erland wrote:
> The setRating function will probably not work for implementing the
> trackstat setrating command due to this if statement:
> >
Code:
--------------------
> >
> if ($request->isNotCommand([['ratingslight'],['setrating']])) {
>
--------------------
> >
> You can do an and with a similar statement for isNotCommand with
> trackstat setrating and it should work properly.
>
> If you want to make it work properly if TrackStat also is installed
> you could put an if statement around the addDispatch calls that
> register TrackStat CLI commands so they are only registered if
> TrackStat isnt installed. You can see the isPluginsInstalled function
> in some of my plugins for an example how to check if a plugin is
> installed. If you want to have additional logic in setrating if
> TrackStat is installed you can implement a setTrackStatRating function
> and TrackStat will call your plugin when a rating is set through
> TrackStat, you can see the TrackStatPlaylist plugin for an example of
> this
> https://github.com/erland/lms-trackstatplaylist/blob/a00d709aaf2dbe797c096b949d3d4b280335fb44/src/Plugin.pm
>
> Just mentioning all this since your logic around comment tags and
> playlists generation potentially could be useful for someone even if
> TrackStat is installed.
>
> You might want to check with pippin how iPeng handles ratings, not
> sure if it checks if trackstat setrating is available or explicitly
> checks if TrackStat plugin is installed. Might be other third party
> apps that also sets ratings via TrackStat that you might want to
> verify compatibility with.
>
> By the way, its great to see more third party developers are
> interested to add functionality around ratings :-)
Tack så mycket för your kind words. The mess with the request/command
check happened because I hastily brought back the TrackStat dispatches -
which I now deleted again. I think I will do it your way and ask
developers if they consider supporting the setrating function of
-Ratings Light-.
But honestly, apart from your plugins, iPeng and Material I have no idea
which plugins or apps support rating. I will try to get in touch with
pippin for sure.
And thanks for the hint. I will definitely keep the setTrackStatRating
function in mind if I add some logic that should to be applied to tracks
just after the rating has happened (that's the idea behind that, no?).
Can I just ask one question? I wanted to include a menu for browsing
artists and genres that have rated tracks. Browsing them like this might
be nice. But I always get some wong/empty entries on the lower levels
(artists menu -> -albums- or for genres -> -artists-). While the plugin
already contains the (disabled) code, I described the problem more in
detail 'here'
(https://forums.slimdevices.com/showthread.php?113187-virtual-library-database-operation&p=996695&viewfull=1#post996695)
and included a link to some demo files that allow reproducing the
problem in a minute. Since you probably have a lot of experience with
menus (and CustomBrowse actually doesn't have this problem) I thought
I'd ask. I wouldn't like to include the menus with this bug. Thank you!
------------------------------------------------------------------------
afriend's Profile: http://forums.slimdevices.com/member.php?userid=39306
View this thread: http://forums.slimdevices.com/showthread.php?t=113344
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins