Repositories (1)

slimserver
4 snippets stored for this repo
# Yep. this is horrific. Basically what's happening here is that
# (with good reason) DBIx::Class::Schema copies the result source for
# registration. Because we have a retarded setup order forced on us we need
# to actually make our ->result_source_instance -be- the source used, and we
# need to get the source name and schema into ourselves. So this makes it
# happen.
sub loadContainer {
	my $args = shift;

	# Retarded servers such as Windows Media Connect require a certain order of XML elements (!)
	tie my %args, 'Tie::LLHash', (
		udn            => $args->{udn},
		service        => 'urn:schemas-upnp-org:service:ContentDirectory:1',
Perl IconPerl
#      # we don't give a shit. no, we do, but we can't. no...#d#
#      # we, we... have to use openssl :/#d#
# So it looks like we will have to switch some stuff around.
  # local() is useless here as we will be leaving the scope
  # anyway, and deep cloning is just too fucking expensive
  # So replace the inner hashref manually
  my @new_from = ($from->[0]);
  my $sw_idx = { map { $_ => 1 } @$switch_branch };