Studios convert to Kodi compatible studios

This commit is contained in:
angelblue05 2015-10-01 03:13:39 -05:00
parent 749b39e5e7
commit 0294957d14

View file

@ -78,16 +78,29 @@ class API():
try:
studio = item['SeriesStudio']
studios.append(studio)
studios.append(self.getStudio(studio))
except:
try:
studioArray = item['Studios']
for studio in studioArray:
studios.append(studio['Name'])
studios.append(self.getStudio(studio['Name']))
except: pass
return studios
def getStudio(self, studioName):
# Convert studio for Kodi to properly detect them
studios = {
'abc (us)': "ABC",
'fox (us)': "FOX",
'mtv (us)': "MTV",
'showcase (ca)': "Showcase",
'wgn america': "WGN"
}
return studios.get(studioName.lower(), studioName)
def getGenre(self,item):
genre = ""
genres = item.get("Genres")