Get PlayCount for plugin:// URLs
#1
Hi,
is there a way to get the PlayCount for plugin:// URLs?

I tried it via the JSON RPC Api, but couldnt find a solution:
Code:
{ "jsonrpc": "2.0", "method": "Files.GetFileDetails", "params": { "file": "plugin://plugin.video.bestofyoutube_com/?url=GOI4H9Kbxxs&mode=playVideo", "media": "video", "properties": ["playcount"] } , "id": 1 }
returns:
Code:
{"error":{"code":-32602,"message":"Invalid params."},"id":1,"jsonrpc":"2.0"}

Should it work this way? I also tried it with urlencoded file parameter.

It's all stored in MyVideos*.db / TABLE: "files". I could directly access it via python, but i think this is not allowed when i want the addon to be added to the official repo!?!
Code:
c.execute('SELECT playCount FROM files WHERE strFilename=?', [pluginUrl])
Or is this okay?

Any solution would be great...
Reply
#2
Anyone?

I'm already using this in some of my new addons and also planned to integrate it in some existing ones.
Would be nice if i can still add my addons/updates to the official repo...
Reply
#3
i'll move this to JSON-RPC. perhaps it's something missing in core code
anyway direct db access is not allowed.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#4
At the risk of breaking etiquette and necroing an old thread, I ran into this problem too. The same issue seems to apply to http: URLs as well. Playcounts for both plugin: and http: URLs appear in the database if you look at it with an SQLite viewer, but the JSON-RPC API doesn't let you get them. I think I narrowed it down to this line, although there may be other spots that also need changed to fix this. If my guess is right, the issue is that the JSON-RPC API tries to get the parent directory for the file you queried, which fails for plugin: and http: URLs.
Reply

Logout Mark Read Team Forum Stats Members Help
Get PlayCount for plugin:// URLs0