PDA

View Full Version : Dynamic Playlist/SugarCube, Alarm,or MediaFly problem?



Philip Meyer
2009-03-04, 02:33
I have an alarm scheduled to play a Dynamic Playlist that uses SugarCube. This morning, it didn't play anything. The screen flashed the current date/time, and I pressed a key and the screen just reported that it was playing Dynamic Playlist SugarCube.

When the MIS screensaver kicked in, it appeared that it was playing "NewsPod 02 March", which was a MediaFly episode I had played a couple of days ago. I think that perhaps DynamicPlaylist/SugarCube chose it as a random initial song, but couldn't actually play it because it doesn't exist?

Alternatively, perhaps this was selected from the backup alarm processing. I think it's meant to check nn seconds after the alarm is kicked off, that music is playing. If it is not playing, it plays something random.

When MediaFly episodes are played, they are removed from your list of items from your account on their server, so you can't play them again.
It appears that everything ever played in SC ends up in the database, even MediaFly stuff that cannot be replayed. There's no point storing these urls in the DB, because they will not play a second time (unless mediafly account is configured to not delete after 0% play progress).

I guess that Dynamic Playlist/SugarCube and the backup alarm processing should only select random local music (ignore non file:/// urls, or where remote <> 1).

I picked up some trace, but it doesn't seem to make much sense. The first time indicates that SugarCube couldn't find a track, but doesn't say what. There are two players involved in this log. "Bedroom" plays the Dynamic Playlist/SugarCube alarm (starts at 7:00am), whilst "Boom - Study" plays a fixed LBC973 Radio station url as an alarm (starts at 7:00am too). The log doesn't seem to show much about the Bedroom player, just LBC (which did play correctly on the Boom).


[07:00:10.2187] Plugins::SugarCube::Plugin::getNextDynamicPlayList Tracks (1080) Couldn't find track for:
[07:00:10.6118] Slim::Schema::updateOrCreate (1136) Merging entry for http://mediasrv.musicradio.com/LBC973 readTags is: [0]
[07:00:10.6130] Slim::Schema::updateOrCreate (1157) Updating http://mediasrv.musicradio.com/LBC973 : year to 0
[07:00:10.6142] Slim::Schema::updateOrCreate (1157) Updating http://mediasrv.musicradio.com/LBC973 : remote to 1
[07:00:11.0657] Slim::Schema::updateOrCreate (1136) Merging entry for clientplaylist://00:04:20:06:38:3c readTags is: [0]
[07:00:11.0669] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:06:38:3c : title to Now Playing - Bedroom
[07:00:11.0679] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:06:38:3c : year to 0
[07:00:11.0688] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:06:38:3c : content_type to cpl
[07:00:11.0702] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:06:38:3c : remote to 0
[07:00:11.0714] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:06:38:3c : titlesearch to NOW PLAYING BEDROOM
[07:00:11.0724] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:06:38:3c : titlesort to NOW PLAYING BEDROOM
[07:00:11.2973] Slim::Music::Info::setContentType (270) Content-Type for http://mediasrv.musicradio.com/LBC973 is cached as asx
[07:00:11.3067] Slim::Schema::updateOrCreate (1136) Merging entry for http://mediasrv.musicradio.com/LBC973 readTags is: [0]
[07:00:11.3077] Slim::Schema::updateOrCreate (1157) Updating http://mediasrv.musicradio.com/LBC973 : year to 0
[07:00:11.3087] Slim::Schema::updateOrCreate (1157) Updating http://mediasrv.musicradio.com/LBC973 : content_type to asx
[07:00:11.3095] Slim::Schema::updateOrCreate (1157) Updating http://mediasrv.musicradio.com/LBC973 : remote to 1
[07:00:11.7701] Slim::Schema::updateOrCreate (1136) Merging entry for mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf readTags is: [0]
[07:00:11.7717] Slim::Schema::updateOrCreate (1157) Updating mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf : year to 0
[07:00:11.7728] Slim::Schema::updateOrCreate (1157) Updating mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf : remote to 1
[07:00:11.8129] Slim::Schema::updateOrCreate (1136) Merging entry for mms://81.20.48.50:80/LBC973?MSWMExt=.asf readTags is: [0]
[07:00:11.8139] Slim::Schema::updateOrCreate (1157) Updating mms://81.20.48.50:80/LBC973?MSWMExt=.asf : year to 0
[07:00:11.8149] Slim::Schema::updateOrCreate (1157) Updating mms://81.20.48.50:80/LBC973?MSWMExt=.asf : remote to 1
[07:00:14.4002] Slim::Schema::updateOrCreate (1136) Merging entry for clientplaylist://00:04:20:06:38:3c readTags is: [0]
[07:00:14.4013] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:06:38:3c : title to Now Playing - Bedroom
[07:00:14.4023] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:06:38:3c : year to 0
[07:00:14.4032] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:06:38:3c : content_type to cpl
[07:00:14.4040] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:06:38:3c : remote to 0
[07:00:14.4049] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:06:38:3c : titlesearch to NOW PLAYING BEDROOM
[07:00:14.4059] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:06:38:3c : titlesort to NOW PLAYING BEDROOM
[07:00:14.4590] Slim::Music::Info::setContentType (270) Content-Type for mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf is cached as wma
[07:00:14.4682] Slim::Schema::updateOrCreate (1136) Merging entry for mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf readTags is: [0]
[07:00:14.4692] Slim::Schema::updateOrCreate (1157) Updating mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf : year to 0
[07:00:14.4702] Slim::Schema::updateOrCreate (1157) Updating mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf : content_type to wma
[07:00:14.4711] Slim::Schema::updateOrCreate (1157) Updating mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf : remote to 1
[07:00:14.6403] Slim::Schema::updateOrCreate (1136) Merging entry for file:///M:/Music/Slimserver/Playlists/TrackStat%20Played.m3u readTags is: [0]
[07:00:14.6414] Slim::Schema::updateOrCreate (1157) Updating file:///M:/Music/Slimserver/Playlists/TrackStat%20Played.m3u : title to TrackStat Played
[07:00:14.6427] Slim::Schema::updateOrCreate (1157) Updating file:///M:/Music/Slimserver/Playlists/TrackStat%20Played.m3u : year to 0
[07:00:14.6439] Slim::Schema::updateOrCreate (1157) Updating file:///M:/Music/Slimserver/Playlists/TrackStat%20Played.m3u : content_type to ssp
[07:00:14.6448] Slim::Schema::updateOrCreate (1157) Updating file:///M:/Music/Slimserver/Playlists/TrackStat%20Played.m3u : remote to 0
[07:00:14.6457] Slim::Schema::updateOrCreate (1157) Updating file:///M:/Music/Slimserver/Playlists/TrackStat%20Played.m3u : titlesearch to TRACKSTAT PLAYED
[07:00:14.6467] Slim::Schema::updateOrCreate (1157) Updating file:///M:/Music/Slimserver/Playlists/TrackStat%20Played.m3u : titlesort to TRACKSTAT PLAYED
[07:00:15.8752] Slim::Schema::updateOrCreate (1136) Merging entry for mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf readTags is: [1]
[07:00:15.8759] Slim::Schema::updateOrCreate (1157) Updating mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf : year to 0
[07:00:15.8764] Slim::Schema::updateOrCreate (1157) Updating mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf : bitrate to 128703
[07:00:15.8769] Slim::Schema::updateOrCreate (1157) Updating mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf : remote to 1
[07:00:16.0372] Slim::Schema::updateOrCreate (1136) Merging entry for http://mediasrv.musicradio.com/LBC973 readTags is: [1]
[07:00:16.0383] Slim::Schema::updateOrCreate (1157) Updating http://mediasrv.musicradio.com/LBC973 : year to 0
[07:00:16.0393] Slim::Schema::updateOrCreate (1157) Updating http://mediasrv.musicradio.com/LBC973 : bitrate to 128703
[07:00:16.0401] Slim::Schema::updateOrCreate (1157) Updating http://mediasrv.musicradio.com/LBC973 : remote to 1
[07:00:16.0558] Slim::Music::Info::setTitle (300) Adding title mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf for http://mediasrv.musicradio.com/LBC973
[07:00:16.0655] Slim::Schema::updateOrCreate (1136) Merging entry for http://mediasrv.musicradio.com/LBC973 readTags is: [0]
[07:00:16.0667] Slim::Schema::updateOrCreate (1157) Updating http://mediasrv.musicradio.com/LBC973 : title to mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf
[07:00:16.0680] Slim::Schema::updateOrCreate (1157) Updating http://mediasrv.musicradio.com/LBC973 : year to 0
[07:00:16.0690] Slim::Schema::updateOrCreate (1157) Updating http://mediasrv.musicradio.com/LBC973 : remote to 1
[07:00:16.0700] Slim::Schema::updateOrCreate (1157) Updating http://mediasrv.musicradio.com/LBC973 : titlesearch to MMS MEDIASRV MUSICRADIO COM LBC973 MSWMEXT ASF
[07:00:16.0710] Slim::Schema::updateOrCreate (1157) Updating http://mediasrv.musicradio.com/LBC973 : titlesort to MMS MEDIASRV MUSICRADIO COM LBC973 MSWMEXT ASF
[07:00:16.4066] Slim::Schema::updateOrCreate (1136) Merging entry for mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf readTags is: [1]
[07:00:16.4077] Slim::Schema::updateOrCreate (1157) Updating mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf : year to 0
[07:00:16.4087] Slim::Schema::updateOrCreate (1157) Updating mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf : bitrate to 128000
[07:00:16.4096] Slim::Schema::updateOrCreate (1157) Updating mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf : remote to 1
[07:00:16.4865] Slim::Music::Info::setContentType (270) Content-Type for mms://81.20.48.50:80/LBC973?MSWMExt=.asf is cached as wma
[07:00:16.4972] Slim::Schema::updateOrCreate (1136) Merging entry for mms://81.20.48.50:80/LBC973?MSWMExt=.asf readTags is: [0]
[07:00:16.4983] Slim::Schema::updateOrCreate (1157) Updating mms://81.20.48.50:80/LBC973?MSWMExt=.asf : year to 0
[07:00:16.4993] Slim::Schema::updateOrCreate (1157) Updating mms://81.20.48.50:80/LBC973?MSWMExt=.asf : content_type to wma
[07:00:16.5002] Slim::Schema::updateOrCreate (1157) Updating mms://81.20.48.50:80/LBC973?MSWMExt=.asf : remote to 1
[07:00:16.6235] Slim::Schema::updateOrCreate (1136) Merging entry for clientplaylist://00:04:20:1e:02:28 readTags is: [0]
[07:00:16.6249] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:1e:02:28 : title to Now Playing - Study Boom
[07:00:16.6259] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:1e:02:28 : year to 0
[07:00:16.6269] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:1e:02:28 : content_type to cpl
[07:00:16.6278] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:1e:02:28 : remote to 0
[07:00:16.6287] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:1e:02:28 : titlesearch to NOW PLAYING STUDY BOOM
[07:00:16.6297] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:1e:02:28 : titlesort to NOW PLAYING STUDY BOOM
[07:00:16.6614] Slim::Music::Info::setContentType (270) Content-Type for mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf is cached as wma
[07:00:16.6666] Slim::Schema::updateOrCreate (1136) Merging entry for mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf readTags is: [0]
[07:00:16.6672] Slim::Schema::updateOrCreate (1157) Updating mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf : year to 0
[07:00:16.6677] Slim::Schema::updateOrCreate (1157) Updating mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf : content_type to wma
[07:00:16.6684] Slim::Schema::updateOrCreate (1157) Updating mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf : remote to 1
[07:00:16.6698] Slim::Schema::forceCommit (1535) Syncing to the database.
[07:00:16.7581] Slim::Schema::updateOrCreate (1136) Merging entry for mms://81.20.48.50:80/LBC973?MSWMExt=.asf readTags is: [1]
[07:00:16.7587] Slim::Schema::updateOrCreate (1157) Updating mms://81.20.48.50:80/LBC973?MSWMExt=.asf : year to 0
[07:00:16.7592] Slim::Schema::updateOrCreate (1157) Updating mms://81.20.48.50:80/LBC973?MSWMExt=.asf : bitrate to 128703
[07:00:16.7596] Slim::Schema::updateOrCreate (1157) Updating mms://81.20.48.50:80/LBC973?MSWMExt=.asf : remote to 1
[07:00:16.9109] Slim::Schema::updateOrCreate (1136) Merging entry for clientplaylist://00:04:20:1e:02:28 readTags is: [0]
[07:00:16.9115] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:1e:02:28 : title to Now Playing - Study Boom
[07:00:16.9120] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:1e:02:28 : year to 0
[07:00:16.9125] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:1e:02:28 : content_type to cpl
[07:00:16.9129] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:1e:02:28 : remote to 0
[07:00:16.9133] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:1e:02:28 : titlesearch to NOW PLAYING STUDY BOOM
[07:00:16.9138] Slim::Schema::updateOrCreate (1157) Updating clientplaylist://00:04:20:1e:02:28 : titlesort to NOW PLAYING STUDY BOOM
[07:00:18.8281] Slim::Schema::updateOrCreate (1136) Merging entry for mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf readTags is: [1]
[07:00:18.8292] Slim::Schema::updateOrCreate (1157) Updating mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf : year to 0
[07:00:18.8302] Slim::Schema::updateOrCreate (1157) Updating mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf : bitrate to 128000
[07:00:18.8313] Slim::Schema::updateOrCreate (1157) Updating mms://mediasrv.musicradio.com/LBC973?MSWMExt=.asf : remote to 1
[07:00:20.3461] Slim::Networking::SimpleAsyncHTTP::onError (228) Failed to connect to http://localhost:10002/api/flush (Timed out waiting for data)
[07:00:20.3716] Plugins::TrackStat::MusicMagic::Export::gotErrorVi aHTTP (486) Failure setting Music Magic flush

erland
2009-03-04, 11:31
If you like to try patching, you can try to change this row in the SugarCube Plugin.pm file:


$track = Slim::Schema->rs('Track')->search(undef,{ 'order_by' => \'RAND()'})->single;


To this:


$track = Slim::Schema->rs('Track')->search({'audio'=>1,'remote'=>0},{ 'order_by' => \'RAND()'})->single;

Philip Meyer
2009-03-04, 16:15
>If you like to try patching, you can try to change this row in the
>SugarCube Plugin.pm file:

I made the change. I tried a SugarCube dynamic playlist, clearing playlist, tried again, etc, several times, and it worked each time. Hard to proove that it won't pick an internet radio url from the songs table, but at least the change hasn't done any more harm ;-)

Thanks for the patch - I'll keep monitor the situation over the next few mornings and let you know if I'm sacked for being any later to work ;-)

Phil