Help to get thetvdb id
#1
Hi. I'm actually new to xbmc addon developing (and also new to python). I'm trying to create a subtitle addon for an italian subtitle website. To do that i'm gonna need to use the thetvdb id of the tv show (seriesid in the database or imdbnumber in json). I already found that is not accessible from infolabels but with a json query i can get it like this:
Code:
http://192.168.0.3/jsonrpc?request={"jsonrpc":"2.0","id":1,"method":"VideoLibrary.GetTVShowDetails","params":{"tvshowid":1, "properties": ["imdbnumber"]}}
But i need the tv show id for the query, without i can't do it. How can i get the tv show id of a running episode from infolabels? What is the best method?
Thanks in advance for the help...
Reply
#2
(2014-02-27, 21:55)phate89 Wrote: Hi. I'm actually new to xbmc addon developing (and also new to python). I'm trying to create a subtitle addon for an italian subtitle website. To do that i'm gonna need to use the thetvdb id of the tv show (seriesid in the database or imdbnumber in json). I already found that is not accessible from infolabels but with a json query i can get it like this:
Code:
http://192.168.0.3/jsonrpc?request={"jsonrpc":"2.0","id":1,"method":"VideoLibrary.GetTVShowDetails","params":{"tvshowid":1, "properties": ["imdbnumber"]}}
But i need the tv show id for the query, without i can't do it. How can i get the tv show id of a running episode from infolabels? What is the best method?
Thanks in advance for the help...

the imdb number is the tvdb number when querying tvshows...
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#3
(2014-02-28, 00:41)Lunatixz Wrote: the imdb number is the tvdb number when querying tvshows...
I know that. My english isn't great so I probably didn't explained myself well.
I know that with that query I can get the thetvdb id of a tv show but I don't know how to get the tv show id of the episode I'm playing and without that I can't use that json request
Reply
#4
(2014-02-28, 00:46)phate89 Wrote:
(2014-02-28, 00:41)Lunatixz Wrote: the imdb number is the tvdb number when querying tvshows...
I know that. My english isn't great so I probably didn't explained myself well.
I know that with that query I can get the thetvdb id of a tv show but I don't know how to get the tv show id of the episode I'm playing and without that I can't use that json request

ahh, my bad. In that case... I think the below might work, Player.Getitem should return info on whats currently playing. But I don't remember off hand if it returns imdb number (but it should?)

Code:
{"jsonrpc":"2.0","method":"Player.GetItem","params":{"playerid":1,"properties":["imdbnumber"]},"id":1}
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#5
With that query i get this:
Code:
{"id":1,"jsonrpc":"2.0","result":{"item":{"id":1516,"imdbnumber":"","label":"Il Ritorno","type":"episode"}}}
the id is from the episode id (not the tv show id) and the imdbnumber is empty ("")
Reply
#6
I checked in the xbmc code and it's not implemented. It only gets it for the movies. For tv show episodes xbmc only gets info from episodeview. Is this intended? Because it is possible to retrieve the thetvdb id with a little change of code but it's not of that specific episode, it is the id of the tv show..
Reply
#7
Have you tried Gotham? Is it the same result?
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#8
I actually tried directly to gotham because i'm developing a subtitle addon for it but with frodo is the same.
I looked in the code and it doesn't fill the imdbnumber tag for the episodes. It uses getepisodeinfo that only query episodeview table and doesn't ask info about the tv show..
Reply
#9
I found this thread in an unrelated search and thought I'd help out some future searchers. You can get the tvdb id of the show of the currently playing episode in 2 steps.

Step 1: only do this if you know the currently playing media is an episode
Code:
{"jsonrpc":"2.0","method":"Player.GetItem","params":{"playerid":1,"properties":["tvshowid"]},"id":1}

Step 2: take tvshowid and call GetTVShowDetails. 47 is a placeholder
Code:
{"jsonrpc":"2.0","method":"VideoLibrary.GetTVShowDetails","params":{"tvshowid":47,"properties":["imdbnumber"]},"id":1}
Reply
#10
Sad 
deleted
Reply

Logout Mark Read Team Forum Stats Members Help
Help to get thetvdb id0