Skip to content

Commit

Permalink
filename tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
flibrarian committed Mar 4, 2023
1 parent b91bfee commit 2ef6864
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flibcommon.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ def get_display_sequence(book):
'антология современной прозы',
'антология духовной мысли',
'антология советской литературы',
'антология военной литературы']
'антология военной литературы',
'антология романса']
for seq in book.description.sequences + book.description.psequences:
if seq.number and seq.number.isdigit() and int(seq.number) > 0:
skip = False
Expand Down Expand Up @@ -353,6 +354,8 @@ def build_filename(book, translit):

filename_parts.append(book.description.title)
base = '_'.join([process_characters(s, translit) for s in filename_parts])
if len(base) > 1 and base[0] == '-':
base = base[1:]
base = cut_unicode(base, 240)
return "%s.%d.fb2" % (base, book.id)

Expand Down

0 comments on commit 2ef6864

Please sign in to comment.