Bug 1363 - Problems with iTunes Party Shuffle plugin
: Problems with iTunes Party Shuffle plugin
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Playlists
: 6.1.0
: PC Windows XP
: P2 minor (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-12 13:25 UTC by James Craig
Modified: 2008-08-18 10:54 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Craig 2005-04-12 13:25:30 UTC
In the iTunes Party Shuffle plugin I get a track location from iTunes and queue
it up in the SlimServer playlist using the following line:
Slim::Control::Command::execute( $client, [ 'playlist',	'add',	$trackloc ]);
here's an example $trackloc that I would get from iTunes.
E:\The Chemical Brothers\Singles 93-03 [Bonus Tracks]\01 Not Another Drugstore
[Planet Nin.mp3 
This worked fine in 5.4. In 6.0 it works fine - some of the time. The rest of
the time playback stops. Pressing play restarts playback!
I suspect it doesn't work when there is a  difference between the $trackloc and
 the URL stored in the database from the iTunes XML. For example in the XML the
character '[' is escaped - adding a track containing a '[' always hits this problem.
Here's the location for that file as it appears in iTunes XML
file://localhost/E:/The%20Chemical%20Brothers/Singles%2093-03%20%5BBonus%20Tracks%5D/01%20Not%20Another%20Dru
gstore%20%5BPlanet%20Nin.mp3/
So the question is, am I doing the right thing?
Comment 1 James Craig 2005-04-12 13:28:22 UTC
here's some --d_source --d_info output from when I added the song mentioned above:

2005-04-12 21:13:15.4680 PartyShuffle: open (15 of 15)
2005-04-12 21:13:15.4888 PartyShuffle: got E:\The Chemical Brothers\Singles
93-03 [Bonus Tracks]\01 Not Another Drugstor
e [Planet Nin.mp3 from iTunes
2005-04-12 21:13:15.4998 Converting
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20Not%20A
nother%20Drugstore%20[Planet%20Nin.mp3 to E:\The Chemical Brothers\Singles 93-03
[Bonus Tracks]\01 Not Another Drugstore
 [Planet Nin.mp3
2005-04-12 21:13:15.5021 mp3 file type for
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20
Not%20Another%20Drugstore%20[Planet%20Nin.mp3
2005-04-12 21:13:15.5206 PartyShuffle: added E:\The Chemical Brothers\Singles
93-03 [Bonus Tracks]\01 Not Another Drugst
ore [Planet Nin.mp3 to Slim::Player::SoftSqueeze=ARRAY(0x31cde8c)
2005-04-12 21:13:15.5299 25:81:b0:4a:7c:0d New play mode: play
2005-04-12 21:13:15.5312 25:81:b0:4a:7c:0d: Current playmode: play
2005-04-12 21:13:15.5342 PartyShuffle: Jump +1 (15 of 16)
2005-04-12 21:13:15.5356 Backtrace:

   frame 0: Slim::Player::Source::playmode (/PerlApp/Slim/Control/Command.pm
line 595)
   frame 1: Slim::Control::Command::execute (/PerlApp/Slim/Buttons/Common.pm
line 194)
   frame 2: Slim::Buttons::Common::__ANON__ (/PerlApp/Slim/Hardware/IR.pm line 616)
   frame 3: Slim::Hardware::IR::executeButton (/PerlApp/Slim/Control/Command.pm
line 585)
   frame 4: Slim::Control::Command::execute (/PerlApp/Slim/Hardware/IR.pm line 640)
   frame 5: Slim::Hardware::IR::processCode (/PerlApp/Slim/Hardware/IR.pm line 499)
   frame 6: Slim::Hardware::IR::releaseCode (/PerlApp/Slim/Hardware/IR.pm line 394)
   frame 7: Slim::Hardware::IR::checkRelease (/PerlApp/Slim/Utils/Timers.pm line 62)
   frame 8: Slim::Utils::Timers::checkTimers (slimserver.pl line 595)
   frame 9: main::idle (slimserver.pl line 565)
   frame 10: main::main (slimserver.pl line 61)
   frame 11: PerlSvc::Interactive (perlsvc line 1208)
   frame 12: PerlSvc::_interactive (slimserver.pl line 0)
   frame 13: (eval) (slimserver.pl line 0)

2005-04-12 21:13:15.5435 25:81:b0:4a:7c:0d: Switching to mode play from play
2005-04-12 21:13:15.5442  Already in playmode play : ignoring mode change
2005-04-12 21:13:15.5752 iTunesUpdate: Ignoring play command, assumed redundant...
2005-04-12 21:13:15.5761 *----------------------------
2005-04-12 21:13:15.5771 Play command [Softsqueeze (25:81:b0:4a:7c:0d)]
2005-04-12 21:13:15.5777 *----------------------------
2005-04-12 21:13:15.5783 Ignoring play command, assumed redundant...
2005-04-12 21:13:15.5896 Scanning with 0 import plugins
2005-04-12 21:13:15.7628 We need to send 0 seconds of silence...
2005-04-12 21:13:15.7635 sending 0 bytes of silence
2005-04-12 21:13:16.2869 Got a track starting event
2005-04-12 21:13:16.2877 Song 14 has now started playing
2005-04-12 21:13:16.2910 Song queue is now 14
2005-04-12 21:13:16.2927 Scanning with 0 import plugins
2005-04-12 21:13:20.5848 Backtrace:

   frame 0: Slim::Player::Source::playmode (/PerlApp/Slim/Player/Source.pm line 742)
   frame 1: Slim::Player::Source::jumpto (/PerlApp/Slim/Control/Command.pm line
1205)
   frame 2: Slim::Control::Command::execute (/PerlApp/Slim/Buttons/Common.pm
line 177)
   frame 3: Slim::Buttons::Common::__ANON__ (/PerlApp/Slim/Hardware/IR.pm line 616)
   frame 4: Slim::Hardware::IR::executeButton (/PerlApp/Slim/Control/Command.pm
line 585)
   frame 5: Slim::Control::Command::execute (/PerlApp/Slim/Hardware/IR.pm line 640)
   frame 6: Slim::Hardware::IR::processCode (/PerlApp/Slim/Hardware/IR.pm line 499)
   frame 7: Slim::Hardware::IR::releaseCode (/PerlApp/Slim/Hardware/IR.pm line 394)
   frame 8: Slim::Hardware::IR::checkRelease (/PerlApp/Slim/Utils/Timers.pm line 62)
   frame 9: Slim::Utils::Timers::checkTimers (slimserver.pl line 627)
   frame 10: main::idle (slimserver.pl line 565)
   frame 11: main::main (slimserver.pl line 61)
   frame 12: PerlSvc::Interactive (perlsvc line 1208)
   frame 13: PerlSvc::_interactive (slimserver.pl line 0)
   frame 14: (eval) (slimserver.pl line 0)

2005-04-12 21:13:20.6093 25:81:b0:4a:7c:0d: Switching to mode stop from play
2005-04-12 21:13:20.6101 25:81:b0:4a:7c:0d New play mode: stop
2005-04-12 21:13:20.6107 Stopping and clearing out old chunks for client
25:81:b0:4a:7c:0d
2005-04-12 21:13:20.6158 Resetting song queue
2005-04-12 21:13:20.6165 Song queue is now 14
2005-04-12 21:13:20.6178 25:81:b0:4a:7c:0d: Current playmode: stop
2005-04-12 21:13:20.6185 jumping by +1
2005-04-12 21:13:20.6228 Adding song index 15 to song queue
2005-04-12 21:13:20.6238 Clearing out song queue first
2005-04-12 21:13:20.6245 Song queue is now 15
2005-04-12 21:13:20.6258 Backtrace:

   frame 0: Slim::Player::Source::playmode (/PerlApp/Slim/Player/Source.pm line 772)
   frame 1: Slim::Player::Source::jumpto (/PerlApp/Slim/Control/Command.pm line
1205)
   frame 2: Slim::Control::Command::execute (/PerlApp/Slim/Buttons/Common.pm
line 177)
   frame 3: Slim::Buttons::Common::__ANON__ (/PerlApp/Slim/Hardware/IR.pm line 616)
   frame 4: Slim::Hardware::IR::executeButton (/PerlApp/Slim/Control/Command.pm
line 585)
   frame 5: Slim::Control::Command::execute (/PerlApp/Slim/Hardware/IR.pm line 640)
   frame 6: Slim::Hardware::IR::processCode (/PerlApp/Slim/Hardware/IR.pm line 499)
   frame 7: Slim::Hardware::IR::releaseCode (/PerlApp/Slim/Hardware/IR.pm line 394)
   frame 8: Slim::Hardware::IR::checkRelease (/PerlApp/Slim/Utils/Timers.pm line 62)
   frame 9: Slim::Utils::Timers::checkTimers (slimserver.pl line 627)
   frame 10: main::idle (slimserver.pl line 565)
   frame 11: main::main (slimserver.pl line 61)
   frame 12: PerlSvc::Interactive (perlsvc line 1208)
   frame 13: PerlSvc::_interactive (slimserver.pl line 0)
   frame 14: (eval) (slimserver.pl line 0)

2005-04-12 21:13:20.6334 25:81:b0:4a:7c:0d: Switching to mode play from stop
2005-04-12 21:13:20.6399 openSong on:
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20Not%2
0Another%20Drugstore%20[Planet%20Nin.mp3
2005-04-12 21:13:20.6416 Song is of unrecognized type mp3! Stopping!
file:///E:/The%20Chemical%20Brothers/Singles%2093-0
3%20[Bonus%20Tracks]/01%20Not%20Another%20Drugstore%20[Planet%20Nin.mp3
2005-04-12 21:13:20.6475 New track for
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20Not%
20Another%20Drugstore%20[Planet%20Nin.mp3
2005-04-12 21:13:20.6491 readTag was set for
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%
20Not%20Another%20Drugstore%20[Planet%20Nin.mp3
2005-04-12 21:13:20.6505 reading tags for:
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20
Not%20Another%20Drugstore%20[Planet%20Nin.mp3
2005-04-12 21:13:20.6536 Trying to load Slim::Formats::MP3
2005-04-12 21:13:20.7688 isFile(E:\The Chemical Brothers\Singles 93-03 [Bonus
Tracks]\01 Not Another Drugstore [Planet N
in.mp3) == 1
2005-04-12 21:13:20.8298 Adding
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20Not%20Anoth
er%20Drugstore%20[Planet%20Nin.mp3 : TAG to 1
2005-04-12 21:13:20.8313 Adding
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20Not%20Anoth
er%20Drugstore%20[Planet%20Nin.mp3 : BLOCKALIGN to 1
2005-04-12 21:13:20.8326 Adding
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20Not%20Anoth
er%20Drugstore%20[Planet%20Nin.mp3 : TITLESORT to NOT ANOTHER DRUGSTORE [PLANET
NINE MIX]
2005-04-12 21:13:20.8338 Adding
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20Not%20Anoth
er%20Drugstore%20[Planet%20Nin.mp3 : TRACKNUM to 1
2005-04-12 21:13:20.8354 Adding
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20Not%20Anoth
er%20Drugstore%20[Planet%20Nin.mp3 : TITLE to Not Another Drugstore [Planet Nine
Mix]
2005-04-12 21:13:20.8367 Adding
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20Not%20Anoth
er%20Drugstore%20[Planet%20Nin.mp3 : SIZE to 7138972
2005-04-12 21:13:20.8384 Adding
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20Not%20Anoth
er%20Drugstore%20[Planet%20Nin.mp3 : OFFSET to 2048
2005-04-12 21:13:20.8402 Adding
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20Not%20Anoth
er%20Drugstore%20[Planet%20Nin.mp3 : YEAR to 2003
2005-04-12 21:13:20.8417 Adding
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20Not%20Anoth
er%20Drugstore%20[Planet%20Nin.mp3 : FS to 7141252
2005-04-12 21:13:20.8436 Adding
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20Not%20Anoth
er%20Drugstore%20[Planet%20Nin.mp3 : SECS to 356.9538
2005-04-12 21:13:20.8456 Adding
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20Not%20Anoth
er%20Drugstore%20[Planet%20Nin.mp3 : CT to mp3
2005-04-12 21:13:20.8469 Adding
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20Not%20Anoth
er%20Drugstore%20[Planet%20Nin.mp3 : TAGVERSION to ID3v1.1 / ID3v2.3.0
2005-04-12 21:13:20.8482 Adding
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20Not%20Anoth
er%20Drugstore%20[Planet%20Nin.mp3 : AGE to 1100286301
2005-04-12 21:13:20.8494 Adding
file:///E:/The%20Chemical%20Brothers/Singles%2093-03%20[Bonus%20Tracks]/01%20Not%20Anoth
er%20Drugstore%20[Planet%20Nin.mp3 : BITRATE to 160000
2005-04-12 21:13:21.0136 Couldn't open song.  Stopping.
2005-04-12 21:13:21.0142 opening next song...
Comment 2 Dan Sully 2005-04-12 13:41:05 UTC
James - where can I take a look at your plugin?

Try using Slim::Web::HTTP::escape() first maybe.
Comment 3 James Craig 2005-04-13 00:10:24 UTC
www.jamescraig.co.uk/SlimServer

I've experimented with using the escape function but that seemed to upset
SlimServer quite a bit!

Wondering if I should find the track in the database first - can I pass a 'track
object' to the "playlist, add" function?
Comment 4 James Craig 2005-04-16 08:55:23 UTC
I've finally cracked this!
Needed to just escape the [] brackets - fileURLFromPath had done everything else.
Comment 5 Chris Owens 2008-03-11 11:28:10 UTC
This bug was marked resolved in Slimserver 6.1, which is several versions ago.  If you're still seeing this bug, please re-open it.  Thanks!