Ignore invalid episode items (bug 934)
In case the episode list is in an inconsistent state, we simply ignore that episode an continue with the rest.
This commit is contained in:
parent
96cd54122f
commit
b4886df89a
1 changed files with 5 additions and 1 deletions
|
@ -2124,7 +2124,11 @@ class gPodder(BuilderWidget, dbus.service.Object):
|
|||
(model, paths) = selection.get_selected_rows()
|
||||
|
||||
for path in paths:
|
||||
episode = model.get_value(model.get_iter(path), EpisodeListModel.C_EPISODE)
|
||||
try:
|
||||
episode = model.get_value(model.get_iter(path), EpisodeListModel.C_EPISODE)
|
||||
except TypeError, te:
|
||||
log('Invalid episode at path %s', str(path), sender=self)
|
||||
continue
|
||||
|
||||
if episode.file_type() not in ('audio', 'video'):
|
||||
open_instead_of_play = True
|
||||
|
|
Loading…
Reference in a new issue