Re: [SlimDevices: Plugins] Re: Random Play and continuous

2005-07-12 Thread kdf
Quoting Craig [EMAIL PROTECTED]:
 Would it be possible to add continuous play to the Album and Artist
 modes so that it plays one random album or artist after another?

possible:
http://www.deane-freeman.com/slimserver/beta/Random.pm

one current issue that I haven't bothered to trap, yet, is that it will not work
with single-track albums or single-track artists.  I'll be fixing that when I
get another block of time.

I think I'll add a few other modes for disabling.  Currently, most changes to
the playlist will cause the continuous mode to stop.  I'm thinking of a mode
where only power-off/stop disables, and another that is only a manual disable
(continually cycling from where you left off until you turn off the cyclic mode
or shut off from the plugin menu).

After that, I expect I'll wrap it up and ship it :)

-kdf
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


[SlimDevices: Plugins] Re: AlienBBC bug

2005-07-12 Thread Patrick Dixon

I tried it and now the Alien plugin won't load

2005-07-12 10:49:58.6466 Can't require Plugins::Alien::Plugin for
Plugins menu: Global symbol %refreshing requires explicit package
name at /usr/local/slimserver//Plugins/Alien/Plugin.pm line 242.
Compilation failed in require at (eval 68) line 3.

I'm on r3651/FC3


-- 
Patrick Dixon

www.at-view.co.uk
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


[SlimDevices: Plugins] Re: AlienBBC bug

2005-07-12 Thread Triode

Sounds like a bad edit of the file so that the number of { doesn't
match the number of }?


-- 
Triode
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


[SlimDevices: Plugins] Re: Random Play and continuous

2005-07-12 Thread Craig

Hi KDF,

Those changes seem to work fine if you start playback from the menu
however if you start playback from a defined remote control key (as you
explained in another thread) they don't work, I expanded your
instructions and added some code to allow a button to start Album or
Artist play too. 
If you jump in with the Play tracks command then the new FF  RWD
functions don't work and  if you jump into Album or Artist Play then
there's no cycling.

I cannot see any difference in the debug output between starting play
from the menu or from a hotkey

Craig


-- 
Craig
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Re: Random Play and continuous

2005-07-12 Thread kdf
Quoting Craig [EMAIL PROTECTED]:


 Hi KDF,

 Those changes seem to work fine if you start playback from the menu
 however if you start playback from a defined remote control key (as you
 explained in another thread) they don't work, I expanded your
 instructions and added some code to allow a button to start Album or
 Artist play too.
 If you jump in with the Play tracks command then the new FF  RWD
 functions don't work and  if you jump into Album or Artist Play then
 there's no cycling.

which new FF and RWD functions?

 I cannot see any difference in the debug output between starting play
 from the menu or from a hotkey

can you send me any diffs to the plugin, and a copy of your map file?

thanks,
kdf
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Re: AlienBBC bug

2005-07-12 Thread kdf
Quoting Patrick Dixon [EMAIL PROTECTED]:


 I've stared it it for ages and I just can see it - can you?

   $menu-refresh();
   $refreshing{$client} = 0;

it is complaining about %refreshing not being a declared variable, so you can't
use $refreshing{$client}, without a my %refreshing hanging out somewhere in
that module.  Maybe my copy isn't up to date, but I don't see it anywhere.
-kdf
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


[SlimDevices: Plugins] Re: AlienBBC bug

2005-07-12 Thread Triode

Yep - problem was I cut and pasted from a newer version! Sorry.

Patrick - you should have mail...


-- 
Triode
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


[SlimDevices: Plugins] Re: AlienBBC bug

2005-07-12 Thread Patrick Dixon

BTW email address is patrick at dixon dot flyer dot co dot uk


-- 
Patrick Dixon

www.at-view.co.uk
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


[SlimDevices: Plugins] Re: Random Play and continuous

2005-07-12 Thread Craig

Hi KDF,

You made changes so that pressing fwd on the remote played the next
random track and added a new one to the list whereas before it would
break the cycle and play the playlist to the end. It's this doesn't
seem to work if you use the custom map to start playback.

My changes were just an expansion of your suggestion of 

'tracks' = sub  {
my $client = shift;
playRandom($client,'track');
},
in the initplugin section.
I added

'artists' = sub {
my $client = shift;
playRandom($client,'artist');
},
'albums' = sub {
my $client = shift;
playRandom($client,'album');
} 

and then added
7.hold = modefunction_PLUGIN.Random-tracks
8.hold = modefunction_PLUGIN.Random-albums
9.hold = modefunction_PLUGIN.Random-artists

to custom.map

Craig


-- 
Craig
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Re: Random Play and continuous

2005-07-12 Thread kdf
Quoting Craig [EMAIL PROTECTED]:


 Hi KDF,

 You made changes so that pressing fwd on the remote played the next
 random track and added a new one to the list whereas before it would
 break the cycle and play the playlist to the end. It's this doesn't
 seem to work if you use the custom map to start playback.

seems to be working for me, but I'll add some more debug lines so you can get a
better picture of what is happening for you.

Album and Artist cycling is not going to happen on a track-by-track basis, as it
is just too hard to keep track of when to start adding from a new album or not.
 Instead, it will delete the completed track and only add another random
artist/album when the track count is down to 1.  Again, this does not work if
the album or artist has only one track, and I can't be sure that it will work
if you FWD on the last track :)

The only thing I can think of as to why FWD/REW might be stopping teh track
cycling is if you are in some other mode that has these defined as a function
other than 'playlist jump +/- 1'.  The plugin is unable to monitor buttons,
only the resulting function as reported by the command callback.

I'll post an updated Beta for the morning.
-kdf
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


[SlimDevices: Plugins] Re: Random Play and continuous

2005-07-12 Thread Craig

Hi KDF,
It's late here and I'm confusing myself now!!!

Do those changes of mine look ok to you? 

I'm just thinking that there's some difference between starting play
using the mapped key and using the menus and actually pressing play.

I'll wait for the update and try and figure out whats happening.

Then again it could just be me sticking my text editor where it's not
wanted :-)

Thanks for all your efforts
Craig


-- 
Craig
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins


Re: [SlimDevices: Plugins] Re: Random Play and continuous

2005-07-12 Thread kdf
Quoting Craig [EMAIL PROTECTED]:


 Hi KDF,
 It's late here and I'm confusing myself now!!!

 Do those changes of mine look ok to you?

seem fine :)

 I'm just thinking that there's some difference between starting play
 using the mapped key and using the menus and actually pressing play.

Yes, there is.  Pressing play from within the plugin happens only once. 
Pressing and holding from elsewhere can end up being repeated.  These repeat
calls appear to be causing an overlapping callback that cancels itself out.

Then, it seems that refreshing the web interface can send unwanted
commands...etc etc.

-kdf
___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/plugins