mirror of
https://github.com/evilhero/mylar
synced 2024-12-24 16:51:42 +00:00
FIX:(#191) Put back the Download-to-local option on details page
This commit is contained in:
parent
31fc75fdd6
commit
e1fdfed281
3 changed files with 23 additions and 0 deletions
|
@ -296,6 +296,23 @@
|
||||||
<a href="#" onclick="doAjaxCall('queueissue?ComicID=${issue['ComicID']}&IssueID=${issue['IssueID']}&ComicIssue=${issue['Issue_Number']}&mode=want', $(this),'table')" data-success="Retrying the same version of '${issue['ComicName']}' '${issue['Issue_Number']}'" title="Retry the same download again"><img src="interfaces/default/images/retry_icon.png" height="25" width="25" /></a>
|
<a href="#" onclick="doAjaxCall('queueissue?ComicID=${issue['ComicID']}&IssueID=${issue['IssueID']}&ComicIssue=${issue['Issue_Number']}&mode=want', $(this),'table')" data-success="Retrying the same version of '${issue['ComicName']}' '${issue['Issue_Number']}'" title="Retry the same download again"><img src="interfaces/default/images/retry_icon.png" height="25" width="25" /></a>
|
||||||
<a href="#" title="Mark issue as Skipped" onclick="doAjaxCall('unqueueissue?IssueID=${issue['IssueID']}&ComicID=${issue['ComicID']}',$(this),'table')" data-success="'${issue['Issue_Number']}' has been marked as skipped"><img src="interfaces/default/images/skipped_icon.png" height="25" width="25" /></a>
|
<a href="#" title="Mark issue as Skipped" onclick="doAjaxCall('unqueueissue?IssueID=${issue['IssueID']}&ComicID=${issue['ComicID']}',$(this),'table')" data-success="'${issue['Issue_Number']}' has been marked as skipped"><img src="interfaces/default/images/skipped_icon.png" height="25" width="25" /></a>
|
||||||
%elif (issue['Status'] == 'Downloaded'):
|
%elif (issue['Status'] == 'Downloaded'):
|
||||||
|
|
||||||
|
%if issue['inCacheDIR']:
|
||||||
|
<%
|
||||||
|
try:
|
||||||
|
with open(os.path.join(mylar.CACHE_DIR,issue['Location'])) as f:
|
||||||
|
linky = issue['Location']
|
||||||
|
except IOError as e:
|
||||||
|
linky = None
|
||||||
|
|
||||||
|
%>
|
||||||
|
%if linky:
|
||||||
|
<a href="cache/${linky}"><img src="interfaces/default/images/download_icon.png" height="25" width="25" title="Download the Issue" /></a>
|
||||||
|
%endif
|
||||||
|
%else:
|
||||||
|
<a onclick="doAjaxCall('downloadLocal?IssueID=${issue['IssueID']}', $(this), 'table')" ><img src="interfaces/default/images/copy_icon.png" height="25" width="25" title="Copy issue to local cache (ready for download)" /></a>
|
||||||
|
%endif
|
||||||
|
%elif (issue['Status'] == 'Read'):
|
||||||
<a href="#" title="Add to Reading List" onclick="doAjaxCall('addtoreadlist?IssueID=${issue['IssueID']}',$(this),'table')" data-success="${issue['Issue_Number']} added to Reading List"><img src="interfaces/default/images/glasses-icon.png" height="25" width="25" /></a>
|
<a href="#" title="Add to Reading List" onclick="doAjaxCall('addtoreadlist?IssueID=${issue['IssueID']}',$(this),'table')" data-success="${issue['Issue_Number']} added to Reading List"><img src="interfaces/default/images/glasses-icon.png" height="25" width="25" /></a>
|
||||||
%else:
|
%else:
|
||||||
<a href="#" onclick="doAjaxCall('queueissue?ComicID=${issue['ComicID']}&IssueID=${issue['IssueID']}&ComicIssue=${issue['Issue_Number']}&mode=want', $(this),'table')" data-success="Retrying the same version of '${issue['ComicName']}' '${issue['Issue_Number']}'" title="Retry the same download again"><img src="interfaces/default/images/retry_icon.png" height="25" width="25" /></a>
|
<a href="#" onclick="doAjaxCall('queueissue?ComicID=${issue['ComicID']}&IssueID=${issue['IssueID']}&ComicIssue=${issue['Issue_Number']}&mode=want', $(this),'table')" data-success="Retrying the same version of '${issue['ComicName']}' '${issue['Issue_Number']}'" title="Retry the same download again"><img src="interfaces/default/images/retry_icon.png" height="25" width="25" /></a>
|
||||||
|
|
|
@ -849,6 +849,11 @@ def dbcheck():
|
||||||
except sqlite3.OperationalError:
|
except sqlite3.OperationalError:
|
||||||
c.execute('ALTER TABLE importresults ADD COLUMN impID TEXT')
|
c.execute('ALTER TABLE importresults ADD COLUMN impID TEXT')
|
||||||
|
|
||||||
|
try:
|
||||||
|
c.execute('SELECT inCacheDir from issues')
|
||||||
|
except sqlite3.OperationalError:
|
||||||
|
c.execute('ALTER TABLE issues ADD COLUMN inCacheDIR TEXT')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
c.execute('SELECT inCacheDIR from readlist')
|
c.execute('SELECT inCacheDIR from readlist')
|
||||||
except sqlite3.OperationalError:
|
except sqlite3.OperationalError:
|
||||||
|
|
|
@ -907,6 +907,7 @@ class WebInterface(object):
|
||||||
newValueDict = {'inCacheDIR': 'True',
|
newValueDict = {'inCacheDIR': 'True',
|
||||||
'Location': issueFILE}
|
'Location': issueFILE}
|
||||||
myDB.upsert("readlist", newValueDict, controlValueDict)
|
myDB.upsert("readlist", newValueDict, controlValueDict)
|
||||||
|
myDB.upsert("issues", newValueDict, controlValueDict)
|
||||||
|
|
||||||
#print("DB updated - Download link now enabled.")
|
#print("DB updated - Download link now enabled.")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue