Announcement

Collapse
No announcement yet.

Feature Request: Trackstat Rating Support

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Feature Request: Trackstat Rating Support

    Could we have an event action added to rate the now playing song?

    For example, I could have an event trigger that responds to me pushing the number "5" on my remote.

    That event then fires and changes the trackstat rating for the now playing song on the associated player to "5."

    This is mostly usefuly for the Duet, since the SB3 and Boom already have IR remotes that can do this... It would also work for anyone that makes a custom interface through HSTouch or MainLobby. It could also allow rating through the HS web UI.

    One of the tricks would supporting both 5 and 10-star ratings, since trackstat can support either (could the plugin pull this from SC?)
    John
    Hardware: i5-6400T w/16GB RAM & SSD w/HS3Pro, Z-Net, Harmony Hub x2, Echo Dot x2, Ocelot
    Plugins: Z-wave, HSTouch, BLBackup, Harmony, GTS CPUXA, UltraMon3, Nest
    HSTouch: Multiple Android Devices; 5 x ToteVision MD-1001 10.1" Win 7 Tablets
    Devices: Cooper RF9501 x4, RF9517 x6, RF9534 x1, RF9540-N x7, RF9542 x1, RF9542-Z x2, RFHDSCG x1, RFWC5 x5; Intermatic HA02 x6; FortrezZ MIMOLite x3; Leviton VRPD3-1LW x4, VRR15-1LZ x6; Nest Tstat & 9x Protects; Dragon PD-100 x3, PA-100 x3

    #2
    Does not sound difficult to add if there is a way to control the rating from the CLI interface. I don't recall seeing such CLI commands, but then again was not one of my focus areas. I will have to investigate.

    In the interim, have you looked at the SqueezeCenter web interface (in the technical documentation); if they have a way to do it, your script could use the HS2 web APIs to call that URL and set it.

    Comment


      #3
      Thanks, I checked with the developer of Trackstat and he pointed me to the Wiki and the CLI commands to interface with the ratings. However, you have to have the full filename of the now playing song in order to make it work. Here's the wiki entry: http://wiki.slimdevices.com/index.ph...#CLI_interface

      and here's a exceprt:



      The prefered way to recieve event or getting information from TrackStat is to use the provided CLI interface. TrackStat provides the following CLI commands and events.
      • Retreive rating for a track
      <DL><DD>trackstat getrating 94 <DD>trackstat getrating file:///mnt/mp3music_small/The%20Bodyguard/12%20Trust%20In%20Me.mp3 <DD>trackstat getrating /mnt/mp3music_small/The%20Bodyguard/12%20Trust%20In%20Me.mp3 <DD>00:04:20:06:22:b3 trackstat getrating 94 <DD>00:04:20:06:22:b3 trackstat getrating file:///mnt/mp3music_small/The%20Bodyguard/12%20Trust%20In%20Me.mp3 <DD>00:04:20:06:22:b3 trackstat getrating /mnt/mp3music_small/The%20Bodyguard/12%20Trust%20In%20Me.mp3 </DD></DL><DL><DD>If the command succeeds it returns a "rating" parameter with the rating for the selected track between 0-5 and it also returns a "ratingpercentage" pamameter with the rating for the selected track between 0-100. </DD></DL>
      • Set rating for a track to 4 (or 85%)
      <DL><DD>trackstat setrating 94 4 <DD>trackstat setrating 94 85% <DD>trackstat setrating file:///mnt/mp3music_small/The%20Bodyguard/12%20Trust%20In%20Me.mp3 4 <DD>trackstat setrating file:///mnt/mp3music_small/The%20Bodyguard/12%20Trust%20In%20Me.mp3 85% <DD>trackstat setrating /mnt/mp3music_small/The%20Bodyguard/12%20Trust%20In%20Me.mp3 4 <DD>trackstat setrating /mnt/mp3music_small/The%20Bodyguard/12%20Trust%20In%20Me.mp3 85% <DD>00:04:20:06:22:b3 trackstat setrating 94 4 <DD>00:04:20:06:22:b3 trackstat setrating 94 85% <DD>00:04:20:06:22:b3 trackstat setrating file:///mnt/mp3music_small/The%20Bodyguard/12%20Trust%20In%20Me.mp3 4 <DD>00:04:20:06:22:b3 trackstat setrating file:///mnt/mp3music_small/The%20Bodyguard/12%20Trust%20In%20Me.mp3 85% <DD>00:04:20:06:22:b3 trackstat setrating /mnt/mp3music_small/The%20Bodyguard/12%20Trust%20In%20Me.mp3 4 <DD>00:04:20:06:22:b3 trackstat setrating /mnt/mp3music_small/The%20Bodyguard/12%20Trust%20In%20Me.mp3 85% </DD></DL><DL><DD>If the command succeeds it returns a "rating" parameter with the newly set rating between 0-5 and it also returns a "ratingpercentage" parameter with the rating for the selected track between 0-100. </DD></DL>
      • Event about changed rating for a track with trackid 94 and rating 4 (or rating percentage 85%)
      <DL><DD>trackstat changedrating file%3A%2F%2F%2Fmp3music_small%2FThe%20Bodyguard%2F12%20Trus t%20In%20Me.mp3 94 4 85% </DD></DL>
      • Event about changed statistics regarding playcount=18 and lastplayed=1144572357
      <DL><DD>trackstat changedstatistic file%3A%2F%2F%2Fmp3music_small%2FThe%20Bodyguard%2F12%20Trus t%20In%20Me.mp3 94 18 1144572357 </DD></DL>
      So, if we can get the filename of the now playing song and then inject it into the CLI command, it will work.
      John
      Hardware: i5-6400T w/16GB RAM & SSD w/HS3Pro, Z-Net, Harmony Hub x2, Echo Dot x2, Ocelot
      Plugins: Z-wave, HSTouch, BLBackup, Harmony, GTS CPUXA, UltraMon3, Nest
      HSTouch: Multiple Android Devices; 5 x ToteVision MD-1001 10.1" Win 7 Tablets
      Devices: Cooper RF9501 x4, RF9517 x6, RF9534 x1, RF9540-N x7, RF9542 x1, RF9542-Z x2, RFHDSCG x1, RFWC5 x5; Intermatic HA02 x6; FortrezZ MIMOLite x3; Leviton VRPD3-1LW x4, VRR15-1LZ x6; Nest Tstat & 9x Protects; Dragon PD-100 x3, PA-100 x3

      Comment


        #4
        Thank you for the info and I breifly looked at it this weekend. I hope to include event actions and APIs to support this in the next 1.6 Beta update.

        Comment

        Working...
        X