diff options
author | Paweł Jastrzębski <pawelj@iosphe.re> | 2019-03-06 20:12:11 +0100 |
---|---|---|
committer | Paweł Jastrzębski <pawelj@iosphe.re> | 2019-03-06 20:12:11 +0100 |
commit | 535c2c220bfa303fd2b760843d3e5ba86358e356 (patch) | |
tree | f0f4ce6e024c097e8bab349bc6933cc46adc230e | |
parent | Bye, bye DEBs (diff) | |
download | kcc-535c2c220bfa303fd2b760843d3e5ba86358e356.tar.gz kcc-535c2c220bfa303fd2b760843d3e5ba86358e356.tar.bz2 kcc-535c2c220bfa303fd2b760843d3e5ba86358e356.zip |
Added RAR5 support
-rw-r--r-- | kindlecomicconverter/KCC_gui.py | 2 | ||||
-rw-r--r-- | kindlecomicconverter/comicarchive.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/kindlecomicconverter/KCC_gui.py b/kindlecomicconverter/KCC_gui.py index 7dcfbe6..33ef984 100644 --- a/kindlecomicconverter/KCC_gui.py +++ b/kindlecomicconverter/KCC_gui.py @@ -1078,7 +1078,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow): class KCCGUI_MetaEditor(KCC_ui_editor.Ui_editorDialog): def loadData(self, file): self.parser = metadata.MetadataParser(file) - if self.parser.format == 'RAR': + if self.parser.format in ['RAR', 'RAR5']: self.editorWidget.setEnabled(False) self.okButton.setEnabled(False) self.statusLabel.setText('CBR metadata are read-only.') diff --git a/kindlecomicconverter/comicarchive.py b/kindlecomicconverter/comicarchive.py index 214ae8d..435a99c 100644 --- a/kindlecomicconverter/comicarchive.py +++ b/kindlecomicconverter/comicarchive.py @@ -40,7 +40,7 @@ class ComicArchive: process.communicate() if process.returncode != 0: raise OSError('Archive is corrupted or encrypted.') - elif self.type not in ['7Z', 'RAR', 'ZIP']: + elif self.type not in ['7Z', 'RAR', 'RAR5', 'ZIP']: raise OSError('Unsupported archive format.') def extract(self, targetdir): @@ -61,7 +61,7 @@ class ComicArchive: return targetdir def addFile(self, sourcefile): - if self.type == 'RAR': + if self.type in ['RAR', 'RAR5']: raise NotImplementedError process = Popen('7z a -y "' + self.filepath + '" "' + sourcefile + '"', stdout=PIPE, stderr=STDOUT, shell=True) |