Пример #1
0
	def __init__(self, jobManager, jobManagerItem, torrentClient ):
		phases = [
			self.__StopAutomaticJobBeforeExtracting,
			self.__StopAutomaticJobIfThereAreMultipleVideosBeforeExtracting,
			self.__CreateUploadPath,
			self.__MakeIncludedFileList,
			self.__ExtractRelease,
			self.__ValidateExtractedRelease,
			self.__MakeReleaseDescription,
			self.__DetectSubtitles,
			self.__MakeTorrent,
			self.__CheckIfExistsOnPtp,
			self.__CheckSynopsis,
			self.__CheckCoverArt,
			self.__RehostPoster,
			self.__StopBeforeUploading,
			self.__StartTorrent,
			self.__UploadMovie,
			self.__ExecuteCommandOnSuccessfulUpload ]

		WorkerBase.__init__( self, phases, jobManager, jobManagerItem )
		
		self.TorrentClient = torrentClient
		self.IncludedFileList = None
		self.VideoFiles = []
		self.AdditionalFiles = []
		self.MainMediaInfo = None
		self.ReleaseDescription = u""
    def __init__(self, jobManager, jobManagerItem, torrentClient):
        phases = [
            self.__CheckAnnouncementSource, self.__PrepareDownload,
            self.__CheckSizeLimit, self.__ValidateReleaseInfo,
            self.__CheckIfExistsOnPtp,
            self.__FillOutDetailsForNewMovieByPtpApi,
            self.__FillOutDetailsForNewMovieByExternalSources,
            self.__CheckSynopsis, self.__CheckCoverArt,
            self.__CheckImdbRatingAndVoteCount,
            self.__StopAutomaticJobBeforeDownloadingTorrentFile
        ]

        # Instead of this if, it would be possible to make a totally generic downloader system through SourceBase.
        if jobManagerItem.ReleaseInfo.AnnouncementSourceName == "file":
            phases.append(self.__DetectSceneReleaseFromFileList)
            phases.append(self.__AddToPendingDownloads)
        else:
            phases.extend([
                self.__CreateReleaseDirectory, self.__DownloadTorrentFile,
                self.
                __StopAutomaticJobIfThereAreMultipleVideosBeforeDownloading,
                self.__DetectSceneReleaseFromFileList, self.__DownloadTorrent,
                self.__AddToPendingDownloads
            ])

        WorkerBase.__init__(self, phases, jobManager, jobManagerItem)
        self.TorrentClient = torrentClient
Пример #3
0
	def __init__( self, jobManager, jobManagerItem, torrentClient ):
		phases = [
			self.__CheckAnnouncementSource,
			self.__PrepareDownload,
			self.__CheckSizeLimit,
			self.__ValidateReleaseInfo,
			self.__CheckIfExistsOnPtp,
			self.__FillOutDetailsForNewMovieByPtpApi,
			self.__FillOutDetailsForNewMovieByExternalSources,
			self.__CheckSynopsis,
			self.__CheckCoverArt,
			self.__CheckImdbRatingAndVoteCount, 
			self.__StopAutomaticJobBeforeDownloadingTorrentFile ]

		# Instead of this if, it would be possible to make a totally generic downloader system through SourceBase.
		if jobManagerItem.ReleaseInfo.AnnouncementSourceName == "file":
			phases.append( self.__DetectSceneReleaseFromFileList )
			phases.append( self.__AddToPendingDownloads )
		else:
			phases.extend( [
				self.__CreateReleaseDirectory,
				self.__DownloadTorrentFile,
				self.__StopAutomaticJobIfThereAreMultipleVideosBeforeDownloading,
				self.__DetectSceneReleaseFromFileList,
				self.__DownloadTorrent,
				self.__AddToPendingDownloads ] )

		WorkerBase.__init__( self, phases, jobManager, jobManagerItem )
		self.TorrentClient = torrentClient