FIX: Enforce Permissions option wasn't being used with cover.jpg option, FIX: Using dropdown selection on Read List Management screen to mark as Added would fail

This commit is contained in:
evilhero 2016-11-11 11:53:53 -05:00
parent a774a3ba0b
commit 8e70faa2da
3 changed files with 7 additions and 9 deletions

View File

@ -491,7 +491,8 @@ def addComictoDB(comicid, mismatch=None, pullupd=None, imported=None, ogcname=No
try:
comiclocal = os.path.join(comlocation, 'cover.jpg')
shutil.copy(coverfile, comiclocal)
filechecker.setperms(comiclocal)
if mylar.ENFORCE_PERMS:
filechecker.setperms(comiclocal)
except IOError as e:
logger.error('Unable to save cover (' + str(coverfile) + ') into series directory (' + str(comiclocal) + ') at this time.')

View File

@ -60,9 +60,6 @@ class Readinglist(object):
else:
locpath = None
if mylar.MULTIPLE_DEST_DIRS is not None and mylar.MULTIPLE_DEST_DIRS != 'None' and os.path.join(mylar.MULTIPLE_DEST_DIRS, os.path.basename(comicinfo['ComicLocation'])) != comicinfo['ComicLocation']:
logger.fdebug(self.module + ' Multiple_dest_dirs:' + mylar.MULTIPLE_DEST_DIRS)
logger.fdebug(self.module + ' Dir: ' + comicinfo['ComicLocation'])
logger.fdebug(self.module + ' Os.path.basename: ' + os.path.basename(comicinfo['ComicLocation']))
pathdir = os.path.join(mylar.MULTIPLE_DEST_DIRS, os.path.basename(comicinfo['ComicLocation']))
if os.path.exists(os.path.join(pathdir, readlist['Location'])):
locpath = os.path.join(pathdir, readlist['Location'])

View File

@ -2422,18 +2422,18 @@ class WebInterface(object):
comicname = mi['ComicName']
if action == 'Downloaded':
logger.fdebug(u"Marking %s %s as %s" % (comicname, mi['Issue_Number'], action))
logger.fdebug(u"Marking %s #%s as %s" % (comicname, mi['Issue_Number'], action))
read = readinglist.Readinglist(IssueID)
read.addtoreadlist()
elif action == 'Read':
logger.fdebug(u"Marking %s %s as %s" % (comicname, mi['Issue_Number'], action))
logger.fdebug(u"Marking %s #%s as %s" % (comicname, mi['Issue_Number'], action))
markasRead(IssueID)
elif action == 'Added':
logger.fdebug(u"Marking %s %s as %s" % (comicname, mi['Issue_Number'], action))
read = readinglist.Readinglist(IssueID)
logger.fdebug(u"Marking %s #%s as %s" % (comicname, mi['Issue_Number'], action))
read = readinglist.Readinglist(IssueID=IssueID)
read.addtoreadlist()
elif action == 'Remove':
logger.fdebug('Deleting %s %s' % (comicname, mi['Issue_Number']))
logger.fdebug('Deleting %s #%s' % (comicname, mi['Issue_Number']))
myDB.action('DELETE from readlist WHERE IssueID=?', [IssueID])
elif action == 'Send':
logger.fdebug('Queuing ' + mi['Location'] + ' to send to tablet.')