Пример #1
0
 def _play_callback(self, data):
     """Callback function used for Up Next add-on integration"""
     common.info('Received play signal from UpNext add-on. Playing next episode...')
     # This information are necessary to be able to understand if when play the next episode is done by
     # the add-on itself or from external call (Kodi library)
     g.LOCAL_DB.set_value('upnext_play_callback_received', True)
     g.LOCAL_DB.set_value('upnext_play_callback_file_type', 'strm' if '.strm' in data['play_path'] else 'plugin')
     # Manually generates the OnStop notification
     self.onNotification('_play_callback', 'Player.OnStop', None)
     # Todo: Seem a bug of Kodi, when play next video and stop the video,
     #  the previous videos marked as watched lost his checks
     #  but if you return to previous folder and open again the video list, the lost checks are restored.
     #  This happen when play videos inside add-on with "Sync of watched status with Netflix" feature disabled.
     common.play_media(data['play_path'])
Пример #2
0
def play_callback(data):
    """Callback function used for upnext integration"""
    common.debug('Received signal from Up Next. Playing next episode...')
    common.stop_playback()
    common.play_media(data['play_path'])