Exemple #1
0
 def __init__(self,
              tmdb_type,
              tmdb_id=None,
              season=None,
              episode=None,
              ignore_default=False,
              **kwargs):
     self.players = get_players_from_file()
     self.details = get_item_details(tmdb_type, tmdb_id, season, episode)
     self.item = get_detailed_item(
         tmdb_type, tmdb_id, season, episode, details=self.details) or {}
     self.playerstring = get_playerstring(tmdb_type,
                                          tmdb_id,
                                          season,
                                          episode,
                                          details=self.details)
     self.dialog_players = self._get_players_for_dialog(tmdb_type)
     self.default_player = ADDON.getSettingString(
         'default_player_movies'
     ) if tmdb_type == 'movie' else ADDON.getSettingString(
         'default_player_episodes')
     self.ignore_default = ignore_default
     self.tmdb_type, self.tmdb_id, self.season, self.episode = tmdb_type, tmdb_id, season, episode
     self.dummy_duration = try_float(
         ADDON.getSettingString('dummy_duration')) or 1.0
     self.dummy_delay = try_float(
         ADDON.getSettingString('dummy_delay')) or 1.0
     self.force_xbmcplayer = ADDON.getSettingBool('force_xbmcplayer')
 def __init__(self,
              tmdb_type,
              tmdb_id=None,
              season=None,
              episode=None,
              ignore_default=False,
              **kwargs):
     with busy_dialog():
         self.players = get_players_from_file()
         self.details = get_item_details(tmdb_type, tmdb_id, season,
                                         episode)
         self.item = get_detailed_item(
             tmdb_type, tmdb_id, season, episode,
             details=self.details) or {}
         self.playerstring = get_playerstring(tmdb_type,
                                              tmdb_id,
                                              season,
                                              episode,
                                              details=self.details)
         self.dialog_players = self._get_players_for_dialog(tmdb_type)
         self.default_player = ADDON.getSettingString(
             'default_player_movies'
         ) if tmdb_type == 'movie' else ADDON.getSettingString(
             'default_player_episodes')
         self.ignore_default = ignore_default
Exemple #3
0
    def __init__(self,
                 tmdb_type,
                 tmdb_id=None,
                 season=None,
                 episode=None,
                 ignore_default=False,
                 islocal=False,
                 **kwargs):
        with ProgressDialog('TMDbHelper',
                            u'{}...'.format(ADDON.getLocalizedString(32374)),
                            total=3) as _p_dialog:
            self.api_language = None
            self.players = get_players_from_file()

            _p_dialog.update(u'{}...'.format(ADDON.getLocalizedString(32375)))
            self.details = get_item_details(tmdb_type, tmdb_id, season,
                                            episode)
            self.item = get_detailed_item(
                tmdb_type, tmdb_id, season, episode,
                details=self.details) or {}

            _p_dialog.update(u'{}...'.format(ADDON.getLocalizedString(32376)))
            self.playerstring = get_playerstring(tmdb_type,
                                                 tmdb_id,
                                                 season,
                                                 episode,
                                                 details=self.details)
            self.dialog_players = self._get_players_for_dialog(tmdb_type)

            self.default_player = ADDON.getSettingString(
                'default_player_movies'
            ) if tmdb_type == 'movie' else ADDON.getSettingString(
                'default_player_episodes')
            self.ignore_default = ignore_default
            self.tmdb_type, self.tmdb_id, self.season, self.episode = tmdb_type, tmdb_id, season, episode
            self.dummy_duration = try_float(
                ADDON.getSettingString('dummy_duration')) or 1.0
            self.dummy_delay = try_float(
                ADDON.getSettingString('dummy_delay')) or 1.0
            self.force_xbmcplayer = ADDON.getSettingBool('force_xbmcplayer')
            self.is_strm = islocal