Retrieving in-progress music videos
#1
Hi,

for my addon XBMC File Cleaner I need a way to retrieve any music videos that have resume points stored in the library. I understand XBMC used to not store resume points for these videos in the past, but since the last time I read the JSON-RPC API I noticed GetMusicVideos now supports the resume property. Therefore I drafted the following request, but it gives me an error: "Received value does not match any of the union type definitions."

Code:
{"jsonrpc":"2.0","method":"VideoLibrary.GetMusicVideos","params":{"properties":["title","thumbnail","resume","artist","album","genre","lastplayed","year","runtime","fanart","file","streamdetails"],"filter":{"and":{"field": "resume.position","operator":"greaterthan","value":0}}},"id":"libMusicVideos"}

Could anyone tell me how to filter based on the position field of the resume object? I am also planning to use this for episodes and movies, so even if music videos still do not support resume points I would still like to know how to do this for the other videos.

Thanks in advance!
Reply
#2
What is the error you are getting?

The field "resume.position" looks wrong. IIRC we only have a boolean "inprogress" filter but it only works for movies, tvshows and episodes.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
This is the full error message:
Code:
{"error":{"code":-32602,"data":{"method":"VideoLibrary.GetMusicVideos","stack":{"message":"Received value does not match any of the union type definitions","name":"filter","property":{"type":"string"},"type":"object"}},"message":"Invalid params."},"id":"libMusicVideos","jsonrpc":"2.0"}

I based the fields on the data I found here: http://wiki.xbmc.org/index.php?title=JSO...MusicVideo

I am currently using the inprogress field but I noticed here there are a lot of new filters since the last time I looked, such as tag, resume, streamdetails, etc. This would open up some new ways to use my addon.
Reply

Logout Mark Read Team Forum Stats Members Help
Retrieving in-progress music videos0