Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Member
    Join Date
    May 2011
    Location
    Utrecht, The Netherlands
    Posts
    52

    Trackstat statistics and Spotty content

    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:
    Name:  01.png
Views: 245
Size:  7.5 KB
    (This is from the Trackstat xml)

    ...while local songs have more statistics available, such as “last played” and “playcount”
    Name:  02.PNG
Views: 236
Size:  10.1 KB

    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
    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

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,543

    Trackstat statistics and Spotty content

    > 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.

  3. #3
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,290
    Quote Originally Posted by mherger View Post
    > 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/showt...=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)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

  4. #4
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,290
    Quote Originally Posted by erland View Post
    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/showt...=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)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

  5. #5
    Member
    Join Date
    May 2011
    Location
    Utrecht, The Netherlands
    Posts
    52
    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

  6. #6
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,290
    Quote Originally Posted by rlem View Post
    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)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

  7. #7
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,543

    Trackstat statistics and Spotty content

    > 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.

  8. #8
    Member
    Join Date
    May 2011
    Location
    Utrecht, The Netherlands
    Posts
    52

    Or is it the LMS database?

    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:

    Name:  a. Local track.PNG
Views: 60
Size:  60.2 KB

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

    Name:  b. Spotify track (in library).PNG
Views: 64
Size:  82.7 KB

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

    Thanks,
    Randy
    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

  9. #9
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,543

    Trackstat statistics and Spotty content

    > 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.

  10. #10
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,290
    Quote Originally Posted by mherger View Post
    > 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-tracks...lugin.pm#L4259

    And the following code will likely not work if persistent handling isn’t implemented for remote tracks:
    https://github.com/erland/lms-tracks...lugin.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)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •