debug mode
This commit is contained in:
parent
d9971f3c66
commit
d0f11023f4
1 changed files with 8 additions and 5 deletions
|
@ -27,6 +27,9 @@ from subtitles import *
|
||||||
from extract import *
|
from extract import *
|
||||||
import midentify
|
import midentify
|
||||||
|
|
||||||
|
def debug(string):
|
||||||
|
#print string
|
||||||
|
return
|
||||||
|
|
||||||
hub = PackageHub('oxdbarchive')
|
hub = PackageHub('oxdbarchive')
|
||||||
__connection__ = hub
|
__connection__ = hub
|
||||||
|
@ -531,7 +534,7 @@ class ArchiveFile(SQLObject):
|
||||||
if not movie_file or not exists(movie_file):
|
if not movie_file or not exists(movie_file):
|
||||||
return
|
return
|
||||||
if exists(mini_movie_file) and not force:
|
if exists(mini_movie_file) and not force:
|
||||||
print "clip exists, skipping extraction", mini_movie_file
|
debug("clip exists, skipping extraction %s" % mini_movie_file)
|
||||||
return
|
return
|
||||||
self.extracted = False
|
self.extracted = False
|
||||||
oxdb_makedir(dirname(mini_movie_file))
|
oxdb_makedir(dirname(mini_movie_file))
|
||||||
|
@ -543,7 +546,7 @@ class ArchiveFile(SQLObject):
|
||||||
options += ' "%s"' % movie_file.replace('"', '\\"')
|
options += ' "%s"' % movie_file.replace('"', '\\"')
|
||||||
options += ' -o "%s"' % mini_movie_file
|
options += ' -o "%s"' % mini_movie_file
|
||||||
cmd = "mencoder %s >/dev/null 2>&1" % options
|
cmd = "mencoder %s >/dev/null 2>&1" % options
|
||||||
#print cmd.encode('utf-8')
|
debug(cmd.encode('utf-8'))
|
||||||
r = os.system(cmd.encode('utf-8'))
|
r = os.system(cmd.encode('utf-8'))
|
||||||
if r == 0:
|
if r == 0:
|
||||||
self.extracted = True
|
self.extracted = True
|
||||||
|
@ -563,12 +566,12 @@ class ArchiveFile(SQLObject):
|
||||||
return
|
return
|
||||||
|
|
||||||
if not (self.extracted and exists(self.mini_movie_file)):
|
if not (self.extracted and exists(self.mini_movie_file)):
|
||||||
print "mini movie missing, skipping", self.path
|
debug("mini movie missing, skipping %s" % self.path)
|
||||||
return
|
return
|
||||||
|
|
||||||
t = self.timelineFile
|
t = self.timelineFile
|
||||||
if exists(t):
|
if exists(t):
|
||||||
print "skipping, ", self.path
|
debug("timeline exists , %s" % self.path)
|
||||||
return
|
return
|
||||||
|
|
||||||
oxdb_makedir(dirname(t))
|
oxdb_makedir(dirname(t))
|
||||||
|
@ -594,7 +597,7 @@ class ArchiveFile(SQLObject):
|
||||||
if not subtitle.absolutePath or not exists(subtitle.absolutePath):
|
if not subtitle.absolutePath or not exists(subtitle.absolutePath):
|
||||||
return
|
return
|
||||||
if not subtitle.absolutePath.endswith('.srt'):
|
if not subtitle.absolutePath.endswith('.srt'):
|
||||||
print "this is not a subtitle", subtitle.absolutePath
|
debug("this is not a subtitle %s" % subtitle.absolutePath)
|
||||||
return
|
return
|
||||||
movieFile.srt = loadSrt(subtitle.absolutePath)
|
movieFile.srt = loadSrt(subtitle.absolutePath)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue