Skip to content

Commit

Permalink
switch to (not updated) progress bar instead of notification (#78)
Browse files Browse the repository at this point in the history
* switch to (not updated) progress bar instead of notification
* handle resolving errors
  • Loading branch information
nullket committed Sep 19, 2022
1 parent a886dd7 commit 4a5f94e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions service.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,17 @@ def playlistIndex(url, playlist):
ydl.add_default_info_extractors()

with ydl:
showInfoNotification("Resolving stream(s) for " + url)
result = ydl.extract_info(url, download=False)
progress = xbmcgui.DialogProgressBG()
progress.create("Resolving " + url)
try:
result = ydl.extract_info(url, download=False)
except:
progress.close()
showErrorNotification("Could not resolve the url, check the log for more info")
import traceback
log(msg=traceback.format_exc(), level=xbmc.LOGERROR)
exit()
progress.close()

if 'entries' in result:
# more than one video
Expand Down

0 comments on commit 4a5f94e

Please sign in to comment.