Export cover

This commit is contained in:
Christian Colglazier 2021-08-14 15:49:07 -04:00
parent 86b5241f32
commit ccc8d7c7a2

View File

@ -57,6 +57,11 @@ class AudibleBook(object):
if not os.path.exists(outFilePath):
os.system('ffmpeg -i {} -acodec copy -vcodec copy -ss {} -t {} {}'.
format(self.convertedFilePath, start, end, outFilePath))
def getCover(self):
outFilePath = '{}/cover.jpg'.format(self.targetDir)
if not os.path.exists(outFilePath):
os.system('ffmpeg -i {} -an -vcodec copy {}'.
format(self.convertedFilePath, outFilePath))
# getHash() returns the hash of a given file.
@ -105,4 +110,5 @@ book.setTargetDir(outputDir)
book.removeDRM(name)
book.splitChapters()
book.getCover()