kdf;132376 Wrote:
> 'playFavorite' => sub {
> Plugins::TrackStat::Plugin::saveRatingsForCurrentlyPlaying($_[0],
> undef, $_[2]); }
>
> The buttonarg should be the third argument, so you can use just the one
>
> mapping and let the button go through with array index 2.
It works!!! This is too cool!
I went ahead and limited it to only respond to buttons 0-5 as those are
the only ones supported by TrackStat (I believe, even though it appears
to try and rate a song at 6 or 7 stars if I don't limit it). I've now
got the following for numbers 0-5:
Code:
--------------------
'playFavorite_0' => sub {
Plugins::TrackStat::Plugin::saveRatingsForCurrentlyPlaying($_[0], undef, 0); }
--------------------
I've also modified 6-9 to execute the snooze like the numberScroll did
previously.
I'm looking into how I can put a plugin check around line 320 to
dynamically add these lines to the alarmActiveFunctions hash, if the
TrackStat plugin is loaded. Here's the pseudo code I'm thinking
about:
Code:
--------------------
if (TrackStat is installed)
Add 'playFavorite_0-5' definitions to alarmActiveFunctions
else
Add 'numberScroll' definition to alarmActiveFunctions
--------------------
Would this be something you'd be willing to release with KDF? At least
then it would keep my extra need to maintain it when upgrading in the
future. ;-)
Thanks again for all your help with this. This is pretty exciting!
--
kyleki
------------------------------------------------------------------------
kyleki's Profile: http://forums.slimdevices.com/member.php?userid=2510
View this thread: http://forums.slimdevices.com/showthread.php?t=26793
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins