diff --git a/audible-converter.py b/audible-converter.py index 644fcf4..6d98bad 100644 --- a/audible-converter.py +++ b/audible-converter.py @@ -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()