mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-02 12:53:06 +02:00
Fix #3091 (calibredb list doesn't honour --prefix completely anymore)
This commit is contained in:
parent
16cadc2a31
commit
fc228bd5b5
1 changed files with 3 additions and 0 deletions
|
|
@ -1525,6 +1525,9 @@ def get_data_as_dict(self, prefix=None, authors_as_string=False):
|
|||
if formats:
|
||||
for fmt in formats.split(','):
|
||||
path = self.format_abspath(x['id'], fmt, index_is_id=True)
|
||||
if prefix != self.library_path:
|
||||
path = os.path.relpath(path, self.library_path)
|
||||
path = os.path.join(prefix, path)
|
||||
x['formats'].append(path)
|
||||
x['fmt_'+fmt.lower()] = path
|
||||
x['available_formats'] = [i.upper() for i in formats.split(',')]
|
||||
|
|
|
|||
Loading…
Reference in a new issue