Bug 2043 - Interface with StationPlaylist (automatic playlister)
: Interface with StationPlaylist (automatic playlister)
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Plugin
: 6.2.0
: PC All
: P2 enhancement (vote)
: Future
Assigned To: KDF
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-31 05:06 UTC by jean-guillaume
Modified: 2008-12-15 13:07 UTC (History)
0 users

See Also:
Category: ---


Attachments
basic functions in a plugin (5.06 KB, text/plain)
2005-08-31 17:46 UTC, KDF
Details
update to use 2-digit numbering (5.12 KB, text/plain)
2005-09-03 16:23 UTC, KDF
Details
my playlist (2.84 KB, text/plain)
2005-09-05 00:10 UTC, jean-guillaume
Details
use numeric months, and convert current playlist name for compare. (5.51 KB, text/plain)
2005-09-05 10:48 UTC, KDF
Details
get rid of backtrack on startup (5.55 KB, text/plain)
2005-09-05 11:03 UTC, KDF
Details
client based settings (5.54 KB, text/plain)
2005-09-05 11:43 UTC, KDF
Details
increment outside of the loop (5.53 KB, text/plain)
2005-09-05 12:47 UTC, KDF
Details
more stuff moved outside the client loop (5.43 KB, patch)
2005-09-05 19:37 UTC, KDF
Details | Diff
use the file URL for the playlist load command (5.46 KB, text/plain)
2005-09-06 11:01 UTC, KDF
Details
V0.4 for use with 6.5 (5.71 KB, text/plain)
2006-08-15 16:52 UTC, KDF
Details
V0.5 for 6.5 (5.71 KB, text/plain)
2006-08-15 17:06 UTC, KDF
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jean-guillaume 2005-08-31 05:06:31 UTC
Hello
There is a very complete tool to make intelligent & automatic playlists: 
Station Playlist Creator, from www.stationplaylist.com
It makes playlists with this format: MonthDay-Hour.m3u

It would be very interesting that the slimserver automatically loads those 
playlists (at the right day/time of course).

Greetings
Comment 1 KDF 2005-08-31 17:46:40 UTC
Created attachment 785 [details]
basic functions in a plugin

save this as StationPlaylist.pm in the Plugins folder and restart the server. 
It should now give you a place to enter the playlist directory (server
settings->plugins) and then hopefully load as needed. Each client will need to
turn on the loader, but will set a server pref so you only have to do it once. 
Do this via the player UI, Plugins->Station Playlist, then press PLAY. Turning
off the loader will require the same steps
Comment 2 jean-guillaume 2005-08-31 23:36:50 UTC
Hello
That sounds great !
But ... the plugin is not loaded, and doesn't appear in plugin list. I 
put "stationplaylist.pm" file in plugins folder, restarted... but nothing in 
slimserver :(
I should have missed something, but what ?
thank you for help !
Comment 3 jean-guillaume 2005-08-31 23:46:10 UTC
oops, ok, it's case sensitive! 
sorry for stupidity !
Comment 4 KDF 2005-08-31 23:47:24 UTC
file naming is case sensitive.  It MUST be StationPlaylist.pm, not
stationplaylist.pm.  To look for other types of errors, open a command prompt
window:

start->programs->accessories->command prompt

cd "\program files\slimserver\server\"
slim.exe --d_plugins

then the window will be filled with messages as the server loads the plugins. 
you will see any errors reported there.  

However, from what you have mentioned here, I would expect the file naming
should be enough.
Comment 5 KDF 2005-08-31 23:48:21 UTC
cool.  try it out, see if if does what you need.
Comment 6 jean-guillaume 2005-09-01 00:11:25 UTC
I'm just trying, and there's a problem ..
Slimserver is shutted down after a few seconds (about 15) just after 
loading. "slim.exe" process is killed.

I tried the debug function and I had thoses lines:

C:\Program Files\SlimServer\server>slim.exe --d_plugins
2005-09-01 09:08:23.7659 BROWSE_MUSIC does not exist. creating...
2005-09-01 09:08:23.7678 Registering screensaver Now Playing (Jump back
)
2005-09-01 09:08:23.7682 Registering screensaver None
2005-09-01 09:08:27.3779 Requiring Plugins::StationPlaylist plugin.
2005-09-01 09:08:27.3881 PLUGINS does not exist. creating...
Can't locate object method "prefGet" via package "Slim::Player::Squeeze
C:/Program Files/SlimServer/server/Plugins/StationPlaylist.pm line 90.

Comment 7 jean-guillaume 2005-09-02 12:58:02 UTC
No idea ? :(
Comment 8 Blackketter Dean 2005-09-02 13:07:19 UTC
Which version of SlimServer are you running?  That plugin may require a more current 6.2 pre-release 
nightly build.
Comment 9 jean-guillaume 2005-09-02 13:11:44 UTC
Well hmm..
I'm running 6.1.1 Version
I will retry with the new version in a few minutes...
Thank you !
Comment 10 jean-guillaume 2005-09-02 13:32:01 UTC
I can't run this last pre-release version.
I have this error (when trying in a DOS command prompt) :
DBD::SQLite::db prepare_cached failed: no such column: contributors(1) at dbdimp
.c line 268 at /PerlApp/Ima/DBI.pm line 391.
Comment 11 KDF 2005-09-02 18:46:42 UTC
oh yeah, sorry.  the plugin is written based on the latest 6.2.0 nightly build.
 you may need to erase the slimserversql.db file and let the server rescan (lot
of upgrades from 6.1.1 and the path isn't as stable as it could be)
Comment 12 jean-guillaume 2005-09-03 02:16:13 UTC
Ok, thank you for answer
I've ran the server, setup "station playlist ON" on squeezebox and setup 
playlist folder.
I have playlists (september03-10.m3u ; september03-11.m3u) in this folder.
But nothing happens ... :s
Comment 13 jean-guillaume 2005-09-03 04:21:28 UTC
EDIT:
I have some lines like that in command prompt (with --d_plugins)


2005-09-03 13:00:06.4198 StationPlaylist: checking for C:\playlists\September3-1
3.m3u, current is:

at regular intervals (one minute)
But nothing else ...
Comment 14 KDF 2005-09-03 12:17:59 UTC
d'oh.  two-digit day :)
I didn't think of that one.
Comment 15 KDF 2005-09-03 16:23:09 UTC
Created attachment 793 [details]
update to use 2-digit numbering

this should force 2-digit numbering for day and hour, so playlists must match
September04-09.m3u for a 9am sept 4 trigger
Comment 16 jean-guillaume 2005-09-04 11:39:38 UTC
That's better ;)
But ... no sound yet :(
I have thoses messages:

2005-09-04 20:30:01.2505 StationPlaylist: checking for C:\playlists\September04-
20.m3u, current is: file:///C:/playlists/September04-20.m3u
2005-09-04 20:30:03.2658 StationPlaylist: loading C:\playlists\September04-20.m3
u

The squeezebox is playing nothing !
I guess it's a problem with m3u format.
Slimserver's playlists have this format:
 #CURTRACK 0
 #EXTM3U
 1
 2
 (...)
But station playlist's ones have this format:
c:\musics\....mp3
c:\musics\....mp3
c:\musics\....mp3
...

Another thing (tell me if I abuse !!): it would be nice to have a different 
playlist folder for each client.

Comment 17 KDF 2005-09-04 15:39:02 UTC
I think you need to try to make sure that these playlists are in fact playable.
 I was assuming this was already the case, and that all you were after was a
timing system to load them.  You can try copying one of these playlists to the
playlist folder given in your server settings.  That, or point slimserver to the
station playlist playlist folder.  Browse playlists and try playing.  Also, if
you could attach a playlist to this bug report, that might help from my end as
to what might be going wrong.  it would be really annoying if their use of m3u
isn't compatible.  The playlist track references DO have to refer to the tracks
in a way that matches how slimserver accesses them.  in this case, if they are
c:\media, then I hope your music folder in server settings is pointing to
c:\media...

having a client-based setting is easy.  Lets get something that works first tho:)
Comment 18 jean-guillaume 2005-09-05 00:10:34 UTC
Created attachment 796 [details]
my playlist
Comment 19 jean-guillaume 2005-09-05 00:11:01 UTC
Hello
"Station playlist" playlists are playable, I've just tested. 
I put the same m3u file in both "station playlist" folder, and slimserver 
playlists folder.
Musics are correctly played when I load playlist in slimserver. (even if I have 
the following message: "ID3v2 found. Be aware that the ID3 tag is currently 
lost when transcoding."
Each minute, the music is stopped by the station playlist plugin:
"Now playing
Nothing" (on squeezebox)
2005-09-05 10:01:04.1812 StationPlaylist: loading C:\playlists\september05-
10.m3u
(in command prompt)
I've created a attachment with this playlist...
Comment 20 jean-guillaume 2005-09-05 02:28:32 UTC
I've found !
Some of my folders/mp3 have accents (� � etc..) and slimserver doesn't like 
them at all ! (I didn't know... sorry ...)
Now the playlists are correctly loaded, but... they are reloaded each minute !
(music stops and restarts)

Comment 21 jean-guillaume 2005-09-05 05:14:33 UTC
I have to add something:
Everything is working well (as far as I have tested... and except the each 
minute reloading) ONLY if I setup playlist folders in server settings (the same 
folder as in plugins settings)


Comment 22 KDF 2005-09-05 10:02:03 UTC
what are ou seeing in the d_plugins log?

it should say something like: "checking for...current is..."
that is designed to show you the test, where it should only load a new playlist
if the current does not match the new checked for playlist.  If the accents are
not being converted properly, they may not match.  Hopefully the log should
reflect this.

My test used a common playlist folder.  I wouldn't have thought it would be
required that they be the same, but I suppose on thinking about it, that there
might be a limitation on that.
Comment 23 jean-guillaume 2005-09-05 10:29:42 UTC
What I see in d_plugins log:

2005-09-05 19:25:00.1189 StationPlaylist: checking for C:\Documents and Settings
\JG\Mes documents\madeinaudio\demo webradio\playlists\0905-19.m3u, current is: f
ile:///C:/Documents%20and%20Settings/JG/Mes%20documents/madeinaudio/demo%20webra
dio/playlists/0905-19.m3u
2005-09-05 19:25:02.1214 StationPlaylist: loading C:\Documents and Settings\JG\M
es documents\madeinaudio\demo webradio\playlists\0905-19.m3u

(note that I have modified the code to use month number instead of month name, 
it is easier for my french translation ;) )

I think that the problem can come from the "%20", don't you think ?
Comment 24 jean-guillaume 2005-09-05 10:41:42 UTC
This is not a "%20" issue, I've try it out...

2005-09-05 19:39:09.3435 StationPlaylist: checking for C:\playlists\0905-19.m3u
 current is: file:///C:/playlists/0905-19.m3u
2005-09-05 19:39:11.3588 StationPlaylist: loading C:\playlists\0905-19.m3u
2005-09-05 19:40:09.3591 StationPlaylist: checking for C:\playlists\0905-19.m3u,
 current is: file:///C:/playlists/0905-19.m3u
2005-09-05 19:40:11.3744 StationPlaylist: loading C:\playlists\0905-19.m3u

and again and again ...
Comment 25 KDF 2005-09-05 10:48:21 UTC
Created attachment 797 [details]
use numeric months, and convert current playlist name for compare.

the problem was that the server is converting the currentPlaylist to a url. 
I've converted back for the check, so that should hopefully help.  I have also
replicated your conversion to using numerical months.
Comment 26 jean-guillaume 2005-09-05 10:58:58 UTC
Thank you !
Everything seems ok !

However, be aware of this strange log, during startup:

2005-09-05 19:54:10.7356 Backtrace:

   frame 0: Slim::Utils::Misc::assert (/PerlApp/Slim/Utils/Misc.pm line 165)
   frame 1: Slim::Utils::Misc::pathFromFileURL (C:/Program Files/SlimServer for
Windows/server/Plugins/StationPlaylist.pm line 109)
   frame 2: Plugins::StationPlaylist::checkTime (/PerlApp/Slim/Utils/Timers.pm
ine 100)
   frame 3: Slim::Utils::Timers::checkTimers (slimserver.pl line 643)
   frame 4: main::idle (slimserver.pl line 581)
   frame 5: main::main (slimserver.pl line 61)
   frame 6: PerlSvc::Interactive (perlsvc.pl line 1485)
   frame 7: PerlSvc::_interactive (slimserver.pl line 0)
   frame 8: (eval) (slimserver.pl line 0)

Here's the problem. /PerlApp/Slim/Utils/Misc.pm, line 165:


2005-09-05 19:54:10.7396 pathFromFileURL:  isn't a file URL...
2005-09-05 19:54:10.7404 Backtrace:

   frame 0: Slim::Utils::Misc::pathFromFileURL (C:/Program Files/SlimServer for
Windows/server/Plugins/StationPlaylist.pm line 109)
   frame 1: Plugins::StationPlaylist::checkTime (/PerlApp/Slim/Utils/Timers.pm
ine 100)
   frame 2: Slim::Utils::Timers::checkTimers (slimserver.pl line 643)
   frame 3: main::idle (slimserver.pl line 581)
   frame 4: main::main (slimserver.pl line 61)
   frame 5: PerlSvc::Interactive (perlsvc.pl line 1485)
   frame 6: PerlSvc::_interactive (slimserver.pl line 0)
   frame 7: (eval) (slimserver.pl line 0)

I don't know what it means at all ...
Comment 27 KDF 2005-09-05 11:03:24 UTC
Created attachment 798 [details]
get rid of backtrack on startup

yeah, noticed that one just after I posted.  This should clear it up.
Comment 28 jean-guillaume 2005-09-05 11:32:53 UTC
That's effectively cleared ;)

And hmm... what about the client based version ? :)
Comment 29 KDF 2005-09-05 11:43:53 UTC
Created attachment 799 [details]
client based settings

right, moved to player settings->plugins now.  You will have to redo the
settings for each player.  The old server settings are useless.
Comment 30 jean-guillaume 2005-09-05 12:36:56 UTC
I tried to run softsqueeze with a second playlist folder, and there is just a 
little problem: it ran the october's playlists !

2005-09-05 21:35:00.9456 StationPlaylist: checking for C:\playlists\0905-21.m3u,
 current is: C:\playlists\0905-21.m3u
2005-09-05 21:35:00.9476 StationPlaylist: required playlist already loaded.
2005-09-05 21:35:00.9493 StationPlaylist: checking for C:\playlists2\1005-21.m3u
, current is: C:\playlists2\1005-21.m3u
2005-09-05 21:35:00.9504 StationPlaylist: required playlist already loaded.

(note the 1005-21)
I suppose this is a small bug in code, but I'm still not able to correct it :(
Comment 31 KDF 2005-09-05 12:47:58 UTC
Created attachment 801 [details]
increment outside of the loop

getting to be a lot of these. I guess I should have put this stuff elsewhere :)


Anyway, stupid slip on my part.  This should work now, I hope.	I'm going out
for the day now, so any other problems I'll have to get to tomorrow.
Comment 32 jean-guillaume 2005-09-05 12:52:29 UTC
OK, thank you again for your help and availability
Comment 33 jean-guillaume 2005-09-05 13:31:59 UTC
The last two troubles:

- m3u format requested by the second player:
" 2005-09-05 22:11:40.7431 StationPlaylist: checking for C:\playlists2\009005-
22.m3u"  (note the three digit)

- only works with the playlist (and so, the player) which is specified in 
the "playlists folder" in server settings
Comment 34 KDF 2005-09-05 19:37:48 UTC
Created attachment 802 [details]
more stuff moved outside the client loop

This should help.
Comment 35 jean-guillaume 2005-09-06 00:51:43 UTC
Hello 
the end ;)
I think everything is ok, I have to see it during a long time to be sure.
The only thing that remains, is the fact that I have to setup one of the 
playlists folder used by one of the players (any) in server settings.
If I don't do that, playlists seems to be correctly loaded (checked and loaded 
in d_plugins) but do not start.
This is not very annoying.

How can I thank you ? :)
Comment 36 KDF 2005-09-06 10:59:41 UTC
"Thank-you" is enough:)

The plugin does seem to require at least something in the server settings,
playlist folder.  I am not sure what, but it seems to not have to be one of the
station playlist folders.  I can only guess that the playlist loading commands
are being returned early if this setting is blank.  I'm not sure where, but as
long as it works for you then that's good. 

I'll attach a slightly more correct version for loading playlists shortly, but
marking fixed now to save an extra email from this server.
Comment 37 KDF 2005-09-06 11:01:31 UTC
Created attachment 804 [details]
use the file URL for the playlist load command

This is just to be a bit more in line with the expectations of the playlist
'play' command.  This will help prevent any future changes from possibly
breaking the plugin.
Comment 38 jean-guillaume 2005-09-07 09:45:06 UTC
Hello
Thank you, so ;)
I can't test this last release, because I don't have a DSL connection since 
yesterday... :(
I will let you know in a few hours or days (I hope ...)
Before that, I would like to know if there is any way to "enqueue" the 
playlists which are loaded everyhour, in order to prevent the music cuts.
I don't think it's possible, but who knows ? :)
Comment 39 KDF 2005-09-07 10:08:48 UTC
enqueuing is another enhancement request, bug 1207.  However, you could change
line 150 to use 'add' instead of 'play', which would just keep adding the new
playlist onto the end of the old one.  You'd have to manaully start playback at
some initial point, and the current playlist would ventually grow very long.
Comment 40 jean-guillaume 2005-09-10 03:54:23 UTC
I will forget enqueuing :)
On the last "release" of this plugin, there is a problem with playlist format:
2005-09-10 15:52:00.6119 StationPlaylist; checking for C:\playlists\09010-
12.m3u, current is:

Note the 3 digit for day ...
Comment 41 KDF 2005-09-10 11:34:25 UTC
line 83 needs to be:
	$mday = '0'.$mday if $mday <= 9;
 instead of:
	$mday = '0'.$mday if $mon <= 9;
Comment 42 jean-guillaume 2005-09-10 12:25:18 UTC
Well done !
Thank you again ;-)
Comment 43 Chris Owens 2006-06-16 14:42:34 UTC
There are 536 bugs in the database with targets of '---' that were fixed prior to new year 2006.  I am setting them to targets of 6.2.1 to keep them from showing up in my queries.
Comment 44 jean-guillaume 2006-06-24 05:38:55 UTC
Hello
I've installed slimserver on another server, with the last alpha pre release version.
The plugin stationplaylist is not working with this version :(
I have thoses lines with --d_plugins:

2006-06-24 14:00:00.8450 StationPlaylist: checking timer
2006-06-24 14:00:00.8471 StationPlaylist: checking for C:\public\madeinaudio\pla
ylists\rapido\1\0624-14.m3u, current is:
2006-06-24 14:00:00.8513 StationPlaylist: setting timer to 60 minutes.
2006-06-24 14:00:02.8527 StationPlaylist: loading C:\public\madeinaudio\playlist
s\rapido\1\0624-14.m3u
2006-06-24 14:00:02.8730 scanPathOrURL: Finding valid files in: C:\public\madein
audio\playlists\rapido\1\0624-14.m3u
2006-06-24 14:00:02.9349 About to look for files in C:\public\madeinaudio\playli
sts\rapido\1\0624-14.m3u
2006-06-24 14:00:02.9439 Found 1 files in C:\public\madeinaudio\playlists\rapido
\1\0624-14.m3u
2006-06-24 14:00:02.9503 ERROR: Request: Error when trying to run function coder
ef: [Can't locate object method "useProgressBar" via package "Slim::Utils::Progr
essBar" at /PerlApp/Slim/Utils/ProgressBar.pm line 39.
]

2006-06-24 14:00:02.9774 Request: Command [00:04:20:05:b7:bc->playlist play] (Ba
d dispatch!)
2006-06-24 14:00:02.9808    Param: [_item] = [file:///C:/public/madeinaudio/play
lists/rapido/1/0624-14.m3u]

Any idea of how to resolve this ?
Thank you very much
Comment 45 KDF 2006-06-26 22:06:33 UTC
you should try to stick with the 6.3.0 builds.  6.5 (alpha) is considered unstable at this time, and the errors you show should have nothing to do with this bug or the related plugin.  If you really want to keep going with nightly builds, then regular updates might already be rid of this as Dan as done work in the last few days.
Comment 46 jean-guillaume 2006-06-26 23:30:32 UTC
Hello Kdf
It works perfectly with 6.3.0
I will try out beta releases later ;)
Thank you!
Comment 47 KDF 2006-08-15 16:52:35 UTC
Created attachment 1428 [details]
V0.4 for use with 6.5

updated to work with 6.5 builds.
Comment 48 KDF 2006-08-15 17:06:28 UTC
Created attachment 1429 [details]
V0.5 for 6.5

this time without typos
Comment 49 jean-guillaume 2006-08-16 00:51:21 UTC
I will try out today, thank you Kdf ;)
Comment 50 KDF 2006-09-08 15:16:12 UTC
closing again. feel free to reopen if there are any problems. 
Comment 51 James Richardson 2008-12-15 13:07:01 UTC
This bug appears to have been fixed in the latest release!

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.

Make sure to include the version number of the software you are seeing the error with.