mirror of
https://github.com/evilhero/mylar
synced 2025-03-12 06:52:58 +00:00
added ability to change default directory for individual comics (Edit tab)
This commit is contained in:
parent
83ddb15a46
commit
d1a4495652
2 changed files with 46 additions and 30 deletions
|
@ -139,14 +139,33 @@
|
|||
</fieldset>
|
||||
</td>
|
||||
<td id="maindetails">
|
||||
%if comic['ComicPublisher'] == 'DC Comics':
|
||||
<img src="interfaces/default/images/logo-dccomics.png" align="right" alt="DC" height="50" width="50"/>
|
||||
%elif comic['ComicPublisher'] == 'Marvel':
|
||||
<img src="interfaces/default/images/logo-marvel.jpg" align="right" alt="Marvel" height="50" width="100"/>
|
||||
%elif comic['ComicPublisher'] == 'Image':
|
||||
<img src="interfaces/default/images/logo-imagecomics.gif" align="right" alt="Image" height="100" width="50"/>
|
||||
%elif comic['ComicPublisher'] == 'Dark Horse Comics':
|
||||
<img src="interfaces/default/images/logo-darkhorse.jpg" align="right" alt="Darkhorse" height="75" width="50"/>
|
||||
%elif comic['ComicPublisher'] == 'IDW Publishing':
|
||||
<img src="interfaces/default/images/logo-idwpublish.png" align="right" alt="IDW" height="50" width="100"/>
|
||||
%endif
|
||||
|
||||
<form action="comic_config" method="GET">
|
||||
<input type="hidden" name="ComicID" value=${comic['ComicID']}>
|
||||
<fieldset>
|
||||
<div>
|
||||
<label>Soon to come - Editable details!!! </label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<div class="row">
|
||||
<label>Directory Location</label>
|
||||
<input type="text" name="com_location" value="${comic['ComicLocation']}" size="50">
|
||||
<small>the directory where all the comics are for this comic</small>
|
||||
</div>
|
||||
<div class="row">
|
||||
<input type="submit" value="Update"/>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -413,6 +413,11 @@ class WebInterface(object):
|
|||
"sab_api" : mylar.SAB_APIKEY,
|
||||
"sab_pass" : mylar.SAB_PASSWORD,
|
||||
"sab_cat" : mylar.SAB_CATEGORY,
|
||||
"sab_priority_1" : helpers.radio(mylar.SAB_PRIORITY, 1),
|
||||
"sab_priority_2" : helpers.radio(mylar.SAB_PRIORITY, 2),
|
||||
"sab_priority_3" : helpers.radio(mylar.SAB_PRIORITY, 3),
|
||||
"sab_priority_4" : helpers.radio(mylar.SAB_PRIORITY, 4),
|
||||
"sab_priority_5" : helpers.radio(mylar.SAB_PRIORITY, 5),
|
||||
"use_blackhole" : helpers.checked(mylar.BLACKHOLE),
|
||||
"blackhole_dir" : mylar.BLACKHOLE_DIR,
|
||||
"usenet_retention" : mylar.USENET_RETENTION,
|
||||
|
@ -440,31 +445,22 @@ class WebInterface(object):
|
|||
return serve_template(templatename="config.html", title="Settings", config=config)
|
||||
config.exposed = True
|
||||
|
||||
def comicConfigUpdate(self, comiclocation=None):
|
||||
print ("YO")
|
||||
#mylar.COMIC_LOCATION = comiclocation
|
||||
#mylar.QUAL_ALTVERS = qualaltvers
|
||||
#mylar.QUAL_SCANNER = qualscanner
|
||||
#mylar.QUAL_TYPE = qualtype
|
||||
#mylar.QUAL_QUALITY = qualquality
|
||||
#print ("ComicID:" + ComicID)
|
||||
print ("LOC:" + str(comiclocation))
|
||||
#print ("ALT:" + str(qualaltvers))
|
||||
#myDB = db.DBConnection()
|
||||
#controlValueDict = {'ComicID': ComicID}
|
||||
#newValues = {"ComicLocation": comic_location,
|
||||
# "QUALalt_vers": qual_altvers,
|
||||
# "QUALScanner": qual_scanner,
|
||||
# "QUALtype": qual_type,
|
||||
# "QUALquality": qual_quality
|
||||
# }
|
||||
#myDB.upsert("comics", newValues, controlValueDict)
|
||||
raise cherrypy.HTTPRedirect("home")
|
||||
|
||||
comicConfigUpdate.exposed = True
|
||||
def comic_config(self, com_location, ComicID):
|
||||
myDB = db.DBConnection()
|
||||
controlValueDict = {'ComicID': ComicID}
|
||||
newValues = {"ComicLocation": com_location }
|
||||
#"QUALalt_vers": qual_altvers,
|
||||
#"QUALScanner": qual_scanner,
|
||||
#"QUALtype": qual_type,
|
||||
#"QUALquality": qual_quality
|
||||
#}
|
||||
myDB.upsert("comics", newValues, controlValueDict)
|
||||
#raise cherrypy.HTTPRedirect("home")
|
||||
return page
|
||||
comic_config.exposed = True
|
||||
|
||||
def configUpdate(self, http_host='0.0.0.0', http_username=None, http_port=8181, http_password=None, launch_browser=0, download_scan_interval=None, nzb_search_interval=None, libraryscan_interval=None,
|
||||
sab_host=None, sab_username=None, sab_apikey=None, sab_password=None, sab_category=None, log_dir=None, blackhole=0, blackhole_dir=None,
|
||||
sab_host=None, sab_username=None, sab_apikey=None, sab_password=None, sab_category=None, sab_priority=0, log_dir=None, blackhole=0, blackhole_dir=None,
|
||||
usenet_retention=None, nzbsu=0, nzbsu_apikey=None, dognzb=0, dognzb_apikey=None,
|
||||
raw=0, raw_provider=None, raw_username=None, raw_password=None, raw_groups=None, experimental=0,
|
||||
preferred_quality=0, move_files=0, rename_files=0, folder_format=None, file_format=None,
|
||||
|
@ -482,6 +478,7 @@ class WebInterface(object):
|
|||
mylar.SAB_PASSWORD = sab_password
|
||||
mylar.SAB_APIKEY = sab_apikey
|
||||
mylar.SAB_CATEGORY = sab_category
|
||||
mylar.SAB_PRIORITY = sab_priority
|
||||
mylar.BLACKHOLE = blackhole
|
||||
mylar.BLACKHOLE_DIR = blackhole_dir
|
||||
mylar.USENET_RETENTION = usenet_retention
|
||||
|
|
Loading…
Add table
Reference in a new issue