mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
Convert to new-style class by inheriting from object
This commit is contained in:
parent
c7defa37da
commit
0a1fe84306
5 changed files with 13 additions and 8 deletions
|
@ -12,7 +12,8 @@ from core.transcoder import transcoder
|
|||
|
||||
requests.packages.urllib3.disable_warnings()
|
||||
|
||||
class autoProcessMovie:
|
||||
|
||||
class autoProcessMovie(object):
|
||||
def get_release(self, baseURL, imdbid=None, download_id=None, release_id=None):
|
||||
results = {}
|
||||
params = {}
|
||||
|
@ -46,7 +47,7 @@ class autoProcessMovie:
|
|||
if 'error' in result:
|
||||
logger.error(str(result['error']))
|
||||
else:
|
||||
logger.error("no media found for id %s" % (params['id']))
|
||||
logger.error("no media found for id %s" % (params['id']))
|
||||
return results
|
||||
|
||||
# Gather release info and return it back, no need to narrow results
|
||||
|
@ -210,7 +211,7 @@ class autoProcessMovie:
|
|||
else:
|
||||
logger.error("Transcoding failed for files in %s" % (dirName), section)
|
||||
return [1, "%s: Failed to post-process - Transcoding failed" % (section) ]
|
||||
for video in listMediaFiles(dirName, media=True, audio=False, meta=False, archives=False):
|
||||
for video in listMediaFiles(dirName, media=True, audio=False, meta=False, archives=False):
|
||||
if not release and not ".cp(tt" in video and imdbid:
|
||||
videoName, videoExt = os.path.splitext(video)
|
||||
video2 = "%s.cp(%s)%s" % (videoName, imdbid, videoExt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue