2012-09-13 15:27:34 +00:00
# This file is part of Mylar.
#
# Mylar is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Mylar is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Mylar. If not, see <http://www.gnu.org/licenses/>.
from __future__ import with_statement
import os , sys , subprocess
2014-05-26 18:11:39 +00:00
import threading
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
import datetime
2012-09-13 15:27:34 +00:00
import webbrowser
import sqlite3
2012-12-16 17:57:02 +00:00
import itertools
2012-10-16 08:16:29 +00:00
import csv
2013-01-15 19:02:32 +00:00
import shutil
2013-08-19 06:14:47 +00:00
import platform
import locale
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
from threading import Lock , Thread
2012-09-13 15:27:34 +00:00
2014-05-26 18:11:39 +00:00
from lib . apscheduler . scheduler import Scheduler
2012-09-13 15:27:34 +00:00
from lib . configobj import ConfigObj
import cherrypy
2014-05-26 18:11:39 +00:00
from mylar import versioncheck , logger , versioncheck , rsscheck , search , PostProcessor , weeklypull , helpers #versioncheckit, searchit, weeklypullit, dbupdater, scheduler
2012-09-13 15:27:34 +00:00
FULL_PATH = None
PROG_DIR = None
ARGS = None
SIGNAL = None
SYS_ENCODING = None
2013-08-19 06:14:47 +00:00
OS_DETECT = platform . system ( )
OS_LANG , OS_ENCODING = locale . getdefaultlocale ( )
2012-09-13 15:27:34 +00:00
VERBOSE = 1
DAEMON = False
PIDFILE = None
2014-06-04 20:31:26 +00:00
CREATEPID = False
2014-06-09 07:55:05 +00:00
SAFESTART = False
2012-09-13 15:27:34 +00:00
2014-05-26 18:11:39 +00:00
SCHED = Scheduler ( )
2012-09-13 15:27:34 +00:00
2014-05-26 18:11:39 +00:00
INIT_LOCK = threading . Lock ( )
2012-09-13 15:27:34 +00:00
__INITIALIZED__ = False
started = False
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
WRITELOCK = False
2014-06-09 07:55:05 +00:00
## for use with updated scheduler (not working atm)
#INIT_LOCK = Lock()
#dbUpdateScheduler = None
#searchScheduler = None
#RSSScheduler = None
#WeeklyScheduler = None
#VersionScheduler = None
#FolderMonitorScheduler = None
2012-09-13 15:27:34 +00:00
DATA_DIR = None
2014-02-26 19:48:50 +00:00
DBLOCK = False
2012-09-13 15:27:34 +00:00
2014-06-04 20:31:26 +00:00
UMASK = None
2012-09-13 15:27:34 +00:00
CONFIG_FILE = None
CFG = None
CONFIG_VERSION = None
DB_FILE = None
LOG_DIR = None
LOG_LIST = [ ]
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
MAX_LOGSIZE = None
2012-09-13 15:27:34 +00:00
CACHE_DIR = None
2013-03-06 16:20:09 +00:00
SYNO_FIX = False
2012-09-13 15:27:34 +00:00
2013-02-13 01:27:24 +00:00
PULLNEW = None
2012-09-13 15:27:34 +00:00
HTTP_PORT = None
HTTP_HOST = None
HTTP_USERNAME = None
HTTP_PASSWORD = None
HTTP_ROOT = None
FIX: (#746) updated autoProcessComics.py / ComicRN.py's which will now send proper completion messeages to clients, FIX: (#752) refresh series will now test if a series is 'out of whack' with it's numerical issue count (ie. 5/4) or it has no issue data due to a bad refresh / api maxing out and will adjust it's processing to accomodate either, IMP: (#750) Added ComicVine API Checker which will check API counts at regular intervals to inform/warn users of usage, as well as adding a screen-time display of API hits / mins used at the bottom of every page (refreshing/reloading pages will update counts), FIX: (#747)EOL normalization (dos2unix) on search.py - removed classes & exceptions as not being used, IMP: (#747) Skip processing issues with an invalid store date & issue date (thnx rupaschomaker), FIX: Removed strings when searching/logging torrents as was causing ascii errors especially with KAT, IMP: Added [META-TAGGING] to logging for meta-tagging module, IMP: Added ability in GUI to select CR or Cbl tags (or both) when writing metadata to cbz files, IMP: Improved support/usage with ComicTagger v1.1.15 which allows for personal CV API Key usage - if supplied to Mylar, will use when tagging with ComicTagger, IMP: Added Manual Search option to allow for individual searches of issues without changing initial status.
2014-06-18 19:58:19 +00:00
HTTPS_FORCE_ON = False
2014-02-26 19:48:50 +00:00
API_ENABLED = False
API_KEY = None
2012-09-13 15:27:34 +00:00
LAUNCH_BROWSER = False
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
LOGVERBOSE = None
2012-09-13 15:27:34 +00:00
GIT_PATH = None
INSTALL_TYPE = None
CURRENT_VERSION = None
LATEST_VERSION = None
COMMITS_BEHIND = None
2013-02-16 18:30:22 +00:00
USER_AGENT = None
FIX:(#304) Index out of range on recheck, FIX:(#303) Comicvine link updated on details page, FIX:(#302) Query rate (Search Delay) Added as a configuration option, FIX:(#300) Version number error on searching when no version number, FIX:(#297) Manual Rename of Files working, FIX:(#294) 'AU' issue problems should be resolved now, FIX:(#290) V#(year) and Vol#(year) added to filechecking, IMP: ComicVine data use only now as a hidden option (cv_only = 1 in config.ini), IMP: added as options for file naming, IMP: Rough drafting of Annuals (annuals_on = 1 in config.ini), Other fixes..
2013-04-06 09:43:18 +00:00
SEARCH_DELAY = 1
2012-09-13 15:27:34 +00:00
2014-06-09 07:55:05 +00:00
COMICVINE_API = None
DEFAULT_CVAPI = ' 583939a3df0a25fc4e8b7a29934a13078002dc27 '
FIX: (#746) updated autoProcessComics.py / ComicRN.py's which will now send proper completion messeages to clients, FIX: (#752) refresh series will now test if a series is 'out of whack' with it's numerical issue count (ie. 5/4) or it has no issue data due to a bad refresh / api maxing out and will adjust it's processing to accomodate either, IMP: (#750) Added ComicVine API Checker which will check API counts at regular intervals to inform/warn users of usage, as well as adding a screen-time display of API hits / mins used at the bottom of every page (refreshing/reloading pages will update counts), FIX: (#747)EOL normalization (dos2unix) on search.py - removed classes & exceptions as not being used, IMP: (#747) Skip processing issues with an invalid store date & issue date (thnx rupaschomaker), FIX: Removed strings when searching/logging torrents as was causing ascii errors especially with KAT, IMP: Added [META-TAGGING] to logging for meta-tagging module, IMP: Added ability in GUI to select CR or Cbl tags (or both) when writing metadata to cbz files, IMP: Improved support/usage with ComicTagger v1.1.15 which allows for personal CV API Key usage - if supplied to Mylar, will use when tagging with ComicTagger, IMP: Added Manual Search option to allow for individual searches of issues without changing initial status.
2014-06-18 19:58:19 +00:00
CVAPI_COUNT = 0
CVAPI_TIME = None
IMP:(#753) Better handling of cbz files when using metatagging option, IMP: Added option for MetaTagging to enable/disable overwriting of existing metadata on cbz files, IMP: Post-Processing will now delete folders that are identical to filenames after successful post-processing, FIX:(#756) Fix for Manual Search for an Issue which resulted in traceback errors upon not finding any matches (Windows), IMP: Added module-name to logging for some modules to help troubleshooting (eventually all will be done), IMP: If a filename contained repeated characters for spaces (ie. ___ or ...), it would fail on post-processing due to the nzbname being off, IMP: Monitoring of CV API will now be persitent on restarts/shutdowns/etc, IMP: Added a maximum CV API global so that it can be adjusted for monitoring more easily should API requirements change, IMP: When Adding new series, will now only mark issues that are actually upcoming as Wanted (based on Store Date)
2014-06-22 08:32:45 +00:00
CVAPI_MAX = 400
2014-06-09 07:55:05 +00:00
2012-09-13 15:27:34 +00:00
CHECK_GITHUB = False
CHECK_GITHUB_ON_STARTUP = False
CHECK_GITHUB_INTERVAL = None
DESTINATION_DIR = None
2013-04-22 03:43:57 +00:00
CHMOD_DIR = None
CHMOD_FILE = None
2012-09-13 15:27:34 +00:00
USENET_RETENTION = None
ADD_COMICS = False
2013-01-27 10:07:08 +00:00
COMIC_DIR = None
LIBRARYSCAN = False
IMP_MOVE = False
2013-01-28 20:31:43 +00:00
IMP_RENAME = False
2013-02-06 19:55:23 +00:00
IMP_METADATA = False
2012-09-13 15:27:34 +00:00
SEARCH_INTERVAL = 360
2013-01-15 17:32:08 +00:00
NZB_STARTUP_SEARCH = False
2012-09-13 15:27:34 +00:00
LIBRARYSCAN_INTERVAL = 300
DOWNLOAD_SCAN_INTERVAL = 5
IMP: Added ForceRSS Check and Test SABnzbd Connection buttons in Config, FIX: If Annuals not enabled, would error on home screen, IMP: updated mylar.init.d (thnx Kalinon), FIX: Manual Post-Processing fix for Manual Run (thnx Kalinon), IMP: Library Monitor working (check folder every X minutes and Post-Process), IMP: Future Upcoming introduction, IMP: Experimental search better handling of year inclusions, FIX: Filechecker will now pick up series with years in the series title accordingly, FIX: Torrent seedbox sending would lockup occassionally when attempting to send torrent file, FIX: malformed image url on some series, IMP: Moved issue updating to a seperate function, IMP: When series was refreshed, would download the last issue (or few issues depending on date), regardless of status, IMP: When series is volume 1 or volume label doesn't exist, either assume V1 or remove volume requirements to improve matching hits, IMP: StoryArcs will now check in StoryArc folder for existing issues and change status in StoryArc accordingly...
2013-11-28 15:48:59 +00:00
CHECK_FOLDER = None
2012-09-13 15:27:34 +00:00
INTERFACE = None
2013-10-04 03:44:57 +00:00
PREFERRED_QUALITY = 0
2012-09-13 15:27:34 +00:00
CORRECT_METADATA = False
MOVE_FILES = False
RENAME_FILES = False
FOLDER_FORMAT = None
FILE_FORMAT = None
2012-09-14 17:29:01 +00:00
REPLACE_SPACES = False
REPLACE_CHAR = None
2012-10-30 10:43:01 +00:00
ZERO_LEVEL = False
ZERO_LEVEL_N = None
2013-01-14 05:12:59 +00:00
LOWERCASE_FILENAME = False
2013-07-30 04:57:37 +00:00
IGNORE_HAVETOTAL = False
2013-01-13 15:59:46 +00:00
USE_MINSIZE = False
2013-02-09 03:34:02 +00:00
MINSIZE = 10
2013-01-13 15:59:46 +00:00
USE_MAXSIZE = False
2013-02-09 03:34:02 +00:00
MAXSIZE = 60
2012-09-24 05:17:29 +00:00
AUTOWANT_UPCOMING = True
2012-09-13 15:27:34 +00:00
AUTOWANT_ALL = False
2012-12-27 15:04:03 +00:00
COMIC_COVER_LOCAL = False
2013-01-15 17:32:08 +00:00
ADD_TO_CSV = True
2013-04-22 04:13:56 +00:00
PROWL_ENABLED = False
2013-02-18 17:39:00 +00:00
PROWL_PRIORITY = 1
PROWL_KEYS = None
2013-04-22 04:13:56 +00:00
PROWL_ONSNATCH = False
2013-02-18 17:39:00 +00:00
NMA_ENABLED = False
NMA_APIKEY = None
NMA_PRIORITY = None
2013-09-07 06:05:32 +00:00
NMA_ONSNATCH = False
2013-04-22 04:13:56 +00:00
PUSHOVER_ENABLED = False
PUSHOVER_PRIORITY = 1
PUSHOVER_APIKEY = None
PUSHOVER_USERKEY = None
PUSHOVER_ONSNATCH = False
2013-09-07 06:05:32 +00:00
BOXCAR_ENABLED = False
BOXCAR_ONSNATCH = False
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
BOXCAR_TOKEN = None
PUSHBULLET_ENABLED = False
PUSHBULLET_APIKEY = None
PUSHBULLET_DEVICEID = None
PUSHBULLET_ONSNATCH = False
2013-09-07 06:05:32 +00:00
2013-01-23 07:34:50 +00:00
SKIPPED2WANTED = False
2013-01-23 08:22:22 +00:00
CVINFO = False
2013-02-06 19:55:23 +00:00
LOG_LEVEL = None
2013-05-04 01:57:19 +00:00
POST_PROCESSING = 1
2012-09-13 15:27:34 +00:00
2014-02-26 19:48:50 +00:00
NZB_DOWNLOADER = None #0 = sabnzbd, #1 = nzbget, #2 = blackhole
USE_SABNZBD = False
2012-09-13 15:27:34 +00:00
SAB_HOST = None
SAB_USERNAME = None
SAB_PASSWORD = None
SAB_APIKEY = None
SAB_CATEGORY = None
2012-09-28 15:42:25 +00:00
SAB_PRIORITY = None
2013-02-09 03:34:02 +00:00
SAB_DIRECTORY = None
2012-09-13 15:27:34 +00:00
2013-02-20 03:03:51 +00:00
USE_NZBGET = False
NZBGET_HOST = None
NZBGET_PORT = None
NZBGET_USERNAME = None
NZBGET_PASSWORD = None
NZBGET_PRIORITY = None
NZBGET_CATEGORY = None
2014-02-26 19:48:50 +00:00
NZBGET_DIRECTORY = None
USE_BLACKHOLE = False
BLACKHOLE_DIR = None
2013-02-20 03:03:51 +00:00
2013-10-01 18:37:42 +00:00
PROVIDER_ORDER = None
2012-09-13 15:27:34 +00:00
NZBSU = False
2013-08-04 05:57:21 +00:00
NZBSU_UID = None
2012-09-13 15:27:34 +00:00
NZBSU_APIKEY = None
DOGNZB = False
2013-08-04 05:57:21 +00:00
DOGNZB_UID = None
2012-09-13 15:27:34 +00:00
DOGNZB_APIKEY = None
2012-12-16 17:57:02 +00:00
NEWZNAB = False
2013-07-10 01:45:10 +00:00
NEWZNAB_NAME = None
2012-12-16 17:57:02 +00:00
NEWZNAB_HOST = None
NEWZNAB_APIKEY = None
2013-08-04 05:57:21 +00:00
NEWZNAB_UID = None
2012-12-16 17:57:02 +00:00
NEWZNAB_ENABLED = False
EXTRA_NEWZNABS = [ ]
2013-05-19 04:07:18 +00:00
NEWZNAB_EXTRA = None
2012-12-16 17:57:02 +00:00
2012-09-13 15:27:34 +00:00
RAW = False
RAW_PROVIDER = None
RAW_USERNAME = None
RAW_PASSWORD = None
RAW_GROUPS = None
EXPERIMENTAL = False
2013-09-20 05:17:04 +00:00
ALTEXPERIMENTAL = False
2012-09-13 15:27:34 +00:00
COMIC_LOCATION = None
QUAL_ALTVERS = None
QUAL_SCANNER = None
QUAL_TYPE = None
QUAL_QUALITY = None
2012-12-27 15:04:03 +00:00
ENABLE_EXTRA_SCRIPTS = 1
EXTRA_SCRIPTS = None
2012-09-13 15:27:34 +00:00
2013-01-13 17:10:41 +00:00
ENABLE_PRE_SCRIPTS = 1
PRE_SCRIPTS = None
2013-02-17 10:31:18 +00:00
COUNT_COMICS = 0
COUNT_ISSUES = 0
COUNT_HAVES = 0
2013-03-21 17:09:10 +00:00
COMICSORT = None
ANNUALS_ON = 0
2013-04-22 03:11:12 +00:00
CV_ONLY = 1
CV_ONETIMER = 1
2013-04-12 02:14:27 +00:00
GRABBAG_DIR = None
HIGHCOUNT = 0
2013-04-22 03:11:12 +00:00
READ2FILENAME = 0
2013-05-25 06:18:00 +00:00
STORYARCDIR = 0
2013-05-01 18:13:07 +00:00
CVAPIFIX = 0
CVURL = None
2013-05-04 04:40:32 +00:00
WEEKFOLDER = 0
2013-05-06 04:35:33 +00:00
LOCMOVE = 0
NEWCOM_DIR = None
2013-05-25 06:18:00 +00:00
FFTONEWCOM_DIR = 0
2013-05-19 04:07:18 +00:00
OLDCONFIG_VERSION = None
2013-03-21 17:09:10 +00:00
2013-07-01 05:19:15 +00:00
INDIE_PUB = 75
BIGGIE_PUB = 55
ENABLE_META = 0
CMTAGGER_PATH = None
FIX: (#746) updated autoProcessComics.py / ComicRN.py's which will now send proper completion messeages to clients, FIX: (#752) refresh series will now test if a series is 'out of whack' with it's numerical issue count (ie. 5/4) or it has no issue data due to a bad refresh / api maxing out and will adjust it's processing to accomodate either, IMP: (#750) Added ComicVine API Checker which will check API counts at regular intervals to inform/warn users of usage, as well as adding a screen-time display of API hits / mins used at the bottom of every page (refreshing/reloading pages will update counts), FIX: (#747)EOL normalization (dos2unix) on search.py - removed classes & exceptions as not being used, IMP: (#747) Skip processing issues with an invalid store date & issue date (thnx rupaschomaker), FIX: Removed strings when searching/logging torrents as was causing ascii errors especially with KAT, IMP: Added [META-TAGGING] to logging for meta-tagging module, IMP: Added ability in GUI to select CR or Cbl tags (or both) when writing metadata to cbz files, IMP: Improved support/usage with ComicTagger v1.1.15 which allows for personal CV API Key usage - if supplied to Mylar, will use when tagging with ComicTagger, IMP: Added Manual Search option to allow for individual searches of issues without changing initial status.
2014-06-18 19:58:19 +00:00
CT_TAG_CR = 1
CT_TAG_CBL = 1
IMP:(#753) Better handling of cbz files when using metatagging option, IMP: Added option for MetaTagging to enable/disable overwriting of existing metadata on cbz files, IMP: Post-Processing will now delete folders that are identical to filenames after successful post-processing, FIX:(#756) Fix for Manual Search for an Issue which resulted in traceback errors upon not finding any matches (Windows), IMP: Added module-name to logging for some modules to help troubleshooting (eventually all will be done), IMP: If a filename contained repeated characters for spaces (ie. ___ or ...), it would fail on post-processing due to the nzbname being off, IMP: Monitoring of CV API will now be persitent on restarts/shutdowns/etc, IMP: Added a maximum CV API global so that it can be adjusted for monitoring more easily should API requirements change, IMP: When Adding new series, will now only mark issues that are actually upcoming as Wanted (based on Store Date)
2014-06-22 08:32:45 +00:00
CT_CBZ_OVERWRITE = 0
2013-07-01 05:19:15 +00:00
2013-08-07 06:27:12 +00:00
ENABLE_RSS = 0
2013-07-30 04:57:37 +00:00
RSS_CHECKINTERVAL = 20
RSS_LASTRUN = None
ENABLE_TORRENTS = 0
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
MINSEEDS = 0
2013-07-30 04:57:37 +00:00
TORRENT_LOCAL = 0
LOCAL_WATCHDIR = None
TORRENT_SEEDBOX = 0
SEEDBOX_HOST = None
SEEDBOX_PORT = None
SEEDBOX_USER = None
SEEDBOX_PASS = None
SEEDBOX_WATCHDIR = None
ENABLE_TORRENT_SEARCH = 0
ENABLE_KAT = 0
2013-10-19 01:04:16 +00:00
KAT_PROXY = None
2013-07-30 04:57:37 +00:00
ENABLE_CBT = 0
CBT_PASSKEY = None
2014-06-02 19:02:28 +00:00
SNATCHEDTORRENT_NOTIFY = 0
2013-07-30 04:57:37 +00:00
2012-09-13 15:27:34 +00:00
def CheckSection ( sec ) :
""" Check if INI section exists, if not create it """
try :
CFG [ sec ]
return True
except :
CFG [ sec ] = { }
return False
################################################################################
# Check_setting_int #
################################################################################
def check_setting_int ( config , cfg_name , item_name , def_val ) :
try :
my_val = int ( config [ cfg_name ] [ item_name ] )
except :
my_val = def_val
try :
config [ cfg_name ] [ item_name ] = my_val
except :
config [ cfg_name ] = { }
config [ cfg_name ] [ item_name ] = my_val
logger . debug ( item_name + " -> " + str ( my_val ) )
return my_val
################################################################################
# Check_setting_str #
################################################################################
def check_setting_str ( config , cfg_name , item_name , def_val , log = True ) :
try :
my_val = config [ cfg_name ] [ item_name ]
except :
my_val = def_val
try :
config [ cfg_name ] [ item_name ] = my_val
except :
config [ cfg_name ] = { }
config [ cfg_name ] [ item_name ] = my_val
if log :
logger . debug ( item_name + " -> " + my_val )
else :
logger . debug ( item_name + " -> ****** " )
return my_val
def initialize ( ) :
with INIT_LOCK :
IMP:(#753) Better handling of cbz files when using metatagging option, IMP: Added option for MetaTagging to enable/disable overwriting of existing metadata on cbz files, IMP: Post-Processing will now delete folders that are identical to filenames after successful post-processing, FIX:(#756) Fix for Manual Search for an Issue which resulted in traceback errors upon not finding any matches (Windows), IMP: Added module-name to logging for some modules to help troubleshooting (eventually all will be done), IMP: If a filename contained repeated characters for spaces (ie. ___ or ...), it would fail on post-processing due to the nzbname being off, IMP: Monitoring of CV API will now be persitent on restarts/shutdowns/etc, IMP: Added a maximum CV API global so that it can be adjusted for monitoring more easily should API requirements change, IMP: When Adding new series, will now only mark issues that are actually upcoming as Wanted (based on Store Date)
2014-06-22 08:32:45 +00:00
global __INITIALIZED__ , COMICVINE_API , DEFAULT_CVAPI , CVAPI_COUNT , CVAPI_TIME , CVAPI_MAX , FULL_PATH , PROG_DIR , VERBOSE , DAEMON , COMICSORT , DATA_DIR , CONFIG_FILE , CFG , CONFIG_VERSION , LOG_DIR , CACHE_DIR , MAX_LOGSIZE , LOGVERBOSE , OLDCONFIG_VERSION , OS_DETECT , OS_LANG , OS_ENCODING , \
FIX: (#746) updated autoProcessComics.py / ComicRN.py's which will now send proper completion messeages to clients, FIX: (#752) refresh series will now test if a series is 'out of whack' with it's numerical issue count (ie. 5/4) or it has no issue data due to a bad refresh / api maxing out and will adjust it's processing to accomodate either, IMP: (#750) Added ComicVine API Checker which will check API counts at regular intervals to inform/warn users of usage, as well as adding a screen-time display of API hits / mins used at the bottom of every page (refreshing/reloading pages will update counts), FIX: (#747)EOL normalization (dos2unix) on search.py - removed classes & exceptions as not being used, IMP: (#747) Skip processing issues with an invalid store date & issue date (thnx rupaschomaker), FIX: Removed strings when searching/logging torrents as was causing ascii errors especially with KAT, IMP: Added [META-TAGGING] to logging for meta-tagging module, IMP: Added ability in GUI to select CR or Cbl tags (or both) when writing metadata to cbz files, IMP: Improved support/usage with ComicTagger v1.1.15 which allows for personal CV API Key usage - if supplied to Mylar, will use when tagging with ComicTagger, IMP: Added Manual Search option to allow for individual searches of issues without changing initial status.
2014-06-18 19:58:19 +00:00
HTTP_PORT , HTTP_HOST , HTTP_USERNAME , HTTP_PASSWORD , HTTP_ROOT , HTTPS_FORCE_ON , API_ENABLED , API_KEY , LAUNCH_BROWSER , GIT_PATH , SAFESTART , \
2013-03-21 17:09:10 +00:00
CURRENT_VERSION , LATEST_VERSION , CHECK_GITHUB , CHECK_GITHUB_ON_STARTUP , CHECK_GITHUB_INTERVAL , USER_AGENT , DESTINATION_DIR , \
2013-04-12 02:14:27 +00:00
DOWNLOAD_DIR , USENET_RETENTION , SEARCH_INTERVAL , NZB_STARTUP_SEARCH , INTERFACE , AUTOWANT_ALL , AUTOWANT_UPCOMING , ZERO_LEVEL , ZERO_LEVEL_N , COMIC_COVER_LOCAL , HIGHCOUNT , \
2014-02-26 19:48:50 +00:00
LIBRARYSCAN , LIBRARYSCAN_INTERVAL , DOWNLOAD_SCAN_INTERVAL , NZB_DOWNLOADER , USE_SABNZBD , SAB_HOST , SAB_USERNAME , SAB_PASSWORD , SAB_APIKEY , SAB_CATEGORY , SAB_PRIORITY , SAB_DIRECTORY , USE_BLACKHOLE , BLACKHOLE_DIR , ADD_COMICS , COMIC_DIR , IMP_MOVE , IMP_RENAME , IMP_METADATA , \
FIX:(#663) Weekly pull list would crash on issues with decimal places if series on watchlist, FIX: Error logging when performing search, FIX:(#662) Removed 'Test SABnzbd button' as was causing configuration saving issues. Can still be used by url : /SABtest, IMP: Added more logic checking to weeklypull list when comparing series for matches (to ensure an issue is part of a given series), IMP: Removed dead references to nzbx as a provider, FIX: If issue had no leading 0 in a decimal issue, mylar would crash, FIX: None status would occur when refreshing a series and more than one issue was being pulled in for data, IMP: When using manual post-processing, if issue date was near end/start of year issue comparison would fail. Comparison by month now added, FIX: file checking - if decimal in issue and no year present, would skip issue, FIX: manual post-processing - would fail/skip if no year provided for issue within filename, FIX: Manual Annual Add option will only be available if annuals_on=1 within the config.ini now
2014-04-07 16:20:05 +00:00
USE_NZBGET , NZBGET_HOST , NZBGET_PORT , NZBGET_USERNAME , NZBGET_PASSWORD , NZBGET_CATEGORY , NZBGET_PRIORITY , NZBGET_DIRECTORY , NZBSU , NZBSU_UID , NZBSU_APIKEY , DOGNZB , DOGNZB_UID , DOGNZB_APIKEY , \
2013-08-04 05:57:21 +00:00
NEWZNAB , NEWZNAB_NAME , NEWZNAB_HOST , NEWZNAB_APIKEY , NEWZNAB_UID , NEWZNAB_ENABLED , EXTRA_NEWZNABS , NEWZNAB_EXTRA , \
2013-09-20 05:17:04 +00:00
RAW , RAW_PROVIDER , RAW_USERNAME , RAW_PASSWORD , RAW_GROUPS , EXPERIMENTAL , ALTEXPERIMENTAL , \
IMP:(#753) Better handling of cbz files when using metatagging option, IMP: Added option for MetaTagging to enable/disable overwriting of existing metadata on cbz files, IMP: Post-Processing will now delete folders that are identical to filenames after successful post-processing, FIX:(#756) Fix for Manual Search for an Issue which resulted in traceback errors upon not finding any matches (Windows), IMP: Added module-name to logging for some modules to help troubleshooting (eventually all will be done), IMP: If a filename contained repeated characters for spaces (ie. ___ or ...), it would fail on post-processing due to the nzbname being off, IMP: Monitoring of CV API will now be persitent on restarts/shutdowns/etc, IMP: Added a maximum CV API global so that it can be adjusted for monitoring more easily should API requirements change, IMP: When Adding new series, will now only mark issues that are actually upcoming as Wanted (based on Store Date)
2014-06-22 08:32:45 +00:00
ENABLE_META , CMTAGGER_PATH , CT_TAG_CR , CT_TAG_CBL , CT_CBZ_OVERWRITE , INDIE_PUB , BIGGIE_PUB , IGNORE_HAVETOTAL , PROVIDER_ORDER , \
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
dbUpdateScheduler , searchScheduler , RSSScheduler , WeeklyScheduler , VersionScheduler , FolderMonitorScheduler , \
ENABLE_TORRENTS , MINSEEDS , TORRENT_LOCAL , LOCAL_WATCHDIR , TORRENT_SEEDBOX , SEEDBOX_HOST , SEEDBOX_PORT , SEEDBOX_USER , SEEDBOX_PASS , SEEDBOX_WATCHDIR , \
2014-06-02 19:02:28 +00:00
ENABLE_RSS , RSS_CHECKINTERVAL , RSS_LASTRUN , ENABLE_TORRENT_SEARCH , ENABLE_KAT , KAT_PROXY , ENABLE_CBT , CBT_PASSKEY , SNATCHEDTORRENT_NOTIFY , \
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
PROWL_ENABLED , PROWL_PRIORITY , PROWL_KEYS , PROWL_ONSNATCH , NMA_ENABLED , NMA_APIKEY , NMA_PRIORITY , NMA_ONSNATCH , PUSHOVER_ENABLED , PUSHOVER_PRIORITY , PUSHOVER_APIKEY , PUSHOVER_USERKEY , PUSHOVER_ONSNATCH , BOXCAR_ENABLED , BOXCAR_ONSNATCH , BOXCAR_TOKEN , \
PUSHBULLET_ENABLED , PUSHBULLET_APIKEY , PUSHBULLET_DEVICEID , PUSHBULLET_ONSNATCH , LOCMOVE , NEWCOM_DIR , FFTONEWCOM_DIR , \
IMP: Added ForceRSS Check and Test SABnzbd Connection buttons in Config, FIX: If Annuals not enabled, would error on home screen, IMP: updated mylar.init.d (thnx Kalinon), FIX: Manual Post-Processing fix for Manual Run (thnx Kalinon), IMP: Library Monitor working (check folder every X minutes and Post-Process), IMP: Future Upcoming introduction, IMP: Experimental search better handling of year inclusions, FIX: Filechecker will now pick up series with years in the series title accordingly, FIX: Torrent seedbox sending would lockup occassionally when attempting to send torrent file, FIX: malformed image url on some series, IMP: Moved issue updating to a seperate function, IMP: When series was refreshed, would download the last issue (or few issues depending on date), regardless of status, IMP: When series is volume 1 or volume label doesn't exist, either assume V1 or remove volume requirements to improve matching hits, IMP: StoryArcs will now check in StoryArc folder for existing issues and change status in StoryArc accordingly...
2013-11-28 15:48:59 +00:00
PREFERRED_QUALITY , MOVE_FILES , RENAME_FILES , LOWERCASE_FILENAMES , USE_MINSIZE , MINSIZE , USE_MAXSIZE , MAXSIZE , CORRECT_METADATA , FOLDER_FORMAT , FILE_FORMAT , REPLACE_CHAR , REPLACE_SPACES , ADD_TO_CSV , CVINFO , LOG_LEVEL , POST_PROCESSING , SEARCH_DELAY , GRABBAG_DIR , READ2FILENAME , STORYARCDIR , CVURL , CVAPIFIX , CHECK_FOLDER , \
2014-06-04 20:31:26 +00:00
COMIC_LOCATION , QUAL_ALTVERS , QUAL_SCANNER , QUAL_TYPE , QUAL_QUALITY , ENABLE_EXTRA_SCRIPTS , EXTRA_SCRIPTS , ENABLE_PRE_SCRIPTS , PRE_SCRIPTS , PULLNEW , COUNT_ISSUES , COUNT_HAVES , COUNT_COMICS , SYNO_FIX , CHMOD_FILE , CHMOD_DIR , ANNUALS_ON , CV_ONLY , CV_ONETIMER , WEEKFOLDER , UMASK
2012-09-13 15:27:34 +00:00
if __INITIALIZED__ :
return False
2013-01-13 15:59:46 +00:00
2012-09-13 15:27:34 +00:00
# Make sure all the config sections exist
CheckSection ( ' General ' )
CheckSection ( ' SABnzbd ' )
2013-02-20 03:03:51 +00:00
CheckSection ( ' NZBGet ' )
2012-09-13 15:27:34 +00:00
CheckSection ( ' NZBsu ' )
CheckSection ( ' DOGnzb ' )
CheckSection ( ' Raw ' )
CheckSection ( ' Experimental ' )
2012-12-16 17:57:02 +00:00
CheckSection ( ' Newznab ' )
2013-07-30 04:57:37 +00:00
CheckSection ( ' Torrents ' )
2012-09-13 15:27:34 +00:00
# Set global variables based on config file or use defaults
try :
HTTP_PORT = check_setting_int ( CFG , ' General ' , ' http_port ' , 8090 )
except :
HTTP_PORT = 8090
if HTTP_PORT < 21 or HTTP_PORT > 65535 :
HTTP_PORT = 8090
2013-05-19 04:07:18 +00:00
CONFIG_VERSION = check_setting_str ( CFG , ' General ' , ' config_version ' , ' ' )
2014-06-09 07:55:05 +00:00
COMICVINE_API = check_setting_str ( CFG , ' General ' , ' comicvine_api ' , ' ' )
if not COMICVINE_API :
COMICVINE_API = None
IMP:(#753) Better handling of cbz files when using metatagging option, IMP: Added option for MetaTagging to enable/disable overwriting of existing metadata on cbz files, IMP: Post-Processing will now delete folders that are identical to filenames after successful post-processing, FIX:(#756) Fix for Manual Search for an Issue which resulted in traceback errors upon not finding any matches (Windows), IMP: Added module-name to logging for some modules to help troubleshooting (eventually all will be done), IMP: If a filename contained repeated characters for spaces (ie. ___ or ...), it would fail on post-processing due to the nzbname being off, IMP: Monitoring of CV API will now be persitent on restarts/shutdowns/etc, IMP: Added a maximum CV API global so that it can be adjusted for monitoring more easily should API requirements change, IMP: When Adding new series, will now only mark issues that are actually upcoming as Wanted (based on Store Date)
2014-06-22 08:32:45 +00:00
CVAPI_COUNT = check_setting_int ( CFG , ' General ' , ' cvapi_count ' , 0 )
CVAPI_TIME = check_setting_str ( CFG , ' General ' , ' cvapi_time ' , ' ' )
helpers . cvapi_check ( ) #get the values logged in.
2012-09-13 15:27:34 +00:00
HTTP_HOST = check_setting_str ( CFG , ' General ' , ' http_host ' , ' 0.0.0.0 ' )
HTTP_USERNAME = check_setting_str ( CFG , ' General ' , ' http_username ' , ' ' )
HTTP_PASSWORD = check_setting_str ( CFG , ' General ' , ' http_password ' , ' ' )
HTTP_ROOT = check_setting_str ( CFG , ' General ' , ' http_root ' , ' / ' )
FIX: (#746) updated autoProcessComics.py / ComicRN.py's which will now send proper completion messeages to clients, FIX: (#752) refresh series will now test if a series is 'out of whack' with it's numerical issue count (ie. 5/4) or it has no issue data due to a bad refresh / api maxing out and will adjust it's processing to accomodate either, IMP: (#750) Added ComicVine API Checker which will check API counts at regular intervals to inform/warn users of usage, as well as adding a screen-time display of API hits / mins used at the bottom of every page (refreshing/reloading pages will update counts), FIX: (#747)EOL normalization (dos2unix) on search.py - removed classes & exceptions as not being used, IMP: (#747) Skip processing issues with an invalid store date & issue date (thnx rupaschomaker), FIX: Removed strings when searching/logging torrents as was causing ascii errors especially with KAT, IMP: Added [META-TAGGING] to logging for meta-tagging module, IMP: Added ability in GUI to select CR or Cbl tags (or both) when writing metadata to cbz files, IMP: Improved support/usage with ComicTagger v1.1.15 which allows for personal CV API Key usage - if supplied to Mylar, will use when tagging with ComicTagger, IMP: Added Manual Search option to allow for individual searches of issues without changing initial status.
2014-06-18 19:58:19 +00:00
HTTPS_FORCE_ON = bool ( check_setting_int ( CFG , ' General ' , ' https_force_on ' , 0 ) )
2014-02-26 19:48:50 +00:00
API_ENABLED = bool ( check_setting_int ( CFG , ' General ' , ' api_enabled ' , 0 ) )
API_KEY = check_setting_str ( CFG , ' General ' , ' api_key ' , ' ' )
2012-09-13 15:27:34 +00:00
LAUNCH_BROWSER = bool ( check_setting_int ( CFG , ' General ' , ' launch_browser ' , 1 ) )
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
LOGVERBOSE = bool ( check_setting_int ( CFG , ' General ' , ' logverbose ' , 0 ) )
if LOGVERBOSE :
VERBOSE = 2
else :
VERBOSE = 1
MAX_LOGSIZE = check_setting_str ( CFG , ' General ' , ' max_logsize ' , ' ' )
if not MAX_LOGSIZE :
MAX_LOGSIZE = 1000000
2012-09-13 15:27:34 +00:00
GIT_PATH = check_setting_str ( CFG , ' General ' , ' git_path ' , ' ' )
LOG_DIR = check_setting_str ( CFG , ' General ' , ' log_dir ' , ' ' )
2013-01-17 16:22:51 +00:00
if not CACHE_DIR :
CACHE_DIR = check_setting_str ( CFG , ' General ' , ' cache_dir ' , ' ' )
2012-09-13 15:27:34 +00:00
CHECK_GITHUB = bool ( check_setting_int ( CFG , ' General ' , ' check_github ' , 1 ) )
CHECK_GITHUB_ON_STARTUP = bool ( check_setting_int ( CFG , ' General ' , ' check_github_on_startup ' , 1 ) )
CHECK_GITHUB_INTERVAL = check_setting_int ( CFG , ' General ' , ' check_github_interval ' , 360 )
DESTINATION_DIR = check_setting_str ( CFG , ' General ' , ' destination_dir ' , ' ' )
2013-04-22 03:43:57 +00:00
CHMOD_DIR = check_setting_str ( CFG , ' General ' , ' chmod_dir ' , ' 0777 ' )
CHMOD_FILE = check_setting_str ( CFG , ' General ' , ' chmod_file ' , ' 0660 ' )
2012-09-13 15:27:34 +00:00
USENET_RETENTION = check_setting_int ( CFG , ' General ' , ' usenet_retention ' , ' 1500 ' )
SEARCH_INTERVAL = check_setting_int ( CFG , ' General ' , ' search_interval ' , 360 )
2013-01-15 17:32:08 +00:00
NZB_STARTUP_SEARCH = bool ( check_setting_int ( CFG , ' General ' , ' nzb_startup_search ' , 0 ) )
2013-01-27 10:07:08 +00:00
LIBRARYSCAN = bool ( check_setting_int ( CFG , ' General ' , ' libraryscan ' , 1 ) )
2012-09-13 15:27:34 +00:00
LIBRARYSCAN_INTERVAL = check_setting_int ( CFG , ' General ' , ' libraryscan_interval ' , 300 )
2013-01-27 10:07:08 +00:00
ADD_COMICS = bool ( check_setting_int ( CFG , ' General ' , ' add_comics ' , 0 ) )
COMIC_DIR = check_setting_str ( CFG , ' General ' , ' comic_dir ' , ' ' )
IMP_MOVE = bool ( check_setting_int ( CFG , ' General ' , ' imp_move ' , 0 ) )
2013-01-28 20:31:43 +00:00
IMP_RENAME = bool ( check_setting_int ( CFG , ' General ' , ' imp_rename ' , 0 ) )
2013-02-06 19:55:23 +00:00
IMP_METADATA = bool ( check_setting_int ( CFG , ' General ' , ' imp_metadata ' , 0 ) )
2012-09-13 15:27:34 +00:00
DOWNLOAD_SCAN_INTERVAL = check_setting_int ( CFG , ' General ' , ' download_scan_interval ' , 5 )
IMP: Added ForceRSS Check and Test SABnzbd Connection buttons in Config, FIX: If Annuals not enabled, would error on home screen, IMP: updated mylar.init.d (thnx Kalinon), FIX: Manual Post-Processing fix for Manual Run (thnx Kalinon), IMP: Library Monitor working (check folder every X minutes and Post-Process), IMP: Future Upcoming introduction, IMP: Experimental search better handling of year inclusions, FIX: Filechecker will now pick up series with years in the series title accordingly, FIX: Torrent seedbox sending would lockup occassionally when attempting to send torrent file, FIX: malformed image url on some series, IMP: Moved issue updating to a seperate function, IMP: When series was refreshed, would download the last issue (or few issues depending on date), regardless of status, IMP: When series is volume 1 or volume label doesn't exist, either assume V1 or remove volume requirements to improve matching hits, IMP: StoryArcs will now check in StoryArc folder for existing issues and change status in StoryArc accordingly...
2013-11-28 15:48:59 +00:00
CHECK_FOLDER = check_setting_str ( CFG , ' General ' , ' check_folder ' , ' ' )
2012-09-13 15:27:34 +00:00
INTERFACE = check_setting_str ( CFG , ' General ' , ' interface ' , ' default ' )
AUTOWANT_ALL = bool ( check_setting_int ( CFG , ' General ' , ' autowant_all ' , 0 ) )
2012-09-24 05:17:29 +00:00
AUTOWANT_UPCOMING = bool ( check_setting_int ( CFG , ' General ' , ' autowant_upcoming ' , 1 ) )
2012-12-27 15:04:03 +00:00
COMIC_COVER_LOCAL = bool ( check_setting_int ( CFG , ' General ' , ' comic_cover_local ' , 0 ) )
2013-10-04 03:44:57 +00:00
PREFERRED_QUALITY = check_setting_int ( CFG , ' General ' , ' preferred_quality ' , 0 )
2012-09-13 15:27:34 +00:00
CORRECT_METADATA = bool ( check_setting_int ( CFG , ' General ' , ' correct_metadata ' , 0 ) )
MOVE_FILES = bool ( check_setting_int ( CFG , ' General ' , ' move_files ' , 0 ) )
RENAME_FILES = bool ( check_setting_int ( CFG , ' General ' , ' rename_files ' , 0 ) )
2013-04-22 03:43:57 +00:00
FOLDER_FORMAT = check_setting_str ( CFG , ' General ' , ' folder_format ' , ' $Series ($Year) ' )
2012-12-16 17:57:02 +00:00
FILE_FORMAT = check_setting_str ( CFG , ' General ' , ' file_format ' , ' $Series $Issue ($Year) ' )
2014-02-26 19:48:50 +00:00
USE_BLACKHOLE = bool ( check_setting_int ( CFG , ' General ' , ' use_blackhole ' , 0 ) )
2012-09-13 15:27:34 +00:00
BLACKHOLE_DIR = check_setting_str ( CFG , ' General ' , ' blackhole_dir ' , ' ' )
2012-09-14 17:29:01 +00:00
REPLACE_SPACES = bool ( check_setting_int ( CFG , ' General ' , ' replace_spaces ' , 0 ) )
REPLACE_CHAR = check_setting_str ( CFG , ' General ' , ' replace_char ' , ' ' )
2012-10-30 10:43:01 +00:00
ZERO_LEVEL = bool ( check_setting_int ( CFG , ' General ' , ' zero_level ' , 0 ) )
ZERO_LEVEL_N = check_setting_str ( CFG , ' General ' , ' zero_level_n ' , ' ' )
2013-01-14 05:12:59 +00:00
LOWERCASE_FILENAMES = bool ( check_setting_int ( CFG , ' General ' , ' lowercase_filenames ' , 0 ) )
2013-07-30 04:57:37 +00:00
IGNORE_HAVETOTAL = bool ( check_setting_int ( CFG , ' General ' , ' ignore_havetotal ' , 0 ) )
2013-03-06 16:20:09 +00:00
SYNO_FIX = bool ( check_setting_int ( CFG , ' General ' , ' syno_fix ' , 0 ) )
FIX:(#304) Index out of range on recheck, FIX:(#303) Comicvine link updated on details page, FIX:(#302) Query rate (Search Delay) Added as a configuration option, FIX:(#300) Version number error on searching when no version number, FIX:(#297) Manual Rename of Files working, FIX:(#294) 'AU' issue problems should be resolved now, FIX:(#290) V#(year) and Vol#(year) added to filechecking, IMP: ComicVine data use only now as a hidden option (cv_only = 1 in config.ini), IMP: added as options for file naming, IMP: Rough drafting of Annuals (annuals_on = 1 in config.ini), Other fixes..
2013-04-06 09:43:18 +00:00
SEARCH_DELAY = check_setting_int ( CFG , ' General ' , ' search_delay ' , 1 )
2013-04-12 02:14:27 +00:00
GRABBAG_DIR = check_setting_str ( CFG , ' General ' , ' grabbag_dir ' , ' ' )
if not GRABBAG_DIR :
#default to ComicLocation
GRABBAG_DIR = DESTINATION_DIR
2013-05-04 04:40:32 +00:00
WEEKFOLDER = bool ( check_setting_int ( CFG , ' General ' , ' weekfolder ' , 0 ) )
2013-05-01 18:13:07 +00:00
CVAPIFIX = bool ( check_setting_int ( CFG , ' General ' , ' cvapifix ' , 0 ) )
if CVAPIFIX is None :
CVAPIFIX = 0
2013-05-06 04:35:33 +00:00
LOCMOVE = bool ( check_setting_int ( CFG , ' General ' , ' locmove ' , 0 ) )
if LOCMOVE is None :
LOCMOVE = 0
NEWCOM_DIR = check_setting_str ( CFG , ' General ' , ' newcom_dir ' , ' ' )
2013-05-25 06:18:00 +00:00
FFTONEWCOM_DIR = bool ( check_setting_int ( CFG , ' General ' , ' fftonewcom_dir ' , 0 ) )
if FFTONEWCOM_DIR is None :
FFTONEWCOM_DIR = 0
2013-04-12 02:14:27 +00:00
HIGHCOUNT = check_setting_str ( CFG , ' General ' , ' highcount ' , ' ' )
if not HIGHCOUNT : HIGHCOUNT = 0
2013-04-22 03:11:12 +00:00
READ2FILENAME = bool ( check_setting_int ( CFG , ' General ' , ' read2filename ' , 0 ) )
2013-05-25 06:18:00 +00:00
STORYARCDIR = bool ( check_setting_int ( CFG , ' General ' , ' storyarcdir ' , 0 ) )
2013-02-18 17:39:00 +00:00
PROWL_ENABLED = bool ( check_setting_int ( CFG , ' Prowl ' , ' prowl_enabled ' , 0 ) )
PROWL_KEYS = check_setting_str ( CFG , ' Prowl ' , ' prowl_keys ' , ' ' )
PROWL_ONSNATCH = bool ( check_setting_int ( CFG , ' Prowl ' , ' prowl_onsnatch ' , 0 ) )
PROWL_PRIORITY = check_setting_int ( CFG , ' Prowl ' , ' prowl_priority ' , 0 )
NMA_ENABLED = bool ( check_setting_int ( CFG , ' NMA ' , ' nma_enabled ' , 0 ) )
NMA_APIKEY = check_setting_str ( CFG , ' NMA ' , ' nma_apikey ' , ' ' )
NMA_PRIORITY = check_setting_int ( CFG , ' NMA ' , ' nma_priority ' , 0 )
NMA_ONSNATCH = bool ( check_setting_int ( CFG , ' NMA ' , ' nma_onsnatch ' , 0 ) )
2013-04-22 04:13:56 +00:00
PUSHOVER_ENABLED = bool ( check_setting_int ( CFG , ' PUSHOVER ' , ' pushover_enabled ' , 0 ) )
PUSHOVER_APIKEY = check_setting_str ( CFG , ' PUSHOVER ' , ' pushover_apikey ' , ' ' )
PUSHOVER_USERKEY = check_setting_str ( CFG , ' PUSHOVER ' , ' pushover_userkey ' , ' ' )
PUSHOVER_PRIORITY = check_setting_int ( CFG , ' PUSHOVER ' , ' pushover_priority ' , 0 )
PUSHOVER_ONSNATCH = bool ( check_setting_int ( CFG , ' PUSHOVER ' , ' pushover_onsnatch ' , 0 ) )
2013-09-07 06:05:32 +00:00
BOXCAR_ENABLED = bool ( check_setting_int ( CFG , ' BOXCAR ' , ' boxcar_enabled ' , 0 ) )
BOXCAR_ONSNATCH = bool ( check_setting_int ( CFG , ' BOXCAR ' , ' boxcar_onsnatch ' , 0 ) )
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
BOXCAR_TOKEN = check_setting_str ( CFG , ' BOXCAR ' , ' boxcar_token ' , ' ' )
2013-09-07 06:05:32 +00:00
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
PUSHBULLET_ENABLED = bool ( check_setting_int ( CFG , ' PUSHBULLET ' , ' pushbullet_enabled ' , 0 ) )
PUSHBULLET_APIKEY = check_setting_str ( CFG , ' PUSHBULLET ' , ' pushbullet_apikey ' , ' ' )
PUSHBULLET_DEVICEID = check_setting_str ( CFG , ' PUSHBULLET ' , ' pushbullet_deviceid ' , ' ' )
PUSHBULLET_ONSNATCH = bool ( check_setting_int ( CFG , ' PUSHBULLET ' , ' pushbullet_onsnatch ' , 0 ) )
2013-09-07 06:05:32 +00:00
2013-01-13 15:59:46 +00:00
USE_MINSIZE = bool ( check_setting_int ( CFG , ' General ' , ' use_minsize ' , 0 ) )
MINSIZE = check_setting_str ( CFG , ' General ' , ' minsize ' , ' ' )
USE_MAXSIZE = bool ( check_setting_int ( CFG , ' General ' , ' use_maxsize ' , 0 ) )
MAXSIZE = check_setting_str ( CFG , ' General ' , ' maxsize ' , ' ' )
2013-01-15 17:32:08 +00:00
ADD_TO_CSV = bool ( check_setting_int ( CFG , ' General ' , ' add_to_csv ' , 1 ) )
2013-01-23 08:22:22 +00:00
CVINFO = bool ( check_setting_int ( CFG , ' General ' , ' cvinfo ' , 0 ) )
2013-03-21 17:09:10 +00:00
ANNUALS_ON = bool ( check_setting_int ( CFG , ' General ' , ' annuals_on ' , 0 ) )
if not ANNUALS_ON :
2013-04-22 03:11:12 +00:00
#default to on
2013-03-21 17:09:10 +00:00
ANNUALS_ON = 0
2013-04-22 03:11:12 +00:00
CV_ONLY = bool ( check_setting_int ( CFG , ' General ' , ' cv_only ' , 1 ) )
FIX:(#304) Index out of range on recheck, FIX:(#303) Comicvine link updated on details page, FIX:(#302) Query rate (Search Delay) Added as a configuration option, FIX:(#300) Version number error on searching when no version number, FIX:(#297) Manual Rename of Files working, FIX:(#294) 'AU' issue problems should be resolved now, FIX:(#290) V#(year) and Vol#(year) added to filechecking, IMP: ComicVine data use only now as a hidden option (cv_only = 1 in config.ini), IMP: added as options for file naming, IMP: Rough drafting of Annuals (annuals_on = 1 in config.ini), Other fixes..
2013-04-06 09:43:18 +00:00
if not CV_ONLY :
2013-04-22 03:11:12 +00:00
#default to on
CV_ONLY = 1
CV_ONETIMER = bool ( check_setting_int ( CFG , ' General ' , ' cv_onetimer ' , 1 ) )
FIX:(#304) Index out of range on recheck, FIX:(#303) Comicvine link updated on details page, FIX:(#302) Query rate (Search Delay) Added as a configuration option, FIX:(#300) Version number error on searching when no version number, FIX:(#297) Manual Rename of Files working, FIX:(#294) 'AU' issue problems should be resolved now, FIX:(#290) V#(year) and Vol#(year) added to filechecking, IMP: ComicVine data use only now as a hidden option (cv_only = 1 in config.ini), IMP: added as options for file naming, IMP: Rough drafting of Annuals (annuals_on = 1 in config.ini), Other fixes..
2013-04-06 09:43:18 +00:00
if not CV_ONETIMER :
2013-04-22 03:11:12 +00:00
CV_ONETIMER = 1
2013-02-06 19:55:23 +00:00
LOG_LEVEL = check_setting_str ( CFG , ' General ' , ' log_level ' , ' ' )
2012-12-27 15:04:03 +00:00
ENABLE_EXTRA_SCRIPTS = bool ( check_setting_int ( CFG , ' General ' , ' enable_extra_scripts ' , 0 ) )
EXTRA_SCRIPTS = check_setting_str ( CFG , ' General ' , ' extra_scripts ' , ' ' )
2013-01-13 17:10:41 +00:00
ENABLE_PRE_SCRIPTS = bool ( check_setting_int ( CFG , ' General ' , ' enable_pre_scripts ' , 0 ) )
PRE_SCRIPTS = check_setting_str ( CFG , ' General ' , ' pre_scripts ' , ' ' )
2013-02-13 01:27:24 +00:00
POST_PROCESSING = bool ( check_setting_int ( CFG , ' General ' , ' post_processing ' , 1 ) )
2013-01-13 17:10:41 +00:00
2013-07-01 05:19:15 +00:00
ENABLE_META = bool ( check_setting_int ( CFG , ' General ' , ' enable_meta ' , 0 ) )
CMTAGGER_PATH = check_setting_str ( CFG , ' General ' , ' cmtagger_path ' , ' ' )
FIX: (#746) updated autoProcessComics.py / ComicRN.py's which will now send proper completion messeages to clients, FIX: (#752) refresh series will now test if a series is 'out of whack' with it's numerical issue count (ie. 5/4) or it has no issue data due to a bad refresh / api maxing out and will adjust it's processing to accomodate either, IMP: (#750) Added ComicVine API Checker which will check API counts at regular intervals to inform/warn users of usage, as well as adding a screen-time display of API hits / mins used at the bottom of every page (refreshing/reloading pages will update counts), FIX: (#747)EOL normalization (dos2unix) on search.py - removed classes & exceptions as not being used, IMP: (#747) Skip processing issues with an invalid store date & issue date (thnx rupaschomaker), FIX: Removed strings when searching/logging torrents as was causing ascii errors especially with KAT, IMP: Added [META-TAGGING] to logging for meta-tagging module, IMP: Added ability in GUI to select CR or Cbl tags (or both) when writing metadata to cbz files, IMP: Improved support/usage with ComicTagger v1.1.15 which allows for personal CV API Key usage - if supplied to Mylar, will use when tagging with ComicTagger, IMP: Added Manual Search option to allow for individual searches of issues without changing initial status.
2014-06-18 19:58:19 +00:00
CT_TAG_CR = bool ( check_setting_int ( CFG , ' General ' , ' ct_tag_cr ' , 1 ) )
CT_TAG_CBL = bool ( check_setting_int ( CFG , ' General ' , ' ct_tag_cbl ' , 1 ) )
IMP:(#753) Better handling of cbz files when using metatagging option, IMP: Added option for MetaTagging to enable/disable overwriting of existing metadata on cbz files, IMP: Post-Processing will now delete folders that are identical to filenames after successful post-processing, FIX:(#756) Fix for Manual Search for an Issue which resulted in traceback errors upon not finding any matches (Windows), IMP: Added module-name to logging for some modules to help troubleshooting (eventually all will be done), IMP: If a filename contained repeated characters for spaces (ie. ___ or ...), it would fail on post-processing due to the nzbname being off, IMP: Monitoring of CV API will now be persitent on restarts/shutdowns/etc, IMP: Added a maximum CV API global so that it can be adjusted for monitoring more easily should API requirements change, IMP: When Adding new series, will now only mark issues that are actually upcoming as Wanted (based on Store Date)
2014-06-22 08:32:45 +00:00
CT_CBZ_OVERWRITE = bool ( check_setting_int ( CFG , ' General ' , ' ct_cbz_overwrite ' , 0 ) )
2013-07-01 05:19:15 +00:00
INDIE_PUB = check_setting_str ( CFG , ' General ' , ' indie_pub ' , ' 75 ' )
BIGGIE_PUB = check_setting_str ( CFG , ' General ' , ' biggie_pub ' , ' 55 ' )
2013-07-30 04:57:37 +00:00
ENABLE_RSS = bool ( check_setting_int ( CFG , ' General ' , ' enable_rss ' , 1 ) )
RSS_CHECKINTERVAL = check_setting_str ( CFG , ' General ' , ' rss_checkinterval ' , ' 20 ' )
RSS_LASTRUN = check_setting_str ( CFG , ' General ' , ' rss_lastrun ' , ' ' )
ENABLE_TORRENTS = bool ( check_setting_int ( CFG , ' Torrents ' , ' enable_torrents ' , 0 ) )
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
MINSEEDS = check_setting_str ( CFG , ' Torrents ' , ' minseeds ' , ' 0 ' )
2013-07-30 04:57:37 +00:00
TORRENT_LOCAL = bool ( check_setting_int ( CFG , ' Torrents ' , ' torrent_local ' , 0 ) )
LOCAL_WATCHDIR = check_setting_str ( CFG , ' Torrents ' , ' local_watchdir ' , ' ' )
TORRENT_SEEDBOX = bool ( check_setting_int ( CFG , ' Torrents ' , ' torrent_seedbox ' , 0 ) )
SEEDBOX_HOST = check_setting_str ( CFG , ' Torrents ' , ' seedbox_host ' , ' ' )
SEEDBOX_PORT = check_setting_str ( CFG , ' Torrents ' , ' seedbox_port ' , ' ' )
SEEDBOX_USER = check_setting_str ( CFG , ' Torrents ' , ' seedbox_user ' , ' ' )
SEEDBOX_PASS = check_setting_str ( CFG , ' Torrents ' , ' seedbox_pass ' , ' ' )
SEEDBOX_WATCHDIR = check_setting_str ( CFG , ' Torrents ' , ' seedbox_watchdir ' , ' ' )
ENABLE_TORRENT_SEARCH = bool ( check_setting_int ( CFG , ' Torrents ' , ' enable_torrent_search ' , 0 ) )
ENABLE_KAT = bool ( check_setting_int ( CFG , ' Torrents ' , ' enable_kat ' , 0 ) )
2013-10-19 01:04:16 +00:00
KAT_PROXY = check_setting_str ( CFG , ' Torrents ' , ' kat_proxy ' , ' ' )
2013-07-30 04:57:37 +00:00
ENABLE_CBT = bool ( check_setting_int ( CFG , ' Torrents ' , ' enable_cbt ' , 0 ) )
CBT_PASSKEY = check_setting_str ( CFG , ' Torrents ' , ' cbt_passkey ' , ' ' )
2014-06-02 19:02:28 +00:00
SNATCHEDTORRENT_NOTIFY = bool ( check_setting_int ( CFG , ' Torrents ' , ' snatchedtorrent_notify ' , 0 ) )
2014-02-26 19:48:50 +00:00
#this needs to have it's own category - for now General will do.
NZB_DOWNLOADER = check_setting_int ( CFG , ' General ' , ' nzb_downloader ' , 0 )
#legacy support of older config - reload into old values for consistency.
if NZB_DOWNLOADER == 0 : USE_SABNZBD = True
elif NZB_DOWNLOADER == 1 : USE_NZBGET = True
elif NZB_DOWNLOADER == 2 : USE_BLACKHOLE = True
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
else :
#default to SABnzbd
NZB_DOWNLOADER = 0
USE_SABNZBD = True
2014-02-26 19:48:50 +00:00
#USE_SABNZBD = bool(check_setting_int(CFG, 'SABnzbd', 'use_sabnzbd', 0))
2012-09-13 15:27:34 +00:00
SAB_HOST = check_setting_str ( CFG , ' SABnzbd ' , ' sab_host ' , ' ' )
SAB_USERNAME = check_setting_str ( CFG , ' SABnzbd ' , ' sab_username ' , ' ' )
SAB_PASSWORD = check_setting_str ( CFG , ' SABnzbd ' , ' sab_password ' , ' ' )
SAB_APIKEY = check_setting_str ( CFG , ' SABnzbd ' , ' sab_apikey ' , ' ' )
SAB_CATEGORY = check_setting_str ( CFG , ' SABnzbd ' , ' sab_category ' , ' ' )
2013-02-09 03:34:02 +00:00
SAB_DIRECTORY = check_setting_str ( CFG , ' SABnzbd ' , ' sab_directory ' , ' ' )
2013-01-13 15:59:46 +00:00
SAB_PRIORITY = check_setting_str ( CFG , ' SABnzbd ' , ' sab_priority ' , ' ' )
2013-01-13 19:20:39 +00:00
if SAB_PRIORITY . isdigit ( ) :
if SAB_PRIORITY == " 0 " : SAB_PRIORITY = " Default "
elif SAB_PRIORITY == " 1 " : SAB_PRIORITY = " Low "
elif SAB_PRIORITY == " 2 " : SAB_PRIORITY = " Normal "
elif SAB_PRIORITY == " 3 " : SAB_PRIORITY = " High "
elif SAB_PRIORITY == " 4 " : SAB_PRIORITY = " Paused "
else : SAB_PRIORITY = " Default "
2013-02-20 03:03:51 +00:00
2014-02-26 19:48:50 +00:00
#USE_NZBGET = bool(check_setting_int(CFG, 'NZBGet', 'use_nzbget', 0))
2013-02-20 03:03:51 +00:00
NZBGET_HOST = check_setting_str ( CFG , ' NZBGet ' , ' nzbget_host ' , ' ' )
NZBGET_PORT = check_setting_str ( CFG , ' NZBGet ' , ' nzbget_port ' , ' ' )
NZBGET_USERNAME = check_setting_str ( CFG , ' NZBGet ' , ' nzbget_username ' , ' ' )
NZBGET_PASSWORD = check_setting_str ( CFG , ' NZBGet ' , ' nzbget_password ' , ' ' )
NZBGET_CATEGORY = check_setting_str ( CFG , ' NZBGet ' , ' nzbget_category ' , ' ' )
NZBGET_PRIORITY = check_setting_str ( CFG , ' NZBGet ' , ' nzbget_priority ' , ' ' )
2014-02-26 19:48:50 +00:00
NZBGET_DIRECTORY = check_setting_str ( CFG , ' NZBGet ' , ' nzbget_directory ' , ' ' )
#USE_BLACKHOLE = bool(check_setting_int(CFG, 'General', 'use_blackhole', 0))
BLACKHOLE_DIR = check_setting_str ( CFG , ' General ' , ' blackhole_dir ' , ' ' )
2013-02-20 03:03:51 +00:00
2013-10-01 18:37:42 +00:00
PR_NUM = 0 # provider counter here (used for provider orders)
PR = [ ]
2014-01-29 19:24:53 +00:00
#add torrents to provider counter.
if ENABLE_CBT :
PR . append ( ' cbt ' )
PR_NUM + = 1
if ENABLE_KAT :
PR . append ( ' kat ' )
PR_NUM + = 1
2012-09-13 15:27:34 +00:00
NZBSU = bool ( check_setting_int ( CFG , ' NZBsu ' , ' nzbsu ' , 0 ) )
2013-08-04 05:57:21 +00:00
NZBSU_UID = check_setting_str ( CFG , ' NZBsu ' , ' nzbsu_uid ' , ' ' )
2012-09-13 15:27:34 +00:00
NZBSU_APIKEY = check_setting_str ( CFG , ' NZBsu ' , ' nzbsu_apikey ' , ' ' )
2013-10-01 18:37:42 +00:00
if NZBSU :
2014-06-01 07:35:18 +00:00
PR . append ( ' nzb.su ' )
2013-10-01 18:37:42 +00:00
PR_NUM + = 1
2012-09-13 15:27:34 +00:00
DOGNZB = bool ( check_setting_int ( CFG , ' DOGnzb ' , ' dognzb ' , 0 ) )
2013-08-04 05:57:21 +00:00
DOGNZB_UID = check_setting_str ( CFG , ' DOGnzb ' , ' dognzb_uid ' , ' ' )
2012-09-13 15:27:34 +00:00
DOGNZB_APIKEY = check_setting_str ( CFG , ' DOGnzb ' , ' dognzb_apikey ' , ' ' )
2013-10-01 18:37:42 +00:00
if DOGNZB :
PR . append ( ' dognzb ' )
PR_NUM + = 1
2012-09-13 15:27:34 +00:00
RAW = bool ( check_setting_int ( CFG , ' Raw ' , ' raw ' , 0 ) )
RAW_PROVIDER = check_setting_str ( CFG , ' Raw ' , ' raw_provider ' , ' ' )
RAW_USERNAME = check_setting_str ( CFG , ' Raw ' , ' raw_username ' , ' ' )
RAW_PASSWORD = check_setting_str ( CFG , ' Raw ' , ' raw_password ' , ' ' )
RAW_GROUPS = check_setting_str ( CFG , ' Raw ' , ' raw_groups ' , ' ' )
EXPERIMENTAL = bool ( check_setting_int ( CFG , ' Experimental ' , ' experimental ' , 0 ) )
2013-09-20 05:17:04 +00:00
ALTEXPERIMENTAL = bool ( check_setting_int ( CFG , ' Experimental ' , ' altexperimental ' , 1 ) )
2013-10-01 18:37:42 +00:00
if EXPERIMENTAL :
PR . append ( ' Experimental ' )
PR_NUM + = 1
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
#print 'PR_NUM::' + str(PR_NUM)
2013-10-01 18:37:42 +00:00
2012-12-16 17:57:02 +00:00
NEWZNAB = bool ( check_setting_int ( CFG , ' Newznab ' , ' newznab ' , 0 ) )
2013-05-19 04:07:18 +00:00
if CONFIG_VERSION :
NEWZNAB_HOST = check_setting_str ( CFG , ' Newznab ' , ' newznab_host ' , ' ' )
NEWZNAB_APIKEY = check_setting_str ( CFG , ' Newznab ' , ' newznab_apikey ' , ' ' )
2013-08-04 05:57:21 +00:00
NEWZNAB_UID = 1
2013-05-19 04:07:18 +00:00
NEWZNAB_ENABLED = bool ( check_setting_int ( CFG , ' Newznab ' , ' newznab_enabled ' , 1 ) )
2013-07-30 04:57:37 +00:00
NEWZNAB_NAME = NEWZNAB_HOST
if CONFIG_VERSION == ' 4 ' :
NEWZNAB_NAME = check_setting_str ( CFG , ' Newznab ' , ' newznab_name ' , ' ' )
2013-08-04 05:57:21 +00:00
elif CONFIG_VERSION == ' 5 ' :
NEWZNAB_UID = check_setting_str ( CFG , ' Newznab ' , ' newznab_uid ' , ' ' )
NEWZNAB_NAME = check_setting_str ( CFG , ' Newznab ' , ' newznab_name ' , ' ' )
2013-07-30 04:57:37 +00:00
# this gets nasty
# if configv is != 4, then the NewznabName doesn't exist so we need to create and add it and
# then rewrite
# if configv == 4, Newznab name exists and let it go through....
2012-12-16 17:57:02 +00:00
# Need to pack the extra newznabs back into a list of tuples
flattened_newznabs = check_setting_str ( CFG , ' Newznab ' , ' extra_newznabs ' , [ ] , log = False )
2013-07-30 04:57:37 +00:00
if CONFIG_VERSION == ' 4 ' :
EN_NUM = 4 #EN_NUM is the number of iterations of itertools to use
2013-08-04 05:57:21 +00:00
elif CONFIG_VERSION == ' 5 ' :
EN_NUM = 5 #addition of Newznab UID
2013-07-30 04:57:37 +00:00
else :
EN_NUM = 3
EXTRA_NEWZNABS = list ( itertools . izip ( * [ itertools . islice ( flattened_newznabs , i , None , EN_NUM ) for i in range ( EN_NUM ) ] ) )
#if ConfigV3 add the nzb_name to it..
2013-08-04 05:57:21 +00:00
if CONFIG_VERSION != ' 5 ' : #just bump it up to V5 and throw in the UID too.
2013-07-30 04:57:37 +00:00
ENABS = [ ]
for en in EXTRA_NEWZNABS :
#set newznabname to newznab address initially so doesn't bomb.
2013-08-04 05:57:21 +00:00
if CONFIG_VERSION == ' 4 ' :
2013-08-06 00:53:10 +00:00
ENABS . append ( ( en [ 0 ] , en [ 1 ] , en [ 2 ] , ' 1 ' , en [ 3 ] ) ) #0=name,1=host,2=api,3=enabled/disabled
2013-08-04 05:57:21 +00:00
else :
2013-08-06 00:53:10 +00:00
ENABS . append ( ( en [ 0 ] , en [ 0 ] , en [ 1 ] , ' 1 ' , en [ 2 ] ) ) #0=host,1=api,2=enabled/disabled
2013-07-30 04:57:37 +00:00
#now we hammer the EXTRA_NEWZNABS with the corrected version
EXTRA_NEWZNABS = ENABS
#update the configV and write the config.
2013-08-04 05:57:21 +00:00
CONFIG_VERSION = ' 5 '
2013-07-30 04:57:37 +00:00
config_write ( )
2013-08-04 05:57:21 +00:00
2013-05-19 04:07:18 +00:00
#to counteract the loss of the 1st newznab entry because of a switch, let's rewrite to the tuple
if NEWZNAB_HOST and CONFIG_VERSION :
2013-08-04 05:57:21 +00:00
EXTRA_NEWZNABS . append ( ( NEWZNAB_NAME , NEWZNAB_HOST , NEWZNAB_APIKEY , NEWZNAB_UID , int ( NEWZNAB_ENABLED ) ) )
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
#PR_NUM +=1
2013-05-19 04:07:18 +00:00
# Need to rewrite config here and bump up config version
2013-08-04 05:57:21 +00:00
CONFIG_VERSION = ' 5 '
2013-05-19 04:07:18 +00:00
config_write ( )
2013-10-01 18:37:42 +00:00
2013-10-01 19:10:40 +00:00
#print 'PR_NUM:' + str(PR_NUM)
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
if NEWZNAB :
for ens in EXTRA_NEWZNABS :
#print ens[0]
#print 'enabled:' + str(ens[4])
if ens [ 4 ] == ' 1 ' : # if newznabs are enabled
PR . append ( ens [ 0 ] )
PR_NUM + = 1
2013-10-01 18:37:42 +00:00
2013-10-01 19:10:40 +00:00
#print('Provider Number count: ' + str(PR_NUM))
2013-10-01 18:37:42 +00:00
flattened_provider_order = check_setting_str ( CFG , ' General ' , ' provider_order ' , [ ] , log = False )
PROVIDER_ORDER = list ( itertools . izip ( * [ itertools . islice ( flattened_provider_order , i , None , 2 ) for i in range ( 2 ) ] ) )
if len ( flattened_provider_order ) == 0 :
#priority provider sequence in order#, ProviderName
2013-10-01 19:10:40 +00:00
#print('creating provider sequence order now...')
2013-10-01 18:37:42 +00:00
TMPPR_NUM = 0
PROV_ORDER = [ ]
while TMPPR_NUM < PR_NUM :
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
PROV_ORDER . append ( { " order_seq " : TMPPR_NUM ,
" provider " : str ( PR [ TMPPR_NUM ] ) } )
2013-10-01 18:37:42 +00:00
TMPPR_NUM + = 1
PROVIDER_ORDER = PROV_ORDER
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
else :
#if provider order exists already, load it and then append to end any NEW entries.
TMPPR_NUM = 0
PROV_ORDER = [ ]
for PRO in PROVIDER_ORDER :
PROV_ORDER . append ( { " order_seq " : PRO [ 0 ] ,
" provider " : str ( PRO [ 1 ] ) } )
#print 'Provider is : ' + str(PRO)
TMPPR_NUM + = 1
if PR_NUM != TMPPR_NUM :
#print 'existing Order count does not match New Order count'
if PR_NUM > TMPPR_NUM :
#print 'New entries exist, appending to end as default ordering'
TMPPR_NUM = 0
while ( TMPPR_NUM < PR_NUM ) :
#print 'checking entry #' + str(TMPPR_NUM) + ': ' + str(PR[TMPPR_NUM])
if not any ( d . get ( " provider " , None ) == str ( PR [ TMPPR_NUM ] ) for d in PROV_ORDER ) :
#print 'new provider should be : ' + str(TMPPR_NUM) + ' -- ' + str(PR[TMPPR_NUM])
PROV_ORDER . append ( { " order_seq " : TMPPR_NUM ,
" provider " : str ( PR [ TMPPR_NUM ] ) } )
#else:
#print 'provider already exists at : ' + str(TMPPR_NUM) + ' -- ' + str(PR[TMPPR_NUM])
TMPPR_NUM + = 1
2014-01-29 19:24:53 +00:00
#this isn't ready for primetime just yet...
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
#print 'Provider Order is:' + str(PROV_ORDER)
if PROV_ORDER is None :
flatt_providers = None
else :
flatt_providers = [ ]
for pro in PROV_ORDER :
for key , value in pro . items ( ) :
flatt_providers . append ( str ( value ) )
PROVIDER_ORDER = list ( itertools . izip ( * [ itertools . islice ( flatt_providers , i , None , 2 ) for i in range ( 2 ) ] ) )
#print 'text provider order is: ' + str(PROVIDER_ORDER)
2013-10-01 18:37:42 +00:00
config_write ( )
2012-09-13 15:27:34 +00:00
# update folder formats in the config & bump up config version
if CONFIG_VERSION == ' 0 ' :
from mylar . helpers import replace_all
2012-12-16 17:57:02 +00:00
file_values = { ' issue ' : ' Issue ' , ' title ' : ' Title ' , ' series ' : ' Series ' , ' year ' : ' Year ' }
folder_values = { ' series ' : ' Series ' , ' publisher ' : ' Publisher ' , ' year ' : ' Year ' , ' first ' : ' First ' , ' lowerfirst ' : ' first ' }
2012-09-13 15:27:34 +00:00
FILE_FORMAT = replace_all ( FILE_FORMAT , file_values )
FOLDER_FORMAT = replace_all ( FOLDER_FORMAT , folder_values )
CONFIG_VERSION = ' 1 '
if CONFIG_VERSION == ' 1 ' :
from mylar . helpers import replace_all
2012-12-16 17:57:02 +00:00
file_values = { ' Issue ' : ' $Issue ' ,
2012-09-13 15:27:34 +00:00
' Title ' : ' $Title ' ,
2012-12-16 17:57:02 +00:00
' Series ' : ' $Series ' ,
2012-09-13 15:27:34 +00:00
' Year ' : ' $Year ' ,
' title ' : ' $title ' ,
2012-12-16 17:57:02 +00:00
' series ' : ' $series ' ,
2012-09-13 15:27:34 +00:00
' year ' : ' $year '
}
2012-12-16 17:57:02 +00:00
folder_values = { ' Series ' : ' $Series ' ,
' Publisher ' : ' $Publisher ' ,
' Year ' : ' $Year ' ,
' First ' : ' $First ' ,
' series ' : ' $series ' ,
' publisher ' : ' $publisher ' ,
' year ' : ' $year ' ,
' first ' : ' $first '
2012-09-13 15:27:34 +00:00
}
FILE_FORMAT = replace_all ( FILE_FORMAT , file_values )
FOLDER_FORMAT = replace_all ( FOLDER_FORMAT , folder_values )
CONFIG_VERSION = ' 2 '
2012-09-19 13:56:09 +00:00
2013-01-13 15:59:46 +00:00
if ' http:// ' not in SAB_HOST [ : 7 ] and ' https:// ' not in SAB_HOST [ : 8 ] :
2012-09-19 13:56:09 +00:00
SAB_HOST = ' http:// ' + SAB_HOST
2013-01-13 15:59:46 +00:00
#print ("SAB_HOST:" + SAB_HOST)
2012-09-19 13:56:09 +00:00
2012-09-13 15:27:34 +00:00
if not LOG_DIR :
LOG_DIR = os . path . join ( DATA_DIR , ' logs ' )
2013-01-13 15:59:46 +00:00
2012-09-13 15:27:34 +00:00
if not os . path . exists ( LOG_DIR ) :
try :
os . makedirs ( LOG_DIR )
except OSError :
if VERBOSE :
print ' Unable to create the log directory. Logging to screen only. '
2013-01-13 15:59:46 +00:00
2012-09-13 15:27:34 +00:00
# Start the logger, silence console logging if we need to
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
logger . initLogger ( verbose = VERBOSE ) #logger.mylar_log.initLogger(verbose=VERBOSE)
2013-01-13 15:59:46 +00:00
2012-09-13 15:27:34 +00:00
# Put the cache dir in the data dir for now
2013-01-17 16:22:51 +00:00
if not CACHE_DIR :
CACHE_DIR = os . path . join ( str ( DATA_DIR ) , ' cache ' )
2013-03-06 16:20:09 +00:00
#logger.info("cache set to : " + str(CACHE_DIR))
2012-09-13 15:27:34 +00:00
if not os . path . exists ( CACHE_DIR ) :
try :
2013-01-13 15:59:46 +00:00
os . makedirs ( CACHE_DIR )
2012-09-13 15:27:34 +00:00
except OSError :
logger . error ( ' Could not create cache dir. Check permissions of datadir: ' + DATA_DIR )
2013-01-13 15:59:46 +00:00
2014-06-09 07:55:05 +00:00
#ComicVine API Check
if COMICVINE_API is None or COMICVINE_API == ' ' :
logger . error ( ' No User Comicvine API key specified. I will not work very well due to api limits - http://api.comicvine.com/ and get your own free key. ' )
2012-12-16 17:57:02 +00:00
# Sanity check for search interval. Set it to at least 6 hours
if SEARCH_INTERVAL < 360 :
2013-08-19 06:14:47 +00:00
logger . info ( ' Search interval too low. Resetting to 6 hour minimum ' )
2012-12-16 17:57:02 +00:00
SEARCH_INTERVAL = 360
2012-09-13 15:27:34 +00:00
# Initialize the database
logger . info ( ' Checking to see if the database has all tables.... ' )
try :
dbcheck ( )
except Exception , e :
2013-08-19 06:14:47 +00:00
logger . error ( ' Cannot connect to the database: %s ' % e )
2013-01-13 15:59:46 +00:00
2013-03-12 16:04:28 +00:00
# With the addition of NZBGet, it's possible that both SAB and NZBget are unchecked initially.
# let's force default SAB.
2014-02-26 19:48:50 +00:00
#if NZB_DOWNLOADER == None:
# logger.info('No Download Option selected - default to SABnzbd.')
# NZB_DOWNLOADER = 0
# USE_SABNZBD = 1
#else:
# logger.info('nzb_downloader is set to : ' + str(NZB_DOWNLOADER))
#if USE_NZBGET == 0 and USE_SABNZBD == 0 :
# logger.info('No Download Server option given - defaulting to SABnzbd.')
# USE_SABNZBD = 1
2013-03-12 16:04:28 +00:00
2012-09-13 15:27:34 +00:00
# Get the currently installed version - returns None, 'win32' or the git hash
# Also sets INSTALL_TYPE variable to 'win', 'git' or 'source'
CURRENT_VERSION = versioncheck . getVersion ( )
2013-02-17 10:31:18 +00:00
if CURRENT_VERSION is not None :
hash = CURRENT_VERSION [ : 7 ]
else :
hash = " unknown "
2013-02-16 18:30:22 +00:00
if version . MYLAR_VERSION == ' master ' :
vers = ' M '
else :
vers = ' D '
USER_AGENT = ' Mylar/ ' + str ( hash ) + ' ( ' + vers + ' ) +http://www.github.com/evilhero/mylar/ '
2013-01-13 15:59:46 +00:00
2012-09-13 15:27:34 +00:00
# Check for new versions
if CHECK_GITHUB_ON_STARTUP :
try :
LATEST_VERSION = versioncheck . checkGithub ( )
except :
LATEST_VERSION = CURRENT_VERSION
else :
LATEST_VERSION = CURRENT_VERSION
2013-03-06 16:20:09 +00:00
#check for syno_fix here
if SYNO_FIX :
parsepath = os . path . join ( DATA_DIR , ' bs4 ' , ' builder ' , ' _lxml.py ' )
if os . path . isfile ( parsepath ) :
print ( " found bs4...renaming appropriate file. " )
src = os . path . join ( parsepath )
dst = os . path . join ( DATA_DIR , ' bs4 ' , ' builder ' , ' lxml.py ' )
try :
shutil . move ( src , dst )
except ( OSError , IOError ) :
2013-08-19 06:14:47 +00:00
logger . error ( ' Unable to rename file...shutdown Mylar and go to ' + src . encode ( ' utf-8 ' ) + ' and rename the _lxml.py file to lxml.py ' )
logger . error ( ' NOT doing this will result in errors when adding / refreshing a series ' )
2013-03-06 16:20:09 +00:00
else :
2013-08-19 06:14:47 +00:00
logger . info ( ' Synology Parsing Fix already implemented. No changes required at this time. ' )
2013-03-06 16:20:09 +00:00
2013-05-01 18:13:07 +00:00
#CV sometimes points to the incorrect DNS - here's the fix.
if CVAPIFIX == 1 :
CVURL = ' http://beta.comicvine.com/api/ '
2013-08-19 06:14:47 +00:00
logger . info ( ' CVAPIFIX enabled: ComicVine set to beta API site ' )
2013-05-01 18:13:07 +00:00
else :
CVURL = ' http://api.comicvine.com/ '
2013-08-19 06:14:47 +00:00
logger . info ( ' CVAPIFIX disabled: Comicvine set to normal API site ' )
2013-05-06 04:35:33 +00:00
if LOCMOVE :
helpers . updateComicLocation ( )
2013-08-19 06:14:47 +00:00
#logger.fdebug('platform detected as : ' + OS_DETECT)
#logger.fdebug('language detected as : ' + OS_LANG)
#logger.fdebug('encoding detected as : ' + OS_ENCODING)
2013-03-21 17:09:10 +00:00
#Ordering comics here
2013-08-19 06:14:47 +00:00
logger . info ( ' Remapping the sorting to allow for new additions. ' )
2013-03-21 17:09:10 +00:00
COMICSORT = helpers . ComicSort ( sequence = ' startup ' )
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
#start the db write only thread here.
#this is a thread that continually runs in the background as the ONLY thread that can write to the db.
2014-05-26 18:11:39 +00:00
# logger.info('Starting Write-Only thread.')
#db.WriteOnly()
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
#initialize the scheduler threads here.
2014-05-26 18:11:39 +00:00
#dbUpdateScheduler = scheduler.Scheduler(action=dbupdater.dbUpdate(),
# cycleTime=datetime.timedelta(hours=48),
# runImmediately=False,
# threadName="DBUPDATE")
# if NZB_STARTUP_SEARCH:
# searchrunmode = True
# else:
# searchrunmode = False
#searchScheduler = scheduler.Scheduler(searchit.CurrentSearcher(),
# cycleTime=datetime.timedelta(minutes=SEARCH_INTERVAL),
# threadName="SEARCH",
# runImmediately=searchrunmode)
#RSSScheduler = scheduler.Scheduler(rsscheckit.tehMain(),
# cycleTime=datetime.timedelta(minutes=int(RSS_CHECKINTERVAL)),
# threadName="RSSCHECK",
# runImmediately=True,
# delay=30)
#WeeklyScheduler = scheduler.Scheduler(weeklypullit.Weekly(),
# cycleTime=datetime.timedelta(hours=24),
# threadName="WEEKLYCHECK",
# runImmediately=True,
# delay=10)
#VersionScheduler = scheduler.Scheduler(versioncheckit.CheckVersion(),
# cycleTime=datetime.timedelta(minutes=CHECK_GITHUB_INTERVAL),
# threadName="VERSIONCHECK",
# runImmediately=True)
#FolderMonitorScheduler = scheduler.Scheduler(PostProcessor.FolderCheck(),
# cycleTime=datetime.timedelta(minutes=int(DOWNLOAD_SCAN_INTERVAL)),
# threadName="FOLDERMONITOR",
# runImmediately=True,
# delay=60)
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
2014-06-04 20:31:26 +00:00
# Store the original umask
UMASK = os . umask ( 0 )
os . umask ( UMASK )
2013-03-06 16:20:09 +00:00
2012-09-13 15:27:34 +00:00
__INITIALIZED__ = True
return True
2013-01-13 15:59:46 +00:00
2012-09-13 15:27:34 +00:00
def daemonize ( ) :
if threading . activeCount ( ) != 1 :
logger . warn ( ' There are %r active threads. Daemonizing may cause \
strange behavior . ' % threading.enumerate())
sys . stdout . flush ( )
sys . stderr . flush ( )
# Do first fork
try :
pid = os . fork ( )
if pid == 0 :
pass
else :
# Exit the parent process
logger . debug ( ' Forking once... ' )
os . _exit ( 0 )
except OSError , e :
sys . exit ( " 1st fork failed: %s [ %d ] " % ( e . strerror , e . errno ) )
os . setsid ( )
2014-06-04 20:31:26 +00:00
# Make sure I can read my own files and shut out others
prev = os . umask ( 0 ) # @UndefinedVariable - only available in UNIX
os . umask ( prev and int ( ' 077 ' , 8 ) )
2012-09-13 15:27:34 +00:00
# Do second fork
try :
pid = os . fork ( )
if pid > 0 :
logger . debug ( ' Forking twice... ' )
os . _exit ( 0 ) # Exit second parent process
except OSError , e :
sys . exit ( " 2nd fork failed: %s [ %d ] " % ( e . strerror , e . errno ) )
2014-06-04 20:31:26 +00:00
dev_null = file ( ' /dev/null ' , ' r ' )
os . dup2 ( dev_null . fileno ( ) , sys . stdin . fileno ( ) )
2012-09-13 15:27:34 +00:00
si = open ( ' /dev/null ' , " r " )
so = open ( ' /dev/null ' , " a+ " )
se = open ( ' /dev/null ' , " a+ " )
os . dup2 ( si . fileno ( ) , sys . stdin . fileno ( ) )
os . dup2 ( so . fileno ( ) , sys . stdout . fileno ( ) )
os . dup2 ( se . fileno ( ) , sys . stderr . fileno ( ) )
pid = os . getpid ( )
logger . info ( ' Daemonized to PID: %s ' % pid )
2014-06-04 20:31:26 +00:00
if CREATEPID :
logger . info ( " Writing PID %d to %s " , pid , PIDFILE )
with file ( PIDFILE , ' w ' ) as fp :
fp . write ( " %s \n " % pid )
2012-09-13 15:27:34 +00:00
def launch_browser ( host , port , root ) :
if host == ' 0.0.0.0 ' :
host = ' localhost '
try :
webbrowser . open ( ' http:// %s : %i %s ' % ( host , port , root ) )
except Exception , e :
logger . error ( ' Could not launch browser: %s ' % e )
2014-04-02 19:14:30 +00:00
def config_write ( ) :
2012-09-13 15:27:34 +00:00
new_config = ConfigObj ( )
new_config . filename = CONFIG_FILE
IMP: Removed unneeded code from several modules, IMP:(#659) Subdirectories now will be scanned in properly when in series directories, FIX:(#635)(#658) Moved code from html into module to allow for better integration and further templating needs, IMP: Added ability for mylar to auto-grab SABnzbd API when provided with user/pass, IMP: Test SABnzbd button works again - will auto-rollback to NZBKey usage, IMP: Added counts to Upcoming page, IMP: Added some more detailed parsing to the ImportResults, IMP: ImportResults will now show proper series title, IMP: Improved some logic when determining if a new weekly issue is on a watchlist if a rebooted series, IMP: A bunch of smaller fixes, and some various code tweaks...
2014-04-02 19:08:59 +00:00
2013-08-19 06:14:47 +00:00
new_config . encoding = ' UTF8 '
2012-09-13 15:27:34 +00:00
new_config [ ' General ' ] = { }
new_config [ ' General ' ] [ ' config_version ' ] = CONFIG_VERSION
2014-06-09 07:55:05 +00:00
new_config [ ' General ' ] [ ' comicvine_api ' ] = COMICVINE_API
IMP:(#753) Better handling of cbz files when using metatagging option, IMP: Added option for MetaTagging to enable/disable overwriting of existing metadata on cbz files, IMP: Post-Processing will now delete folders that are identical to filenames after successful post-processing, FIX:(#756) Fix for Manual Search for an Issue which resulted in traceback errors upon not finding any matches (Windows), IMP: Added module-name to logging for some modules to help troubleshooting (eventually all will be done), IMP: If a filename contained repeated characters for spaces (ie. ___ or ...), it would fail on post-processing due to the nzbname being off, IMP: Monitoring of CV API will now be persitent on restarts/shutdowns/etc, IMP: Added a maximum CV API global so that it can be adjusted for monitoring more easily should API requirements change, IMP: When Adding new series, will now only mark issues that are actually upcoming as Wanted (based on Store Date)
2014-06-22 08:32:45 +00:00
#write the current CV API time / count here so it's persistent through reboots/restarts.
#get the current values.
helpers . cvapi_check ( )
new_config [ ' General ' ] [ ' cvapi_count ' ] = CVAPI_COUNT
new_config [ ' General ' ] [ ' cvapi_time ' ] = CVAPI_TIME
2012-09-13 15:27:34 +00:00
new_config [ ' General ' ] [ ' http_port ' ] = HTTP_PORT
new_config [ ' General ' ] [ ' http_host ' ] = HTTP_HOST
new_config [ ' General ' ] [ ' http_username ' ] = HTTP_USERNAME
new_config [ ' General ' ] [ ' http_password ' ] = HTTP_PASSWORD
new_config [ ' General ' ] [ ' http_root ' ] = HTTP_ROOT
FIX: (#746) updated autoProcessComics.py / ComicRN.py's which will now send proper completion messeages to clients, FIX: (#752) refresh series will now test if a series is 'out of whack' with it's numerical issue count (ie. 5/4) or it has no issue data due to a bad refresh / api maxing out and will adjust it's processing to accomodate either, IMP: (#750) Added ComicVine API Checker which will check API counts at regular intervals to inform/warn users of usage, as well as adding a screen-time display of API hits / mins used at the bottom of every page (refreshing/reloading pages will update counts), FIX: (#747)EOL normalization (dos2unix) on search.py - removed classes & exceptions as not being used, IMP: (#747) Skip processing issues with an invalid store date & issue date (thnx rupaschomaker), FIX: Removed strings when searching/logging torrents as was causing ascii errors especially with KAT, IMP: Added [META-TAGGING] to logging for meta-tagging module, IMP: Added ability in GUI to select CR or Cbl tags (or both) when writing metadata to cbz files, IMP: Improved support/usage with ComicTagger v1.1.15 which allows for personal CV API Key usage - if supplied to Mylar, will use when tagging with ComicTagger, IMP: Added Manual Search option to allow for individual searches of issues without changing initial status.
2014-06-18 19:58:19 +00:00
new_config [ ' General ' ] [ ' https_force_on ' ] = int ( HTTPS_FORCE_ON )
2014-02-26 19:48:50 +00:00
new_config [ ' General ' ] [ ' api_enabled ' ] = int ( API_ENABLED )
new_config [ ' General ' ] [ ' api_key ' ] = API_KEY
2012-09-13 15:27:34 +00:00
new_config [ ' General ' ] [ ' launch_browser ' ] = int ( LAUNCH_BROWSER )
new_config [ ' General ' ] [ ' log_dir ' ] = LOG_DIR
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
new_config [ ' General ' ] [ ' max_logsize ' ] = MAX_LOGSIZE
2012-12-20 10:39:37 +00:00
new_config [ ' General ' ] [ ' logverbose ' ] = int ( LOGVERBOSE )
2012-09-13 15:27:34 +00:00
new_config [ ' General ' ] [ ' git_path ' ] = GIT_PATH
2013-01-17 16:22:51 +00:00
new_config [ ' General ' ] [ ' cache_dir ' ] = CACHE_DIR
FIX:(#304) Index out of range on recheck, FIX:(#303) Comicvine link updated on details page, FIX:(#302) Query rate (Search Delay) Added as a configuration option, FIX:(#300) Version number error on searching when no version number, FIX:(#297) Manual Rename of Files working, FIX:(#294) 'AU' issue problems should be resolved now, FIX:(#290) V#(year) and Vol#(year) added to filechecking, IMP: ComicVine data use only now as a hidden option (cv_only = 1 in config.ini), IMP: added as options for file naming, IMP: Rough drafting of Annuals (annuals_on = 1 in config.ini), Other fixes..
2013-04-06 09:43:18 +00:00
new_config [ ' General ' ] [ ' annuals_on ' ] = int ( ANNUALS_ON )
new_config [ ' General ' ] [ ' cv_only ' ] = int ( CV_ONLY )
new_config [ ' General ' ] [ ' cv_onetimer ' ] = int ( CV_ONETIMER )
2013-05-01 18:13:07 +00:00
new_config [ ' General ' ] [ ' cvapifix ' ] = int ( CVAPIFIX )
2012-09-13 15:27:34 +00:00
new_config [ ' General ' ] [ ' check_github ' ] = int ( CHECK_GITHUB )
new_config [ ' General ' ] [ ' check_github_on_startup ' ] = int ( CHECK_GITHUB_ON_STARTUP )
new_config [ ' General ' ] [ ' check_github_interval ' ] = CHECK_GITHUB_INTERVAL
new_config [ ' General ' ] [ ' destination_dir ' ] = DESTINATION_DIR
2013-04-22 03:43:57 +00:00
new_config [ ' General ' ] [ ' chmod_dir ' ] = CHMOD_DIR
new_config [ ' General ' ] [ ' chmod_file ' ] = CHMOD_FILE
2012-09-13 15:27:34 +00:00
new_config [ ' General ' ] [ ' usenet_retention ' ] = USENET_RETENTION
new_config [ ' General ' ] [ ' search_interval ' ] = SEARCH_INTERVAL
2013-01-15 17:32:08 +00:00
new_config [ ' General ' ] [ ' nzb_startup_search ' ] = int ( NZB_STARTUP_SEARCH )
2013-01-27 10:07:08 +00:00
new_config [ ' General ' ] [ ' libraryscan ' ] = int ( LIBRARYSCAN )
2012-09-13 15:27:34 +00:00
new_config [ ' General ' ] [ ' libraryscan_interval ' ] = LIBRARYSCAN_INTERVAL
2013-01-27 10:07:08 +00:00
new_config [ ' General ' ] [ ' add_comics ' ] = int ( ADD_COMICS )
new_config [ ' General ' ] [ ' comic_dir ' ] = COMIC_DIR
new_config [ ' General ' ] [ ' imp_move ' ] = int ( IMP_MOVE )
2013-01-28 20:31:43 +00:00
new_config [ ' General ' ] [ ' imp_rename ' ] = int ( IMP_RENAME )
2013-02-06 19:55:23 +00:00
new_config [ ' General ' ] [ ' imp_metadata ' ] = int ( IMP_METADATA )
2012-09-13 15:27:34 +00:00
new_config [ ' General ' ] [ ' download_scan_interval ' ] = DOWNLOAD_SCAN_INTERVAL
IMP: Added ForceRSS Check and Test SABnzbd Connection buttons in Config, FIX: If Annuals not enabled, would error on home screen, IMP: updated mylar.init.d (thnx Kalinon), FIX: Manual Post-Processing fix for Manual Run (thnx Kalinon), IMP: Library Monitor working (check folder every X minutes and Post-Process), IMP: Future Upcoming introduction, IMP: Experimental search better handling of year inclusions, FIX: Filechecker will now pick up series with years in the series title accordingly, FIX: Torrent seedbox sending would lockup occassionally when attempting to send torrent file, FIX: malformed image url on some series, IMP: Moved issue updating to a seperate function, IMP: When series was refreshed, would download the last issue (or few issues depending on date), regardless of status, IMP: When series is volume 1 or volume label doesn't exist, either assume V1 or remove volume requirements to improve matching hits, IMP: StoryArcs will now check in StoryArc folder for existing issues and change status in StoryArc accordingly...
2013-11-28 15:48:59 +00:00
new_config [ ' General ' ] [ ' check_folder ' ] = CHECK_FOLDER
2012-09-13 15:27:34 +00:00
new_config [ ' General ' ] [ ' interface ' ] = INTERFACE
2013-01-15 19:32:31 +00:00
new_config [ ' General ' ] [ ' autowant_all ' ] = int ( AUTOWANT_ALL )
new_config [ ' General ' ] [ ' autowant_upcoming ' ] = int ( AUTOWANT_UPCOMING )
new_config [ ' General ' ] [ ' preferred_quality ' ] = int ( PREFERRED_QUALITY )
new_config [ ' General ' ] [ ' comic_cover_local ' ] = int ( COMIC_COVER_LOCAL )
2012-09-13 15:27:34 +00:00
new_config [ ' General ' ] [ ' correct_metadata ' ] = int ( CORRECT_METADATA )
new_config [ ' General ' ] [ ' move_files ' ] = int ( MOVE_FILES )
new_config [ ' General ' ] [ ' rename_files ' ] = int ( RENAME_FILES )
new_config [ ' General ' ] [ ' folder_format ' ] = FOLDER_FORMAT
new_config [ ' General ' ] [ ' file_format ' ] = FILE_FORMAT
2014-02-26 19:48:50 +00:00
#new_config['General']['use_blackhole'] = int(USE_BLACKHOLE)
2012-09-13 15:27:34 +00:00
new_config [ ' General ' ] [ ' blackhole_dir ' ] = BLACKHOLE_DIR
2012-09-14 17:29:01 +00:00
new_config [ ' General ' ] [ ' replace_spaces ' ] = int ( REPLACE_SPACES )
new_config [ ' General ' ] [ ' replace_char ' ] = REPLACE_CHAR
2012-10-30 10:43:01 +00:00
new_config [ ' General ' ] [ ' zero_level ' ] = int ( ZERO_LEVEL )
new_config [ ' General ' ] [ ' zero_level_n ' ] = ZERO_LEVEL_N
2013-03-06 16:20:09 +00:00
new_config [ ' General ' ] [ ' lowercase_filenames ' ] = int ( LOWERCASE_FILENAMES )
2013-07-30 04:57:37 +00:00
new_config [ ' General ' ] [ ' ignore_havetotal ' ] = int ( IGNORE_HAVETOTAL )
2013-03-06 16:20:09 +00:00
new_config [ ' General ' ] [ ' syno_fix ' ] = int ( SYNO_FIX )
FIX:(#304) Index out of range on recheck, FIX:(#303) Comicvine link updated on details page, FIX:(#302) Query rate (Search Delay) Added as a configuration option, FIX:(#300) Version number error on searching when no version number, FIX:(#297) Manual Rename of Files working, FIX:(#294) 'AU' issue problems should be resolved now, FIX:(#290) V#(year) and Vol#(year) added to filechecking, IMP: ComicVine data use only now as a hidden option (cv_only = 1 in config.ini), IMP: added as options for file naming, IMP: Rough drafting of Annuals (annuals_on = 1 in config.ini), Other fixes..
2013-04-06 09:43:18 +00:00
new_config [ ' General ' ] [ ' search_delay ' ] = SEARCH_DELAY
2013-04-12 02:14:27 +00:00
new_config [ ' General ' ] [ ' grabbag_dir ' ] = GRABBAG_DIR
new_config [ ' General ' ] [ ' highcount ' ] = HIGHCOUNT
2013-04-22 03:11:12 +00:00
new_config [ ' General ' ] [ ' read2filename ' ] = int ( READ2FILENAME )
2013-05-25 06:18:00 +00:00
new_config [ ' General ' ] [ ' storyarcdir ' ] = int ( STORYARCDIR )
2013-01-13 15:59:46 +00:00
new_config [ ' General ' ] [ ' use_minsize ' ] = int ( USE_MINSIZE )
new_config [ ' General ' ] [ ' minsize ' ] = MINSIZE
new_config [ ' General ' ] [ ' use_maxsize ' ] = int ( USE_MAXSIZE )
new_config [ ' General ' ] [ ' maxsize ' ] = MAXSIZE
2013-01-15 17:32:08 +00:00
new_config [ ' General ' ] [ ' add_to_csv ' ] = int ( ADD_TO_CSV )
2013-01-23 08:22:22 +00:00
new_config [ ' General ' ] [ ' cvinfo ' ] = int ( CVINFO )
2013-02-06 19:55:23 +00:00
new_config [ ' General ' ] [ ' log_level ' ] = LOG_LEVEL
2012-12-27 15:04:03 +00:00
new_config [ ' General ' ] [ ' enable_extra_scripts ' ] = int ( ENABLE_EXTRA_SCRIPTS )
new_config [ ' General ' ] [ ' extra_scripts ' ] = EXTRA_SCRIPTS
2013-01-13 17:10:41 +00:00
new_config [ ' General ' ] [ ' enable_pre_scripts ' ] = int ( ENABLE_PRE_SCRIPTS )
new_config [ ' General ' ] [ ' pre_scripts ' ] = PRE_SCRIPTS
2013-05-04 01:57:19 +00:00
new_config [ ' General ' ] [ ' post_processing ' ] = int ( POST_PROCESSING )
2013-05-04 04:40:32 +00:00
new_config [ ' General ' ] [ ' weekfolder ' ] = int ( WEEKFOLDER )
2013-05-06 04:35:33 +00:00
new_config [ ' General ' ] [ ' locmove ' ] = int ( LOCMOVE )
new_config [ ' General ' ] [ ' newcom_dir ' ] = NEWCOM_DIR
2013-05-25 06:18:00 +00:00
new_config [ ' General ' ] [ ' fftonewcom_dir ' ] = int ( FFTONEWCOM_DIR )
2013-07-01 05:19:15 +00:00
new_config [ ' General ' ] [ ' enable_meta ' ] = int ( ENABLE_META )
new_config [ ' General ' ] [ ' cmtagger_path ' ] = CMTAGGER_PATH
FIX: (#746) updated autoProcessComics.py / ComicRN.py's which will now send proper completion messeages to clients, FIX: (#752) refresh series will now test if a series is 'out of whack' with it's numerical issue count (ie. 5/4) or it has no issue data due to a bad refresh / api maxing out and will adjust it's processing to accomodate either, IMP: (#750) Added ComicVine API Checker which will check API counts at regular intervals to inform/warn users of usage, as well as adding a screen-time display of API hits / mins used at the bottom of every page (refreshing/reloading pages will update counts), FIX: (#747)EOL normalization (dos2unix) on search.py - removed classes & exceptions as not being used, IMP: (#747) Skip processing issues with an invalid store date & issue date (thnx rupaschomaker), FIX: Removed strings when searching/logging torrents as was causing ascii errors especially with KAT, IMP: Added [META-TAGGING] to logging for meta-tagging module, IMP: Added ability in GUI to select CR or Cbl tags (or both) when writing metadata to cbz files, IMP: Improved support/usage with ComicTagger v1.1.15 which allows for personal CV API Key usage - if supplied to Mylar, will use when tagging with ComicTagger, IMP: Added Manual Search option to allow for individual searches of issues without changing initial status.
2014-06-18 19:58:19 +00:00
new_config [ ' General ' ] [ ' ct_tag_cr ' ] = int ( CT_TAG_CR )
new_config [ ' General ' ] [ ' ct_tag_cbl ' ] = int ( CT_TAG_CBL )
IMP:(#753) Better handling of cbz files when using metatagging option, IMP: Added option for MetaTagging to enable/disable overwriting of existing metadata on cbz files, IMP: Post-Processing will now delete folders that are identical to filenames after successful post-processing, FIX:(#756) Fix for Manual Search for an Issue which resulted in traceback errors upon not finding any matches (Windows), IMP: Added module-name to logging for some modules to help troubleshooting (eventually all will be done), IMP: If a filename contained repeated characters for spaces (ie. ___ or ...), it would fail on post-processing due to the nzbname being off, IMP: Monitoring of CV API will now be persitent on restarts/shutdowns/etc, IMP: Added a maximum CV API global so that it can be adjusted for monitoring more easily should API requirements change, IMP: When Adding new series, will now only mark issues that are actually upcoming as Wanted (based on Store Date)
2014-06-22 08:32:45 +00:00
new_config [ ' General ' ] [ ' ct_cbz_overwrite ' ] = int ( CT_CBZ_OVERWRITE )
2013-07-01 05:19:15 +00:00
new_config [ ' General ' ] [ ' indie_pub ' ] = INDIE_PUB
new_config [ ' General ' ] [ ' biggie_pub ' ] = BIGGIE_PUB
2013-02-20 03:03:51 +00:00
2013-07-30 04:57:37 +00:00
new_config [ ' General ' ] [ ' enable_rss ' ] = int ( ENABLE_RSS )
new_config [ ' General ' ] [ ' rss_checkinterval ' ] = RSS_CHECKINTERVAL
new_config [ ' General ' ] [ ' rss_lastrun ' ] = RSS_LASTRUN
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
# Need to unpack the providers for saving in config.ini
2013-10-25 02:14:31 +00:00
if PROVIDER_ORDER is None :
flattened_providers = None
else :
flattened_providers = [ ]
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
for pro in PROVIDER_ORDER :
#for key, value in pro.items():
for item in pro :
flattened_providers . append ( str ( item ) )
#flattened_providers.append(str(value))
2013-10-01 18:37:42 +00:00
new_config [ ' General ' ] [ ' provider_order ' ] = flattened_providers
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
new_config [ ' General ' ] [ ' nzb_downloader ' ] = int ( NZB_DOWNLOADER )
2013-10-01 18:37:42 +00:00
2013-07-30 04:57:37 +00:00
new_config [ ' Torrents ' ] = { }
new_config [ ' Torrents ' ] [ ' enable_torrents ' ] = int ( ENABLE_TORRENTS )
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
new_config [ ' Torrents ' ] [ ' minseeds ' ] = int ( MINSEEDS )
2013-07-30 04:57:37 +00:00
new_config [ ' Torrents ' ] [ ' torrent_local ' ] = int ( TORRENT_LOCAL )
new_config [ ' Torrents ' ] [ ' local_watchdir ' ] = LOCAL_WATCHDIR
new_config [ ' Torrents ' ] [ ' torrent_seedbox ' ] = int ( TORRENT_SEEDBOX )
new_config [ ' Torrents ' ] [ ' seedbox_host ' ] = SEEDBOX_HOST
new_config [ ' Torrents ' ] [ ' seedbox_port ' ] = SEEDBOX_PORT
new_config [ ' Torrents ' ] [ ' seedbox_user ' ] = SEEDBOX_USER
new_config [ ' Torrents ' ] [ ' seedbox_pass ' ] = SEEDBOX_PASS
new_config [ ' Torrents ' ] [ ' seedbox_watchdir ' ] = SEEDBOX_WATCHDIR
new_config [ ' Torrents ' ] [ ' enable_torrent_search ' ] = int ( ENABLE_TORRENT_SEARCH )
new_config [ ' Torrents ' ] [ ' enable_kat ' ] = int ( ENABLE_KAT )
2013-10-19 01:04:16 +00:00
new_config [ ' Torrents ' ] [ ' kat_proxy ' ] = KAT_PROXY
2013-07-30 04:57:37 +00:00
new_config [ ' Torrents ' ] [ ' enable_cbt ' ] = int ( ENABLE_CBT )
new_config [ ' Torrents ' ] [ ' cbt_passkey ' ] = CBT_PASSKEY
2014-06-02 19:02:28 +00:00
new_config [ ' Torrents ' ] [ ' snatchedtorrent_notify ' ] = int ( SNATCHEDTORRENT_NOTIFY )
2012-09-13 15:27:34 +00:00
new_config [ ' SABnzbd ' ] = { }
2014-02-26 19:48:50 +00:00
#new_config['SABnzbd']['use_sabnzbd'] = int(USE_SABNZBD)
2012-09-13 15:27:34 +00:00
new_config [ ' SABnzbd ' ] [ ' sab_host ' ] = SAB_HOST
new_config [ ' SABnzbd ' ] [ ' sab_username ' ] = SAB_USERNAME
new_config [ ' SABnzbd ' ] [ ' sab_password ' ] = SAB_PASSWORD
new_config [ ' SABnzbd ' ] [ ' sab_apikey ' ] = SAB_APIKEY
new_config [ ' SABnzbd ' ] [ ' sab_category ' ] = SAB_CATEGORY
2012-09-28 15:42:25 +00:00
new_config [ ' SABnzbd ' ] [ ' sab_priority ' ] = SAB_PRIORITY
2013-02-09 03:34:02 +00:00
new_config [ ' SABnzbd ' ] [ ' sab_directory ' ] = SAB_DIRECTORY
2012-09-13 15:27:34 +00:00
2013-02-20 03:03:51 +00:00
new_config [ ' NZBGet ' ] = { }
2014-02-26 19:48:50 +00:00
#new_config['NZBGet']['use_nzbget'] = int(USE_NZBGET)
2013-02-20 03:03:51 +00:00
new_config [ ' NZBGet ' ] [ ' nzbget_host ' ] = NZBGET_HOST
new_config [ ' NZBGet ' ] [ ' nzbget_port ' ] = NZBGET_PORT
new_config [ ' NZBGet ' ] [ ' nzbget_username ' ] = NZBGET_USERNAME
new_config [ ' NZBGet ' ] [ ' nzbget_password ' ] = NZBGET_PASSWORD
new_config [ ' NZBGet ' ] [ ' nzbget_category ' ] = NZBGET_CATEGORY
new_config [ ' NZBGet ' ] [ ' nzbget_priority ' ] = NZBGET_PRIORITY
2014-02-26 19:48:50 +00:00
new_config [ ' NZBGet ' ] [ ' nzbget_directory ' ] = NZBGET_DIRECTORY
2013-02-20 03:03:51 +00:00
2012-09-13 15:27:34 +00:00
new_config [ ' NZBsu ' ] = { }
new_config [ ' NZBsu ' ] [ ' nzbsu ' ] = int ( NZBSU )
2013-08-04 05:57:21 +00:00
new_config [ ' NZBsu ' ] [ ' nzbsu_uid ' ] = NZBSU_UID
2012-09-13 15:27:34 +00:00
new_config [ ' NZBsu ' ] [ ' nzbsu_apikey ' ] = NZBSU_APIKEY
new_config [ ' DOGnzb ' ] = { }
new_config [ ' DOGnzb ' ] [ ' dognzb ' ] = int ( DOGNZB )
2013-08-04 05:57:21 +00:00
new_config [ ' DOGnzb ' ] [ ' dognzb_uid ' ] = DOGNZB_UID
2012-09-13 15:27:34 +00:00
new_config [ ' DOGnzb ' ] [ ' dognzb_apikey ' ] = DOGNZB_APIKEY
new_config [ ' Experimental ' ] = { }
new_config [ ' Experimental ' ] [ ' experimental ' ] = int ( EXPERIMENTAL )
2013-09-20 05:17:04 +00:00
new_config [ ' Experimental ' ] [ ' altexperimental ' ] = int ( ALTEXPERIMENTAL )
2012-09-13 15:27:34 +00:00
2012-12-16 17:57:02 +00:00
new_config [ ' Newznab ' ] = { }
new_config [ ' Newznab ' ] [ ' newznab ' ] = int ( NEWZNAB )
2013-05-19 04:07:18 +00:00
2012-12-16 17:57:02 +00:00
# Need to unpack the extra newznabs for saving in config.ini
flattened_newznabs = [ ]
for newznab in EXTRA_NEWZNABS :
for item in newznab :
flattened_newznabs . append ( item )
new_config [ ' Newznab ' ] [ ' extra_newznabs ' ] = flattened_newznabs
2013-02-18 17:39:00 +00:00
new_config [ ' Prowl ' ] = { }
new_config [ ' Prowl ' ] [ ' prowl_enabled ' ] = int ( PROWL_ENABLED )
new_config [ ' Prowl ' ] [ ' prowl_keys ' ] = PROWL_KEYS
new_config [ ' Prowl ' ] [ ' prowl_onsnatch ' ] = int ( PROWL_ONSNATCH )
new_config [ ' Prowl ' ] [ ' prowl_priority ' ] = int ( PROWL_PRIORITY )
new_config [ ' NMA ' ] = { }
new_config [ ' NMA ' ] [ ' nma_enabled ' ] = int ( NMA_ENABLED )
new_config [ ' NMA ' ] [ ' nma_apikey ' ] = NMA_APIKEY
new_config [ ' NMA ' ] [ ' nma_priority ' ] = NMA_PRIORITY
2013-03-12 19:28:11 +00:00
new_config [ ' NMA ' ] [ ' nma_onsnatch ' ] = int ( NMA_ONSNATCH )
2013-02-18 17:39:00 +00:00
2013-04-22 04:13:56 +00:00
new_config [ ' PUSHOVER ' ] = { }
new_config [ ' PUSHOVER ' ] [ ' pushover_enabled ' ] = int ( PUSHOVER_ENABLED )
new_config [ ' PUSHOVER ' ] [ ' pushover_apikey ' ] = PUSHOVER_APIKEY
new_config [ ' PUSHOVER ' ] [ ' pushover_userkey ' ] = PUSHOVER_USERKEY
new_config [ ' PUSHOVER ' ] [ ' pushover_priority ' ] = PUSHOVER_PRIORITY
new_config [ ' PUSHOVER ' ] [ ' pushover_onsnatch ' ] = int ( PUSHOVER_ONSNATCH )
2013-09-07 06:05:32 +00:00
new_config [ ' BOXCAR ' ] = { }
new_config [ ' BOXCAR ' ] [ ' boxcar_enabled ' ] = int ( BOXCAR_ENABLED )
new_config [ ' BOXCAR ' ] [ ' boxcar_onsnatch ' ] = int ( BOXCAR_ONSNATCH )
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
new_config [ ' BOXCAR ' ] [ ' boxcar_token ' ] = BOXCAR_TOKEN
2013-09-07 06:05:32 +00:00
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
new_config [ ' PUSHBULLET ' ] = { }
new_config [ ' PUSHBULLET ' ] [ ' pushbullet_enabled ' ] = int ( PUSHBULLET_ENABLED )
new_config [ ' PUSHBULLET ' ] [ ' pushbullet_apikey ' ] = PUSHBULLET_APIKEY
new_config [ ' PUSHBULLET ' ] [ ' pushbullet_deviceid ' ] = PUSHBULLET_DEVICEID
new_config [ ' PUSHBULLET ' ] [ ' pushbullet_onsnatch ' ] = int ( PUSHBULLET_ONSNATCH )
2013-09-07 06:05:32 +00:00
2012-09-13 15:27:34 +00:00
new_config [ ' Raw ' ] = { }
new_config [ ' Raw ' ] [ ' raw ' ] = int ( RAW )
new_config [ ' Raw ' ] [ ' raw_provider ' ] = RAW_PROVIDER
new_config [ ' Raw ' ] [ ' raw_username ' ] = RAW_USERNAME
new_config [ ' Raw ' ] [ ' raw_password ' ] = RAW_PASSWORD
new_config [ ' Raw ' ] [ ' raw_groups ' ] = RAW_GROUPS
new_config . write ( )
def start ( ) :
2014-05-26 18:11:39 +00:00
global __INITIALIZED__ , started
#dbUpdateScheduler, searchScheduler, RSSScheduler, \
#WeeklyScheduler, VersionScheduler, FolderMonitorScheduler
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
with INIT_LOCK :
if __INITIALIZED__ :
2012-09-13 15:27:34 +00:00
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
# Start our scheduled background tasks
2014-05-26 18:11:39 +00:00
#from mylar import updater, search, PostProcessor
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
2012-09-13 15:27:34 +00:00
2014-05-26 18:11:39 +00:00
SCHED . add_interval_job ( updater . dbUpdate , hours = 48 )
SCHED . add_interval_job ( search . searchforissue , minutes = SEARCH_INTERVAL )
2013-01-11 21:20:51 +00:00
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
#start the db updater scheduler
2014-05-26 18:11:39 +00:00
#logger.info('Initializing the DB Updater.')
#dbUpdateScheduler.thread.start()
2013-07-30 04:57:37 +00:00
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
#start the search scheduler
2014-05-26 18:11:39 +00:00
#searchScheduler.thread.start()
IMP: Added ForceRSS Check and Test SABnzbd Connection buttons in Config, FIX: If Annuals not enabled, would error on home screen, IMP: updated mylar.init.d (thnx Kalinon), FIX: Manual Post-Processing fix for Manual Run (thnx Kalinon), IMP: Library Monitor working (check folder every X minutes and Post-Process), IMP: Future Upcoming introduction, IMP: Experimental search better handling of year inclusions, FIX: Filechecker will now pick up series with years in the series title accordingly, FIX: Torrent seedbox sending would lockup occassionally when attempting to send torrent file, FIX: malformed image url on some series, IMP: Moved issue updating to a seperate function, IMP: When series was refreshed, would download the last issue (or few issues depending on date), regardless of status, IMP: When series is volume 1 or volume label doesn't exist, either assume V1 or remove volume requirements to improve matching hits, IMP: StoryArcs will now check in StoryArc folder for existing issues and change status in StoryArc accordingly...
2013-11-28 15:48:59 +00:00
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
helpers . latestdate_fix ( )
2013-07-30 04:57:37 +00:00
FIX: (#746) updated autoProcessComics.py / ComicRN.py's which will now send proper completion messeages to clients, FIX: (#752) refresh series will now test if a series is 'out of whack' with it's numerical issue count (ie. 5/4) or it has no issue data due to a bad refresh / api maxing out and will adjust it's processing to accomodate either, IMP: (#750) Added ComicVine API Checker which will check API counts at regular intervals to inform/warn users of usage, as well as adding a screen-time display of API hits / mins used at the bottom of every page (refreshing/reloading pages will update counts), FIX: (#747)EOL normalization (dos2unix) on search.py - removed classes & exceptions as not being used, IMP: (#747) Skip processing issues with an invalid store date & issue date (thnx rupaschomaker), FIX: Removed strings when searching/logging torrents as was causing ascii errors especially with KAT, IMP: Added [META-TAGGING] to logging for meta-tagging module, IMP: Added ability in GUI to select CR or Cbl tags (or both) when writing metadata to cbz files, IMP: Improved support/usage with ComicTagger v1.1.15 which allows for personal CV API Key usage - if supplied to Mylar, will use when tagging with ComicTagger, IMP: Added Manual Search option to allow for individual searches of issues without changing initial status.
2014-06-18 19:58:19 +00:00
#start the ComicVine API Counter here.
logger . info ( ' Initiating the ComicVine API Checker to report API hits every 5 minutes. ' )
SCHED . add_interval_job ( helpers . cvapi_check , minutes = 5 )
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
#initiate startup rss feeds for torrents/nzbs here...
if ENABLE_RSS :
2014-05-26 18:11:39 +00:00
SCHED . add_interval_job ( rsscheck . tehMain , minutes = int ( RSS_CHECKINTERVAL ) )
#RSSScheduler.thread.start()
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
logger . info ( ' Initiating startup-RSS feed checks. ' )
2014-05-26 18:11:39 +00:00
rsscheck . tehMain ( )
2013-07-30 04:57:37 +00:00
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
#weekly pull list gets messed up if it's not populated first, so let's populate it then set the scheduler.
logger . info ( ' Checking for existance of Weekly Comic listing... ' )
PULLNEW = ' no ' #reset the indicator here.
2014-05-26 18:11:39 +00:00
threading . Thread ( target = weeklypull . pullit ) . start ( )
#now the scheduler (check every 24 hours)
SCHED . add_interval_job ( weeklypull . pullit , hours = 24 )
#WeeklyScheduler.thread.start()
2013-01-11 21:20:51 +00:00
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
#let's do a run at the Wanted issues here (on startup) if enabled.
2014-05-26 18:11:39 +00:00
if NZB_STARTUP_SEARCH :
threading . Thread ( target = search . searchforissue ) . start ( )
2012-09-13 15:27:34 +00:00
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
if CHECK_GITHUB :
2014-05-26 18:11:39 +00:00
#VersionScheduler.thread.start()
SCHED . add_interval_job ( versioncheck . checkGithub , minutes = CHECK_GITHUB_INTERVAL )
2012-09-13 15:27:34 +00:00
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
#run checkFolder every X minutes (basically Manual Run Post-Processing)
FIX: (#746) updated autoProcessComics.py / ComicRN.py's which will now send proper completion messeages to clients, FIX: (#752) refresh series will now test if a series is 'out of whack' with it's numerical issue count (ie. 5/4) or it has no issue data due to a bad refresh / api maxing out and will adjust it's processing to accomodate either, IMP: (#750) Added ComicVine API Checker which will check API counts at regular intervals to inform/warn users of usage, as well as adding a screen-time display of API hits / mins used at the bottom of every page (refreshing/reloading pages will update counts), FIX: (#747)EOL normalization (dos2unix) on search.py - removed classes & exceptions as not being used, IMP: (#747) Skip processing issues with an invalid store date & issue date (thnx rupaschomaker), FIX: Removed strings when searching/logging torrents as was causing ascii errors especially with KAT, IMP: Added [META-TAGGING] to logging for meta-tagging module, IMP: Added ability in GUI to select CR or Cbl tags (or both) when writing metadata to cbz files, IMP: Improved support/usage with ComicTagger v1.1.15 which allows for personal CV API Key usage - if supplied to Mylar, will use when tagging with ComicTagger, IMP: Added Manual Search option to allow for individual searches of issues without changing initial status.
2014-06-18 19:58:19 +00:00
logger . info ( ' Monitor folder set to : ' + str ( CHECK_FOLDER ) )
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
if CHECK_FOLDER :
if DOWNLOAD_SCAN_INTERVAL > 0 :
FIX: (#746) updated autoProcessComics.py / ComicRN.py's which will now send proper completion messeages to clients, FIX: (#752) refresh series will now test if a series is 'out of whack' with it's numerical issue count (ie. 5/4) or it has no issue data due to a bad refresh / api maxing out and will adjust it's processing to accomodate either, IMP: (#750) Added ComicVine API Checker which will check API counts at regular intervals to inform/warn users of usage, as well as adding a screen-time display of API hits / mins used at the bottom of every page (refreshing/reloading pages will update counts), FIX: (#747)EOL normalization (dos2unix) on search.py - removed classes & exceptions as not being used, IMP: (#747) Skip processing issues with an invalid store date & issue date (thnx rupaschomaker), FIX: Removed strings when searching/logging torrents as was causing ascii errors especially with KAT, IMP: Added [META-TAGGING] to logging for meta-tagging module, IMP: Added ability in GUI to select CR or Cbl tags (or both) when writing metadata to cbz files, IMP: Improved support/usage with ComicTagger v1.1.15 which allows for personal CV API Key usage - if supplied to Mylar, will use when tagging with ComicTagger, IMP: Added Manual Search option to allow for individual searches of issues without changing initial status.
2014-06-18 19:58:19 +00:00
logger . info ( ' Enabling folder monitor for : ' + str ( CHECK_FOLDER ) + ' every ' + str ( DOWNLOAD_SCAN_INTERVAL ) + ' minutes. ' )
2014-05-26 18:11:39 +00:00
#FolderMonitorScheduler.thread.start()
SCHED . add_interval_job ( helpers . checkFolder , minutes = int ( DOWNLOAD_SCAN_INTERVAL ) )
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
else :
logger . error ( ' You need to specify a monitoring time for the check folder option to work ' )
2014-05-26 18:11:39 +00:00
SCHED . start ( )
2012-09-13 15:27:34 +00:00
started = True
def dbcheck ( ) :
conn = sqlite3 . connect ( DB_FILE )
c = conn . cursor ( )
2013-08-19 06:14:47 +00:00
c . execute ( ' CREATE TABLE IF NOT EXISTS comics (ComicID TEXT UNIQUE, ComicName TEXT, ComicSortName TEXT, ComicYear TEXT, DateAdded TEXT, Status TEXT, IncludeExtras INTEGER, Have INTEGER, Total INTEGER, ComicImage TEXT, ComicPublisher TEXT, ComicLocation TEXT, ComicPublished TEXT, LatestIssue TEXT, LatestDate TEXT, Description TEXT, QUALalt_vers TEXT, QUALtype TEXT, QUALscanner TEXT, QUALquality TEXT, LastUpdated TEXT, AlternateSearch TEXT, UseFuzzy TEXT, ComicVersion TEXT, SortOrder INTEGER, ForceContinuing INTEGER) ' )
2014-01-29 19:24:53 +00:00
c . execute ( ' CREATE TABLE IF NOT EXISTS issues (IssueID TEXT, ComicName TEXT, IssueName TEXT, Issue_Number TEXT, DateAdded TEXT, Status TEXT, Type TEXT, ComicID, ArtworkURL Text, ReleaseDate TEXT, Location TEXT, IssueDate TEXT, Int_IssueNumber INT, ComicSize TEXT, AltIssueNumber TEXT) ' )
2013-07-10 01:45:10 +00:00
c . execute ( ' CREATE TABLE IF NOT EXISTS snatched (IssueID TEXT, ComicName TEXT, Issue_Number TEXT, Size INTEGER, DateAdded TEXT, Status TEXT, FolderName TEXT, ComicID TEXT, Provider TEXT) ' )
2013-07-30 04:57:37 +00:00
c . execute ( ' CREATE TABLE IF NOT EXISTS upcoming (ComicName TEXT, IssueNumber TEXT, ComicID TEXT, IssueID TEXT, IssueDate TEXT, Status TEXT, DisplayComicName TEXT) ' )
2013-05-25 06:18:00 +00:00
c . execute ( ' CREATE TABLE IF NOT EXISTS nzblog (IssueID TEXT, NZBName TEXT, SARC TEXT) ' )
2012-12-27 15:04:03 +00:00
c . execute ( ' CREATE TABLE IF NOT EXISTS weekly (SHIPDATE text, PUBLISHER text, ISSUE text, COMIC VARCHAR(150), EXTRA text, STATUS text) ' )
2012-10-30 10:43:01 +00:00
# c.execute('CREATE TABLE IF NOT EXISTS sablog (nzo_id TEXT, ComicName TEXT, ComicYEAR TEXT, ComicIssue TEXT, name TEXT, nzo_complete TEXT)')
IMP: Removed unneeded code from several modules, IMP:(#659) Subdirectories now will be scanned in properly when in series directories, FIX:(#635)(#658) Moved code from html into module to allow for better integration and further templating needs, IMP: Added ability for mylar to auto-grab SABnzbd API when provided with user/pass, IMP: Test SABnzbd button works again - will auto-rollback to NZBKey usage, IMP: Added counts to Upcoming page, IMP: Added some more detailed parsing to the ImportResults, IMP: ImportResults will now show proper series title, IMP: Improved some logic when determining if a new weekly issue is on a watchlist if a rebooted series, IMP: A bunch of smaller fixes, and some various code tweaks...
2014-04-02 19:08:59 +00:00
c . execute ( ' CREATE TABLE IF NOT EXISTS importresults (impID TEXT, ComicName TEXT, ComicYear TEXT, Status TEXT, ImportDate TEXT, ComicFilename TEXT, ComicLocation TEXT, WatchMatch TEXT, DisplayName TEXT) ' )
2013-03-06 16:20:09 +00:00
c . execute ( ' CREATE TABLE IF NOT EXISTS readlist (IssueID TEXT, ComicName TEXT, Issue_Number TEXT, Status TEXT, DateAdded TEXT, Location TEXT, inCacheDir TEXT, SeriesYear TEXT, ComicID TEXT) ' )
2013-07-02 05:50:14 +00:00
c . execute ( ' CREATE TABLE IF NOT EXISTS readinglist(StoryArcID TEXT, ComicName TEXT, IssueNumber TEXT, SeriesYear TEXT, IssueYEAR TEXT, StoryArc TEXT, TotalIssues TEXT, Status TEXT, inCacheDir TEXT, Location TEXT, IssueArcID TEXT, ReadingOrder INT, IssueID TEXT) ' )
2014-02-26 19:48:50 +00:00
c . execute ( ' CREATE TABLE IF NOT EXISTS annuals (IssueID TEXT, Issue_Number TEXT, IssueName TEXT, IssueDate TEXT, Status TEXT, ComicID TEXT, GCDComicID TEXT, Location TEXT, ComicSize TEXT, Int_IssueNumber INT, ComicName TEXT, ReleaseDate TEXT, ReleaseComicID TEXT, ReleaseComicName TEXT) ' )
2013-07-30 04:57:37 +00:00
c . execute ( ' CREATE TABLE IF NOT EXISTS rssdb (Title TEXT UNIQUE, Link TEXT, Pubdate TEXT, Site TEXT, Size TEXT) ' )
IMP: Added ForceRSS Check and Test SABnzbd Connection buttons in Config, FIX: If Annuals not enabled, would error on home screen, IMP: updated mylar.init.d (thnx Kalinon), FIX: Manual Post-Processing fix for Manual Run (thnx Kalinon), IMP: Library Monitor working (check folder every X minutes and Post-Process), IMP: Future Upcoming introduction, IMP: Experimental search better handling of year inclusions, FIX: Filechecker will now pick up series with years in the series title accordingly, FIX: Torrent seedbox sending would lockup occassionally when attempting to send torrent file, FIX: malformed image url on some series, IMP: Moved issue updating to a seperate function, IMP: When series was refreshed, would download the last issue (or few issues depending on date), regardless of status, IMP: When series is volume 1 or volume label doesn't exist, either assume V1 or remove volume requirements to improve matching hits, IMP: StoryArcs will now check in StoryArc folder for existing issues and change status in StoryArc accordingly...
2013-11-28 15:48:59 +00:00
c . execute ( ' CREATE TABLE IF NOT EXISTS futureupcoming (ComicName TEXT, IssueNumber TEXT, ComicID TEXT, IssueID TEXT, IssueDate TEXT, Publisher TEXT, Status TEXT, DisplayComicName TEXT) ' )
2013-01-11 21:20:51 +00:00
conn . commit
c . close
2012-10-16 08:16:29 +00:00
#new
2013-01-11 21:20:51 +00:00
csv_load ( )
#add in the late players to the game....
try :
c . execute ( ' SELECT LastUpdated from comics ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE comics ADD COLUMN LastUpdated TEXT ' )
try :
c . execute ( ' SELECT QUALalt_vers from comics ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE comics ADD COLUMN QUALalt_vers TEXT ' )
try :
c . execute ( ' SELECT QUALtype from comics ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE comics ADD COLUMN QUALtype TEXT ' )
try :
c . execute ( ' SELECT QUALscanner from comics ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE comics ADD COLUMN QUALscanner TEXT ' )
try :
c . execute ( ' SELECT QUALquality from comics ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE comics ADD COLUMN QUALquality TEXT ' )
try :
c . execute ( ' SELECT AlternateSearch from comics ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE comics ADD COLUMN AlternateSearch TEXT ' )
2013-03-08 03:07:14 +00:00
try :
c . execute ( ' SELECT ComicVersion from comics ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE comics ADD COLUMN ComicVersion TEXT ' )
2013-03-14 08:33:16 +00:00
try :
c . execute ( ' SELECT SortOrder from comics ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE comics ADD COLUMN SortOrder INTEGER ' )
2013-03-08 03:07:14 +00:00
2013-01-11 21:20:51 +00:00
try :
c . execute ( ' SELECT ComicSize from issues ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE issues ADD COLUMN ComicSize TEXT ' )
2013-01-13 15:59:46 +00:00
try :
c . execute ( ' SELECT UseFuzzy from comics ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE comics ADD COLUMN UseFuzzy TEXT ' )
2013-02-13 01:27:24 +00:00
try :
c . execute ( ' SELECT WatchMatch from importresults ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE importresults ADD COLUMN WatchMatch TEXT ' )
2013-02-16 18:30:22 +00:00
try :
2013-02-22 08:35:51 +00:00
c . execute ( ' SELECT IssueCount from importresults ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE importresults ADD COLUMN IssueCount TEXT ' )
try :
c . execute ( ' SELECT ComicLocation from importresults ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE importresults ADD COLUMN ComicLocation TEXT ' )
try :
c . execute ( ' SELECT ComicFilename from importresults ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE importresults ADD COLUMN ComicFilename TEXT ' )
try :
c . execute ( ' SELECT impID from importresults ' )
2013-02-16 18:30:22 +00:00
except sqlite3 . OperationalError :
2013-02-22 08:35:51 +00:00
c . execute ( ' ALTER TABLE importresults ADD COLUMN impID TEXT ' )
2013-03-14 08:55:38 +00:00
try :
c . execute ( ' SELECT inCacheDir from issues ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE issues ADD COLUMN inCacheDIR TEXT ' )
2013-02-25 15:36:43 +00:00
try :
c . execute ( ' SELECT inCacheDIR from readlist ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE readlist ADD COLUMN inCacheDIR TEXT ' )
2013-02-22 08:35:51 +00:00
2013-02-25 15:36:43 +00:00
try :
c . execute ( ' SELECT Location from readlist ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE readlist ADD COLUMN Location TEXT ' )
2013-02-16 18:30:22 +00:00
2013-03-06 16:20:09 +00:00
try :
c . execute ( ' SELECT IssueDate from readlist ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE readlist ADD COLUMN IssueDate TEXT ' )
try :
c . execute ( ' SELECT SeriesYear from readlist ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE readlist ADD COLUMN SeriesYear TEXT ' )
try :
c . execute ( ' SELECT ComicID from readlist ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE readlist ADD COLUMN ComicID TEXT ' )
FIX:(#304) Index out of range on recheck, FIX:(#303) Comicvine link updated on details page, FIX:(#302) Query rate (Search Delay) Added as a configuration option, FIX:(#300) Version number error on searching when no version number, FIX:(#297) Manual Rename of Files working, FIX:(#294) 'AU' issue problems should be resolved now, FIX:(#290) V#(year) and Vol#(year) added to filechecking, IMP: ComicVine data use only now as a hidden option (cv_only = 1 in config.ini), IMP: added as options for file naming, IMP: Rough drafting of Annuals (annuals_on = 1 in config.ini), Other fixes..
2013-04-06 09:43:18 +00:00
try :
c . execute ( ' SELECT DetailURL from comics ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE comics ADD COLUMN DetailURL TEXT ' )
2013-05-04 01:57:19 +00:00
try :
c . execute ( ' SELECT ComicID from weekly ' )
except :
c . execute ( ' ALTER TABLE weekly ADD COLUMN ComicID TEXT ' )
2013-03-06 16:20:09 +00:00
2013-05-25 06:18:00 +00:00
try :
c . execute ( ' SELECT implog from importresults ' )
except :
c . execute ( ' ALTER TABLE importresults ADD COLUMN implog TEXT ' )
try :
c . execute ( ' SELECT SARC from nzblog ' )
except :
c . execute ( ' ALTER TABLE nzblog ADD COLUMN SARC TEXT ' )
2013-07-01 05:19:15 +00:00
try :
c . execute ( ' SELECT Location from annuals ' )
except :
c . execute ( ' ALTER TABLE annuals ADD COLUMN Location TEXT ' )
try :
c . execute ( ' SELECT ComicSize from annuals ' )
except :
c . execute ( ' ALTER TABLE annuals ADD COLUMN ComicSize TEXT ' )
try :
c . execute ( ' SELECT Int_IssueNumber from annuals ' )
except :
c . execute ( ' ALTER TABLE annuals ADD COLUMN Int_IssueNumber INT ' )
2013-05-25 06:18:00 +00:00
2013-07-30 04:57:37 +00:00
try :
c . execute ( ' SELECT ComicName from annuals ' )
annual_update = " no "
except :
c . execute ( ' ALTER TABLE annuals ADD COLUMN ComicName TEXT ' )
annual_update = " yes "
if annual_update == " yes " :
logger . info ( " Updating Annuals table for new fields - one-time update. " )
helpers . annual_update ( )
2013-07-10 01:45:10 +00:00
try :
c . execute ( ' SELECT Provider from snatched ' )
except :
c . execute ( ' ALTER TABLE snatched ADD COLUMN Provider TEXT ' )
2013-07-30 04:57:37 +00:00
try :
c . execute ( ' SELECT DisplayComicName from upcoming ' )
except :
c . execute ( ' ALTER TABLE upcoming ADD COLUMN DisplayComicName TEXT ' )
2013-08-19 06:14:47 +00:00
try :
c . execute ( ' SELECT ForceContinuing from comics ' )
except :
c . execute ( ' ALTER TABLE comics ADD COLUMN ForceContinuing INTEGER ' )
2014-01-29 19:24:53 +00:00
try :
c . execute ( ' SELECT AltIssueNumber from issues ' )
except :
c . execute ( ' ALTER TABLE issues ADD COLUMN AltIssueNumber TEXT ' )
2013-08-19 06:14:47 +00:00
2014-02-26 19:48:50 +00:00
try :
c . execute ( ' SELECT ReleaseDate from annuals ' )
except :
c . execute ( ' ALTER TABLE annuals ADD COLUMN ReleaseDate TEXT ' )
try :
c . execute ( ' SELECT ReleaseComicID from annuals ' )
except :
c . execute ( ' ALTER TABLE annuals ADD COLUMN ReleaseComicID TEXT ' )
try :
c . execute ( ' SELECT ReleaseComicName from annuals ' )
except :
c . execute ( ' ALTER TABLE annuals ADD COLUMN ReleaseComicName TEXT ' )
2013-07-30 04:57:37 +00:00
IMP: Removed unneeded code from several modules, IMP:(#659) Subdirectories now will be scanned in properly when in series directories, FIX:(#635)(#658) Moved code from html into module to allow for better integration and further templating needs, IMP: Added ability for mylar to auto-grab SABnzbd API when provided with user/pass, IMP: Test SABnzbd button works again - will auto-rollback to NZBKey usage, IMP: Added counts to Upcoming page, IMP: Added some more detailed parsing to the ImportResults, IMP: ImportResults will now show proper series title, IMP: Improved some logic when determining if a new weekly issue is on a watchlist if a rebooted series, IMP: A bunch of smaller fixes, and some various code tweaks...
2014-04-02 19:08:59 +00:00
try :
c . execute ( ' SELECT DisplayName from importresults ' )
except :
c . execute ( ' ALTER TABLE importresults ADD COLUMN DisplayName TEXT ' )
2013-02-18 17:39:00 +00:00
#if it's prior to Wednesday, the issue counts will be inflated by one as the online db's everywhere
#prepare for the next 'new' release of a series. It's caught in updater.py, so let's just store the
#value in the sql so we can display it in the details screen for everyone to wonder at.
try :
c . execute ( ' SELECT not_updated_db from comics ' )
except sqlite3 . OperationalError :
c . execute ( ' ALTER TABLE comics ADD COLUMN not_updated_db TEXT ' )
2013-02-06 19:55:23 +00:00
# -- not implemented just yet ;)
# for metadata...
# MetaData_Present will be true/false if metadata is present
# MetaData will hold the MetaData itself in tuple format
# try:
# c.execute('SELECT MetaData_Present from comics')
# except sqlite3.OperationalError:
# c.execute('ALTER TABLE importresults ADD COLUMN MetaData_Present TEXT')
# try:
# c.execute('SELECT MetaData from importresults')
# except sqlite3.OperationalError:
# c.execute('ALTER TABLE importresults ADD COLUMN MetaData TEXT')
2013-01-13 15:59:46 +00:00
2013-01-27 10:07:08 +00:00
#let's delete errant comics that are stranded (ie. Comicname = Comic ID: )
2013-03-16 17:16:42 +00:00
c . execute ( " DELETE from COMICS WHERE ComicName= ' None ' OR ComicName LIKE ' Comic ID % ' OR ComicName is NULL " )
2014-02-26 19:48:50 +00:00
c . execute ( " DELETE from ISSUES WHERE ComicName= ' None ' OR ComicName LIKE ' Comic ID % ' OR ComicName is NULL " )
2014-03-04 05:11:52 +00:00
c . execute ( " DELETE from UPCOMING WHERE ComicName= ' None ' OR ComicName is NULL or IssueNumber is NULL " )
2013-08-19 06:14:47 +00:00
logger . info ( ' Ensuring DB integrity - Removing all Erroneous Comics (ie. named None) ' )
2013-01-11 21:20:51 +00:00
2013-08-19 06:14:47 +00:00
logger . info ( ' Correcting Null entries that make the main page break on startup. ' )
2013-04-10 02:59:48 +00:00
c . execute ( " UPDATE Comics SET LatestDate= ' Unknown ' WHERE LatestDate= ' None ' or LatestDate is NULL " )
2013-01-11 21:20:51 +00:00
conn . commit ( )
c . close ( )
def csv_load ( ) :
# for redudant module calls..include this.
conn = sqlite3 . connect ( DB_FILE )
c = conn . cursor ( )
2012-10-17 15:56:09 +00:00
c . execute ( ' DROP TABLE IF EXISTS exceptions ' )
2012-10-16 08:16:29 +00:00
c . execute ( ' CREATE TABLE IF NOT EXISTS exceptions (variloop TEXT, ComicID TEXT, NewComicID TEXT, GComicID TEXT) ' )
2012-10-20 07:51:17 +00:00
# for Mylar-based Exception Updates....
i = 0
EXCEPTIONS = [ ]
EXCEPTIONS . append ( ' exceptions.csv ' )
EXCEPTIONS . append ( ' custom_exceptions.csv ' )
2012-10-17 15:56:09 +00:00
2012-10-20 07:51:17 +00:00
while ( i < = 1 ) :
#EXCEPTIONS_FILE = os.path.join(DATA_DIR, 'exceptions.csv')
EXCEPTIONS_FILE = os . path . join ( DATA_DIR , EXCEPTIONS [ i ] )
if not os . path . exists ( EXCEPTIONS_FILE ) :
try :
csvfile = open ( str ( EXCEPTIONS_FILE ) , " rb " )
except ( OSError , IOError ) :
if i == 1 :
2013-08-19 06:14:47 +00:00
logger . info ( ' No Custom Exceptions found - Using base exceptions only. Creating blank custom_exceptions for your personal use. ' )
2013-01-15 19:02:32 +00:00
try :
shutil . copy ( os . path . join ( DATA_DIR , " custom_exceptions_sample.csv " ) , EXCEPTIONS_FILE )
except ( OSError , IOError ) :
2013-08-19 06:14:47 +00:00
logger . error ( ' Cannot create custom_exceptions.csv in ' + str ( DATA_DIR ) + ' . Make sure _sample.csv is present and/or check permissions. ' )
2013-01-15 19:02:32 +00:00
return
2012-10-20 07:51:17 +00:00
else :
2013-08-19 06:14:47 +00:00
logger . error ( ' Could not locate ' + str ( EXCEPTIONS [ i ] ) + ' file. Make sure it is in datadir: ' + DATA_DIR )
2013-01-11 21:20:51 +00:00
break
2012-10-20 07:51:17 +00:00
else :
2012-10-17 15:56:09 +00:00
csvfile = open ( str ( EXCEPTIONS_FILE ) , " rb " )
2012-10-20 07:51:17 +00:00
if i == 0 :
2013-08-19 06:14:47 +00:00
logger . info ( ' Populating Base Exception listings into Mylar.... ' )
2012-10-20 07:51:17 +00:00
elif i == 1 :
2013-08-19 06:14:47 +00:00
logger . info ( ' Populating Custom Exception listings into Mylar.... ' )
2012-10-17 15:56:09 +00:00
2012-10-20 07:51:17 +00:00
creader = csv . reader ( csvfile , delimiter = ' , ' )
2012-10-16 08:16:29 +00:00
2012-10-20 07:51:17 +00:00
for row in creader :
try :
c . execute ( " INSERT INTO exceptions VALUES (?,?,?,?); " , row )
except Exception , e :
#print ("Error - invald arguments...-skipping")
pass
2013-01-11 21:20:51 +00:00
pass
2012-10-20 07:51:17 +00:00
csvfile . close ( )
i + = 1
2012-10-16 08:16:29 +00:00
2012-09-13 15:27:34 +00:00
conn . commit ( )
2013-01-11 21:20:51 +00:00
c . close ( )
2012-09-13 15:27:34 +00:00
2014-05-26 18:11:39 +00:00
#def halt():
# global __INITIALIZED__, dbUpdateScheduler, seachScheduler, RSSScheduler, WeeklyScheduler, \
# VersionScheduler, FolderMonitorScheduler, started
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
2014-05-26 18:11:39 +00:00
# with INIT_LOCK:
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
2014-05-26 18:11:39 +00:00
# if __INITIALIZED__:
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
2014-05-26 18:11:39 +00:00
# logger.info(u"Aborting all threads")
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
# abort all the threads
2014-05-26 18:11:39 +00:00
# dbUpdateScheduler.abort = True
# logger.info(u"Waiting for the DB UPDATE thread to exit")
# try:
# dbUpdateScheduler.thread.join(10)
# except:
# pass
# searchScheduler.abort = True
# logger.info(u"Waiting for the SEARCH thread to exit")
# try:
# searchScheduler.thread.join(10)
# except:
# pass
# RSSScheduler.abort = True
# logger.info(u"Waiting for the RSS CHECK thread to exit")
# try:
# RSSScheduler.thread.join(10)
# except:
# pass
# WeeklyScheduler.abort = True
# logger.info(u"Waiting for the WEEKLY CHECK thread to exit")
# try:
# WeeklyScheduler.thread.join(10)
# except:
# pass
# VersionScheduler.abort = True
# logger.info(u"Waiting for the VERSION CHECK thread to exit")
# try:
# VersionScheduler.thread.join(10)
# except:
# pass
# FolderMonitorScheduler.abort = True
# logger.info(u"Waiting for the FOLDER MONITOR thread to exit")
# try:
# FolderMonitorScheduler.thread.join(10)
# except:
# pass
# __INITIALIZED__ = False
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
2012-09-13 15:27:34 +00:00
def shutdown ( restart = False , update = False ) :
2014-05-26 18:11:39 +00:00
#halt()
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
2012-09-13 15:27:34 +00:00
cherrypy . engine . exit ( )
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
2014-05-26 18:11:39 +00:00
SCHED . shutdown ( wait = False )
2012-09-13 15:27:34 +00:00
config_write ( )
2013-03-21 17:09:10 +00:00
2012-09-13 15:27:34 +00:00
if not restart and not update :
logger . info ( ' Mylar is shutting down... ' )
if update :
logger . info ( ' Mylar is updating... ' )
try :
versioncheck . update ( )
except Exception , e :
logger . warn ( ' Mylar failed to update: %s . Restarting. ' % e )
2014-06-04 20:31:26 +00:00
if CREATEPID :
IMP: Ability to now specify search provider order (regardless of torrents or nzb) within the config.ini, IMP: (#667) Changed the db module to try to accomodate db locking errors and lowering the amount of actual write transactions that were committed along with a new scheduler system, IMP: Changed sabnzbd directory to post-processing, and included subdirs for sabnzbd & nzbget ComicRN scripts, IMP: NZBGet Post-Processing ComicRN.py script (updated for use with nzbget v11.0+)added & updated in post-processing/nzbget directory (thnx ministoat), FIX: If Issue Location was None, and status was Downloaded would cause error in GUI and break series, IMP: (#689) Minimum # of seeders added (will work with KAT), IMP: (#680) Added Boxcar 2 IO Notifications, IMP: Added PushBullet Notifications, IMP: Cleaned up some notification messages so it's not so cluttered, IMP: Added Clickable series link in History tab, IMP: Added Post-Processed as a status to History tab to show manually post-processed items, IMP: Removed log level dropdown from Logs page & added 'ThreadName' as a column, IMP: Added Force Check Availability & View Future Pull-list to Upcoming sub-tabs, IMP: Added '--safe' option to startup options which will redirect directly to Manage Comics screen incase things are broken, FIX: Added proper month conversions for manual post-processing when doing comparitive issue analysis for matches, FIX: (#613) Allow for negative issue numbers in post-processing when renaming and issue padding is enabled, FIX: File Permissions on post-processing would stop post-processing if couldn't change, now will just log the error and continue, IMP: Added Scheduler (from sickbeard) to allow for threadnaming and better scheduling, IMP: Filenames in the format of ' () ' will now get scanned in, IMP: During manual post-processing will now stop looking for matches upon a successful match, IMP: A Refresh/Weeklypull series check will now just scan in issue data, instead of series info,etc, IMP: Removed some legacy GCD code that is no longer in use, IMP: Exception/traceback handling will now be logged, FIX: Unable to grab torrents from KAT due to content-encoding detection failing, IMP: Added universal date-time conversion to allow for non-english based dates to be properly compared when checking search results against publication dates, FIX: Annuals will now get proper notification (prior was leaving out the word 'annual' from notification/logs), IMP: Improved future pull-list detection and increased retension (now ~5 months), IMP: Will now mark new issues as Wanted on a Refresh Series if autowant upcoming is enabled (was reverting to a status of None previously), IMP: Cannot change status to Downloaded if current status is Skipped or Wanted, FIX: (#704) UnSkipped will now work (X in options column on comic details page), IMP: future_check will check upcoming future issues (future pull-list) that have no series data yet (ie. #1's) and auto-add them to watchlist when the data is available and auto-want accordingly, IMP: (#706) Downloading issues to local machine (via comicdetails screen) with special characters in filename now will work, IMP: improved comparison checks during weekly pull list and improved speed abit since only refreshing issue data now instead of entire series, Other Referenced issues: (#670)(#690) and some others....
2014-05-25 18:32:11 +00:00
logger . info ( ' Removing pidfile %s ' % PIDFILE )
2012-09-13 15:27:34 +00:00
os . remove ( PIDFILE )
if restart :
logger . info ( ' Mylar is restarting... ' )
popen_list = [ sys . executable , FULL_PATH ]
popen_list + = ARGS
if ' --nolaunch ' not in popen_list :
popen_list + = [ ' --nolaunch ' ]
logger . info ( ' Restarting Mylar with ' + str ( popen_list ) )
subprocess . Popen ( popen_list , cwd = os . getcwd ( ) )
os . _exit ( 0 )