mirror of
https://github.com/evilhero/mylar
synced 2025-03-12 06:52:58 +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 weekdst is not None:
|
||||||
if mylar.CONFIG.WEEKFOLDER_FORMAT == 0:
|
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:
|
else:
|
||||||
weekfold = os.path.join(weekdst, str( str(weekinfo['midweek']) ))
|
weekfold = os.path.join(weekdst, str( str(weekinfo['midweek']) ))
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1325,16 +1325,7 @@ def weekly_singlecopy(comicid, issuenum, file, path, weekinfo):
|
||||||
|
|
||||||
module = '[WEEKLY-PULL COPY]'
|
module = '[WEEKLY-PULL COPY]'
|
||||||
if mylar.CONFIG.WEEKFOLDER:
|
if mylar.CONFIG.WEEKFOLDER:
|
||||||
if mylar.CONFIG.WEEKFOLDER_LOC:
|
desdir = weekinfo['week_folder']
|
||||||
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']) ))
|
|
||||||
|
|
||||||
dircheck = mylar.filechecker.validateAndCreateDirectory(desdir, True, module=module)
|
dircheck = mylar.filechecker.validateAndCreateDirectory(desdir, True, module=module)
|
||||||
if dircheck:
|
if dircheck:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Add table
Reference in a new issue