2014-03-12, 08:57
(2014-03-10, 13:18)mikebzh44 Wrote: Artistid is not returned when using Files.GetDirectory function on "Songs" smart playlist :I'll look into it when I have some time but a lot has changed in the music database and I'm not familiar with it anymore at all.
Code:_json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "%s", "media": "music", "properties": ["artistid","albumid","dateadded"]}, "id": 1}' %(PLAYLIST))
Informations returned :
Code:{u'filetype': u'file', u'label': u'Total Breakdown', u'albumid': 3, u'file': u'smb://READYNAS/media/Music/Brad Sucks/2008 - Out of it/07_-_Brad_Sucks_-_Total_Breakdown.mp3', u'type': u'song', u'id': 1233},
{u'filetype': u'file', u'label': u'Never Get Out', u'albumid': 2, u'file': u'smb://READYNAS/media/Music/Brad Sucks/2003 - I dont t know what I m doing/08_-_Brad_Sucks_-_Never_Get_Out.mp3', u'type': u'song', u'id': 1222},
{u'filetype': u'file', u'label': u'Borderline', u'albumid': 2, u'file': u'smb://READYNAS/media/Music/Brad Sucks/2003 - I dont t know what I m doing/06_-_Brad_Sucks_-_Borderline.mp3', u'type': u'song', u'id': 1220},
Does Wiki is not up to date :
http://wiki.xbmc.org/index.php?title=JSO...tDirectory
http://wiki.xbmc.org/index.php?title=JSO...elds.Files
Tested with Frodo 12.3 and 13.0-BETA2 Git:20140310-64a9cb9
And yes the documentation on the wiki is not up-to-date,
(2014-03-12, 02:49)ben- Wrote:(2012-07-02, 11:56)Millencolin007 Wrote: Setting the movie as unwatched does not work. Tried the following two requests
Code:curl -H "Content-Type: application/json" -d "{\"jsonrpc\": \"2.0\", \"method\": \"VideoLibrary.SetMovieDetails\", \"params\" : { \"movieid\" : 1, \"playcount\" : 0, \"lastplayed\" : \"\" }, \"id\" : 1 }" http://127.0.0.1:8080/jsonrpc | python -mjson.tool
I just tried this in Gotham Beta-1. Setting lastplayed to "" doesn't seem to be working for me. The API call returns OK, but when querying the details immediately after the call, the old lastplayed date string remains. Is there a special way to assign a string value to empty now?
Clicking the marked as unwatched button in the UI returns the value to "" as expected.
Thanks for the report. Looks like all properties/fields that expect a date/time will fail with an empty value. I'll try to fix it ASAP.