mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-22 00:44:00 +01:00
Get folder name working in history
+ show magnet as torrent
This commit is contained in:
@@ -50,15 +50,14 @@
|
|||||||
fileid = 'nzb'
|
fileid = 'nzb'
|
||||||
if item['URL'].find('torrent') != -1:
|
if item['URL'].find('torrent') != -1:
|
||||||
fileid = 'torrent'
|
fileid = 'torrent'
|
||||||
|
if item['URL'].find('magnet:') != -1:
|
||||||
|
fileid = 'torrent'
|
||||||
if item['URL'].find('rutracker') != -1:
|
if item['URL'].find('rutracker') != -1:
|
||||||
fileid = 'torrent'
|
fileid = 'torrent'
|
||||||
if item['URL'].find('codeshy') != -1:
|
if item['URL'].find('codeshy') != -1:
|
||||||
fileid = 'nzb'
|
fileid = 'nzb'
|
||||||
|
|
||||||
if 'FolderName' in item:
|
folder = 'Folder: ' + item['FolderName']
|
||||||
folder = 'Folder: ' + item['FolderName']
|
|
||||||
else:
|
|
||||||
folder = 'Folder: ?'
|
|
||||||
|
|
||||||
%>
|
%>
|
||||||
<tr class="grade${grade}">
|
<tr class="grade${grade}">
|
||||||
|
|||||||
@@ -814,7 +814,7 @@ class WebInterface(object):
|
|||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def history(self):
|
def history(self):
|
||||||
myDB = db.DBConnection()
|
myDB = db.DBConnection()
|
||||||
history = myDB.select('''SELECT * from snatched WHERE Status NOT LIKE "Seed%" order by DateAdded DESC''')
|
history = myDB.select('''SELECT AlbumID, Title, Size, URL, DateAdded, Status, Kind, ifnull(FolderName, '?') FolderName FROM snatched WHERE Status NOT LIKE "Seed%" ORDER BY DateAdded DESC''')
|
||||||
return serve_template(templatename="history.html", title="History", history=history)
|
return serve_template(templatename="history.html", title="History", history=history)
|
||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
|
|||||||
Reference in New Issue
Block a user