PDA

View Full Version : [Slim-Checkins] r3719 - trunk/server/Slim/Formats



Triode
2005-07-16, 01:17
Does this work if the parsed entries are remote urls?

----- Original Message -----
From: <kdf (AT) svn (DOT) slimdevices.com>
To: <checkins (AT) lists (DOT) slimdevices.com>
Sent: Saturday, July 16, 2005 6:23 AM
Subject: [Slim-Checkins] r3719 - trunk/server/Slim/Formats


> Author: kdf
> Date: 2005-07-15 22:23:21 -0700 (Fri, 15 Jul 2005)
> New Revision: 3719
>
> Modified:
> trunk/server/Slim/Formats/Parse.pm
> Log:
> Bug: 1735
> Description: some playlists may contain references to files that do no exist within the slimserver frame of reference. If a file
> does not exist, or is not readable, then the server will not proceed to updateOrCreate. This applies to .PLS, .M3U, .WPL and .ASX
>
>
>
> Modified: trunk/server/Slim/Formats/Parse.pm
> ================================================== =================
> --- trunk/server/Slim/Formats/Parse.pm 2005-07-16 00:48:37 UTC (rev 3718)
> +++ trunk/server/Slim/Formats/Parse.pm 2005-07-16 05:23:21 UTC (rev 3719)
> @@ -147,6 +147,7 @@
> $entry =~ s|$LF||g;
>
> $entry = Slim::Utils::Misc::fixPath($entry, $m3udir, $donttranslate);
> + next unless -r $entry;
>
> $::d_parse && Slim::Utils::Misc::msg(" entry: $entry\n");
>
> @@ -202,7 +203,8 @@
> next unless defined $urls[$i];
>
> my $entry = Slim::Utils::Misc::fixPath($urls[$i]);
> -
> + next unless -r $entry;
> +
> push @items, _updateMetaData($entry, $titles[$i]);
> }
>
> @@ -630,10 +632,10 @@
> $::d_parse && Slim::Utils::Misc::msg(" entry from file: $entry\n");
>
> $entry = Slim::Utils::Misc::fixPath($entry, $wpldir);
> -
> +
> $::d_parse && Slim::Utils::Misc::msg(" entry: $entry\n");
>
> - push @items, _updateMetaData($entry, undef);
> + push @items, _updateMetaData($entry, undef) if -r $entry;
> }
> }
>
> @@ -781,7 +783,7 @@
> if (defined($path)) {
> $path = Slim::Utils::Misc::fixPath($path, $asxdir);
>
> - push @items, _updateMetaData($path, $title);
> + push @items, _updateMetaData($path, $title) if -r $entry;
> }
> }
> }
>
>

kdf
2005-07-16, 01:47
depends on what you mean by work.

kdf
2005-07-16, 01:52
Did we start adding remote urls to the database at some point? _updateMetaData is really only doing that. are you having any problems with playlists as a result?

Triode
2005-07-16, 02:03
I think we need to push the remote urls onto $items otherwise playlists containing remote urls won't result in them playing...?

I've not tried it (yet), but would definately expect asx to parse as a playlist and extract the mms: urls for instance. Same true
for other playlist formats containing abitary remote urls.

[my question was really will -r fail on a remote url - if so should it only do this for local files?]

Adrian
----- Original Message -----
From: "kdf" <kdf.1s98hn (AT) no-mx (DOT) forums.slimdevices.com>
To: <developers (AT) lists (DOT) slimdevices.com>
Sent: Saturday, July 16, 2005 9:52 AM
Subject: [Developers] Re: [Slim-Checkins] r3719 - trunk/server/Slim/Formats


>
> Did we start adding remote urls to the database at some point?
> _updateMetaData is really only doing that. are you having any problems
> with playlists as a result?
>
>
> --
> kdf
>

kdf
2005-07-16, 02:18
how about this instead?
(Slim::Music::Info::isRemoteURL($entry) || -r $entry)

Triode
2005-07-16, 02:28
Yes I think that would work.

BTW - for asx, you may want to add the equivalent for the v 1 and 2 cases

Adrian
----- Original Message -----
From: "kdf" <kdf.1s99nb (AT) no-mx (DOT) forums.slimdevices.com>
To: <developers (AT) lists (DOT) slimdevices.com>
Sent: Saturday, July 16, 2005 10:18 AM
Subject: [Developers] Re: [Slim-Checkins] r3719 - trunk/server/Slim/Formats


>
> how about this instead?
> (Slim::Music::Info::isRemoteURL($entry) || -r $entry)
>
>
> --
> kdf
>

kdf
2005-07-16, 02:41
right, good point :)

I'll merge something in shortly. If you could do me a favour and give it a test run after updating, I'd appreciate it. My ISP is offline, so its playing havok with slimserver. it doesn't like failed dns lookups. I'm only online thanks to a plethora of open AP's in my area
-kdf

Triode
2005-07-16, 03:23
Kdf,

Found minor typo in asx v3 case & committed fix. In doing so verified that revised version works!

Looks good otherwise.

Adrian
----- Original Message -----
From: "kdf" <kdf.1s9asz (AT) no-mx (DOT) forums.slimdevices.com>
To: <developers (AT) lists (DOT) slimdevices.com>
Sent: Saturday, July 16, 2005 10:41 AM
Subject: [Developers] Re: [Slim-Checkins] r3719 - trunk/server/Slim/Formats


>
> right, good point :)
>
> I'll merge something in shortly. If you could do me a favour and give
> it a test run after updating, I'd appreciate it. My ISP is offline, so
> its playing havok with slimserver. it doesn't like failed dns lookups.
> I'm only online thanks to a plethora of open AP's in my area
> -kdf
>
>
> --
> kdf
>

kdf
2005-07-16, 11:58
Quoting Triode <triode1 (AT) btinternet (DOT) com>:

> Kdf,
>
> Found minor typo in asx v3 case & committed fix. In doing so verified that
> revised version works!

thanks, mate!
-k