2014-03-06, 21:12
Hi !
Is it possible in json to list movie based on cast name.
Thanks
Steven
Is it possible in json to list movie based on cast name.
Thanks
Steven
(2014-03-06, 21:12)Samtronic Wrote: Hi !
Is it possible in json to list movie based on cast name.
Thanks
Steven
(2014-02-16, 17:13)Montellese Wrote:(2014-02-13, 14:58)jez500 Wrote: 3. Persistent storage - I am pretty sure this is a feature request however I might have just missed it too. I would love a way to save/retrieve some data on the host via the api. something like storage System.setVariable {key: value} and System.getVariable {key}. I have heaps of cool ideas if such a thing existed (eg. web ui settings, who played that song and many more ). Any suggestions?I don't understand what exactly you are after.
(2014-03-08, 06:09)jez500 Wrote: Hi Montellese,
Thanks for the responses, all good to know.
With the "persistent storage" it's probably easiest to explain it with an example...
Say in my web interface I want the user to be able to select a color scheme, at the moment I can only save this setting in local browser storage, meaning if they switch browsers then that setting is lost. I would like to be able to store this setting server side (in xbmc) so if the user uses another browser, I can pull the setting from xbmc and apply it accordingly.
(2014-03-08, 09:15)Montellese Wrote:(2014-03-08, 06:09)jez500 Wrote: Hi Montellese,
Thanks for the responses, all good to know.
With the "persistent storage" it's probably easiest to explain it with an example...
Say in my web interface I want the user to be able to select a color scheme, at the moment I can only save this setting in local browser storage, meaning if they switch browsers then that setting is lost. I would like to be able to store this setting server side (in xbmc) so if the user uses another browser, I can pull the setting from xbmc and apply it accordingly.
Over a year ago I wrote some python modules and other code to allow webinterfaces to use python including session and cookie handling.
Unfortunately by the time I was done the whole python interface was changed and I never got around to adjust my code because the new code is completely different. But I still want to make that happen one day.
_json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "%s", "media": "music", "properties": ["artistid","albumid","dateadded"]}, "id": 1}' %(PLAYLIST))
{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},
(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
(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
(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.
(2014-03-12, 08:57)Montellese Wrote: 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.
(2014-03-12, 18:21)ben- Wrote: Great, thanks! Just to clarify, I would use "" (the empty string) to clear the field? This seems correct to me since the null value is used to ignore the attribute altogether when setting details.
(2014-03-12, 19:06)Montellese Wrote:(2014-03-12, 18:21)ben- Wrote: Great, thanks! Just to clarify, I would use "" (the empty string) to clear the field? This seems correct to me since the null value is used to ignore the attribute altogether when setting details.
Yup that's correct. But there is some logic in the database that doesn't let you reset lastplayed when the playcount is greater than 0.
(2014-03-12, 19:15)ben- Wrote:(2014-03-12, 19:06)Montellese Wrote:(2014-03-12, 18:21)ben- Wrote: Great, thanks! Just to clarify, I would use "" (the empty string) to clear the field? This seems correct to me since the null value is used to ignore the attribute altogether when setting details.
Yup that's correct. But there is some logic in the database that doesn't let you reset lastplayed when the playcount is greater than 0.
That constraint is logical since there could never be a case where play count is non-zero with no last played time. I'm implementing "mark as watched" and "mark as unwatched" via the JSON API so I will always be modifying both attributes at the same time. Thanks again!