def artistPage(self, ComicID): myDB = db.DBConnection() comic = myDB.action('SELECT * FROM comics WHERE ComicID=?', [ComicID]).fetchone() issues = myDB.select('SELECT * from issues WHERE ComicID=? order by Int_IssueNumber DESC', [ComicID]) if comic is None: raise cherrypy.HTTPRedirect("home") usethefuzzy = comic['UseFuzzy'] if usethefuzzy is None: usethefuzzy = "0" comicConfig = { "comiclocation" : mylar.COMIC_LOCATION, "fuzzy_year0" : helpers.radio(int(usethefuzzy), 0), "fuzzy_year1" : helpers.radio(int(usethefuzzy), 1), "fuzzy_year2" : helpers.radio(int(usethefuzzy), 2) } return serve_template(templatename="artistredone.html", title=comic['ComicName'], comic=comic, issues=issues, comicConfig=comicConfig)
def config(self): interface_dir = os.path.join(mylar.PROG_DIR, 'data/interfaces/') interface_list = [ name for name in os.listdir(interface_dir) if os.path.isdir(os.path.join(interface_dir, name)) ] config = { "http_host" : mylar.HTTP_HOST, "http_user" : mylar.HTTP_USERNAME, "http_port" : mylar.HTTP_PORT, "http_pass" : mylar.HTTP_PASSWORD, "launch_browser" : helpers.checked(mylar.LAUNCH_BROWSER), "download_scan_interval" : mylar.DOWNLOAD_SCAN_INTERVAL, "nzb_search_interval" : mylar.SEARCH_INTERVAL, "libraryscan_interval" : mylar.LIBRARYSCAN_INTERVAL, "sab_host" : mylar.SAB_HOST, "sab_user" : mylar.SAB_USERNAME, "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, "use_nzbsu" : helpers.checked(mylar.NZBSU), "nzbsu_api" : mylar.NZBSU_APIKEY, "use_dognzb" : helpers.checked(mylar.DOGNZB), "dognzb_api" : mylar.DOGNZB_APIKEY, "use_experimental" : helpers.checked(mylar.EXPERIMENTAL), "destination_dir" : mylar.DESTINATION_DIR, "replace_spaces" : helpers.checked(mylar.REPLACE_SPACES), "replace_char" : mylar.REPLACE_CHAR, "interface_list" : interface_list, "autowant_all" : helpers.checked(mylar.AUTOWANT_ALL), "autowant_upcoming" : helpers.checked(mylar.AUTOWANT_UPCOMING), "pref_qual_0" : helpers.radio(mylar.PREFERRED_QUALITY, 0), "pref_qual_1" : helpers.radio(mylar.PREFERRED_QUALITY, 1), "pref_qual_3" : helpers.radio(mylar.PREFERRED_QUALITY, 3), "pref_qual_2" : helpers.radio(mylar.PREFERRED_QUALITY, 2), "move_files" : helpers.checked(mylar.MOVE_FILES), "rename_files" : helpers.checked(mylar.RENAME_FILES), "folder_format" : mylar.FOLDER_FORMAT, "file_format" : mylar.FILE_FORMAT, "zero_level" : helpers.checked(mylar.ZERO_LEVEL), "zero_level_n" : mylar.ZERO_LEVEL_N, "log_dir" : mylar.LOG_DIR } return serve_template(templatename="config.html", title="Settings", config=config)
def config(self): interface_dir = os.path.join(mylar.PROG_DIR, 'data/interfaces/') interface_list = [ name for name in os.listdir(interface_dir) if os.path.isdir(os.path.join(interface_dir, name)) ] # branch_history, err = mylar.versioncheck.runGit("log --oneline --pretty=format:'%h - %ar - %s' -n 4") # br_hist = branch_history.replace("\n", "<br />\n") config = { "http_host" : mylar.HTTP_HOST, "http_user" : mylar.HTTP_USERNAME, "http_port" : mylar.HTTP_PORT, "http_pass" : mylar.HTTP_PASSWORD, "launch_browser" : helpers.checked(mylar.LAUNCH_BROWSER), "logverbose" : helpers.checked(mylar.LOGVERBOSE), "download_scan_interval" : mylar.DOWNLOAD_SCAN_INTERVAL, "nzb_search_interval" : mylar.SEARCH_INTERVAL, "libraryscan_interval" : mylar.LIBRARYSCAN_INTERVAL, "sab_host" : mylar.SAB_HOST, "sab_user" : mylar.SAB_USERNAME, "sab_api" : mylar.SAB_APIKEY, "sab_pass" : mylar.SAB_PASSWORD, "sab_cat" : mylar.SAB_CATEGORY, "sab_priority" : mylar.SAB_PRIORITY, "use_blackhole" : helpers.checked(mylar.BLACKHOLE), "blackhole_dir" : mylar.BLACKHOLE_DIR, "usenet_retention" : mylar.USENET_RETENTION, "use_nzbsu" : helpers.checked(mylar.NZBSU), "nzbsu_api" : mylar.NZBSU_APIKEY, "use_dognzb" : helpers.checked(mylar.DOGNZB), "dognzb_api" : mylar.DOGNZB_APIKEY, "use_nzbx" : helpers.checked(mylar.NZBX), "use_experimental" : helpers.checked(mylar.EXPERIMENTAL), "use_newznab" : helpers.checked(mylar.NEWZNAB), "newznab_host" : mylar.NEWZNAB_HOST, "newznab_api" : mylar.NEWZNAB_APIKEY, "newznab_enabled" : helpers.checked(mylar.NEWZNAB_ENABLED), "extra_newznabs" : mylar.EXTRA_NEWZNABS, "destination_dir" : mylar.DESTINATION_DIR, "replace_spaces" : helpers.checked(mylar.REPLACE_SPACES), "replace_char" : mylar.REPLACE_CHAR, "use_minsize" : mylar.USE_MINSIZE, "minsize" : mylar.MINSIZE, "use_maxsize" : mylar.USE_MAXSIZE, "maxsize" : mylar.MAXSIZE, "interface_list" : interface_list, "autowant_all" : helpers.checked(mylar.AUTOWANT_ALL), "autowant_upcoming" : helpers.checked(mylar.AUTOWANT_UPCOMING), "comic_cover_local" : helpers.checked(mylar.COMIC_COVER_LOCAL), "pref_qual_0" : helpers.radio(mylar.PREFERRED_QUALITY, 0), "pref_qual_1" : helpers.radio(mylar.PREFERRED_QUALITY, 1), "pref_qual_3" : helpers.radio(mylar.PREFERRED_QUALITY, 3), "pref_qual_2" : helpers.radio(mylar.PREFERRED_QUALITY, 2), "move_files" : helpers.checked(mylar.MOVE_FILES), "rename_files" : helpers.checked(mylar.RENAME_FILES), "folder_format" : mylar.FOLDER_FORMAT, "file_format" : mylar.FILE_FORMAT, "zero_level" : helpers.checked(mylar.ZERO_LEVEL), "zero_level_n" : mylar.ZERO_LEVEL_N, "enable_extra_scripts" : helpers.checked(mylar.ENABLE_EXTRA_SCRIPTS), "extra_scripts" : mylar.EXTRA_SCRIPTS, "branch" : version.MYLAR_VERSION, "br_type" : mylar.INSTALL_TYPE, "br_version" : mylar.versioncheck.getVersion(), "py_version" : platform.python_version(), "data_dir" : mylar.DATA_DIR, "prog_dir" : mylar.PROG_DIR, "cache_dir" : mylar.CACHE_DIR, "config_file" : mylar.CONFIG_FILE, # "branch_history" : br_hist "enable_pre_scripts" : helpers.checked(mylar.ENABLE_PRE_SCRIPTS), "pre_scripts" : mylar.PRE_SCRIPTS, "log_dir" : mylar.LOG_DIR } return serve_template(templatename="config.html", title="Settings", config=config)