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