def run(self):
        debug(self.command)
        import subprocess

        startupinfo = None
        u8runner = None

        if os.name == 'nt':
            startupinfo = subprocess.STARTUPINFO()
            startupinfo.dwFlags |= 1
            startupinfo.wShowWindow = 0
            u8runner = filesystem.abspath(
                filesystem.join(Runner.get_addon_path(),
                                'bin/u8runner.exe')).encode('mbcs')

        shell = self.command[0].startswith('@')
        if shell:
            self.command[0] = self.command[0][1:]

        try:
            subprocess.call(executable=u8runner,
                            args=self.command,
                            startupinfo=startupinfo,
                            shell=shell)
        except OSError, e:
            debug(("Can't start %s: %r" % (str(self.command), e)))
	def __init__(self, base_path,
	             movies_path			= u'Movies',
	             animation_path		= u'Animation',
	             documentary_path	= u'Documentary',
	             anime_path			= u'Anime',
	             hdclub_passkey 		= '',
	             anidub_login = '', anidub_password = '',
	             nnmclub_login = '', nnmclub_password = '', nnmclub_pages = 1, nnmclub_hours=168,
	             rutor_domain = 'rutor.info',
	             rutor_filter = 'CAMRip TS TC VHSRip TVRip SATRip IPTVRip HDTV HDTVRip WEBRip DVD5 DVD9 DVDRip Blu-Ray SuperTS SCR VHSScr DVDScr WP',
	             preffered_bitrate = 10000, preffered_type = QulityType.Q1080, preffered_codec = CodecType.MPGHD,
	             torrent_player = TorrentPlayer.YATP, storage_path = '',
	             movies_save			= True,
	             animation_save		= True,
	             documentary_save	= True,
	             anime_save			= True,
	             tvshows_save		= True,
	             animation_tvshows_save = True,
	             torrent_path        = ''):
		#--------------------------------------------------------------------------------
		self.movies_url 			= self.base_url + '?cat=71&passkey=' + hdclub_passkey
		self.animation_url 			= self.base_url + '?cat=70&passkey=' + hdclub_passkey
		self.documentary_url 		= self.base_url + '?cat=78&passkey=' + hdclub_passkey
		self.hdclub_passkey			= hdclub_passkey
		
		self.__base_path			= filesystem.abspath(base_path)
		self.__movies_path 			= movies_path
		self.__animation_path 		= animation_path
		self.__documentary_path 	= documentary_path
	
		self.anidub_url				= 'http://tr.anidub.com/rss.xml'
		self.__anime_tvshow_path 	= anime_path
		self.anidub_login 			= anidub_login
		self.anidub_password 		= anidub_password

		self.nnmclub_login 			= nnmclub_login
		self.nnmclub_password 		= nnmclub_password
		self.nnmclub_pages			= nnmclub_pages
		self.nnmclub_hours			= nnmclub_hours
		self.use_kinopoisk			= True

		self.rutor_domain           = rutor_domain
		self.rutor_filter           = rutor_filter
		
		self.preffered_bitrate		= preffered_bitrate
		self.preffered_type			= preffered_type
		self.preffered_codec        = preffered_codec if preffered_codec else CodecType.MPGHD
		
		self.torrent_player 		= torrent_player
		self.storage_path			= storage_path
		
		self.movies_save 			= movies_save
		self.animation_save 		= animation_save
		self.documentary_save 		= documentary_save
		self.anime_save 			= anime_save
		self.tvshows_save 			= tvshows_save
		self.animation_tvshows_save = animation_tvshows_save
		self.torrent_path           = torrent_path
		
		self.progress_dialog		= FakeProgressDlg()
Beispiel #3
0
 def filename(self):
     import filesystem
     name = self.module + self.timestamp() + '.log'
     try:
         from xbmc import translatePath
         _filename = 'special://logpath/' + name
     except ImportError:
         _filename = filesystem.abspath(
             filesystem.join(__file__, '../../..', name))
     return _filename
	def tvs_reader(self):
		is_episode = self.is_episode()

		if is_episode:
			path = filesystem.dirname(self.path)
			path = filesystem.abspath(filesystem.join(path, os.pardir))
			path = filesystem.join(path, u'tvshow.nfo')

			if filesystem.exists(path):
				debug(u'tvs_reader: ' + path)
				return NFOReader(path, self.__temp_path)

		return None
    def tvs_reader(self):
        is_episode = self.is_episode()

        if is_episode:
            path = filesystem.dirname(self.path)
            path = filesystem.abspath(filesystem.join(path, os.pardir))
            path = filesystem.join(path, u'tvshow.nfo')

            if filesystem.exists(path):
                debug(u'tvs_reader: ' + path)
                return NFOReader(path, self.__temp_path)

        return None
	def __init__(self, path=None):
		self.role           = _addon.getSetting("role").decode('utf-8')
		self.storage_path   = _addon.getSetting("storage_path").decode('utf-8')

		self.storage_path  = filesystem.abspath(self.storage_path)

		self.remote_host    = _addon.getSetting("remote_host").decode('utf-8')
		try:
			self.remote_port    = int(_addon.getSetting("remote_port"))
		except:
			self.remote_port = 28282

		self.binaries_path = _bin_dir

		xbmc.log(str(self.__dict__))
	def run(self):
		debug(self.command)
		import subprocess

		startupinfo = None
		u8runner = None

		if os.name == 'nt':
			startupinfo = subprocess.STARTUPINFO()
			startupinfo.dwFlags |= 1
			startupinfo.wShowWindow = 0
			u8runner = filesystem.abspath(filesystem.join(Runner.get_addon_path(), 'bin/u8runner.exe')).encode('mbcs')

		shell = self.command[0].startswith('@')
		if shell:
			self.command[0] = self.command[0][1:]

		try:
			subprocess.call(executable=u8runner, args=self.command, startupinfo=startupinfo, shell=shell)
		except OSError, e:
			debug(("Can't start %s: %r" % (str(self.command), e)))
	def __init__(self, base_path,
	             movies_path			= u'Movies',
	             animation_path		= u'Animation',
	             documentary_path	= u'Documentary',
	             anime_path			= u'Anime',
	             hdclub_passkey 		= '',
	             bluebird_passkey 		= None, bluebird_preload_torrents = False, bluebird_login = '', bluebird_password = '', bluebird_nouhd = True,
	             anidub_login = '', anidub_password = '', anidub_rss=True, anidub_favorite=True,
	             nnmclub_login = '', nnmclub_password = '', nnmclub_pages = 1, nnmclub_hours=168, nnmclub_domain='nnm-club.me', nnmclub_use_ssl=False,
	             rutor_domain = 'rutor.info',
	             rutor_filter = 'CAMRip TS TC VHSRip TVRip SATRip IPTVRip HDTV HDTVRip WEBRip DVD5 DVD9 DVDRip Blu-Ray SuperTS SCR VHSScr DVDScr WP',
	             soap4me_login = '', soap4me_password = '', soap4me_rss='',
	             preffered_bitrate = 10000, preffered_type = QulityType.Q1080, preffered_codec = CodecType.MPGHD,
	             torrent_player = TorrentPlayer.YATP, storage_path = '',
	             movies_save			= True,
	             animation_save		= True,
	             documentary_save	= True,
	             anime_save			= True,
	             tvshows_save		= True,
	             animation_tvshows_save = True,
                 documentary_tvshows_save = True,
                 concert_save = True, 
                 kids_save = True,
                 theater_save = True,
	             torrent_path        = '',
				 addon_data_path	 = '',
				 kp_googlecache     = False,
				 kp_usezaborona		= False,
				 rutor_nosd			= True):
		#--------------------------------------------------------------------------------
		Settings.current_settings	= self
		#--------------------------------------------------------------------------------
#		self.movies_url 			= self.base_url  '?cat=71&passkey='  hdclub_passkey
#		self.animation_url 			= self.base_url  '?cat=70&passkey='  hdclub_passkey
#		self.documentary_url 		= self.base_url  '?cat=78&passkey='  hdclub_passkey
#		self.hdclub_passkey			= hdclub_passkey
		self.bluebird_passkey		= bluebird_passkey
		self.bluebird_login			= bluebird_login
		self.bluebird_password		= bluebird_password
		self.bluebird_preload_torrents = bluebird_preload_torrents
		self.bluebird_nouhd			= bluebird_nouhd
		
		self.__base_path			= filesystem.abspath(base_path)
		self.__movies_path 			= movies_path
		self.__animation_path 		= animation_path
		self.__documentary_path 	= documentary_path
	
		self.anidub_url				= 'http://tr.anidub.com/rss.xml'
		self.__anime_tvshow_path 	= anime_path
		self.anidub_login 			= anidub_login
		self.anidub_password 		= anidub_password
		self.anidub_rss 			= anidub_rss
		self.anidub_favorite 		= anidub_favorite

		self.nnmclub_domain			= nnmclub_domain
		self.nnmclub_use_ssl		= nnmclub_use_ssl
		self.nnmclub_login 			= nnmclub_login
		self.nnmclub_password 		= nnmclub_password
		self.nnmclub_pages			= nnmclub_pages
		self.nnmclub_hours			= nnmclub_hours
		self.use_kinopoisk			= True
		self.use_worldart			= True

		self.show_sources			= False

		self.rutor_domain           = rutor_domain
		self.rutor_filter           = rutor_filter

		self.soap4me_login			= soap4me_login
		self.soap4me_password		= soap4me_password
		self.soap4me_rss			= soap4me_rss
		
		self.preffered_bitrate		= preffered_bitrate
		self.preffered_type			= preffered_type
		self.preffered_codec        = preffered_codec if preffered_codec else CodecType.MPGHD
		
		self.torrent_player 		= torrent_player
		self.storage_path			= storage_path
		
		self.movies_save 			= movies_save
		self.animation_save 		= animation_save
		self.documentary_save 		= documentary_save
		self.anime_save 			= anime_save
		self.tvshows_save 			= tvshows_save
		self.animation_tvshows_save = animation_tvshows_save
		self.torrent_path           = torrent_path
		self.documentary_tvshows_save = documentary_tvshows_save
		self.concert_save = concert_save
		self.kids_save = kids_save
		self.theater_save = theater_save
		self.addon_data_path		= addon_data_path

		self.kp_googlecache			= kp_googlecache
		self.kp_usezaborona			= kp_usezaborona
		self.rutor_nosd				= rutor_nosd

		self.progress_dialog		= FakeProgressDlg()

		self.kinohd_enable			= True
		self.kinohd_4k				= True
		self.kinohd_1080p			= True
		self.kinohd_720p			= True
		self.kinohd_3d				= False
		self.kinohd_serial			= True