mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Studios convert to Kodi compatible studios
This commit is contained in:
parent
749b39e5e7
commit
0294957d14
1 changed files with 15 additions and 2 deletions
|
@ -78,16 +78,29 @@ class API():
|
||||||
|
|
||||||
try:
|
try:
|
||||||
studio = item['SeriesStudio']
|
studio = item['SeriesStudio']
|
||||||
studios.append(studio)
|
studios.append(self.getStudio(studio))
|
||||||
except:
|
except:
|
||||||
try:
|
try:
|
||||||
studioArray = item['Studios']
|
studioArray = item['Studios']
|
||||||
for studio in studioArray:
|
for studio in studioArray:
|
||||||
studios.append(studio['Name'])
|
studios.append(self.getStudio(studio['Name']))
|
||||||
except: pass
|
except: pass
|
||||||
|
|
||||||
return studios
|
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):
|
def getGenre(self,item):
|
||||||
genre = ""
|
genre = ""
|
||||||
genres = item.get("Genres")
|
genres = item.get("Genres")
|
||||||
|
|
Loading…
Reference in a new issue