Bug 9674 - Fallback ref URLs aren't used in ASX files
: Fallback ref URLs aren't used in ASX files
Status: REOPENED
Product: Logitech Media Server
Classification: Unclassified
Component: Playlists
: 7.2
: PC Other
: P4 normal with 1 vote (vote)
: 8.0.1
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-08 07:21 UTC by Andy Grundman
Modified: 2009-06-09 16:07 UTC (History)
4 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Grundman 2008-10-08 07:21:25 UTC
For example, http://www.omroep.nl/live/radio3-breed.asx
Comment 1 Andy Grundman 2008-10-08 09:34:16 UTC
Fixed in 7.2.1 change 23467.
Comment 2 Spies Steven 2008-10-13 15:48:56 UTC
Verified with SqueezeCenter Version: 7.2.1 - 23502
Comment 3 Mark Ruys 2008-10-31 03:13:03 UTC
I'm afraid the bug isn't fixed. Tested with squeezecenter-7.2.1-1 which includes revision 23467. 

This is my log:

[08-10-31 10:47:48.5998] Slim::Utils::Scanner::Remote::scanURL (180) Scanning remote URL http://www.omroep.nl/radio2/live64.asx
[08-10-31 10:47:48.8546] Slim::Utils::Scanner::Remote::readRemoteHeaders (285) Headers for http://www.omroep.nl/radio2/live64.asx are bless({
  "accept-ranges" => "bytes",
  connection => "close",
  "content-length" => 471,
  "content-type" => "video/x-ms-asf",
  date => "Fri, 31 Oct 2008 09:47:48 GMT",
  etag => "\"162d4f3-1d7-456763738ee71\"",
  "last-modified" => "Tue, 09 Sep 2008 13:07:19 GMT",
  server => "Apache/2.2.9 (Unix)",
  "x-pad" => "avoid browser bug",
}, "HTTP::Headers")
[08-10-31 10:47:48.8550] Slim::Utils::Scanner::Remote::readRemoteHeaders (317) Content-type for http://www.omroep.nl/radio2/live64.asx detected as asx (video/x-ms-asf)
[08-10-31 10:47:48.8554] Slim::Utils::Scanner::Remote::readRemoteHeaders (322) Updating content-type for http://www.omroep.nl/radio2/live64.asx to asx
[08-10-31 10:47:48.8595] Slim::Utils::Scanner::Remote::readRemoteHeaders (405) This URL is a playlist
[08-10-31 10:47:48.8631] Slim::Formats::Playlists::ASX::read (35) Parsing ASX 3.0: IO::String=GLOB(0xe869e80) url: [http://www.omroep.nl/radio2/live64.asx]
[08-10-31 10:47:48.8650] Slim::Formats::Playlists::ASX::read (131) Found an entry: mms://livemedia.omroep.nl/radio2-bb, title Radio 2
[08-10-31 10:47:48.8714] Slim::Formats::Playlists::ASX::read (131) Found an entry: mms://livemedia2.omroep.nl/radio2-bb, title Radio 2
[08-10-31 10:47:48.8778] Slim::Formats::Playlists::ASX::read (196) parsed 2 items out of ASX
[08-10-31 10:47:48.8960] Slim::Utils::Scanner::Remote::parsePlaylist (631) Found 2 items in playlist http://www.omroep.nl/radio2/live64.asx
[08-10-31 10:47:48.8964] Slim::Utils::Scanner::Remote::parsePlaylist (632) mms://livemedia.omroep.nl/radio2-bb
mms://livemedia2.omroep.nl/radio2-bb
[08-10-31 10:47:48.9027] Slim::Player::TranscodingHelper::getConvertCommand (215) undermax = 1, type = wma, squeezebox2 = 00:04:20:05:a6:a2
[08-10-31 10:47:48.9031] Slim::Player::TranscodingHelper::checkBin (152) Checking formats for: wma-wma-squeezebox2-00:04:20:05:a6:a2
[08-10-31 10:47:48.9034] Slim::Player::TranscodingHelper::checkBin (152) Checking formats for: wma-wma-*-00:04:20:05:a6:a2
[08-10-31 10:47:48.9036] Slim::Player::TranscodingHelper::checkBin (152) Checking formats for: wma-wma-squeezebox2-*
[08-10-31 10:47:48.9039] Slim::Player::TranscodingHelper::enabledFormat (119) Checking to see if wma-wma-squeezebox2-* is enabled
[08-10-31 10:47:48.9042] Slim::Player::TranscodingHelper::checkBin (160)    enabled
[08-10-31 10:47:48.9044] Slim::Player::TranscodingHelper::checkBin (162)   Found command: -
[08-10-31 10:47:48.9048] Slim::Player::TranscodingHelper::getConvertCommand (316) Matched Format: wma Type: wma Command: -
[08-10-31 10:47:48.9053] Slim::Utils::Scanner::Remote::scanURL (180) Scanning remote URL mms://livemedia.omroep.nl/radio2-bb
[08-10-31 10:47:48.9132] Slim::Player::TranscodingHelper::getConvertCommand (215) undermax = 1, type = wma, squeezebox2 = 00:04:20:05:a6:a2
[08-10-31 10:47:48.9136] Slim::Player::TranscodingHelper::checkBin (152) Checking formats for: wma-wma-squeezebox2-00:04:20:05:a6:a2
[08-10-31 10:47:48.9139] Slim::Player::TranscodingHelper::checkBin (152) Checking formats for: wma-wma-*-00:04:20:05:a6:a2
[08-10-31 10:47:48.9142] Slim::Player::TranscodingHelper::checkBin (152) Checking formats for: wma-wma-squeezebox2-*
[08-10-31 10:47:48.9144] Slim::Player::TranscodingHelper::enabledFormat (119) Checking to see if wma-wma-squeezebox2-* is enabled
[08-10-31 10:47:48.9147] Slim::Player::TranscodingHelper::checkBin (160)    enabled
[08-10-31 10:47:48.9150] Slim::Player::TranscodingHelper::checkBin (162)   Found command: -
[08-10-31 10:47:48.9154] Slim::Player::TranscodingHelper::getConvertCommand (316) Matched Format: wma Type: wma Command: -
[08-10-31 10:47:48.9158] Slim::Utils::Scanner::Remote::scanURL (180) Scanning remote URL mms://livemedia2.omroep.nl/radio2-bb
[08-10-31 10:47:48.9558] Slim::Utils::Scanner::Remote::__ANON__ (195) Error: Can't connect to remote server to retrieve playlist: 404 Not Found.
[08-10-31 10:47:48.9625] Slim::Utils::Scanner::Remote::readRemoteHeaders (285) Headers for http://livemedia2.omroep.nl/radio2-bb are bless({
  "cache-control" => "no-cache, x-wms-stream-type=\"broadcast\"",
  "content-length" => 4953,
  "content-type" => "application/vnd.ms.wms-hdr.asfv1",
  date => "Fri, 31 Oct 2008 09:47:48 GMT",
  "last-modified" => "Sat, 30 Dec 1899 00:00:00 GMT",
  pragma => "no-cache, client-id=1308482636, xResetStrm=1, features=\"broadcast\"",
  server => "Cougar/9.01.01.3862",
  supported => "com.microsoft.wm.srvppair, com.microsoft.wm.sswitch, com.microsoft.wm.predstrm, com.microsoft.wm.fastcache, com.microsoft.wm.startupprofile",
}, "HTTP::Headers")
[08-10-31 10:47:48.9630] Slim::Utils::Scanner::Remote::readRemoteHeaders (317) Content-type for http://livemedia2.omroep.nl/radio2-bb detected as wma (application/vnd.ms.wms-hdr.asfv1)
[08-10-31 10:47:48.9634] Slim::Utils::Scanner::Remote::readRemoteHeaders (322) Updating content-type for mms://livemedia2.omroep.nl/radio2-bb to wma
[08-10-31 10:47:48.9698] Slim::Utils::Scanner::Remote::readRemoteHeaders (352) This URL is an audio stream
[08-10-31 10:47:48.9702] Slim::Utils::Scanner::Remote::readRemoteHeaders (357) Reading WMA header
[08-10-31 10:47:48.9791] Slim::Utils::Scanner::Remote::parseWMAHeader (457) WMA header data for mms://livemedia2.omroep.nl/radio2-bb: bless({
  BITRATES => { 1 => 128_694 },
  INFO     => {
                bitrate            => "-27241.9021364576",
                bits_per_sample    => 16,
                channels           => 2,
                codec              => "Windows Media Audio V7 / V8 / V9",
                creation_date      => "3494742240",
                creation_date_unix => "-11644473250",
                data_packets       => "4294967295",
                fileid_guid        => "8C9FB8B2-C064-411B-830E-6A354051B153",
                filesize           => 4941,
                flags              => { broadcast => 1, seekable => 0 },
                flags_raw          => 9,
                max_bitrate        => 128_694,
                max_packet_size    => 5493,
                min_packet_size    => 5493,
                play_duration      => 0,
                playtime_seconds   => "-1.451",
                preroll            => 1451,
                sample_rate        => 48_000,
                send_duration      => 0,
              },
  STREAM   => [
                {
                  audio => {
                        bits_per_sample => 16,
                        channels => 2,
                        codec => "Windows Media Audio V7 / V8 / V9",
                        sample_rate => 48_000,
                      },
                  bitrate => 128_694,
                  error_correct_data => "\1V\25V\25\1\0\0",
                  error_correct_guid => "BFC3CD50-618F-11CF-8BB2-00AA00B4E220",
                  error_correct_type => pack("H*","50cdc3bf8f61cf118bb200aa00b4e220"),
                  error_data_length => 8,
                  flags => { encrypted => 0 },
                  flags_raw => 1,
                  streamNumber => 1,
                  stream_type => "\@\x9Ei\xF8M[\xCF\21\xA8\xFD\0\x80_\\D+",
                  stream_type_guid => "F8699E40-5B4D-11CF-A8FD-00805F5C442B",
                  time_offset => 0,
                  type_data_length => 28,
                  type_specific_data => pack("H*","6101020080bb0000823e0000561510000a00008800000f0059550000"),
                },
              ],
  TAGS     => { VBR => 0 },
  offset   => 4861,
  size     => 4941,
}, "Audio::WMA")
[08-10-31 10:47:48.9795] Slim::Utils::Scanner::Remote::parseWMAHeader (489) Available stream: #1, 128 kbps
[08-10-31 10:47:48.9859] Slim::Utils::Scanner::Remote::parseWMAHeader (518) Will play stream #1, bitrate: 128 kbps
[08-10-31 10:47:48.9864] Slim::Utils::Scanner::Remote::__ANON__ (651) Playlist scan of http://www.omroep.nl/radio2/live64.asx finished
[08-10-31 10:47:48.9905] Slim::Schema::Playlist::getNextEntry (133) Considering mms://livemedia.omroep.nl/radio2-bb (wma)
[08-10-31 10:47:48.9910] Slim::Schema::Playlist::getNextEntry (150) Next playlist entry is mms://livemedia.omroep.nl/radio2-bb
[08-10-31 10:47:48.9977] Slim::Utils::Scanner::Remote::__ANON__ (667) Found at least one audio URL in playlist
[08-10-31 10:47:48.9981] Slim::Player::Protocols::HTTP::__ANON__ (430) Remote scan finished for http://www.omroep.nl/radio2/live64.asx
[08-10-31 10:47:48.9985] Slim::Player::Protocols::HTTP::__ANON__ (453) Replacing playlist item 0 with new track object
[08-10-31 10:47:48.9990] Slim::Player::Source::playmode (309) 00:04:20:05:a6:a2: Switching to mode stop from stop
[08-10-31 10:47:48.9993] Slim::Player::Source::playmode (316) Already in playmode stop : ignoring mode change
[08-10-31 10:47:48.9996] Slim::Player::Source::streamingSongIndex (1496) Adding song index 0 to song queue
[08-10-31 10:47:48.9999] Slim::Player::Source::streamingSongIndex (1500) Clearing out song queue first
[08-10-31 10:47:49.0002] Slim::Player::Source::streamingSongIndex (1517) Song queue is now 0
[08-10-31 10:47:49.0008] Slim::Player::Source::playmode (309) 00:04:20:05:a6:a2: Switching to mode play from stop
[08-10-31 10:47:49.0014] Slim::Player::Source::resetSong (1741) Resetting song buffer.
[08-10-31 10:47:49.0049] Slim::Player::Source::openSong (1845) Trying to open: http://www.omroep.nl/radio2/live64.asx
[08-10-31 10:47:49.0123] Slim::Schema::Playlist::getNextEntry (133) Considering mms://livemedia.omroep.nl/radio2-bb (wma)
[08-10-31 10:47:49.0127] Slim::Schema::Playlist::getNextEntry (150) Next playlist entry is mms://livemedia.omroep.nl/radio2-bb
[08-10-31 10:47:49.0132] Slim::Player::Source::openSong (1875) Handler returned alternate track mms://livemedia.omroep.nl/radio2-bb
[08-10-31 10:47:49.0137] Slim::Player::TranscodingHelper::getConvertCommand (215) undermax = 1, type = wma, squeezebox2 = 00:04:20:05:a6:a2
[08-10-31 10:47:49.0140] Slim::Player::TranscodingHelper::checkBin (152) Checking formats for: wma-wma-squeezebox2-00:04:20:05:a6:a2
[08-10-31 10:47:49.0143] Slim::Player::TranscodingHelper::checkBin (152) Checking formats for: wma-wma-*-00:04:20:05:a6:a2
[08-10-31 10:47:49.0146] Slim::Player::TranscodingHelper::checkBin (152) Checking formats for: wma-wma-squeezebox2-*
[08-10-31 10:47:49.0148] Slim::Player::TranscodingHelper::enabledFormat (119) Checking to see if wma-wma-squeezebox2-* is enabled
[08-10-31 10:47:49.0151] Slim::Player::TranscodingHelper::checkBin (160)    enabled
[08-10-31 10:47:49.0154] Slim::Player::TranscodingHelper::checkBin (162)   Found command: -
[08-10-31 10:47:49.0157] Slim::Player::TranscodingHelper::getConvertCommand (316) Matched Format: wma Type: wma Command: -
[08-10-31 10:47:49.0160] Slim::Player::Source::openSong (1881) URL supports direct streaming [mms://livemedia.omroep.nl/radio2-bb]
[08-10-31 10:47:49.0192] Slim::Player::Source::playmode (412) 00:04:20:05:a6:a2 New play mode: play
[08-10-31 10:47:49.0243] Slim::Player::TranscodingHelper::getConvertCommand (215) undermax = 1, type = wma, squeezebox2 = 00:04:20:05:a6:a2
[08-10-31 10:47:49.0246] Slim::Player::TranscodingHelper::checkBin (152) Checking formats for: wma-wma-squeezebox2-00:04:20:05:a6:a2
[08-10-31 10:47:49.0249] Slim::Player::TranscodingHelper::checkBin (152) Checking formats for: wma-wma-*-00:04:20:05:a6:a2
[08-10-31 10:47:49.0252] Slim::Player::TranscodingHelper::checkBin (152) Checking formats for: wma-wma-squeezebox2-*
[08-10-31 10:47:49.0255] Slim::Player::TranscodingHelper::enabledFormat (119) Checking to see if wma-wma-squeezebox2-* is enabled
[08-10-31 10:47:49.0257] Slim::Player::TranscodingHelper::checkBin (160)    enabled
[08-10-31 10:47:49.0260] Slim::Player::TranscodingHelper::checkBin (162)   Found command: -
[08-10-31 10:47:49.0263] Slim::Player::TranscodingHelper::getConvertCommand (316) Matched Format: wma Type: wma Command: -
[08-10-31 10:47:49.0303] Slim::Player::Source::playmode (581) 00:04:20:05:a6:a2: Current playmode: play
[08-10-31 10:47:49.0595] Slim::Player::Source::errorOpening (1756) Error: While opening current track, so mark it as already played!
[08-10-31 10:47:49.0599] Slim::Player::Source::errorOpening (1756) Backtrace:

   frame 0: Slim::Utils::Log::logBacktrace (/usr/lib/perl5/vendor_perl/Slim/Player/Source.pm line 1756)
   frame 1: Slim::Player::Source::errorOpening (/usr/lib/perl5/vendor_perl/Slim/Player/Squeezebox2.pm line 646)
   frame 2: Slim::Player::Squeezebox2::failedDirectStream (/usr/lib/perl5/vendor_perl/Slim/Player/Squeezebox2.pm line 378)
   frame 3: Slim::Player::Squeezebox2::directHeaders (/usr/lib/perl5/vendor_perl/Slim/Networking/Slimproto.pm line 571)
   frame 4: Slim::Networking::Slimproto::_http_response_handler (/usr/lib/perl5/vendor_perl/Slim/Networking/Slimproto.pm line 421)
   frame 5: Slim::Networking::Slimproto::client_readable (/usr/lib/perl5/vendor_perl/Slim/Networking/IO/Select.pm line 248)
   frame 6: (eval) (/usr/lib/perl5/vendor_perl/Slim/Networking/IO/Select.pm line 248)
   frame 7: Slim::Networking::IO::Select::select (/usr/libexec/squeezecenter-server line 531)
   frame 8: main::idle (/usr/libexec/squeezecenter-server line 481)
   frame 9: main::main (/usr/libexec/squeezecenter-server line 1043)

[08-10-31 10:47:49.0609] Slim::Player::Source::playmode (309) 00:04:20:05:a6:a2: Switching to mode stop from playout-stop
[08-10-31 10:47:49.0617] Slim::Player::Source::playmode (412) 00:04:20:05:a6:a2 New play mode: stop
[08-10-31 10:47:49.0622] Slim::Player::Source::playmode (461) 00:04:20:05:a6:a2: Stopping and clearing out old chunks
[08-10-31 10:47:49.0633] Slim::Player::Source::resetSong (1741) Resetting song buffer.
[08-10-31 10:47:49.0637] Slim::Player::Source::resetSongQueue (1570) Resetting song queue
[08-10-31 10:47:49.0640] Slim::Player::Source::resetSongQueue (1580) Song queue is now 0
[08-10-31 10:47:49.0647] Slim::Player::Source::playmode (581) 00:04:20:05:a6:a2: Current playmode: stop
[08-10-31 10:47:49.0672] Slim::Player::Source::playmode (309) 00:04:20:05:a6:a2: Switching to mode stop from stop
[08-10-31 10:47:49.0675] Slim::Player::Source::playmode (316) Already in playmode stop : ignoring mode change
Comment 4 Bryan Alton 2008-12-10 09:03:51 UTC
The fix also has a side effect on some ASX which results in non-stop playing of the same URL. When URL is finished it just starts again even with repeat off.  This problem did not happen in 7.1

If the entry has two URLS one mms and one http - these are effectively the same and only one should be played.  When SC plays them - I think it treats them as the same URL and gets confused thinking the track has not been played. 
Example URL from NPR will show this problem when played using Tune-in
http://thin.npr.org/dmg.wax?mediaUrl=/npr/me/2008/12/20081210_me_01&mediaPref=WM

The ASX file from NPR of the above URL:
<asx version = "3.0">
<title>NPR Audio</title>
<abstract>more info at NPR.org</abstract>
<moreinfo href="http://www.npr.org/" />
<entry>
<copyright>(c) 2008 NPR</copyright>
<ref href="mms://wm.npr.org/wm.npr.na-central/npr/me/2008/12/20081210_me_01.wma?v1st=&mt=7" />
<ref href="http://wm.npr.org/wm.npr.na-central/npr/me/2008/12/20081210_me_01.wma?v1st=&mt=7" />
</entry>

</asx>
Comment 5 Bryan Alton 2008-12-10 13:13:14 UTC
Ignore my previous comment - the source of the non-stop playing is not the bug fix.
Comment 6 Bryan Alton 2008-12-10 14:41:23 UTC
I was right the first time.  The example ASX in my earlier comment has 2 URL which are identical except mms and http. The processing of ASX.pm results in a playlist with two identical mms URLs - which seems to confuse SC as it nevers stop playing the URLs (this is a separate bug).  The patch below removes duplicate URLs from the items list - it is not a great fix but it stop the non stop playing. 


Index: Slim/Formats/Playlists/ASX.pm
===================================================================
--- Slim/Formats/Playlists/ASX.pm       (revision 24273)
+++ Slim/Formats/Playlists/ASX.pm       (working copy)
@@ -108,7 +108,8 @@
                                }
                        }
                }
-
+
+               my %seenhref = ();
                for my $entry ( @entries ) {

                        my $title = $entry->{title};
@@ -127,6 +128,8 @@
                        # 'ref' tags should refer to audio content, so we need to force
                        # the use of the MMS protocol handler by making sure the URI starts with mms
                        $href =~ s/^http/mms/;
+                       next if defined ($seenhref{$href}) ;
+                       $seenhref{$href} = 1;

                        $log->info("Found an entry: $href, title $title");
Comment 7 Bryan Alton 2009-01-08 01:44:10 UTC
Patch to remove duplicates applied in change 24453
Comment 8 Chris Owens 2009-03-16 09:38:10 UTC
We are now planning to make a 7.3.3 release.  Please review your bugs (all marked open against 7.3.3) to see if they can be fixed in the next few weeks, or if they should be retargeted for 7.4 or future.

Thanks!
Comment 9 Chris Owens 2009-03-30 17:30:30 UTC
Since there's now a planned 7.3.3 release, bugs which won't make the cut-off are being moved to the next target out.  If you feel that this bug needs to be addressed more (or less) urgently than the 7.4 release, please cc chris@slimdevices.com and leave a comment in the bug to that effect so we can review it.

Thanks.
Comment 10 Chris Owens 2009-03-31 08:52:53 UTC
For some reason Bugzilla did not change the target when I did this yesterday.  Or maybe it was me.  In either case, I'm trying it again.