mirror of
https://github.com/evilhero/mylar
synced 2025-03-11 06:22:48 +00:00
FIX:(#2287) Zero-pad single week numbers for weekly directory option
This commit is contained in:
parent
3fa8f08e64
commit
07f51b7911
2 changed files with 5 additions and 11 deletions
|
@ -3009,7 +3009,10 @@ def weekly_info(week=None, year=None, current=None):
|
|||
|
||||
if weekdst is not None:
|
||||
if mylar.CONFIG.WEEKFOLDER_FORMAT == 0:
|
||||
weekfold = os.path.join(weekdst, str( str(weekinfo['year']) + '-' + str(weeknumber) ))
|
||||
weekn = weeknumber
|
||||
if len(str(weekn)) == 1:
|
||||
weekn = '%s%s' % ('0', str(weekn))
|
||||
weekfold = os.path.join(weekdst, '%s-%s' % (weekinfo['year'], weekn))
|
||||
else:
|
||||
weekfold = os.path.join(weekdst, str( str(weekinfo['midweek']) ))
|
||||
else:
|
||||
|
|
|
@ -1325,16 +1325,7 @@ def weekly_singlecopy(comicid, issuenum, file, path, weekinfo):
|
|||
|
||||
module = '[WEEKLY-PULL COPY]'
|
||||
if mylar.CONFIG.WEEKFOLDER:
|
||||
if mylar.CONFIG.WEEKFOLDER_LOC:
|
||||
weekdst = mylar.CONFIG.WEEKFOLDER_LOC
|
||||
else:
|
||||
weekdst = mylar.CONFIG.DESTINATION_DIR
|
||||
|
||||
if mylar.CONFIG.WEEKFOLDER_FORMAT == 0:
|
||||
desdir = os.path.join(weekdst, str( str(weekinfo['year']) + '-' + str(weekinfo['weeknumber']) ))
|
||||
else:
|
||||
desdir = os.path.join(weekdst, str( str(weekinfo['midweek']) ))
|
||||
|
||||
desdir = weekinfo['week_folder']
|
||||
dircheck = mylar.filechecker.validateAndCreateDirectory(desdir, True, module=module)
|
||||
if dircheck:
|
||||
pass
|
||||
|
|
Loading…
Add table
Reference in a new issue