v16 Get MediaType of VideoInfoTag
#1
How can I know id the user is watching a tvshow or a movie?
Using Kodi 16 and Python3

Thanks
Reply
#2
not possible in v16 i think.

in v17, there's and getMediaType() method you can use.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Grab it from jsonrpc.

This is a snip from one of my shell scripts.

PHP Code:
{"jsonrpc""2.0""method""Player.GetItem""params": { "properties": [ "showtitle""streamdetails","title"], "playerid"'"$PlayerId"' }, "id""VideoGetItem"}' -H 'content-typeapplication/json

That should return a bunch of stuff including a 'type' field which will be of value 'episode', 'movie', 'channel' or 'unknown'.
Learning Linux the hard way !!
Reply
#4
And without jsonrpc?
Reply
#5
(2016-11-12, 16:15)DSinapellido Wrote: Using Kodi 16 and Python3

Python3? Huh
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#6
(2016-11-14, 22:32)phil65 Wrote:
(2016-11-12, 16:15)DSinapellido Wrote: Using Kodi 16 and Python3

Python3? Huh

Yep... Now I'm using 2.6... It happens that Archlinux lets you use python 3 with kodi
Reply

Logout Mark Read Team Forum Stats Members Help
Get MediaType of VideoInfoTag0