-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send notification when video play fails #3
base: master
Are you sure you want to change the base?
Conversation
- ISA doesn't support Representations with multiple BaseURLs - Dont block adaptive formats for clients that may need PO tokens - Some urls for adaptive formats may be blocked even if client does need a PO token - As not all urls may be blocked, use HTTPServer to try them all as a proxy to ISA
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would suggest just adding the notification once in yt_play.process
, rather than in multiple places in yt_play._play_stream
:
media_item = _play_stream(provider, context)
if media_item:
if position and items:
ui.set_property(PLAYLIST_PATH,
items[position - 1]['file'])
ui.set_property(PLAYLIST_POSITION, str(position))
else:
ui.clear_property(BUSY_FLAG)
context.send_notification(PLAYBACK_FAILED, {'video_id': video_id})
But looking at it from a higher level, if the intent is to close a dialog and re-open it once playback has completed, wouldn't a better way of doing this be to only close the dialog if the PLAYBACK_STARTED
notification is received?
@@ -63,6 +63,7 @@ | |||
PLAYBACK_STOPPED = 'playback_stopped' | |||
REFRESH_CONTAINER = 'refresh_container' | |||
RELOAD_ACCESS_MANAGER = 'reload_access_manager' | |||
PLAYBACK_FAILED = 'playback_failed' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you keep this group of events in alphabetical order? And the __all__
tuple too.
647f603
to
6092bce
Compare
PR to provide mechanism to alert addons via xbmc.Monitor.onNotification() when addon invokes plugin via PlayMedia() and Youtube is unable to play the video (ex. no streams found)
Add a new notification event "PLAYBACK_FAILED"
Add new calls to method send_notification in yt_play.py when plugin attempts to start play of video but youtube is unable to handle for any reason.