Author Topic: 5 Star (Rating) Songs  (Read 5281 times)

0 Members and 1 Guest are viewing this topic.

Antrobus_Prime

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 0
    • View Profile
5 Star (Rating) Songs
« on: June 07, 2013, 04:40:06 AM »
First of all I am sorry if this has been covered but I can't find a thread on this, Not only am I new to VC I am also trying to get to grips with XBMC also. I used to use itunes and i 5 star'ed my favourite songs that went into my cleverly named 5 star playlist! i have found the command "play hits by" works really well on the songs i have rated in XBMC but was wondering if there is a command to rate songs that are playing, rather than doing it manually? for example if music is playing in party mode and i like a particular song could I then say "computer rate this song" which could then be then used in the "play hits by..." playlist and an overall 5 star playlist?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: 5 Star (Rating) Songs
« Reply #1 on: June 07, 2013, 09:38:28 AM »
No, you are right, this should be part of the standard install and it isn't.  I don't think it was even possible with Eden really, but now with JSON it is.

Here is the command:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="399" name="set rating {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>Player.GetItem&amp;&amp;"playerid":0</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.ParseTokens</cmdType>
    <cmdString>{item.id}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <cmdString>{LastResult}</cmdString>
    <cmdRepeat>0</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>AudioLibrary.SetSongDetails&amp;&amp;"songid":{LastResult}, "rating":{1}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>set</phrase>
  <phrase optional="true">song, track</phrase>
  <phrase>rating</phrase>
  <phrase optional="true">to</phrase>
  <payloadRange>1,5</payloadRange>
  <phrase optional="true">stars</phrase>
</command>

Note that XBMC seems to have a small bug.  The fullscreen viewer will not show the updated rating until you play another song and then come back to the song you rated.  Then you will see the correct number of stars.

However, if you are in "Library Mode" and using the "Media Info" view, you will see it update immediately.

Antrobus_Prime

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 0
    • View Profile
Re: 5 Star (Rating) Songs
« Reply #2 on: June 10, 2013, 05:36:56 AM »
Thankyou very much, slowly my set up is coming along nicely, I've been trying to create a command for my 5 star playlist, i have XJSON.SmartPL, do i just write the name of my playlist in the next box? I can't seem to get it to work...

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: 5 Star (Rating) Songs
« Reply #3 on: June 10, 2013, 08:28:55 AM »
Since a five star playlist doesn't require any payloads you can just create the smart playlist in XBMC.  Then you just need a single action to tell XBMC to open it. 

Create a smart music playlist and name it FiveStar and I'll post the action you need here. 

You will also be able to queue it when you are just browsing around with the remote, if you want.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: 5 Star (Rating) Songs
« Reply #4 on: June 10, 2013, 09:08:28 AM »
Here is a command that will play it.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="816" name="Play Five Star Songs" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>Player.Open&amp;&amp;"item": {"file": "special://profile/playlists/music/FiveStar.xsp"}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Play Five Star Songs</phrase>
</command>

Antrobus_Prime

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 0
    • View Profile
Re: 5 Star (Rating) Songs
« Reply #5 on: June 10, 2013, 06:42:14 PM »
That last command isn't working for me for some reason... VC understands me but XBMC isn't participating.. iIve tried different variations of caps and gaps in the naming of Five Star in XBMC hoping it was a simple miscommunication between the two but that hasn't worked and now my technical ability has ran it's course...

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: 5 Star (Rating) Songs
« Reply #6 on: June 10, 2013, 07:00:41 PM »
Did you create the smart music playlist in XBMC and name it FiveStar ?

Antrobus_Prime

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 0
    • View Profile
Re: 5 Star (Rating) Songs
« Reply #7 on: June 10, 2013, 09:18:08 PM »
Yeh... that's what i was changing the spelling on the playlist thinking caps might be affecting it...

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: 5 Star (Rating) Songs
« Reply #8 on: June 10, 2013, 10:07:15 PM »
I have tested the command and it definitely works.  If you are able to use the other commands in Frodo OK and are able to use smart playlists then I don't see why this one would not work.

Look in your folder:

C:\Users\YOUUSERNAMEHERE\AppData\Roaming\XBMC\userdata\playlists\music

You should have a file in that folder named FiveStar.xsp

If that file is there then it should work, and if not then you must have done something wrong when you created the smart playlist.

The capitalization does not matter, at least not on my system.

If you are still stuck tomorrow I can come look using teamviewer.

« Last Edit: June 10, 2013, 11:01:00 PM by jitterjames »

Antrobus_Prime

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 0
    • View Profile
Re: 5 Star (Rating) Songs
« Reply #9 on: June 11, 2013, 01:18:30 PM »
Sorry dude I'm a numpty, everything is working perfectly now, I created a the playlist when I attempted to create my own command and failed named 5 star playlist so when you fatale me the command and said create a playlist and call it FiveStar I just renamed the existing playlist in XBMC but the xml file name didn't alter! Thanks yet again for all your help!! Xxx