mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-17 21:56:13 +00:00
add Special TV Show mapping to Season 100 and use Delete from table for DB reset
This commit is contained in:
parent
ff437bc439
commit
9d2d2788b2
6 changed files with 56 additions and 33 deletions
|
@ -164,9 +164,30 @@ class ReadEmbyDB():
|
|||
result = json.loads(jsonData)
|
||||
if(result.has_key('Items')):
|
||||
result = result['Items']
|
||||
result = self.changeSeasonSpecialToSeason100(result)
|
||||
|
||||
return result
|
||||
|
||||
def changeSeasonSpecialToSeason100(self, result):
|
||||
addon = xbmcaddon.Addon(id='plugin.video.emby')
|
||||
if(addon.getSetting("useSeason100ForSpecials") != "true"):
|
||||
return result
|
||||
|
||||
for item in result:
|
||||
if(item != None and item.get("IndexNumber") != None and item.get("IndexNumber") == 0):
|
||||
item["IndexNumber"] = 100
|
||||
return result
|
||||
|
||||
def changeEpisodeSpecialToSeason100(self, result):
|
||||
addon = xbmcaddon.Addon(id='plugin.video.emby')
|
||||
if(addon.getSetting("useSeason100ForSpecials") != "true"):
|
||||
return result
|
||||
|
||||
for item in result:
|
||||
if(item != None and item.get("ParentIndexNumber") != None and item.get("ParentIndexNumber") == 0):
|
||||
item["ParentIndexNumber"] = 100
|
||||
return result
|
||||
|
||||
def getEpisodes(self, showId, fullinfo = False):
|
||||
result = None
|
||||
|
||||
|
@ -189,6 +210,8 @@ class ReadEmbyDB():
|
|||
result = json.loads(jsonData)
|
||||
if(result.has_key('Items')):
|
||||
result = result['Items']
|
||||
result = self.changeEpisodeSpecialToSeason100(result)
|
||||
|
||||
return result
|
||||
|
||||
def getLatestEpisodes(self, fullinfo = False, itemList = []):
|
||||
|
@ -217,6 +240,8 @@ class ReadEmbyDB():
|
|||
result = json.loads(jsonData)
|
||||
if(result.has_key('Items')):
|
||||
result = result['Items']
|
||||
result = self.changeEpisodeSpecialToSeason100(result)
|
||||
|
||||
return result
|
||||
|
||||
def getCollections(self, type):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue