Re: [SlimDevices: Plugins] Trackstat statistics and Spotty content

2021-04-07 Thread Michael Herger

I guess the following if statement only updating lastPlayed/play counts
if isFile returns true is likely to cause issues ?
https://github.com/erland/lms-trackstat/blob/fe583776eafce682086a0cc2731a8676b67652f6/src/Plugin.pm#L4259


Yep, isFile() would fail on remote tracks.


And the following code will likely not work if persistent handling isn’t
implemented for remote tracks:
https://github.com/erland/lms-trackstat/blob/fe583776eafce682086a0cc2731a8676b67652f6/src/Plugin.pm#L5000


Yes again. That's something I'm currently looking into.


I suspect there are more issues than these in the plugin code so it
might not be worth the time to fix issues in LMS core unless someone
also is willing to fix the issues in the plugin.


There are other uses to that data. Even built in to LMS. So I'll look 
into implementing statistics for imported remote tracks anyway.

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


Re: [SlimDevices: Plugins] Trackstat statistics and Spotty content

2021-04-07 Thread erland

mherger wrote: 
> > Isn't the problem more that things like "Last Played" and "Playcount"
> > are not stored in the database for online tracks?
> 
> I think you're right! The RemoteTrack class overrides the persistent 
> data handling with empty stubs. I'll have to figure out how I can better
> 
> handle this.

I guess the following if statement only updating lastPlayed/play counts
if isFile returns true is likely to cause issues ?
https://github.com/erland/lms-trackstat/blob/fe583776eafce682086a0cc2731a8676b67652f6/src/Plugin.pm#L4259

And the following code will likely not work if persistent handling isn’t
implemented for remote tracks:
https://github.com/erland/lms-trackstat/blob/fe583776eafce682086a0cc2731a8676b67652f6/src/Plugin.pm#L5000

I suspect there are more issues than these in the plugin code so it
might not be worth the time to fix issues in LMS core unless someone
also is willing to fix the issues in the plugin.



Erland Isaksson ('My homepage' (http://erland.isaksson.info))
Developer of 'many plugins/applets'
(https://wiki.slimdevices.com/index.php/User_Erland.html)
*Starting with LMS 8.0 I no longer support my plugins/applets* ('see
here for more information'
(https://forums.slimdevices.com/showthread.php?49483-Announce-New-versions-of-erlands-plugins&p=998836&viewfull=1#post998836)
)

erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=114317

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


Re: [SlimDevices: Plugins] Trackstat statistics and Spotty content

2021-04-07 Thread Michael Herger

Isn't the problem more that things like "Last Played" and "Playcount"
are not stored in the database for online tracks?


I think you're right! The RemoteTrack class overrides the persistent 
data handling with empty stubs. I'll have to figure out how I can better 
handle this.

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


Re: [SlimDevices: Plugins] Trackstat statistics and Spotty content

2021-04-07 Thread rlem


Hi Erland & Michael,

I've been thinking about this case & am not sure if the fault really
lies in Trackstat mishandling online tracks, because they are picked up
perfectly in the Trackstat XML -including - ratings (as you can see in
my screenshot above).
Isn't the problem more that things like "Last Played" and "Playcount"
are not stored in the database for online tracks?
Because those are missing when I compare the info from the Song Info
screen in the LMS UI:

LOCAL TRACK:

34107

*Spotify track in my library, but without Last Played and Playcount*:

34108

Or are they added by TrackStat?
Anyway, Ratings Light installed fine (hence the double ratings in the
screenshots) & looks very promising!

Thanks,
Randy


+---+
|Filename: b. Spotify track (in library).PNG|
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=34108|
+---+


1x Classic / 2x Radio / 2x Receiver / LMS 8.0.0 - 1603862260 on HP
Proliant N54L with Ubuntu 16.04 LTS
http://www.last.fm/user/rndr

rlem's Profile: http://forums.slimdevices.com/member.php?userid=46931
View this thread: http://forums.slimdevices.com/showthread.php?t=114317

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


Re: [SlimDevices: Plugins] Trackstat statistics and Spotty content

2021-04-06 Thread Michael Herger

I noticed that the plugin code have if statements like:
ref($selectedItem) eq 'Slim::Schema::Track'


Yep, that's likely it. Any check assuming the file is a local track 
might fail.

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


Re: [SlimDevices: Plugins] Trackstat statistics and Spotty content

2021-04-06 Thread erland

rlem wrote: 
> Thanks for even thinking out loud for possible solutions.
> Unfortunately this is all way above my head - but if you want me to test
> some stuff, please do tell!
> 
> Best, 
> R

Take a look at the new Ratings Light plugin. If I remember correctly it
includes some integration with Dynamic Playlist plugin and possibly it
might include the functionality you need. It’s also actively maintained
so you can wish for new features if something is missing.



Erland Isaksson ('My homepage' (http://erland.isaksson.info))
Developer of 'many plugins/applets'
(https://wiki.slimdevices.com/index.php/User_Erland.html)
*Starting with LMS 8.0 I no longer support my plugins/applets* ('see
here for more information'
(https://forums.slimdevices.com/showthread.php?49483-Announce-New-versions-of-erlands-plugins&p=998836&viewfull=1#post998836)
)

erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=114317

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


Re: [SlimDevices: Plugins] Trackstat statistics and Spotty content

2021-04-06 Thread rlem


Thanks for even thinking out loud for possible solutions.
Unfortunately this is all way above my head - but if you want me to test
some stuff, please do tell!

Best, 
R



1x Classic / 2x Radio / 2x Receiver / LMS 8.0.0 - 1603862260 on HP
Proliant N54L with Ubuntu 16.04 LTS
http://www.last.fm/user/rndr

rlem's Profile: http://forums.slimdevices.com/member.php?userid=46931
View this thread: http://forums.slimdevices.com/showthread.php?t=114317

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


Re: [SlimDevices: Plugins] Trackstat statistics and Spotty content

2021-04-06 Thread erland

erland wrote: 
> 
> Someone would have to check the plugin code but it wouldn’t surprise me
> if it was something similar to the issue you corrected in 8.2 for
> Dynamic Playlist plugin:
> https://forums.slimdevices.com/showthread.php?49483-Announce-New-versions-of-erlands-plugins&p=1002453&viewfull=1#post1002453
> .

I noticed that the plugin code have if statements like:
ref($selectedItem) eq 'Slim::Schema::Track'

Could this cause the issues if a RemoteTrack object is returned from
objectForUrl ?



Erland Isaksson ('My homepage' (http://erland.isaksson.info))
Developer of 'many plugins/applets'
(https://wiki.slimdevices.com/index.php/User_Erland.html)
*Starting with LMS 8.0 I no longer support my plugins/applets* ('see
here for more information'
(https://forums.slimdevices.com/showthread.php?49483-Announce-New-versions-of-erlands-plugins&p=998836&viewfull=1#post998836)
)

erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=114317

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


Re: [SlimDevices: Plugins] Trackstat statistics and Spotty content

2021-04-06 Thread erland

mherger wrote: 
> > There’s only 1 downside: it appears that the current
> Trackstat-Dynamic
> > Playlist combo can only make use of the “date added” and the
> rating
> > itself:
> 
> I believe this topic has come up before: the TrackStat plugin seems to 
> filter URLs by the file:// prefix somewhere in its code. This would 
> exclude online tracks from its magic. Which made sense a few years back,
> 
> but is rather limiting nowadays.

Are you sure ?
I think I only filer on tracks.audio=1 but I might have done some
unintentional filtering that cause it to not work.

Someone would have to check the plugin code but it wouldn’t surprise me
if it was something similar to the issue you corrected in 8.2 for
Dynamic Playlist plugin:
https://forums.slimdevices.com/showthread.php?49483-Announce-New-versions-of-erlands-plugins&p=1002453&viewfull=1#post1002453

Unfortunately I probably won’t have the time to look at it myself in the
near future and I suspect there might be unintentional bugs in the
plugin code also causing it to not work with remote tracks.



Erland Isaksson ('My homepage' (http://erland.isaksson.info))
Developer of 'many plugins/applets'
(https://wiki.slimdevices.com/index.php/User_Erland.html)
*Starting with LMS 8.0 I no longer support my plugins/applets* ('see
here for more information'
(https://forums.slimdevices.com/showthread.php?49483-Announce-New-versions-of-erlands-plugins&p=998836&viewfull=1#post998836)
)

erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=114317

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


Re: [SlimDevices: Plugins] Trackstat statistics and Spotty content

2021-04-05 Thread Michael Herger

There’s only 1 downside: it appears that the current Trackstat-Dynamic
Playlist combo can only make use of the “date added” and the rating
itself:


I believe this topic has come up before: the TrackStat plugin seems to 
filter URLs by the file:// prefix somewhere in its code. This would 
exclude online tracks from its magic. Which made sense a few years back, 
but is rather limiting nowadays.

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


[SlimDevices: Plugins] Trackstat statistics and Spotty content

2021-04-05 Thread rlem

Hi, 

First of all I want to profess how extremely happy our family is with
the Squeezebox ecosystem (after all these years). And the satisfaction
has even grown now that Spotty is so well integrated into the LMS
library; it’s wonderful to have local and Spotify albums available and
searchable in one place.

By importing whole Spotify albums I can now add ratings to Spotify songs
too, in order to have them selected & played dynamically by the various
Dynamic Playlists (such as “All top-rated songs in Genre “x”).

There’s only 1 downside: it appears that the current Trackstat-Dynamic
Playlist combo can only make use of the “date added” and the rating
itself:
34092
(This is from the Trackstat xml)

...while local songs have more statistics available, such as “last
played” and “playcount”
34093

This means that locally starred songs won’t be repeated in a playlist
(or even have them not repeated within x days), but with Spotify I get
duplicates/repeats really soon.

So, I guess my question is: would it be possible to have these
statistics also available for online/Spotty content? 
I’m not sure if this is a Plugin or even a LMS database problem…

Or maybe others have made creative solutions for this problem that I
haven’t thought of?

Cheers!
Randy


+---+
|Filename: 02.PNG   |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=34093|
+---+


1x Classic / 2x Radio / 2x Receiver / LMS 8.0.0 - 1603862260 on HP
Proliant N54L with Ubuntu 16.04 LTS
http://www.last.fm/user/rndr

rlem's Profile: http://forums.slimdevices.com/member.php?userid=46931
View this thread: http://forums.slimdevices.com/showthread.php?t=114317

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