2013-07-30 04:57:37 +00:00
#!/usr/bin/python
import os , sys
import re
import lib . feedparser as feedparser
2015-04-17 18:35:05 +00:00
import lib . requests as requests
2013-07-30 04:57:37 +00:00
import ftpsshup
import datetime
2013-09-05 02:36:41 +00:00
import gzip
from StringIO import StringIO
2013-07-30 04:57:37 +00:00
import mylar
from mylar import db , logger , ftpsshup , helpers
2015-04-17 17:29:30 +00:00
2015-03-20 06:47:43 +00:00
def _start_newznab_attr ( self , attrsD ) :
context = self . _getContext ( )
context . setdefault ( ' newznab ' , feedparser . FeedParserDict ( ) )
context [ ' newznab ' ] . setdefault ( ' tags ' , feedparser . FeedParserDict ( ) )
name = attrsD . get ( ' name ' )
value = attrsD . get ( ' value ' )
if name == ' category ' :
context [ ' newznab ' ] . setdefault ( ' categories ' , [ ] ) . append ( value )
else :
context [ ' newznab ' ] [ name ] = value
feedparser . _FeedParserMixin . _start_newznab_attr = _start_newznab_attr
2014-05-26 18:11:39 +00:00
def tehMain ( forcerss = None ) :
logger . info ( ' RSS Feed Check was last run at : ' + str ( mylar . RSS_LASTRUN ) )
firstrun = " no "
#check the last run of rss to make sure it's not hammering.
if mylar . RSS_LASTRUN is None or mylar . RSS_LASTRUN == ' ' or mylar . RSS_LASTRUN == ' 0 ' or forcerss == True :
logger . info ( ' RSS Feed Check First Ever Run. ' )
firstrun = " yes "
mins = 0
else :
c_obj_date = datetime . datetime . strptime ( mylar . RSS_LASTRUN , " % Y- % m- %d % H: % M: % S " )
n_date = datetime . datetime . now ( )
absdiff = abs ( n_date - c_obj_date )
mins = ( absdiff . days * 24 * 60 * 60 + absdiff . seconds ) / 60.0 #3600 is for hours.
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 firstrun == " no " and mins < int ( mylar . RSS_CHECKINTERVAL ) :
logger . fdebug ( ' RSS Check has taken place less than the threshold - not initiating at this time. ' )
return
mylar . RSS_LASTRUN = helpers . now ( )
logger . fdebug ( ' Updating RSS Run time to : ' + str ( mylar . RSS_LASTRUN ) )
mylar . config_write ( )
#function for looping through nzbs/torrent feed
2014-06-15 05:05:42 +00:00
if mylar . ENABLE_TORRENT_SEARCH : #and mylar.ENABLE_TORRENTS:
2014-05-29 18:05:11 +00:00
logger . info ( ' [RSS] Initiating Torrent RSS Check. ' )
2014-05-26 18:11:39 +00:00
if mylar . ENABLE_KAT :
2014-05-29 18:05:11 +00:00
logger . info ( ' [RSS] Initiating Torrent RSS Feed Check on KAT. ' )
2014-05-26 18:11:39 +00:00
torrents ( pickfeed = ' 3 ' )
torrents ( pickfeed = ' 6 ' )
if mylar . ENABLE_CBT :
2014-05-29 18:05:11 +00:00
logger . info ( ' [RSS] Initiating Torrent RSS Feed Check on CBT. ' )
2014-05-26 18:11:39 +00:00
torrents ( pickfeed = ' 1 ' )
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
#torrents(pickfeed='4')
2014-05-29 18:05:11 +00:00
logger . info ( ' [RSS] Initiating RSS Feed Check for NZB Providers. ' )
2015-03-20 08:06:56 +00:00
nzbs ( forcerss = forcerss )
2014-05-29 18:05:11 +00:00
logger . info ( ' [RSS] RSS Feed Check/Update Complete ' )
logger . info ( ' [RSS] Watchlist Check for new Releases ' )
2014-05-26 18:11:39 +00:00
mylar . search . searchforissue ( rsscheck = ' yes ' )
2014-05-29 18:05:11 +00:00
logger . info ( ' [RSS] Watchlist Check complete. ' )
if forcerss :
logger . info ( ' Successfully ran RSS Force Check. ' )
2014-05-26 18:11:39 +00:00
return
2013-07-30 04:57:37 +00:00
2013-08-07 06:27:12 +00:00
def torrents ( pickfeed = None , seriesname = None , issue = None ) :
2013-07-30 04:57:37 +00:00
if pickfeed is None :
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
return
passkey = mylar . PASSKEY_32P
2013-08-07 06:27:12 +00:00
srchterm = None
if seriesname :
srchterm = re . sub ( ' ' , ' % 20 ' , seriesname )
if issue :
2013-10-19 01:04:16 +00:00
srchterm + = ' % 20 ' + str ( issue )
if mylar . KAT_PROXY :
if mylar . KAT_PROXY . endswith ( ' / ' ) :
kat_url = mylar . KAT_PROXY
else :
kat_url = mylar . KAT_PROXY + ' / '
else :
kat_url = ' http://kat.ph/ '
2014-04-14 17:59:27 +00:00
if pickfeed == ' KAT ' :
#we need to cycle through both categories (comics & other) - so we loop.
loopit = 2
2013-07-30 04:57:37 +00:00
else :
2014-04-14 17:59:27 +00:00
loopit = 1
lp = 0
2014-09-05 06:19:26 +00:00
totalcount = 0
2013-09-05 02:36:41 +00:00
2013-07-30 04:57:37 +00:00
title = [ ]
link = [ ]
description = [ ]
seriestitle = [ ]
feeddata = [ ]
myDB = db . DBConnection ( )
2013-08-07 06:27:12 +00:00
torthekat = [ ]
katinfo = { }
2013-07-30 04:57:37 +00:00
2014-04-14 17:59:27 +00:00
while ( lp < loopit ) :
if lp == 0 and loopit == 2 :
pickfeed = ' 2 '
elif lp == 1 and loopit == 2 :
pickfeed = ' 5 '
feedtype = None
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
if pickfeed == " 1 " and mylar . ENABLE_32P : # 32pages new releases feed.
if mylar . RSSFEED_32P is None or mylar . RSSFEED_32P == ' None ' or mylar . RSSFEED_32P == ' ' :
logger . error ( ' [RSS] Warning - you NEED to enter in an RSS Feed URL for 32P in order to use the rss feeds (it can be any feed, it just needs ALL of your keys in the link) ' )
lp = + 1
continue
feed = ' http://32pag.es/feeds.php?feed=torrents_all&user= ' + mylar . USERID_32P + ' &auth= ' + mylar . AUTH_32P + ' &passkey= ' + mylar . PASSKEY_32P + ' &authkey= ' + mylar . AUTHKEY_32P
2014-04-14 17:59:27 +00:00
feedtype = ' from the New Releases RSS Feed for comics '
elif pickfeed == " 2 " and srchterm is not None : # kat.ph search
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
feed = kat_url + " usearch/ " + str ( srchterm ) + " %20c ategory % 3Acomics %20s eeds % 3A " + str ( mylar . MINSEEDS ) + " /?rss=1 "
2014-04-14 17:59:27 +00:00
elif pickfeed == " 3 " : # kat.ph rss feed
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
feed = kat_url + " usearch/category % 3Acomics %20s eeds % 3A " + str ( mylar . MINSEEDS ) + " /?rss=1 "
2014-04-14 17:59:27 +00:00
feedtype = ' from the New Releases RSS Feed for comics '
elif pickfeed == " 4 " : #cbt follow link
feed = " http://comicbt.com/rss.php?action=follow&passkey= " + str ( passkey ) + " &type=dl "
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
feedtype = ' from your 32P Followlist RSS Feed '
2014-04-14 17:59:27 +00:00
elif pickfeed == " 5 " and srchterm is not None : # kat.ph search (category:other since some 0-day comics initially get thrown there until categorized)
feed = kat_url + " usearch/ " + str ( srchterm ) + " %20c ategory % 3Aother %20s eeds % 3A1/?rss=1 "
elif pickfeed == " 6 " : # kat.ph rss feed (category:other so that we can get them quicker if need-be)
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
feed = kat_url + " usearch/.cbr %20c ategory % 3Aother %20s eeds % 3A " + str ( mylar . MINSEEDS ) + " /?rss=1 "
2014-04-14 17:59:27 +00:00
feedtype = ' from the New Releases for category Other RSS Feed that contain comics '
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
elif pickfeed == " 7 " : # 32p series link
2014-04-14 17:59:27 +00:00
# seriespage = "http://comicbt.com/series.php?passkey=" + str(passkey)
feed = " http://comicbt.com/rss.php?action=series&series= " + str ( seriesno ) + " &passkey= " + str ( passkey )
else :
logger . error ( ' invalid pickfeed denoted... ' )
return
#print 'feed URL: ' + str(feed)
if pickfeed == " 7 " : # we need to get the series # first
seriesSearch ( seriespage , seriesname )
feedme = feedparser . parse ( feed )
2013-07-30 04:57:37 +00:00
2014-04-14 17:59:27 +00:00
if pickfeed == " 3 " or pickfeed == " 6 " or pickfeed == " 2 " or pickfeed == " 5 " :
picksite = ' KAT '
2013-07-30 04:57:37 +00:00
elif pickfeed == " 1 " or pickfeed == " 4 " :
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
picksite = ' 32P '
2014-09-05 06:19:26 +00:00
i = 0
2014-04-14 17:59:27 +00:00
for entry in feedme [ ' entries ' ] :
if pickfeed == " 3 " or pickfeed == " 6 " :
tmpsz = feedme . entries [ i ] . enclosures [ 0 ]
feeddata . append ( {
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
' site ' : picksite ,
' title ' : feedme . entries [ i ] . title ,
' link ' : tmpsz [ ' url ' ] ,
' pubdate ' : feedme . entries [ i ] . updated ,
' size ' : tmpsz [ ' length ' ]
2014-04-14 17:59:27 +00:00
} )
elif pickfeed == " 2 " or pickfeed == " 5 " :
tmpsz = feedme . entries [ i ] . enclosures [ 0 ]
torthekat . append ( {
' site ' : picksite ,
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
' title ' : feedme . entries [ i ] . title ,
2014-04-14 17:59:27 +00:00
' link ' : tmpsz [ ' url ' ] ,
' pubdate ' : feedme . entries [ i ] . updated ,
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
' size ' : tmpsz [ ' length ' ]
2014-04-14 17:59:27 +00:00
} )
elif pickfeed == " 1 " or pickfeed == " 4 " :
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 pickfeed == " 1 " :
tmpdesc = feedme . entries [ i ] . description
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
st_pub = feedme . entries [ i ] . title . find ( ' ( ' )
st_end = feedme . entries [ i ] . title . find ( ' ) ' )
pub = feedme . entries [ i ] . title [ st_pub + 1 : st_end ] # +1 to not include (
logger . fdebug ( ' publisher: ' + re . sub ( " ' " , ' ' , pub ) . strip ( ) ) #publisher sometimes is given within quotes for some reason, strip 'em.
vol_find = feedme . entries [ i ] . title . find ( ' vol. ' )
series = feedme . entries [ i ] . title [ st_end + 1 : vol_find ] . strip ( )
logger . fdebug ( ' series title: ' + series )
iss_st = feedme . entries [ i ] . title . find ( ' - ' , vol_find )
vol = re . sub ( ' \ . ' , ' ' , feedme . entries [ i ] . title [ vol_find : iss_st ] ) . strip ( )
logger . fdebug ( ' volume #: ' + str ( vol ) )
issue = feedme . entries [ i ] . title [ iss_st + 3 : ] . strip ( )
logger . fdebug ( ' issue # : ' + str ( issue ) )
#break it down to get the Size since it's available on THIS 32P feed only so far.
#when it becomes available in the new feeds, this will be working, for now it just nulls out.
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
sizestart = tmpdesc . find ( ' Size: ' )
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
justdigits = 0
if sizestart > = 0 :
sizeend = tmpdesc . find ( ' Leechers: ' )
sizestart + = 5 # to get to the end of the word 'Size:'
tmpsize = tmpdesc [ sizestart : sizeend ] . strip ( )
fdigits = re . sub ( " [^0123456789 \ .] " , " " , tmpsize ) . strip ( )
if ' . ' in fdigits :
decfind = fdigits . find ( ' . ' )
wholenum = fdigits [ : decfind ]
decnum = fdigits [ decfind + 1 : ]
else :
wholenum = fdigits
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
decnum = 0
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
if ' MB ' in tmpsize :
wholebytes = int ( wholenum ) * 1048576
wholedecimal = ( int ( decnum ) * 1048576 ) / 100
justdigits = wholebytes + wholedecimal
else :
#it's 'GB' then
wholebytes = ( int ( wholenum ) * 1024 ) * 1048576
wholedecimal = ( ( int ( decnum ) * 1024 ) * 1048576 ) / 100
justdigits = wholebytes + wholedecimal
#this is not currently working for 32p
#Get the # of seeders.
#seedstart = tmpdesc.find('Seeders:')
#seedend = tmpdesc.find('Added:')
#seedstart +=8 # to get to the end of the word 'Seeders:'
#tmpseed = tmpdesc[seedstart:seedend].strip()
#seeddigits = re.sub("[^0123456789\.]", "", tmpseed).strip()
seeddigits = 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
else :
justdigits = None #size not available in follow-list rss feed
seeddigits = 0 #number of seeders not available in follow-list rss feed
if int ( mylar . MINSEEDS ) > = int ( seeddigits ) :
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
link = feedme . entries [ i ] . link
linkst = link . find ( ' &id ' )
linken = link . find ( ' & ' , linkst + 1 )
if linken == - 1 : linken = len ( link )
newlink = re . sub ( ' &id= ' , ' ' , link [ linkst : linken ] ) . strip ( )
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
feeddata . append ( {
' site ' : picksite ,
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
' title ' : str ( series ) . lstrip ( ) + ' ' + str ( vol ) + ' # ' + str ( issue ) ,
' volume ' : vol , # not stored by mylar yet.
' issue ' : issue , # not stored by mylar yet.
' link ' : newlink , #just the id for the torrent
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
' pubdate ' : feedme . entries [ i ] . updated ,
' size ' : justdigits
} )
2014-04-14 17:59:27 +00:00
i + = 1
if feedtype is None :
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
logger . info ( ' [ ' + picksite + ' ] there were ' + str ( i ) + ' results.. ' )
2014-04-14 17:59:27 +00:00
else :
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
logger . info ( ' [ ' + picksite + ' ] there were ' + str ( i ) + ' results ' + feedtype )
2014-09-05 06:19:26 +00:00
totalcount + = i
2014-04-14 17:59:27 +00:00
lp + = 1
2013-10-01 18:37:42 +00:00
2013-08-07 06:27:12 +00:00
if not seriesname :
2014-09-05 06:19:26 +00:00
rssdbupdate ( feeddata , totalcount , ' torrent ' )
2013-08-07 06:27:12 +00:00
else :
katinfo [ ' entries ' ] = torthekat
return katinfo
2013-07-30 04:57:37 +00:00
return
2015-03-20 08:06:56 +00:00
2015-03-21 14:09:34 +00:00
def nzbs ( provider = None , forcerss = False ) :
2013-07-30 04:57:37 +00:00
2015-03-30 15:49:36 +00:00
feedthis = [ ]
def _parse_feed ( site , url ) :
logger . fdebug ( ' [RSS] Fetching items from ' + site )
feedme = feedparser . parse ( url , agent = str ( mylar . USER_AGENT ) )
feedthis . append ( { " site " : site ,
" feed " : feedme } )
2013-07-30 04:57:37 +00:00
newznab_hosts = [ ]
if mylar . NEWZNAB == 1 :
for newznab_host in mylar . EXTRA_NEWZNABS :
2015-03-30 15:49:36 +00:00
logger . fdebug ( ' [RSS] newznab name: ' + str ( newznab_host [ 0 ] ) + ' - enabled: ' + str ( newznab_host [ 4 ] ) )
if str ( newznab_host [ 4 ] ) == ' 1 ' :
2013-07-30 04:57:37 +00:00
newznab_hosts . append ( newznab_host )
2015-03-21 14:09:34 +00:00
providercount = len ( newznab_hosts ) + int ( mylar . EXPERIMENTAL == 1 ) + int ( mylar . NZBSU == 1 ) + int ( mylar . DOGNZB == 1 )
logger . fdebug ( ' [RSS] You have enabled ' + str ( providercount ) + ' NZB RSS search providers. ' )
2013-07-30 04:57:37 +00:00
2015-03-21 14:09:34 +00:00
if mylar . EXPERIMENTAL == 1 :
2015-03-30 15:49:36 +00:00
max_entries = " 250 " if forcerss else " 50 "
_parse_feed ( ' experimental ' , ' http://nzbindex.nl/rss/alt.binaries.comics.dcp/?sort=agedesc&max= ' + max_entries + ' &more=1 ' )
2015-03-20 06:47:43 +00:00
2015-03-21 14:09:34 +00:00
if mylar . NZBSU == 1 :
2015-03-30 15:49:36 +00:00
num_items = " &num=100 " if forcerss else " " # default is 25
_parse_feed ( ' nzb.su ' , ' http://api.nzb.su/rss?t=7030&dl=1&i= ' + ( mylar . NZBSU_UID or ' 1 ' ) + ' &r= ' + mylar . NZBSU_APIKEY + num_items )
2013-07-30 04:57:37 +00:00
2015-03-21 14:09:34 +00:00
if mylar . DOGNZB == 1 :
2015-03-30 15:49:36 +00:00
num_items = " &num=100 " if forcerss else " " # default is 25
_parse_feed ( ' dognzb ' , ' https://dognzb.cr/rss.cfm?r= ' + mylar . DOGNZB_APIKEY + ' &t=7030 ' + num_items )
2015-03-21 14:09:34 +00:00
for newznab_host in newznab_hosts :
site = newznab_host [ 0 ] . rstrip ( )
2015-03-30 15:49:36 +00:00
( newznabuid , _ , newznabcat ) = ( newznab_host [ 3 ] or ' ' ) . partition ( ' # ' )
newznabuid = newznabuid or ' 1 '
newznabcat = newznabcat or ' 7030 '
2015-03-21 14:09:34 +00:00
# 11-21-2014: added &num=100 to return 100 results (or maximum) - unsure of cross-reliablity
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
_parse_feed ( site , newznab_host [ 1 ] . rstrip ( ) + ' /rss?t= ' + str ( newznabcat ) + ' &dl=1&i= ' + str ( newznabuid ) + ' &num=100&r= ' + newznab_host [ 2 ] . rstrip ( ) )
2015-03-30 15:49:36 +00:00
feeddata = [ ]
2015-03-21 14:09:34 +00:00
for ft in feedthis :
site = ft [ ' site ' ]
logger . fdebug ( ' [RSS] ( ' + site + ' ) now being updated... ' )
for entry in ft [ ' feed ' ] . entries :
if site == ' dognzb ' :
#because the rss of dog doesn't carry the enclosure item, we'll use the newznab size value
size = 0
if ' newznab ' in entry and ' size ' in entry [ ' newznab ' ] :
size = entry [ ' newznab ' ] [ ' size ' ]
else :
# experimental, nzb.su, newznab
size = entry . enclosures [ 0 ] [ ' length ' ]
# Link
if site == ' experimental ' :
link = entry . enclosures [ 0 ] [ ' url ' ]
else :
# dognzb, nzb.su, newznab
link = entry . link
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
#Remove the API keys from the url to allow for possible api key changes
if site == ' dognzb ' :
link = re . sub ( mylar . DOGNZB_APIKEY , ' ' , link ) . strip ( )
else :
link = link [ : link . find ( ' &i= ' ) ] . strip ( )
2015-03-21 14:09:34 +00:00
feeddata . append ( { ' Site ' : site ,
' Title ' : entry . title ,
' Link ' : link ,
' Pubdate ' : entry . updated ,
' Size ' : size } )
# logger.fdebug(" Site: " + site)
# logger.fdebug(" Title: " + entry.title)
# logger.fdebug(" Link: " + link)
# logger.fdebug(" pubdate: " + entry.updated)
# logger.fdebug(" size: " + size)
logger . info ( ' [RSS] ( ' + site + ' ) ' + str ( len ( ft [ ' feed ' ] . entries ) ) + ' entries indexed. ' )
i = len ( feeddata )
2015-03-30 15:49:36 +00:00
if i :
2014-04-14 17:59:27 +00:00
logger . info ( ' [RSS] ' + str ( i ) + ' entries have been indexed and are now going to be stored for caching. ' )
2015-03-21 14:09:34 +00:00
rssdbupdate ( feeddata , i , ' usenet ' )
2013-07-30 04:57:37 +00:00
return
def rssdbupdate ( feeddata , i , type ) :
rsschktime = 15
myDB = db . DBConnection ( )
#let's add the entries into the db so as to save on searches
#also to build up the ID's ;)
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
for dataval in feeddata :
2013-07-30 04:57:37 +00:00
if type == ' torrent ' :
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
#we just store the torrent ID's now.
if dataval [ ' site ' ] == ' 32P ' :
newlink = dataval [ ' link ' ]
else :
#store the hash/id from KAT
newlink = os . path . basename ( re . sub ( ' .torrent ' , ' ' , dataval [ ' link ' ] [ : dataval [ ' link ' ] . find ( ' ?title ' ) ] ) )
2013-07-30 04:57:37 +00:00
newVal = { " Link " : newlink ,
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
" Pubdate " : dataval [ ' pubdate ' ] ,
" Site " : dataval [ ' site ' ] ,
" Size " : dataval [ ' size ' ] }
ctrlVal = { " Title " : dataval [ ' title ' ] }
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
2013-07-30 04:57:37 +00:00
else :
newlink = dataval [ ' Link ' ]
newVal = { " Link " : newlink ,
" Pubdate " : dataval [ ' Pubdate ' ] ,
" Site " : dataval [ ' Site ' ] ,
" Size " : dataval [ ' Size ' ] }
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
ctrlVal = { " Title " : dataval [ ' Title ' ] }
2013-07-30 04:57:37 +00:00
myDB . upsert ( " rssdb " , newVal , ctrlVal )
2013-08-19 06:14:47 +00:00
logger . fdebug ( ' Completed adding new data to RSS DB. Next add in ' + str ( mylar . RSS_CHECKINTERVAL ) + ' minutes ' )
2013-07-30 04:57:37 +00:00
return
2013-08-19 06:14:47 +00:00
def torrentdbsearch ( seriesname , issue , comicid = None , nzbprov = None ) :
2013-07-30 04:57:37 +00:00
myDB = db . DBConnection ( )
seriesname_alt = None
if comicid is None or comicid == ' None ' :
pass
else :
2013-08-19 06:14:47 +00:00
logger . fdebug ( ' ComicID: ' + str ( comicid ) )
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
snm = myDB . selectone ( " SELECT * FROM comics WHERE comicid=? " , [ comicid ] ) . fetchone ( )
2013-07-30 04:57:37 +00:00
if snm is None :
2013-08-19 06:14:47 +00:00
logger . fdebug ( ' Invalid ComicID of ' + str ( comicid ) + ' . Aborting search. ' )
2013-07-30 04:57:37 +00:00
return
else :
seriesname = snm [ ' ComicName ' ]
seriesname_alt = snm [ ' AlternateSearch ' ]
2013-08-19 06:14:47 +00:00
#remove 'and' and 'the':
tsearch_rem1 = re . sub ( " \\ band \\ b " , " % " , seriesname . lower ( ) )
tsearch_rem2 = re . sub ( " \\ bthe \\ b " , " % " , tsearch_rem1 . lower ( ) )
tsearch_removed = re . sub ( ' \ s+ ' , ' ' , tsearch_rem2 )
tsearch_seriesname = re . sub ( ' [ \' \ ! \ @ \ # \ $ \ % \ : \ - \ ; \ / \\ = \ ? \ & \ . \ s] ' , ' % ' , tsearch_removed )
2014-12-01 17:23:49 +00:00
if mylar . PREFERRED_QUALITY == 0 :
tsearch = tsearch_seriesname + " % "
elif mylar . PREFERRED_QUALITY == 1 :
tsearch = tsearch_seriesname + " %c br % "
elif mylar . PREFERRED_QUALITY == 2 :
tsearch = tsearch_seriesname + " %c bz % "
else :
tsearch = tsearch_seriesname + " % "
2014-06-25 15:32:54 +00:00
logger . fdebug ( ' tsearch : ' + tsearch )
2013-08-11 05:31:41 +00:00
AS_Alt = [ ]
tresults = [ ]
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
tsearch = ' % ' + tsearch
2013-08-11 05:31:41 +00:00
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
if mylar . ENABLE_32P :
tresults = myDB . select ( " SELECT * FROM rssdb WHERE Title like ? AND Site= ' 32P ' " , [ tsearch ] )
2013-07-30 04:57:37 +00:00
if mylar . ENABLE_KAT :
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
tresults + = myDB . select ( " SELECT * FROM rssdb WHERE Title like ? AND Site= ' KAT ' " , [ tsearch ] )
2013-08-11 05:31:41 +00:00
2013-08-19 06:14:47 +00:00
logger . fdebug ( ' seriesname_alt: ' + str ( seriesname_alt ) )
2013-08-11 05:31:41 +00:00
if seriesname_alt is None or seriesname_alt == ' None ' :
if tresults is None :
2013-08-19 06:14:47 +00:00
logger . fdebug ( ' no Alternate name given. Aborting search. ' )
2013-07-30 04:57:37 +00:00
return " no results "
2013-08-11 05:31:41 +00:00
else :
chkthealt = seriesname_alt . split ( ' ## ' )
if chkthealt == 0 :
AS_Alternate = seriesname_alt
AS_Alt . append ( seriesname_alt )
for calt in chkthealt :
AS_Alter = re . sub ( ' ## ' , ' ' , calt )
u_altsearchcomic = AS_Alter . encode ( ' ascii ' , ' ignore ' ) . strip ( )
2013-08-19 06:14:47 +00:00
AS_Altrem = re . sub ( " \\ band \\ b " , " " , u_altsearchcomic . lower ( ) )
AS_Altrem = re . sub ( " \\ bthe \\ b " , " " , AS_Altrem . lower ( ) )
AS_Alternate = re . sub ( ' [ \ _ \ # \ , \ / \ : \ ; \ . \ - \ ! \ $ \ % \ + \' \ & \ ? \ @ \ s] ' , ' % ' , AS_Altrem )
2013-09-05 02:36:41 +00:00
AS_Altrem_mod = re . sub ( ' [ \ &] ' , ' ' , AS_Altrem )
AS_formatrem_seriesname = re . sub ( ' [ \' \ ! \ @ \ # \ $ \ % \ : \ ; \ / \\ = \ ? \ .] ' , ' ' , AS_Altrem_mod )
AS_formatrem_seriesname = re . sub ( ' \ s+ ' , ' ' , AS_formatrem_seriesname )
if AS_formatrem_seriesname [ : 1 ] == ' ' : AS_formatrem_seriesname = AS_formatrem_seriesname [ 1 : ]
AS_Alt . append ( AS_formatrem_seriesname )
2014-12-01 17:23:49 +00:00
if mylar . PREFERRED_QUALITY == 0 :
AS_Alternate + = " % "
elif mylar . PREFERRED_QUALITY == 1 :
AS_Alternate + = " %c br % "
elif mylar . PREFERRED_QUALITY == 2 :
AS_Alternate + = " %c bz % "
else :
AS_Alternate + = " % "
2013-08-11 05:31:41 +00:00
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
AS_Alternate = ' % ' + AS_Alternate
if mylar . ENABLE_32P :
tresults + = myDB . select ( " SELECT * FROM rssdb WHERE Title like ? AND Site= ' 32P ' " , [ AS_Alternate ] )
2013-08-11 05:31:41 +00:00
if mylar . ENABLE_KAT :
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
tresults + = myDB . select ( " SELECT * FROM rssdb WHERE Title like ? AND Site= ' KAT ' " , [ AS_Alternate ] )
2013-08-11 05:31:41 +00:00
if tresults is None :
2013-08-19 06:14:47 +00:00
logger . fdebug ( ' torrent search returned no results for ' + seriesname )
2013-08-11 05:31:41 +00:00
return " no results "
2013-07-30 04:57:37 +00:00
extensions = ( ' cbr ' , ' cbz ' )
tortheinfo = [ ]
torinfo = { }
for tor in tresults :
torsplit = tor [ ' Title ' ] . split ( ' / ' )
2014-12-01 17:23:49 +00:00
if mylar . PREFERRED_QUALITY == 1 :
if ' cbr ' in tor [ ' Title ' ] :
logger . fdebug ( ' Quality restriction enforced [ cbr only ]. Accepting result. ' )
else :
logger . fdebug ( ' Quality restriction enforced [ cbr only ]. Rejecting result. ' )
elif mylar . PREFERRED_QUALITY == 2 :
if ' cbz ' in tor [ ' Title ' ] :
logger . fdebug ( ' Quality restriction enforced [ cbz only ]. Accepting result. ' )
else :
logger . fdebug ( ' Quality restriction enforced [ cbz only ]. Rejecting result. ' )
2013-08-19 06:14:47 +00:00
logger . fdebug ( ' tor-Title: ' + tor [ ' Title ' ] )
logger . fdebug ( ' there are ' + str ( len ( torsplit ) ) + ' sections in this title ' )
2013-07-30 04:57:37 +00:00
i = 0
2014-04-20 04:01:23 +00:00
if nzbprov is not None :
if nzbprov != tor [ ' Site ' ] :
logger . fdebug ( ' this is a result from ' + str ( tor [ ' Site ' ] ) + ' , not the site I am looking for of ' + str ( nzbprov ) )
continue
2013-07-30 04:57:37 +00:00
#0 holds the title/issue and format-type.
2014-12-01 17:23:49 +00:00
ext_check = True # extension checker to enforce cbr/cbz filetype restrictions.
2013-07-30 04:57:37 +00:00
while ( i < len ( torsplit ) ) :
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
#we'll rebuild the string here so that it's formatted accordingly to be passed back to the parser.
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 . fdebug ( ' section( ' + str ( i ) + ' ): ' + torsplit [ i ] )
2014-01-16 20:25:02 +00:00
#remove extensions
titletemp = torsplit [ i ]
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
titletemp = re . sub ( ' cbr ' , ' ' , titletemp )
titletemp = re . sub ( ' cbz ' , ' ' , titletemp )
titletemp = re . sub ( ' none ' , ' ' , titletemp )
2014-02-26 19:48:50 +00:00
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
if i == 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
rebuiltline = titletemp
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
else :
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
rebuiltline = rebuiltline + ' ( ' + titletemp + ' ) '
2013-07-30 04:57:37 +00:00
i + = 1
2013-08-19 06:14:47 +00:00
2014-12-01 17:23:49 +00:00
if ext_check == False :
continue
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 . fdebug ( ' rebuiltline is : ' + rebuiltline )
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
2013-08-19 06:14:47 +00:00
seriesname_mod = seriesname
foundname_mod = torsplit [ 0 ]
seriesname_mod = re . sub ( " \\ band \\ b " , " " , seriesname_mod . lower ( ) )
foundname_mod = re . sub ( " \\ band \\ b " , " " , foundname_mod . lower ( ) )
seriesname_mod = re . sub ( " \\ bthe \\ b " , " " , seriesname_mod . lower ( ) )
foundname_mod = re . sub ( " \\ bthe \\ b " , " " , foundname_mod . lower ( ) )
seriesname_mod = re . sub ( ' [ \ &] ' , ' ' , seriesname_mod )
foundname_mod = re . sub ( ' [ \ &] ' , ' ' , foundname_mod )
2014-06-11 18:39:50 +00:00
formatrem_seriesname = re . sub ( ' [ \' \ ! \ @ \ # \ $ \ % \ : \ ; \ = \ ? \ .] ' , ' ' , seriesname_mod )
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
formatrem_seriesname = re . sub ( ' [ \ -] ' , ' ' , formatrem_seriesname )
2014-06-11 18:39:50 +00:00
formatrem_seriesname = re . sub ( ' [ \ /] ' , ' ' , formatrem_seriesname ) #not necessary since seriesname in a torrent file won't have /
2013-08-19 06:14:47 +00:00
formatrem_seriesname = re . sub ( ' \ s+ ' , ' ' , formatrem_seriesname )
if formatrem_seriesname [ : 1 ] == ' ' : formatrem_seriesname = formatrem_seriesname [ 1 : ]
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
2014-06-11 18:39:50 +00:00
formatrem_torsplit = re . sub ( ' [ \' \ ! \ @ \ # \ $ \ % \ : \ ; \\ = \ ? \ .] ' , ' ' , foundname_mod )
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
formatrem_torsplit = re . sub ( ' [ \ -] ' , ' ' , formatrem_torsplit ) #we replace the - with space so we'll get hits if differnces
2014-06-11 18:39:50 +00:00
formatrem_torsplit = re . sub ( ' [ \ /] ' , ' ' , formatrem_torsplit ) #not necessary since if has a /, should be removed in above line
2013-07-30 04:57:37 +00:00
formatrem_torsplit = re . sub ( ' \ s+ ' , ' ' , formatrem_torsplit )
2013-08-19 06:14:47 +00:00
logger . fdebug ( str ( len ( formatrem_torsplit ) ) + ' - formatrem_torsplit : ' + formatrem_torsplit . lower ( ) )
logger . fdebug ( str ( len ( formatrem_seriesname ) ) + ' - formatrem_seriesname : ' + formatrem_seriesname . lower ( ) )
2013-08-11 05:31:41 +00:00
if formatrem_seriesname . lower ( ) in formatrem_torsplit . lower ( ) or any ( x . lower ( ) in formatrem_torsplit . lower ( ) for x in AS_Alt ) :
2013-08-19 06:14:47 +00:00
logger . fdebug ( ' matched to : ' + tor [ ' Title ' ] )
logger . fdebug ( ' matched on series title: ' + seriesname )
2013-07-30 04:57:37 +00:00
titleend = formatrem_torsplit [ len ( formatrem_seriesname ) : ]
titleend = re . sub ( ' \ - ' , ' ' , titleend ) #remove the '-' which is unnecessary
2014-01-16 20:25:02 +00:00
#remove extensions
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
titleend = re . sub ( ' cbr ' , ' ' , titleend )
titleend = re . sub ( ' cbz ' , ' ' , titleend )
titleend = re . sub ( ' none ' , ' ' , titleend )
logger . fdebug ( ' titleend: ' + titleend )
2014-01-16 20:25:02 +00:00
2013-07-30 04:57:37 +00:00
sptitle = titleend . split ( )
extra = ' '
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
#the title on 32P has a mix-mash of crap...ignore everything after cbz/cbr to cleanit
2013-08-04 05:57:21 +00:00
ctitle = tor [ ' Title ' ] . find ( ' cbr ' )
if ctitle == 0 :
ctitle = tor [ ' Title ' ] . find ( ' cbz ' )
2014-01-16 20:25:02 +00:00
if ctitle == 0 :
ctitle = tor [ ' Title ' ] . find ( ' none ' )
if ctitle == 0 :
logger . fdebug ( ' cannot determine title properly - ignoring for now. ' )
continue
2013-08-04 05:57:21 +00:00
cttitle = tor [ ' Title ' ] [ : ctitle ]
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
if tor [ ' Site ' ] == ' 32P ' :
st_pub = rebuiltline . find ( ' ( ' )
st_end = rebuiltline . find ( ' ) ' )
rebuiltline = rebuiltline [ st_end + 1 : ]
2013-08-04 05:57:21 +00:00
tortheinfo . append ( {
2014-01-16 20:25:02 +00:00
' title ' : rebuiltline , #cttitle,
2013-08-04 05:57:21 +00:00
' link ' : tor [ ' Link ' ] ,
' pubdate ' : tor [ ' Pubdate ' ] ,
' site ' : tor [ ' Site ' ] ,
' length ' : tor [ ' Size ' ]
} )
2013-07-30 04:57:37 +00:00
torinfo [ ' entries ' ] = tortheinfo
return torinfo
2013-12-03 19:04:38 +00:00
def nzbdbsearch ( seriesname , issue , comicid = None , nzbprov = None , searchYear = None , ComicVersion = None ) :
2013-07-30 04:57:37 +00:00
myDB = db . DBConnection ( )
seriesname_alt = None
if comicid is None or comicid == ' None ' :
pass
else :
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
snm = myDB . selectone ( " SELECT * FROM comics WHERE comicid=? " , [ comicid ] ) . fetchone ( )
2013-07-30 04:57:37 +00:00
if snm is None :
2013-08-19 06:14:47 +00:00
logger . info ( ' Invalid ComicID of ' + str ( comicid ) + ' . Aborting search. ' )
2013-07-30 04:57:37 +00:00
return
else :
seriesname = snm [ ' ComicName ' ]
seriesname_alt = snm [ ' AlternateSearch ' ]
2013-12-03 19:04:38 +00:00
nsearch_seriesname = re . sub ( ' [ \' \ ! \ @ \ # \ $ \ % \ : \ ; \ / \\ = \ ? \ . \ - \ s] ' , ' % ' , seriesname )
2013-07-30 04:57:37 +00:00
formatrem_seriesname = re . sub ( ' [ \' \ ! \ @ \ # \ $ \ % \ : \ ; \ / \\ = \ ? \ .] ' , ' ' , seriesname )
2014-12-01 17:23:49 +00:00
2013-12-03 19:04:38 +00:00
nsearch = ' % ' + nsearch_seriesname + " % "
2014-12-01 17:23:49 +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
nresults = myDB . select ( " SELECT * FROM rssdb WHERE Title like ? AND Site=? " , [ nsearch , nzbprov ] )
2013-07-30 04:57:37 +00:00
if nresults is None :
2013-08-19 06:14:47 +00:00
logger . fdebug ( ' nzb search returned no results for ' + seriesname )
2013-07-30 04:57:37 +00:00
if seriesname_alt is None :
2013-08-19 06:14:47 +00:00
logger . fdebug ( ' no nzb Alternate name given. Aborting search. ' )
2013-07-30 04:57:37 +00:00
return " no results "
else :
chkthealt = seriesname_alt . split ( ' ## ' )
if chkthealt == 0 :
AS_Alternate = AlternateSearch
for calt in chkthealt :
AS_Alternate = re . sub ( ' ## ' , ' ' , calt )
2014-12-01 17:23:49 +00:00
AS_Alternate = ' % ' + AS_Alternate + " % "
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
nresults + = myDB . select ( " SELECT * FROM rssdb WHERE Title like ? AND Site=? " , [ AS_Alternate , nzbprov ] )
2013-07-30 04:57:37 +00:00
if nresults is None :
2013-08-19 06:14:47 +00:00
logger . fdebug ( ' nzb alternate name search returned no results. ' )
2013-07-30 04:57:37 +00:00
return " no results "
nzbtheinfo = [ ]
nzbinfo = { }
2013-12-03 19:04:38 +00:00
if nzbprov == ' experimental ' :
except_list = [ ' releases ' , ' gold line ' , ' distribution ' , ' 0-day ' , ' 0 day ' ]
if ComicVersion :
ComVersChk = re . sub ( " [^0-9] " , " " , ComicVersion )
if ComVersChk == ' ' :
ComVersChk = 0
else :
ComVersChk = 0
else :
ComVersChk = 0
2014-12-01 17:23:49 +00:00
filetype = None
if mylar . PREFERRED_QUALITY == 1 : filetype = ' cbr '
elif mylar . PREFERRED_QUALITY == 2 : filetype = ' cbz '
2013-12-03 19:04:38 +00:00
for results in nresults :
title = results [ ' Title ' ]
#logger.fdebug("titlesplit: " + str(title.split("\"")))
splitTitle = title . split ( " \" " )
noYear = ' False '
2014-12-01 17:23:49 +00:00
_digits = re . compile ( ' \ d ' )
2013-12-03 19:04:38 +00:00
for subs in splitTitle :
#logger.fdebug(subs)
2014-12-01 17:23:49 +00:00
if len ( subs ) > = len ( seriesname ) and not any ( d in subs . lower ( ) for d in except_list ) and bool ( _digits . search ( subs ) ) is True :
if subs . lower ( ) . startswith ( ' for ' ) :
# need to filter down alternate names in here at some point...
if seriesname . lower ( ) . startswith ( ' for ' ) :
pass
else :
#this is the crap we ignore. Continue
logger . fdebug ( ' this starts with FOR : ' + str ( subs ) + ' . This is not present in the series - ignoring. ' )
continue
2013-12-03 19:04:38 +00:00
if ComVersChk == 0 :
noYear = ' False '
if ComVersChk != 0 and searchYear not in subs :
noYear = ' True '
noYearline = subs
if searchYear in subs and noYear == ' True ' :
#this would occur on the next check in the line, if year exists and
#the noYear check in the first check came back valid append it
subs = noYearline + ' ( ' + searchYear + ' ) '
noYear = ' False '
if noYear == ' False ' :
2014-12-01 17:23:49 +00:00
if filetype is not None :
if filetype not in subs . lower ( ) :
continue
2013-12-03 19:04:38 +00:00
nzbtheinfo . append ( {
' title ' : subs ,
' link ' : re . sub ( ' \ /release \ / ' , ' /download/ ' , results [ ' Link ' ] ) ,
' pubdate ' : str ( results [ ' PubDate ' ] ) ,
' site ' : str ( results [ ' Site ' ] ) ,
' length ' : str ( results [ ' Size ' ] ) } )
else :
for nzb in nresults :
# no need to parse here, just compile and throw it back ....
nzbtheinfo . append ( {
' title ' : nzb [ ' Title ' ] ,
' link ' : nzb [ ' Link ' ] ,
' pubdate ' : nzb [ ' Pubdate ' ] ,
' site ' : nzb [ ' Site ' ] ,
' length ' : nzb [ ' Size ' ]
} )
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.fdebug("entered info for " + nzb['Title'])
2013-12-03 19:04:38 +00:00
2013-07-30 04:57:37 +00:00
nzbinfo [ ' entries ' ] = nzbtheinfo
return nzbinfo
2013-10-19 01:04:16 +00:00
def torsend2client ( seriesname , issue , seriesyear , linkit , site ) :
2015-01-25 02:26:22 +00:00
logger . info ( ' matched on ' + seriesname )
filename = helpers . filesafe ( seriesname )
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
filename = re . sub ( ' ' , ' _ ' , filename )
2013-10-19 01:04:16 +00:00
filename + = " _ " + str ( issue ) + " _ " + str ( seriesyear )
2013-07-30 04:57:37 +00:00
2013-10-19 01:04:16 +00:00
if linkit [ - 7 : ] != " torrent " : # and site != "KAT":
2013-07-30 04:57:37 +00:00
filename + = " .torrent "
if mylar . TORRENT_LOCAL and mylar . LOCAL_WATCHDIR is not None :
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
2013-07-30 04:57:37 +00:00
filepath = os . path . join ( mylar . LOCAL_WATCHDIR , filename )
2013-08-19 06:14:47 +00:00
logger . fdebug ( ' filename for torrent set to : ' + filepath )
2013-07-30 04:57:37 +00:00
elif mylar . TORRENT_SEEDBOX and mylar . SEEDBOX_WATCHDIR is not None :
filepath = os . path . join ( mylar . CACHE_DIR , filename )
2013-08-19 06:14:47 +00:00
logger . fdebug ( ' filename for torrent set to : ' + filepath )
2013-07-30 04:57:37 +00:00
else :
2013-08-19 06:14:47 +00:00
logger . error ( ' No Local Watch Directory or Seedbox Watch Directory specified. Set it and try again. ' )
2013-07-30 04:57:37 +00:00
return " fail "
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
if site == ' 32P ' :
url = ' https://32pag.es/torrents.php '
2013-09-05 02:36:41 +00:00
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
verify = False
payload = { ' action ' : ' download ' ,
' torrent_pass ' : mylar . PASSKEY_32P ,
' authkey ' : mylar . AUTHKEY_32P ,
' id ' : linkit }
headers = None #{'Accept-encoding': 'gzip',
# 'User-Agent': str(mylar.USER_AGENT)}
else :
stfind = linkit . find ( ' ? ' )
if stfind == - 1 :
kat_referrer = helpers . torrent_create ( ' KAT ' , linkit )
2013-09-05 02:36:41 +00:00
else :
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
kat_referrer = linkit [ : stfind ]
logger . fdebug ( ' KAT Referer set to : ' + kat_referrer )
headers = { ' Accept-encoding ' : ' gzip ' ,
' Referer ' : kat_referrer }
url = helpers . torrent_create ( ' KAT ' , linkit )
payload = None
verify = False
#logger.info('payload set to : ' + str(payload))
if not verify :
#32P throws back an insecure warning because it can't validate against the CA. The below suppresses the message just for 32P instead of being displayed.
2015-04-17 18:35:05 +00:00
try :
from requests . packages . urllib3 . exceptions import InsecureRequestWarning
requests . packages . urllib3 . disable_warnings ( )
except ImportError :
from urllib3 . exceptions import InsecureRequestWarning
urllib3 . disable_warnings ( )
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
try :
r = requests . get ( url , params = payload , verify = verify , stream = True , headers = headers )
2013-09-05 02:36:41 +00:00
2013-07-30 04:57:37 +00:00
except Exception , e :
logger . warn ( ' Error fetching data from %s : %s ' % ( site , e ) )
return " fail "
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
if site == ' KAT ' :
if r . headers . get ( ' Content-Encoding ' ) == ' gzip ' :
buf = StringIO ( r . content )
f = gzip . GzipFile ( fileobj = buf )
with open ( filepath , ' wb ' ) as f :
for chunk in r . iter_content ( chunk_size = 1024 ) :
if chunk : # filter out keep-alive new chunks
f . write ( chunk )
f . flush ( )
logger . fdebug ( ' [ ' + site + ' ] Saved torrent file to : ' + filepath )
2013-09-05 02:36:41 +00:00
2013-07-30 04:57:37 +00:00
if mylar . TORRENT_LOCAL :
return " pass "
IMP: 32P support added (identical to CBT, no backlog searching but full RSS url is required for usage), IMP: Threaded RSS Check (will only run once concurrently), IMP: Added option to enable/disable Snatched/Failed to show on Wanted tab, FIX: Removed UID from dognzb config, IMP: Removed apikey from being stored in db for dognzb, IMP: Will only store ID/HASH for torrents, instead of entire link - will recreate dynamically as required, IMP: Switched to requests for torrent retrieval, IMP: Removed getdefaultlocal requirements on startup (would fail startup on some OSX systems), IMP: Will now display covers that are in 00.png format when viewing issue details, IMP: Fixed incorrect logic for dupecheck status checks, FIX: Removed some unneeded print statements
2015-04-15 04:10:52 +00:00
2013-07-30 04:57:37 +00:00
elif mylar . TORRENT_SEEDBOX :
tssh = ftpsshup . putfile ( filepath , filename )
return tssh
2013-09-05 02:36:41 +00:00
2013-07-30 04:57:37 +00:00
if __name__ == ' __main__ ' :
#torrents(sys.argv[1])
#torrentdbsearch(sys.argv[1], sys.argv[2], sys.argv[3])
2015-03-20 08:06:56 +00:00
nzbs ( provider = sys . argv [ 1 ] )