mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 10:13:42 +02:00
USBMS: Add filename to News and / special tags.
This commit is contained in:
parent
67ae787d45
commit
c007eb5000
1 changed files with 3 additions and 5 deletions
|
|
@ -870,6 +870,7 @@ def create_upload_path(self, path, mdata, fname):
|
|||
if special_tag is None:
|
||||
from calibre.library.save_to_disk import get_components
|
||||
extra_components = get_components(template, mdata, fname)
|
||||
extra_components[-1] += ext
|
||||
else:
|
||||
tag = special_tag
|
||||
if tag.startswith(_('News')):
|
||||
|
|
@ -883,17 +884,14 @@ def create_upload_path(self, path, mdata, fname):
|
|||
c = sanitize(c)
|
||||
if not c: continue
|
||||
extra_components.append(c)
|
||||
|
||||
extra_componets.append(fname)
|
||||
|
||||
if not use_subdirs:
|
||||
extra_components = extra_components[:1]
|
||||
|
||||
if not extra_components:
|
||||
fname = sanitize(self.filename_callback(fname, mdata))
|
||||
extra_components.append(fname)
|
||||
extra_components = [str(x) for x in extra_components]
|
||||
else:
|
||||
extra_components[-1] += ext
|
||||
extra_components.append(str(fname))
|
||||
|
||||
def remove_trailing_periods(x):
|
||||
ans = x
|
||||
|
|
|
|||
Loading…
Reference in a new issue