Log exceptions when searching for podcasts on gpodder.net.

This commit is contained in:
auouymous 2023-04-02 23:17:13 -06:00
parent ddbae467ef
commit 43eb6ca5f5
1 changed files with 9 additions and 6 deletions

View File

@ -279,12 +279,15 @@ class gPodderPodcastDirectory(BuilderWidget):
@self.obtain_podcasts_with
def load_data():
if self.current_provider.kind == directory.Provider.PROVIDER_SEARCH:
return self.current_provider.on_search(query)
elif self.current_provider.kind == directory.Provider.PROVIDER_URL:
return self.current_provider.on_url(query)
elif self.current_provider.kind == directory.Provider.PROVIDER_FILE:
return self.current_provider.on_file(query)
try:
if self.current_provider.kind == directory.Provider.PROVIDER_SEARCH:
return self.current_provider.on_search(query)
elif self.current_provider.kind == directory.Provider.PROVIDER_URL:
return self.current_provider.on_url(query)
elif self.current_provider.kind == directory.Provider.PROVIDER_FILE:
return self.current_provider.on_file(query)
except Exception as e:
logger.warning('Got exception while loading podcasts: %s', e)
def on_can_subscribe_changed(self, can_subscribe):
self.btnOK.set_sensitive(can_subscribe)