Fix else clauses in for loops

This commit is contained in:
tomkat83 2017-05-08 19:32:12 +02:00
parent 51e2d87a2e
commit 2a8d288a5b

View file

@ -1189,10 +1189,9 @@ class TVShows(Items):
v.KODI_TYPE_SEASON) v.KODI_TYPE_SEASON)
for season in seasons: for season in seasons:
self.removeSeason(season[1]) self.removeSeason(season[1])
else: # Delete plex season entries
# Delete plex season entries plex_db.removeItems_byParentId(showid,
plex_db.removeItems_byParentId(showid, v.KODI_TYPE_SEASON)
v.KODI_TYPE_SEASON)
self.removeShow(showid) self.removeShow(showid)
plex_db.removeItem(show[0]) plex_db.removeItem(show[0])
@ -1208,14 +1207,12 @@ class TVShows(Items):
seasonid, v.KODI_TYPE_EPISODE) seasonid, v.KODI_TYPE_EPISODE)
for episode in season_episodes: for episode in season_episodes:
self.removeEpisode(episode[1], episode[2]) self.removeEpisode(episode[1], episode[2])
else: # Remove plex episodes
# Remove plex episodes plex_db.removeItems_byParentId(seasonid,
plex_db.removeItems_byParentId(seasonid, v.KODI_TYPE_EPISODE)
v.KODI_TYPE_EPISODE) # Remove plex seasons
else: plex_db.removeItems_byParentId(kodiid,
# Remove plex seasons v.KODI_TYPE_SEASON)
plex_db.removeItems_byParentId(kodiid,
v.KODI_TYPE_SEASON)
# Remove tvshow # Remove tvshow
self.removeShow(kodiid) self.removeShow(kodiid)
@ -1228,9 +1225,8 @@ class TVShows(Items):
v.KODI_TYPE_EPISODE) v.KODI_TYPE_EPISODE)
for episode in season_episodes: for episode in season_episodes:
self.removeEpisode(episode[1], episode[2]) self.removeEpisode(episode[1], episode[2])
else: # Remove plex episodes
# Remove plex episodes plex_db.removeItems_byParentId(kodiid, v.KODI_TYPE_EPISODE)
plex_db.removeItems_byParentId(kodiid, v.KODI_TYPE_EPISODE)
# Remove season # Remove season
self.removeSeason(kodiid) self.removeSeason(kodiid)