project
stringlengths
1
98
commit_sha
stringlengths
40
40
parent_sha
stringlengths
40
40
file_path
stringlengths
4
209
project_url
stringlengths
23
132
likely_bug
bool
1 class
comodified
bool
1 class
in_function
bool
2 classes
diff
stringlengths
27
9.71k
before
stringlengths
1
8.91k
after
stringlengths
1
6k
sstub_pattern
stringclasses
23 values
edit_script
stringlengths
33
158k
key
stringlengths
45
154
commit_message
stringlengths
3
65.5k
files
list
SickRage
c29493e5b4d6e60d44820056770385957e7109ae
a4f329fbc394e8939977bf9c43aa540f948fec75
sickbeard/tv.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -1527,7 +1527,7 @@ class TVEpisode(object): path = subliminal.subtitle.get_subtitle_path(video.name, sub.language if sickbeard.SUBTITLES_MULTI else None) if subs_new_path: path = ek.ek(os.path.join, subs_new_path, ek.ek(os.path.split, path)[1]) - new_path = path.replace(ek.ek(os.path.splitext, release_name)[0], + new_path = path.replace(ek.ek(os.path.splitext, self.release_name)[0], ek.ek(os.path.splitext, ek.ek(os.path.basename, self.location))[0]) if ek.ek(os.path.exists, path) and not ek.ek(os.path.exists, newpath): ek.ek(os.rename, path, newpath)
new_path = path . replace ( ek . ek ( os . path . splitext , release_name ) [ 0 ] , ek . ek ( os . path . splitext , ek . ek ( os . path . basename , self . location ) ) [ 0 ] )
new_path = path . replace ( ek . ek ( os . path . splitext , self . release_name ) [ 0 ] , ek . ek ( os . path . splitext , ek . ek ( os . path . basename , self . location ) ) [ 0 ] )
SINGLE_STMT
[["Insert", ["argument_list", 3, 54, 3, 86], ["attribute", "N0"], 3], ["Insert", "N0", ["identifier:self", "T"], 0], ["Insert", "N0", [".:.", "T"], 1], ["Move", "N0", ["identifier:release_name", 3, 73, 3, 85], 2]]
jackkiej/SickRage@c29493e5b4d6e60d44820056770385957e7109ae
Typo, fixes SiCKRAGETV/sickrage-issues#2016
[ { "sha": "1a69942c57b6225c0ed0d59555cb69b0245bddb6", "filename": "sickbeard/tv.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/c29493e5b4d6e60d44820056770385957e7109ae/sickbeard%2Ftv.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/c29493e5b4d6e60d44820056770385957e7109ae/sickbeard%2Ftv.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Ftv.py?ref=c29493e5b4d6e60d44820056770385957e7109ae", "patch": "@@ -1527,7 +1527,7 @@ def downloadSubtitles(self, force=False):\n path = subliminal.subtitle.get_subtitle_path(video.name, sub.language if sickbeard.SUBTITLES_MULTI else None)\n if subs_new_path:\n path = ek.ek(os.path.join, subs_new_path, ek.ek(os.path.split, path)[1])\n- new_path = path.replace(ek.ek(os.path.splitext, release_name)[0], \n+ new_path = path.replace(ek.ek(os.path.splitext, self.release_name)[0],\n ek.ek(os.path.splitext, ek.ek(os.path.basename, self.location))[0])\n if ek.ek(os.path.exists, path) and not ek.ek(os.path.exists, newpath):\n ek.ek(os.rename, path, newpath)" } ]
SickRage
7938796f9a6552adc2b6a1022225c0a44830f9bb
6da257136e24d6e08344c4fd2e2c662b2c874972
sickbeard/helpers.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -1316,7 +1316,7 @@ def _setUpSession(session, headers): # request session proxies if not 'Referer' in session.headers and sickbeard.PROXY_SETTING: - logger.log("Using proxy for url: " + url, logger.DEBUG) + logger.log("Using proxy: " + sickbeard.PROXY_SETTING, logger.DEBUG) scheme, address = urllib2.splittype(sickbeard.PROXY_SETTING) address = sickbeard.PROXY_SETTING if scheme else 'http://' + sickbeard.PROXY_SETTING session.proxies = {
logger . log ( "Using proxy for url: " + url , logger . DEBUG )
logger . log ( "Using proxy: " + sickbeard . PROXY_SETTING , logger . DEBUG )
SINGLE_STMT
[["Update", ["string:\"Using proxy for url: \"", 3, 20, 3, 43], "\"Using proxy: \""], ["Insert", ["binary_operator", 3, 20, 3, 49], ["attribute", "N0"], 2], ["Update", ["identifier:url", 3, 46, 3, 49], "sickbeard"], ["Move", "N0", ["identifier:url", 3, 46, 3, 49], 0], ["Insert", "N0", [".:.", "T"], 1], ["Insert", "N0", ["identifier:PROXY_SETTING", "T"], 2]]
jackkiej/SickRage@7938796f9a6552adc2b6a1022225c0a44830f9bb
hotfix - global url not defined - fixes SiCKRAGETV/sickrage-issues#2015
[ { "sha": "c5e8e88c5a9ac4e92328ff35d7707ec3ebf2e45e", "filename": "sickbeard/helpers.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/7938796f9a6552adc2b6a1022225c0a44830f9bb/sickbeard%2Fhelpers.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/7938796f9a6552adc2b6a1022225c0a44830f9bb/sickbeard%2Fhelpers.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fhelpers.py?ref=7938796f9a6552adc2b6a1022225c0a44830f9bb", "patch": "@@ -1316,7 +1316,7 @@ def _setUpSession(session, headers):\n \n # request session proxies\n if not 'Referer' in session.headers and sickbeard.PROXY_SETTING:\n- logger.log(\"Using proxy for url: \" + url, logger.DEBUG)\n+ logger.log(\"Using proxy: \" + sickbeard.PROXY_SETTING, logger.DEBUG)\n scheme, address = urllib2.splittype(sickbeard.PROXY_SETTING)\n address = sickbeard.PROXY_SETTING if scheme else 'http://' + sickbeard.PROXY_SETTING\n session.proxies = {" } ]
SickRage
5e47d9f4b34567c241e19c1a8edb37e5248c8036
e7ddddb8939bd2dd8826a3a79d36cdabde004c31
sickbeard/__init__.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -656,7 +656,7 @@ def initialize(consoleLogging=True): # git_remote GIT_REMOTE = check_setting_str(CFG, 'General', 'git_remote', 'origin') GIT_REMOTE_URL = check_setting_str(CFG, 'General', 'git_remote_url', - 'git@github.com:SiCKRAGETV/SickRage.git') + 'https://github.com/SiCKRAGETV/SickRage.git') # current commit hash CUR_COMMIT_HASH = check_setting_str(CFG, 'General', 'cur_commit_hash', '')
GIT_REMOTE_URL = check_setting_str ( CFG , 'General' , 'git_remote_url' , 'git@github.com:SiCKRAGETV/SickRage.git' )
GIT_REMOTE_URL = check_setting_str ( CFG , 'General' , 'git_remote_url' , 'https://github.com/SiCKRAGETV/SickRage.git' )
CHANGE_STRING_LITERAL
[["Update", ["string:'git@github.com:SiCKRAGETV/SickRage.git'", 3, 44, 3, 84], "'https://github.com/SiCKRAGETV/SickRage.git'"]]
jackkiej/SickRage@5e47d9f4b34567c241e19c1a8edb37e5248c8036
hotfix - Need https not ssh for github (accepting github key issues)
[ { "sha": "fd5d46f1964e3d057bc6fcedf47386ba3799088f", "filename": "sickbeard/__init__.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/5e47d9f4b34567c241e19c1a8edb37e5248c8036/sickbeard%2F__init__.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/5e47d9f4b34567c241e19c1a8edb37e5248c8036/sickbeard%2F__init__.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2F__init__.py?ref=5e47d9f4b34567c241e19c1a8edb37e5248c8036", "patch": "@@ -656,7 +656,7 @@ def initialize(consoleLogging=True):\n # git_remote\n GIT_REMOTE = check_setting_str(CFG, 'General', 'git_remote', 'origin')\n GIT_REMOTE_URL = check_setting_str(CFG, 'General', 'git_remote_url',\n- 'git@github.com:SiCKRAGETV/SickRage.git')\n+ 'https://github.com/SiCKRAGETV/SickRage.git')\n \n # current commit hash\n CUR_COMMIT_HASH = check_setting_str(CFG, 'General', 'cur_commit_hash', '')" } ]
SickRage
054f10e9b23419a83e8c79c4b1c16f88bf1d427b
5926e2a25124c7d22f98895725464c67577c4ae7
sickbeard/tv.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -1503,7 +1503,7 @@ class TVEpisode(object): if len(sickbeard.SUBTITLES_DIR): # absolute path (GUI 'Browse' button, or typed absolute path) - sillyness? if ek.ek(os.path.isdir, sickbeard.SUBTITLES_DIR): - subs_new_path = ek.ek(os.path.join, sickbeard.SUBTITLES_DIR, self.show.title) + subs_new_path = ek.ek(os.path.join, sickbeard.SUBTITLES_DIR, self.show.name) dir_exists = True else: # relative to the folder the episode is in - sillyness?
subs_new_path = ek . ek ( os . path . join , sickbeard . SUBTITLES_DIR , self . show . title )
subs_new_path = ek . ek ( os . path . join , sickbeard . SUBTITLES_DIR , self . show . name )
CHANGE_ATTRIBUTE_USED
[["Update", ["identifier:title", 3, 92, 3, 97], "name"]]
jackkiej/SickRage@054f10e9b23419a83e8c79c4b1c16f88bf1d427b
Fix SiCKRAGETV/sickrage-issues#2041
[ { "sha": "798bae1b5bfa93658b87389c18aa9d9da29d1367", "filename": "sickbeard/tv.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/054f10e9b23419a83e8c79c4b1c16f88bf1d427b/sickbeard%2Ftv.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/054f10e9b23419a83e8c79c4b1c16f88bf1d427b/sickbeard%2Ftv.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Ftv.py?ref=054f10e9b23419a83e8c79c4b1c16f88bf1d427b", "patch": "@@ -1503,7 +1503,7 @@ def downloadSubtitles(self, force=False):\n if len(sickbeard.SUBTITLES_DIR):\n # absolute path (GUI 'Browse' button, or typed absolute path) - sillyness?\n if ek.ek(os.path.isdir, sickbeard.SUBTITLES_DIR):\n- subs_new_path = ek.ek(os.path.join, sickbeard.SUBTITLES_DIR, self.show.title)\n+ subs_new_path = ek.ek(os.path.join, sickbeard.SUBTITLES_DIR, self.show.name)\n dir_exists = True\n else:\n # relative to the folder the episode is in - sillyness?" } ]
SickRage
cb4be43c2cf6875b106477ad331ab080a4fdb6ea
be8b202eea7ad8063dc7f35e282654c81c5bf048
sickbeard/tv.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -1503,7 +1503,7 @@ class TVEpisode(object): if len(sickbeard.SUBTITLES_DIR): # absolute path (GUI 'Browse' button, or typed absolute path) - sillyness? if ek.ek(os.path.isdir, sickbeard.SUBTITLES_DIR): - subs_new_path = ek.ek(os.path.join, sickbeard.SUBTITLES_DIR, self.show.title) + subs_new_path = ek.ek(os.path.join, sickbeard.SUBTITLES_DIR, self.show.name) dir_exists = True else: # relative to the folder the episode is in - sillyness?
subs_new_path = ek . ek ( os . path . join , sickbeard . SUBTITLES_DIR , self . show . title )
subs_new_path = ek . ek ( os . path . join , sickbeard . SUBTITLES_DIR , self . show . name )
CHANGE_ATTRIBUTE_USED
[["Update", ["identifier:title", 3, 92, 3, 97], "name"]]
jackkiej/SickRage@cb4be43c2cf6875b106477ad331ab080a4fdb6ea
Fix SiCKRAGETV/sickrage-issues#2041
[ { "sha": "798bae1b5bfa93658b87389c18aa9d9da29d1367", "filename": "sickbeard/tv.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/cb4be43c2cf6875b106477ad331ab080a4fdb6ea/sickbeard%2Ftv.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/cb4be43c2cf6875b106477ad331ab080a4fdb6ea/sickbeard%2Ftv.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Ftv.py?ref=cb4be43c2cf6875b106477ad331ab080a4fdb6ea", "patch": "@@ -1503,7 +1503,7 @@ def downloadSubtitles(self, force=False):\n if len(sickbeard.SUBTITLES_DIR):\n # absolute path (GUI 'Browse' button, or typed absolute path) - sillyness?\n if ek.ek(os.path.isdir, sickbeard.SUBTITLES_DIR):\n- subs_new_path = ek.ek(os.path.join, sickbeard.SUBTITLES_DIR, self.show.title)\n+ subs_new_path = ek.ek(os.path.join, sickbeard.SUBTITLES_DIR, self.show.name)\n dir_exists = True\n else:\n # relative to the folder the episode is in - sillyness?" } ]
SickRage
232069a0a027e1f2bef562e1515beaccc7540b61
9e8244444dd0c6f49ccf0847025dae64153d81df
sickbeard/dailysearcher.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -98,7 +98,7 @@ class DailySearcher(): ep.status = common.SKIPPED UpdateWantedList = 1 else: - logger.log(u"New episode " + ep.prettyName() + " airs today, setting status to WANTED") + logger.log(u"New episode %s airs today, setting to default episode status for this show: %s" % (ep.prettyName(), common.statusStrings[ep.show.default_ep_status])) ep.status = ep.show.default_ep_status sql_l.append(ep.get_sql())
else : logger . log ( u"New episode " + ep . prettyName ( ) + " airs today, setting status to WANTED" )
else : logger . log ( u"New episode %s airs today, setting to default episode status for this show: %s" % ( ep . prettyName ( ) , common . statusStrings [ ep . show . default_ep_status ] ) )
SINGLE_STMT
[["Update", ["string:u\"New episode \"", 3, 32, 3, 47], "u\"New episode %s airs today, setting to default episode status for this show: %s\""], ["Move", ["binary_operator", 3, 32, 3, 107], ["string:u\"New episode \"", 3, 32, 3, 47], 0], ["Insert", ["binary_operator", 3, 32, 3, 107], ["%:%", "T"], 1], ["Insert", ["binary_operator", 3, 32, 3, 107], ["tuple", "N0"], 2], ["Insert", "N0", ["(:(", "T"], 0], ["Move", "N0", ["call", 3, 50, 3, 65], 1], ["Insert", "N0", [",:,", "T"], 2], ["Insert", "N0", ["subscript", "N1"], 3], ["Insert", "N0", ["):)", "T"], 4], ["Insert", "N1", ["attribute", "N2"], 0], ["Insert", "N1", ["[:[", "T"], 1], ["Insert", "N1", ["attribute", "N3"], 2], ["Insert", "N1", ["]:]", "T"], 3], ["Insert", "N2", ["identifier:common", "T"], 0], ["Insert", "N2", [".:.", "T"], 1], ["Insert", "N2", ["identifier:statusStrings", "T"], 2], ["Insert", "N3", ["attribute", "N4"], 0], ["Insert", "N3", [".:.", "T"], 1], ["Insert", "N3", ["identifier:default_ep_status", "T"], 2], ["Insert", "N4", ["identifier:ep", "T"], 0], ["Insert", "N4", [".:.", "T"], 1], ["Insert", "N4", ["identifier:show", "T"], 2], ["Delete", ["+:+", 3, 48, 3, 49]], ["Delete", ["binary_operator", 3, 32, 3, 65]], ["Delete", ["+:+", 3, 66, 3, 67]], ["Delete", ["string:\" airs today, setting status to WANTED\"", 3, 68, 3, 107]]]
jackkiej/SickRage@232069a0a027e1f2bef562e1515beaccc7540b61
Fix status string in dailysearcher
[ { "sha": "ebf305ac020a8ab691023c7f0c3cc6aac5de1ff9", "filename": "sickbeard/dailysearcher.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/232069a0a027e1f2bef562e1515beaccc7540b61/sickbeard%2Fdailysearcher.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/232069a0a027e1f2bef562e1515beaccc7540b61/sickbeard%2Fdailysearcher.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fdailysearcher.py?ref=232069a0a027e1f2bef562e1515beaccc7540b61", "patch": "@@ -98,7 +98,7 @@ def run(self, force=False):\n ep.status = common.SKIPPED\n UpdateWantedList = 1\n else:\n- logger.log(u\"New episode \" + ep.prettyName() + \" airs today, setting status to WANTED\")\n+ logger.log(u\"New episode %s airs today, setting to default episode status for this show: %s\" % (ep.prettyName(), common.statusStrings[ep.show.default_ep_status]))\n ep.status = ep.show.default_ep_status\n \n sql_l.append(ep.get_sql())" } ]
SickRage
ff5894546bae22ae6f5bb8b4a767472628fb0062
c2e5344469b9a02174f5447df04ae74213bf6944
sickbeard/dailysearcher.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -92,7 +92,7 @@ class DailySearcher(): ep = show.getEpisode(int(sqlEp["season"]), int(sqlEp["episode"])) with ep.lock: if ep.show.paused: - ep.status = common.SKIPPED + ep.status = ep.show.default_ep_status elif ep.season == 0: logger.log(u"New episode " + ep.prettyName() + " airs today, setting status to SKIPPED because is a special season") ep.status = common.SKIPPED
ep . status = common . SKIPPED
ep . status = ep . show . default_ep_status
SINGLE_STMT
[["Insert", ["attribute", 3, 33, 3, 47], ["attribute", "N0"], 0], ["Insert", ["attribute", 3, 33, 3, 47], ["identifier:default_ep_status", "T"], 3], ["Update", ["identifier:common", 3, 33, 3, 39], "ep"], ["Move", "N0", ["identifier:common", 3, 33, 3, 39], 0], ["Insert", "N0", [".:.", "T"], 1], ["Update", ["identifier:SKIPPED", 3, 40, 3, 47], "show"], ["Move", "N0", ["identifier:SKIPPED", 3, 40, 3, 47], 2]]
jackkiej/SickRage@ff5894546bae22ae6f5bb8b4a767472628fb0062
Paused shows: unaired episodes should honor default ep status
[ { "sha": "db647fc2db52171f4cb9141845a8372efdf6340c", "filename": "sickbeard/dailysearcher.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/ff5894546bae22ae6f5bb8b4a767472628fb0062/sickbeard%2Fdailysearcher.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/ff5894546bae22ae6f5bb8b4a767472628fb0062/sickbeard%2Fdailysearcher.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fdailysearcher.py?ref=ff5894546bae22ae6f5bb8b4a767472628fb0062", "patch": "@@ -92,7 +92,7 @@ def run(self, force=False):\n ep = show.getEpisode(int(sqlEp[\"season\"]), int(sqlEp[\"episode\"]))\n with ep.lock:\n if ep.show.paused:\n- ep.status = common.SKIPPED\n+ ep.status = ep.show.default_ep_status\n elif ep.season == 0:\n logger.log(u\"New episode \" + ep.prettyName() + \" airs today, setting status to SKIPPED because is a special season\")\n ep.status = common.SKIPPED" } ]
SickRage
ad31d9ee9812d1215cc7032601cbbeead8cc923d
326f42c10a0d3ff309f170029f5d7993069595ce
sickbeard/helpers.py
https://github.com/jackkiej/SickRage
true
false
false
@@ -58,7 +58,7 @@ from sickbeard import encodingKludge as ek from sickbeard import notifiers from sickbeard import clients from sickbeard.subtitles import isValidLanguage -from lib.cachecontrol import CacheControl, caches +from cachecontrol import CacheControl, caches from itertools import izip, cycle
from lib . cachecontrol import CacheControl , caches
from cachecontrol import CacheControl , caches
SINGLE_STMT
[["Delete", ["identifier:lib", 3, 6, 3, 9]], ["Delete", [".:.", 3, 9, 3, 10]]]
jackkiej/SickRage@ad31d9ee9812d1215cc7032601cbbeead8cc923d
libs are already at the start of sys.path, importing from lib or lib. causes import issues within previously imported objects fixes SiCKRAGETV/sickrage-issues#2106
[ { "sha": "8cf78bcfd942475dc2af74e97874f873e6df8f49", "filename": "sickbeard/helpers.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/ad31d9ee9812d1215cc7032601cbbeead8cc923d/sickbeard%2Fhelpers.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/ad31d9ee9812d1215cc7032601cbbeead8cc923d/sickbeard%2Fhelpers.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fhelpers.py?ref=ad31d9ee9812d1215cc7032601cbbeead8cc923d", "patch": "@@ -58,7 +58,7 @@\n from sickbeard import notifiers\n from sickbeard import clients\n from sickbeard.subtitles import isValidLanguage\n-from lib.cachecontrol import CacheControl, caches\n+from cachecontrol import CacheControl, caches\n \n from itertools import izip, cycle\n " } ]
SickRage
86d5ba929772143312489e2bf5e92aa20302440a
2a0c39525e0baca0d7a491d9c78979cd2713a504
sickbeard/providers/generic.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -283,7 +283,7 @@ class GenericProvider: # mark season searched for season pack searches so we can skip later on searched_scene_season = epObj.scene_season - if len(episodes) > 1: + if len(episodes) > 1 and search_mode == 'sponly': # get season search results for curString in self._get_season_search_strings(epObj): itemList += self._doSearch(curString, search_mode, len(episodes), epObj=epObj)
if len ( episodes ) > 1 : for curString in self . _get_season_search_strings ( epObj ) : itemList += self . _doSearch ( curString , search_mode , len ( episodes ) , epObj = epObj )
if len ( episodes ) > 1 and search_mode == 'sponly' : for curString in self . _get_season_search_strings ( epObj ) : itemList += self . _doSearch ( curString , search_mode , len ( episodes ) , epObj = epObj )
MORE_SPECIFIC_IF
[["Insert", ["if_statement", 3, 13, 6, 99], ["boolean_operator", "N0"], 1], ["Move", "N0", ["comparison_operator", 3, 16, 3, 33], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Insert", "N0", ["comparison_operator", "N1"], 2], ["Insert", "N1", ["identifier:search_mode", "T"], 0], ["Insert", "N1", ["==:==", "T"], 1], ["Insert", "N1", ["string:'sponly'", "T"], 2]]
jackkiej/SickRage@86d5ba929772143312489e2bf5e92aa20302440a
Fix SeasonPack searchstrings for episode search on multiple ep search Changed the _doSearch call in generic.py to only use _get_season_search_strings when search_mode is 'sponly'
[ { "sha": "41e85cf47b3a85dff66bb89d1d656877c5758d4c", "filename": "sickbeard/providers/generic.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/86d5ba929772143312489e2bf5e92aa20302440a/sickbeard%2Fproviders%2Fgeneric.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/86d5ba929772143312489e2bf5e92aa20302440a/sickbeard%2Fproviders%2Fgeneric.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fproviders%2Fgeneric.py?ref=86d5ba929772143312489e2bf5e92aa20302440a", "patch": "@@ -283,7 +283,7 @@ def findSearchResults(self, show, episodes, search_mode, manualSearch=False, dow\n # mark season searched for season pack searches so we can skip later on\n searched_scene_season = epObj.scene_season\n \n- if len(episodes) > 1:\n+ if len(episodes) > 1 and search_mode == 'sponly':\n # get season search results\n for curString in self._get_season_search_strings(epObj):\n itemList += self._doSearch(curString, search_mode, len(episodes), epObj=epObj)" } ]
SickRage
09e8ca0988695b27b4da5d97fb49f983021f8f25
86d5ba929772143312489e2bf5e92aa20302440a
sickbeard/providers/generic.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -277,7 +277,7 @@ class GenericProvider: continue # skip if season already searched - if len(episodes) > 1 and searched_scene_season == epObj.scene_season: + if len(episodes) > 1 and search_mode == 'sponly' and searched_scene_season == epObj.scene_season: continue # mark season searched for season pack searches so we can skip later on
if len ( episodes ) > 1 and searched_scene_season == epObj . scene_season : continue
if len ( episodes ) > 1 and search_mode == 'sponly' and searched_scene_season == epObj . scene_season : continue
MORE_SPECIFIC_IF
[["Insert", ["boolean_operator", 3, 16, 3, 81], ["boolean_operator", "N0"], 0], ["Insert", ["boolean_operator", 3, 16, 3, 81], ["and:and", "T"], 1], ["Move", "N0", ["comparison_operator", 3, 16, 3, 33], 0], ["Move", "N0", ["and:and", 3, 34, 3, 37], 1], ["Insert", "N0", ["comparison_operator", "N1"], 2], ["Insert", "N1", ["identifier:search_mode", "T"], 0], ["Insert", "N1", ["==:==", "T"], 1], ["Insert", "N1", ["string:'sponly'", "T"], 2]]
jackkiej/SickRage@09e8ca0988695b27b4da5d97fb49f983021f8f25
Fix epsearch only searching first wanted episode when multi-ep search with eponly searches.
[ { "sha": "8fee80a5570b413f5ec5780fdea0a6304cdba3fb", "filename": "sickbeard/providers/generic.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/09e8ca0988695b27b4da5d97fb49f983021f8f25/sickbeard%2Fproviders%2Fgeneric.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/09e8ca0988695b27b4da5d97fb49f983021f8f25/sickbeard%2Fproviders%2Fgeneric.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fproviders%2Fgeneric.py?ref=09e8ca0988695b27b4da5d97fb49f983021f8f25", "patch": "@@ -277,7 +277,7 @@ def findSearchResults(self, show, episodes, search_mode, manualSearch=False, dow\n continue\n \n # skip if season already searched\n- if len(episodes) > 1 and searched_scene_season == epObj.scene_season:\n+ if len(episodes) > 1 and search_mode == 'sponly' and searched_scene_season == epObj.scene_season:\n continue\n \n # mark season searched for season pack searches so we can skip later on" } ]
SickRage
6f134dfe095de5dcbf9ce6213d5dd29f18c1c09a
057137c4f02b236d93ff6b5004548965c0e6860b
sickbeard/logger.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -62,7 +62,7 @@ class CensoredFormatter(logging.Formatter, object): if v and len(v) > 0 and v in msg: msg = msg.replace(v, len(v) * '*') # Needed because Newznab apikey isn't stored as key=value in a section. - msg = re.sub('apikey\=[^\&]*\&','apikey\=**********\&', msg) + msg = re.sub(r'(r|apikey|api_key)=[^&]*([&\w]?)',r'\1=**********\2', msg) return msg
msg = re . sub ( 'apikey\=[^\&]*\&' , 'apikey\=**********\&' , msg )
msg = re . sub ( r'(r|apikey|api_key)=[^&]*([&\w]?)' , r'\1=**********\2' , msg )
SINGLE_STMT
[["Move", ["string:'apikey\\=**********\\&'", 3, 41, 3, 63], ["argument_list", 3, 21, 3, 69], 4], ["Update", ["string:'apikey\\=[^\\&]*\\&'", 3, 22, 3, 40], "r'(r|apikey|api_key)=[^&]*([&\\w]?)'"], ["Update", ["string:'apikey\\=**********\\&'", 3, 41, 3, 63], "r'\\1=**********\\2'"], ["Insert", ["argument_list", 3, 21, 3, 69], [",:,", "T"], 4], ["Delete", [",:,", 3, 40, 3, 41]]]
jackkiej/SickRage@6f134dfe095de5dcbf9ce6213d5dd29f18c1c09a
FIX#1292 Masking NZB API Keys in logs * Modified Regex substitution to account for 3 possible keys that the API can be attached to * Modified Regex to account for API Key being at the end of the string or followed by an & or a space * Used capture groups to only mask out the API Key, matched prefix and ending are kept
[ { "sha": "0359b913cc9802f9fceb5bb1d3012f3f47e2dd01", "filename": "sickbeard/logger.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/6f134dfe095de5dcbf9ce6213d5dd29f18c1c09a/sickbeard%2Flogger.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/6f134dfe095de5dcbf9ce6213d5dd29f18c1c09a/sickbeard%2Flogger.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Flogger.py?ref=6f134dfe095de5dcbf9ce6213d5dd29f18c1c09a", "patch": "@@ -62,7 +62,7 @@ def format(self, record):\n if v and len(v) > 0 and v in msg:\n msg = msg.replace(v, len(v) * '*')\n # Needed because Newznab apikey isn't stored as key=value in a section.\n- msg = re.sub('apikey\\=[^\\&]*\\&','apikey\\=**********\\&', msg)\n+ msg = re.sub(r'(r|apikey|api_key)=[^&]*([&\\w]?)',r'\\1=**********\\2', msg)\n return msg\n \n " } ]
SickRage
f24eed5723a83de544eff74957ceb519e9796112
3b922e70dc4555cee8fcf76ba1901c7e073b4bf1
sickbeard/__init__.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -1615,7 +1615,7 @@ def save_config(): new_config['General']['web_username'] = WEB_USERNAME new_config['General']['web_password'] = helpers.encrypt(WEB_PASSWORD, ENCRYPTION_VERSION) new_config['General']['web_cookie_secret'] = WEB_COOKIE_SECRET - new_config['General']['web_use_gzip'] = WEB_USE_GZIP + new_config['General']['web_use_gzip'] = int(WEB_USE_GZIP) new_config['General']['download_url'] = DOWNLOAD_URL new_config['General']['localhost_ip'] = LOCALHOST_IP new_config['General']['cpu_preset'] = CPU_PRESET
new_config [ 'General' ] [ 'web_use_gzip' ] = WEB_USE_GZIP
new_config [ 'General' ] [ 'web_use_gzip' ] = int ( WEB_USE_GZIP )
ADD_FUNCTION_AROUND_EXPRESSION
[["Insert", ["assignment", 3, 5, 3, 57], ["call", "N0"], 2], ["Insert", "N0", ["identifier:int", "T"], 0], ["Insert", "N0", ["argument_list", "N1"], 1], ["Insert", "N1", ["(:(", "T"], 0], ["Move", "N1", ["identifier:WEB_USE_GZIP", 3, 45, 3, 57], 1], ["Insert", "N1", ["):)", "T"], 2]]
jackkiej/SickRage@f24eed5723a83de544eff74957ceb519e9796112
HOTFIX: convert the bool to int for default web_use_gzip config
[ { "sha": "e08ea89a8c2736e12b0ed1664664670fdd961434", "filename": "sickbeard/__init__.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/f24eed5723a83de544eff74957ceb519e9796112/sickbeard%2F__init__.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/f24eed5723a83de544eff74957ceb519e9796112/sickbeard%2F__init__.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2F__init__.py?ref=f24eed5723a83de544eff74957ceb519e9796112", "patch": "@@ -1615,7 +1615,7 @@ def save_config():\n new_config['General']['web_username'] = WEB_USERNAME\n new_config['General']['web_password'] = helpers.encrypt(WEB_PASSWORD, ENCRYPTION_VERSION)\n new_config['General']['web_cookie_secret'] = WEB_COOKIE_SECRET\n- new_config['General']['web_use_gzip'] = WEB_USE_GZIP\n+ new_config['General']['web_use_gzip'] = int(WEB_USE_GZIP)\n new_config['General']['download_url'] = DOWNLOAD_URL\n new_config['General']['localhost_ip'] = LOCALHOST_IP\n new_config['General']['cpu_preset'] = CPU_PRESET" } ]
SickRage
1f94101d0acaae6702f28634533d5087eb69c6f5
50b81987274e704c6e1b9ffdbf1e436368ac2acd
sickbeard/logger.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -62,7 +62,7 @@ class CensoredFormatter(logging.Formatter, object): if v and len(v) > 0 and v in msg: msg = msg.replace(v, len(v) * '*') # Needed because Newznab apikey isn't stored as key=value in a section. - msg = re.sub(r'(r|apikey|api_key)=[^&]*([&\w]?)',r'\1=**********\2', msg) + msg = re.sub(r'([&?]r|[&?]apikey|[&?]api_key)=[^&]*([&\w]?)',r'\1=**********\2', msg) return msg
msg = re . sub ( r'(r|apikey|api_key)=[^&]*([&\w]?)' , r'\1=**********\2' , msg )
msg = re . sub ( r'([&?]r|[&?]apikey|[&?]api_key)=[^&]*([&\w]?)' , r'\1=**********\2' , msg )
CHANGE_STRING_LITERAL
[["Update", ["string:r'(r|apikey|api_key)=[^&]*([&\\w]?)'", 3, 22, 3, 57], "r'([&?]r|[&?]apikey|[&?]api_key)=[^&]*([&\\w]?)'"]]
jackkiej/SickRage@1f94101d0acaae6702f28634533d5087eb69c6f5
Update Regex to be more specific to for replacement Regex was too broad and would replace more than it should have. Fixed with better matching for keys.
[ { "sha": "f5e0d92ffbbda5e0fd300a9ff53922cd24fe0155", "filename": "sickbeard/logger.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/1f94101d0acaae6702f28634533d5087eb69c6f5/sickbeard%2Flogger.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/1f94101d0acaae6702f28634533d5087eb69c6f5/sickbeard%2Flogger.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Flogger.py?ref=1f94101d0acaae6702f28634533d5087eb69c6f5", "patch": "@@ -62,7 +62,7 @@ def format(self, record):\n if v and len(v) > 0 and v in msg:\n msg = msg.replace(v, len(v) * '*')\n # Needed because Newznab apikey isn't stored as key=value in a section.\n- msg = re.sub(r'(r|apikey|api_key)=[^&]*([&\\w]?)',r'\\1=**********\\2', msg)\n+ msg = re.sub(r'([&?]r|[&?]apikey|[&?]api_key)=[^&]*([&\\w]?)',r'\\1=**********\\2', msg)\n return msg\n \n " } ]
SickRage
5a694b13862a4a20ca756e172e7a2001fefcb056
44403bb64f8043db70106e8a88273c6b2f2d4904
sickbeard/db.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -232,7 +232,7 @@ class DBConnection(object): try: return unicode(x, 'utf-8') except: - return unicode(x, sickbeard.SYS_ENCODING) + return unicode(x, sickbeard.SYS_ENCODING,errors="ignore") def _dict_factory(self, cursor, row): d = {}
return unicode ( x , sickbeard . SYS_ENCODING )
return unicode ( x , sickbeard . SYS_ENCODING , errors = "ignore" )
SAME_FUNCTION_MORE_ARGS
[["Insert", ["argument_list", 3, 27, 3, 54], [",:,", "T"], 4], ["Insert", ["argument_list", 3, 27, 3, 54], ["keyword_argument", "N0"], 5], ["Insert", "N0", ["identifier:errors", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["string:\"ignore\"", "T"], 2]]
jackkiej/SickRage@5a694b13862a4a20ca756e172e7a2001fefcb056
Try to fix 'utf8' codec can't decode byte while reading the DB ``` 2015-05-19 11:19:18 Thread-19 :: Failed doing webui callback: Traceback (most recent call last): File "/home/osmc/SickRage/sickbeard/webserve.py", line 258, in async_call result = function(**kwargs) File "/home/osmc/SickRage/sickbeard/webserve.py", line 1174, in displayShow [showObj.indexerid] File "/home/osmc/SickRage/sickbeard/db.py", line 192, in select sqlResults = self.action(query, args, fetchall=True) File "/home/osmc/SickRage/sickbeard/db.py", line 170, in action sqlResult = self.execute(query, args, fetchall=fetchall, fetchone=fetchone) File "/home/osmc/SickRage/sickbeard/db.py", line 86, in execute return self._execute(query, args).fetchall() File "/home/osmc/SickRage/sickbeard/db.py", line 235, in _unicode_text_factory return unicode(x, sickbeard.SYS_ENCODING) File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0x94 in position 0: invalid start byte ```
[ { "sha": "821b11d9e9e1ef6f5c5c8c6de656ab15de664270", "filename": "sickbeard/db.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/5a694b13862a4a20ca756e172e7a2001fefcb056/sickbeard%2Fdb.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/5a694b13862a4a20ca756e172e7a2001fefcb056/sickbeard%2Fdb.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fdb.py?ref=5a694b13862a4a20ca756e172e7a2001fefcb056", "patch": "@@ -232,7 +232,7 @@ def _unicode_text_factory(self, x):\n try:\n return unicode(x, 'utf-8')\n except:\n- return unicode(x, sickbeard.SYS_ENCODING)\n+ return unicode(x, sickbeard.SYS_ENCODING,errors=\"ignore\")\n \n def _dict_factory(self, cursor, row):\n d = {}" } ]
SickRage
016c646bf360b1883e24862797398ad36b503f5c
7528ea829b4bcb168709c7355fd03821e604ea72
sickbeard/providers/newznab.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -423,7 +423,7 @@ class NewznabCache(tvcache.TVCache): tvrageid = 0 for attr in item['newznab_attr'] if isinstance(item['newznab_attr'], list) else [item['newznab_attr']]: - if attr['name'] == 'tvrageid': + if attr['name'] == 'tvrageid' or attr['name'] == 'rageid': tvrageid = int(attr['value'] or 0) break
if attr [ 'name' ] == 'tvrageid' : tvrageid = int ( attr [ 'value' ] or 0 ) break
if attr [ 'name' ] == 'tvrageid' or attr [ 'name' ] == 'rageid' : tvrageid = int ( attr [ 'value' ] or 0 ) break
LESS_SPECIFIC_IF
[["Insert", ["if_statement", 3, 13, 5, 22], ["boolean_operator", "N0"], 1], ["Move", "N0", ["comparison_operator", 3, 16, 3, 42], 0], ["Insert", "N0", ["or:or", "T"], 1], ["Insert", "N0", ["comparison_operator", "N1"], 2], ["Insert", "N1", ["subscript", "N2"], 0], ["Insert", "N1", ["==:==", "T"], 1], ["Insert", "N1", ["string:'rageid'", "T"], 2], ["Insert", "N2", ["identifier:attr", "T"], 0], ["Insert", "N2", ["[:[", "T"], 1], ["Insert", "N2", ["string:'name'", "T"], 2], ["Insert", "N2", ["]:]", "T"], 3]]
jackkiej/SickRage@016c646bf360b1883e24862797398ad36b503f5c
Fix name of attribute that newsznab returns
[ { "sha": "11f6621cc0aca641d5066fe72b495f067f9066ee", "filename": "sickbeard/providers/newznab.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/016c646bf360b1883e24862797398ad36b503f5c/sickbeard%2Fproviders%2Fnewznab.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/016c646bf360b1883e24862797398ad36b503f5c/sickbeard%2Fproviders%2Fnewznab.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fproviders%2Fnewznab.py?ref=016c646bf360b1883e24862797398ad36b503f5c", "patch": "@@ -423,7 +423,7 @@ def _parseItem(self, item):\n \n tvrageid = 0\n for attr in item['newznab_attr'] if isinstance(item['newznab_attr'], list) else [item['newznab_attr']]:\n- if attr['name'] == 'tvrageid':\n+ if attr['name'] == 'tvrageid' or attr['name'] == 'rageid':\n tvrageid = int(attr['value'] or 0)\n break\n " } ]
SickRage
d071fbbcad5d515ba8784d7139027fc42e185987
2a634de4f0b9a7ff6dd43dfe01fe7e0cb0d65699
lib/pynma/pynma.py
https://github.com/jackkiej/SickRage
true
false
false
@@ -6,7 +6,7 @@ from urllib import urlencode __version__ = "0.1" -API_SERVER = 'nma.usk.bz' +API_SERVER = 'www.notifymyandroid.com' ADD_PATH = '/publicapi/notify' USER_AGENT="PyNMA/v%s"%__version__
API_SERVER = 'nma.usk.bz'
API_SERVER = 'www.notifymyandroid.com'
CHANGE_STRING_LITERAL
[["Update", ["string:'nma.usk.bz'", 3, 14, 3, 26], "'www.notifymyandroid.com'"]]
jackkiej/SickRage@d071fbbcad5d515ba8784d7139027fc42e185987
Fix for https://github.com/SiCKRAGETV/sickrage-issues/issues/1691
[ { "sha": "8da9b740248863548c0b772b0a19924f7ebefe28", "filename": "lib/pynma/pynma.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/d071fbbcad5d515ba8784d7139027fc42e185987/lib%2Fpynma%2Fpynma.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/d071fbbcad5d515ba8784d7139027fc42e185987/lib%2Fpynma%2Fpynma.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/lib%2Fpynma%2Fpynma.py?ref=d071fbbcad5d515ba8784d7139027fc42e185987", "patch": "@@ -6,7 +6,7 @@\n \n __version__ = \"0.1\"\n \n-API_SERVER = 'nma.usk.bz'\n+API_SERVER = 'www.notifymyandroid.com'\n ADD_PATH = '/publicapi/notify'\n \n USER_AGENT=\"PyNMA/v%s\"%__version__" } ]
SickRage
6be1f9a383970b2957f803c2e12252677c04d371
d185980c89055f7179deec708141710ce386a572
sickbeard/databases/failed_db.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -28,7 +28,7 @@ class InitialSchema(db.SchemaUpgrade): def execute(self): queries = [ ('CREATE TABLE failed (release TEXT, size NUMERIC, provider TEXT);',), - ('CREATE TABLE history (date NUMERIC, size NUMERIC, release TEXT, provider TEXT, old_status NUMERIC DEFAULT (?), showid NUMERIC DEFAULT -1, season NUMERIC DEFAULT -1, episode NUMERIC DEFAULT -1);', Quality.NONE), + ('CREATE TABLE history (date NUMERIC, size NUMERIC, release TEXT, provider TEXT, old_status NUMERIC DEFAULT 0, showid NUMERIC DEFAULT -1, season NUMERIC DEFAULT -1, episode NUMERIC DEFAULT -1);',), ('CREATE TABLE db_version (db_version INTEGER);',), ('INSERT INTO db_version (db_version) VALUES (1);',), ]
queries = [ ( 'CREATE TABLE failed (release TEXT, size NUMERIC, provider TEXT);' , ) , ( 'CREATE TABLE history (date NUMERIC, size NUMERIC, release TEXT, provider TEXT, old_status NUMERIC DEFAULT (?), showid NUMERIC DEFAULT -1, season NUMERIC DEFAULT -1, episode NUMERIC DEFAULT -1);' , Quality . NONE ) , ( 'CREATE TABLE db_version (db_version INTEGER);' , ) , ( 'INSERT INTO db_version (db_version) VALUES (1);' , ) , ]
queries = [ ( 'CREATE TABLE failed (release TEXT, size NUMERIC, provider TEXT);' , ) , ( 'CREATE TABLE history (date NUMERIC, size NUMERIC, release TEXT, provider TEXT, old_status NUMERIC DEFAULT 0, showid NUMERIC DEFAULT -1, season NUMERIC DEFAULT -1, episode NUMERIC DEFAULT -1);' , ) , ( 'CREATE TABLE db_version (db_version INTEGER);' , ) , ( 'INSERT INTO db_version (db_version) VALUES (1);' , ) , ]
SINGLE_STMT
[["Update", ["string:'CREATE TABLE history (date NUMERIC, size NUMERIC, release TEXT, provider TEXT, old_status NUMERIC DEFAULT (?), showid NUMERIC DEFAULT -1, season NUMERIC DEFAULT -1, episode NUMERIC DEFAULT -1);'", 3, 14, 3, 209], "'CREATE TABLE history (date NUMERIC, size NUMERIC, release TEXT, provider TEXT, old_status NUMERIC DEFAULT 0, showid NUMERIC DEFAULT -1, season NUMERIC DEFAULT -1, episode NUMERIC DEFAULT -1);'"], ["Delete", ["identifier:Quality", 3, 211, 3, 218]], ["Delete", [".:.", 3, 218, 3, 219]], ["Delete", ["identifier:NONE", 3, 219, 3, 223]], ["Delete", ["attribute", 3, 211, 3, 223]]]
jackkiej/SickRage@6be1f9a383970b2957f803c2e12252677c04d371
HOTFIX - SQLite3 on Debian8 had issues creating the db?
[ { "sha": "9d880bf3a3453d6bfe740c3ff9665a768c75977b", "filename": "sickbeard/databases/failed_db.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/6be1f9a383970b2957f803c2e12252677c04d371/sickbeard%2Fdatabases%2Ffailed_db.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/6be1f9a383970b2957f803c2e12252677c04d371/sickbeard%2Fdatabases%2Ffailed_db.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fdatabases%2Ffailed_db.py?ref=6be1f9a383970b2957f803c2e12252677c04d371", "patch": "@@ -28,7 +28,7 @@ def test(self):\n def execute(self):\n queries = [\n ('CREATE TABLE failed (release TEXT, size NUMERIC, provider TEXT);',),\n- ('CREATE TABLE history (date NUMERIC, size NUMERIC, release TEXT, provider TEXT, old_status NUMERIC DEFAULT (?), showid NUMERIC DEFAULT -1, season NUMERIC DEFAULT -1, episode NUMERIC DEFAULT -1);', Quality.NONE),\n+ ('CREATE TABLE history (date NUMERIC, size NUMERIC, release TEXT, provider TEXT, old_status NUMERIC DEFAULT 0, showid NUMERIC DEFAULT -1, season NUMERIC DEFAULT -1, episode NUMERIC DEFAULT -1);',),\n ('CREATE TABLE db_version (db_version INTEGER);',),\n ('INSERT INTO db_version (db_version) VALUES (1);',),\n ]" } ]
SickRage
d61069ae162cf68ca58bc240ccd466b57cea93b4
3565ec70dc924d8117f506983fc18a9351f487e4
sickbeard/providers/hdtorrents.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -218,7 +218,7 @@ class HDTorrentsProvider(generic.TorrentProvider): continue try: - title = entries[22].find('a')['title'].strip('History - ').replace('Blu-ray', 'bd50') + title = entries[22].find('a')['title'].replace('History - ','').replace('Blu-ray', 'bd50') url = self.urls['home'] % entries[15].find('a')['href'] download_url = self.urls['home'] % entries[15].find('a')['href'] id = entries[23].find('div')['id']
title = entries [ 22 ] . find ( 'a' ) [ 'title' ] . strip ( 'History - ' ) . replace ( 'Blu-ray' , 'bd50' )
title = entries [ 22 ] . find ( 'a' ) [ 'title' ] . replace ( 'History - ' , '' ) . replace ( 'Blu-ray' , 'bd50' )
SINGLE_STMT
[["Update", ["identifier:strip", 3, 68, 3, 73], "replace"], ["Insert", ["argument_list", 3, 73, 3, 87], [",:,", "T"], 2], ["Insert", ["argument_list", 3, 73, 3, 87], ["string:''", "T"], 3]]
jackkiej/SickRage@d61069ae162cf68ca58bc240ccd466b57cea93b4
Fix HDT removing first letter of the file
[ { "sha": "ea5c5e8a98f5fb217ebdedef80e7fb7008bfdf57", "filename": "sickbeard/providers/hdtorrents.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/d61069ae162cf68ca58bc240ccd466b57cea93b4/sickbeard%2Fproviders%2Fhdtorrents.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/d61069ae162cf68ca58bc240ccd466b57cea93b4/sickbeard%2Fproviders%2Fhdtorrents.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fproviders%2Fhdtorrents.py?ref=d61069ae162cf68ca58bc240ccd466b57cea93b4", "patch": "@@ -218,7 +218,7 @@ def _doSearch(self, search_params, search_mode='eponly', epcount=0, age=0, epObj\n continue\n \n try:\n- title = entries[22].find('a')['title'].strip('History - ').replace('Blu-ray', 'bd50')\n+ title = entries[22].find('a')['title'].replace('History - ','').replace('Blu-ray', 'bd50')\n url = self.urls['home'] % entries[15].find('a')['href']\n download_url = self.urls['home'] % entries[15].find('a')['href']\n id = entries[23].find('div')['id']" } ]
scikit-learn
d3a68e759c708a0b7594d83a9bdf01ef45233ff7
4738876a461d0b3926f693c85636b70dececc64f
sklearn/semi_supervised/label_propagation.py
https://github.com/paulha/scikit-learn
true
false
true
@@ -380,7 +380,7 @@ class LabelPropagation(BaseLabelPropagation): _variant = 'propagation' def __init__(self, kernel='rbf', gamma=20, n_neighbors=7, - alpha=None, max_iter=30, tol=1e-3, n_jobs=1): + alpha=None, max_iter=1000, tol=1e-3, n_jobs=1): super(LabelPropagation, self).__init__( kernel=kernel, gamma=gamma, n_neighbors=n_neighbors, alpha=alpha, max_iter=max_iter, tol=tol, n_jobs=n_jobs)
def __init__ ( self , kernel = 'rbf' , gamma = 20 , n_neighbors = 7 , alpha = None , max_iter = 30 , tol = 1e-3 , n_jobs = 1 ) : super ( LabelPropagation , self ) . __init__ ( kernel = kernel , gamma = gamma , n_neighbors = n_neighbors , alpha = alpha , max_iter = max_iter , tol = tol , n_jobs = n_jobs )
def __init__ ( self , kernel = 'rbf' , gamma = 20 , n_neighbors = 7 , alpha = None , max_iter = 1000 , tol = 1e-3 , n_jobs = 1 ) : super ( LabelPropagation , self ) . __init__ ( kernel = kernel , gamma = gamma , n_neighbors = n_neighbors , alpha = alpha , max_iter = max_iter , tol = tol , n_jobs = n_jobs )
CHANGE_NUMERIC_LITERAL
[["Update", ["integer:30", 3, 39, 3, 41], "1000"]]
paulha/scikit-learn@d3a68e759c708a0b7594d83a9bdf01ef45233ff7
Increase the max_iter for LabelPropagation. (#9441) LabelPropagation converges much slower than LabelSpreading. The default of max_iter=30 works well for LabelSpreading but not for LabelPropagation. This was extracted from #5893.
[ { "sha": "c690ac1f151f4a35dcb1acc6b5d4bbbece00767a", "filename": "sklearn/semi_supervised/label_propagation.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/paulha/scikit-learn/blob/d3a68e759c708a0b7594d83a9bdf01ef45233ff7/sklearn%2Fsemi_supervised%2Flabel_propagation.py", "raw_url": "https://github.com/paulha/scikit-learn/raw/d3a68e759c708a0b7594d83a9bdf01ef45233ff7/sklearn%2Fsemi_supervised%2Flabel_propagation.py", "contents_url": "https://api.github.com/repos/paulha/scikit-learn/contents/sklearn%2Fsemi_supervised%2Flabel_propagation.py?ref=d3a68e759c708a0b7594d83a9bdf01ef45233ff7", "patch": "@@ -380,7 +380,7 @@ class LabelPropagation(BaseLabelPropagation):\n _variant = 'propagation'\n \n def __init__(self, kernel='rbf', gamma=20, n_neighbors=7,\n- alpha=None, max_iter=30, tol=1e-3, n_jobs=1):\n+ alpha=None, max_iter=1000, tol=1e-3, n_jobs=1):\n super(LabelPropagation, self).__init__(\n kernel=kernel, gamma=gamma, n_neighbors=n_neighbors, alpha=alpha,\n max_iter=max_iter, tol=tol, n_jobs=n_jobs)" } ]
scikit-learn
0d961f032cd8e2a1e9e8c72feb410029ab6c4d1a
099018f9bfe29915dd24661bd85579785a7c843d
sklearn/tests/test_docstring_parameters.py
https://github.com/paulha/scikit-learn
true
false
false
@@ -45,7 +45,7 @@ IGNORED_MODULES = ( 'setup', 'svm', 'utils', - 'neighbors' + 'neighbors', # Deprecated modules 'cross_validation', 'grid_search',
'neighbors'
'neighbors' ,
SINGLE_STMT
[["Insert", ["expression_statement", 3, 5, 3, 16], [",:,", "T"], 1]]
paulha/scikit-learn@0d961f032cd8e2a1e9e8c72feb410029ab6c4d1a
FIX Insert missing comma
[ { "sha": "b8c60e88ba74793e7e80651e99617f925db36fb5", "filename": "sklearn/tests/test_docstring_parameters.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/paulha/scikit-learn/blob/0d961f032cd8e2a1e9e8c72feb410029ab6c4d1a/sklearn%2Ftests%2Ftest_docstring_parameters.py", "raw_url": "https://github.com/paulha/scikit-learn/raw/0d961f032cd8e2a1e9e8c72feb410029ab6c4d1a/sklearn%2Ftests%2Ftest_docstring_parameters.py", "contents_url": "https://api.github.com/repos/paulha/scikit-learn/contents/sklearn%2Ftests%2Ftest_docstring_parameters.py?ref=0d961f032cd8e2a1e9e8c72feb410029ab6c4d1a", "patch": "@@ -45,7 +45,7 @@\n 'setup',\n 'svm',\n 'utils',\n- 'neighbors'\n+ 'neighbors',\n # Deprecated modules\n 'cross_validation',\n 'grid_search'," } ]
scikit-learn
9c8541f3c525da3fde6ffe9aa5c5b0db48195782
b41c3c7b024715d5dd07544ce5c8af2791216982
sklearn/tree/export.py
https://github.com/paulha/scikit-learn
true
false
false
@@ -92,7 +92,7 @@ def export_graphviz(decision_tree, out_file=SENTINEL, max_depth=None, Parameters ---------- - decision_tree : decision tree classifier + decision_tree : decision tree regressor or classifier The decision tree to be exported to GraphViz. out_file : file object or string, optional (default='tree.dot')
- - - - - - - - - - decision_tree : decision tree classifier
- - - - - - - - - - decision_tree : decision tree regressor or classifier
SINGLE_STMT
[["Insert", ["expression_statement", 2, 5, 3, 45], ["boolean_operator", "N0"], 0], ["Move", "N0", ["unary_operator", 2, 5, 3, 45], 0], ["Insert", "N0", ["or:or", "T"], 1], ["Insert", "N0", ["identifier:classifier", "T"], 2], ["Update", ["identifier:classifier", 3, 35, 3, 45], "regressor"]]
paulha/scikit-learn@9c8541f3c525da3fde6ffe9aa5c5b0db48195782
added tree of type "regressor" to the docstring of exportviz (#9530)
[ { "sha": "3d7f15426e50f5df23045e01fd84837e3bf75799", "filename": "sklearn/tree/export.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/paulha/scikit-learn/blob/9c8541f3c525da3fde6ffe9aa5c5b0db48195782/sklearn%2Ftree%2Fexport.py", "raw_url": "https://github.com/paulha/scikit-learn/raw/9c8541f3c525da3fde6ffe9aa5c5b0db48195782/sklearn%2Ftree%2Fexport.py", "contents_url": "https://api.github.com/repos/paulha/scikit-learn/contents/sklearn%2Ftree%2Fexport.py?ref=9c8541f3c525da3fde6ffe9aa5c5b0db48195782", "patch": "@@ -92,7 +92,7 @@ def export_graphviz(decision_tree, out_file=SENTINEL, max_depth=None,\n \n Parameters\n ----------\n- decision_tree : decision tree classifier\n+ decision_tree : decision tree regressor or classifier\n The decision tree to be exported to GraphViz.\n \n out_file : file object or string, optional (default='tree.dot')" } ]
Twitter-Follow-and-Unfollow-Bot
e44ba0d6fb171b9577b2d6e2f1bb0bb6e6311758
ecc6e0168d79893138819e23276c4a84d5af45d8
FollowUnfollowBot.py
https://github.com/luisramirez-m/Twitter-Follow-and-Unfollow-Bot
true
false
false
@@ -353,5 +353,5 @@ def Continue(): # runs the main function, which runs everything else. -if __init__ == "__main__": +if __name__ == "__main__": main_menu()
if __init__ == "__main__" : main_menu ( )
if __name__ == "__main__" : main_menu ( )
CHANGE_IDENTIFIER_USED
[["Update", ["identifier:__init__", 3, 4, 3, 12], "__name__"]]
luisramirez-m/Twitter-Follow-and-Unfollow-Bot@e44ba0d6fb171b9577b2d6e2f1bb0bb6e6311758
Fixed error
[ { "sha": "be155c4821d4b0e7071c710c592515e35311b2b4", "filename": "FollowUnfollowBot.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/luisramirez-m/Twitter-Follow-and-Unfollow-Bot/blob/e44ba0d6fb171b9577b2d6e2f1bb0bb6e6311758/FollowUnfollowBot.py", "raw_url": "https://github.com/luisramirez-m/Twitter-Follow-and-Unfollow-Bot/raw/e44ba0d6fb171b9577b2d6e2f1bb0bb6e6311758/FollowUnfollowBot.py", "contents_url": "https://api.github.com/repos/luisramirez-m/Twitter-Follow-and-Unfollow-Bot/contents/FollowUnfollowBot.py?ref=e44ba0d6fb171b9577b2d6e2f1bb0bb6e6311758", "patch": "@@ -353,5 +353,5 @@ def Continue():\n \n \n # runs the main function, which runs everything else.\n-if __init__ == \"__main__\": \n+if __name__ == \"__main__\": \n main_menu()" } ]
Twitter-Follow-and-Unfollow-Bot
7c2420ebd2f61fb3b35b4f873236a80ccb2c6563
271a033d0797d0eae2810cc14d9b484d28c540d8
FollowUnfollowBot.py
https://github.com/luisramirez-m/Twitter-Follow-and-Unfollow-Bot
true
false
true
@@ -141,7 +141,7 @@ def follow_all(followers, following, total_followed, whitelisted_users, blacklis # function to follow users based on a keyword: def follow_keyword(followers, following, total_followed, whitelisted_users, blacklisted_users): - with open('keywords.txt') as keywords_text: + with open('keywords.txt', 'r', encoding="utf-8") as keywords_text: keywords = keywords_text.read().splitlines() for i in keywords: # gets search result
with open ( 'keywords.txt' ) as keywords_text : keywords = keywords_text . read ( ) . splitlines ( )
with open ( 'keywords.txt' , 'r' , encoding = "utf-8" ) as keywords_text : keywords = keywords_text . read ( ) . splitlines ( )
SAME_FUNCTION_MORE_ARGS
[["Insert", ["argument_list", 3, 14, 3, 30], [",:,", "T"], 2], ["Insert", ["argument_list", 3, 14, 3, 30], ["string:'r'", "T"], 3], ["Insert", ["argument_list", 3, 14, 3, 30], [",:,", "T"], 4], ["Insert", ["argument_list", 3, 14, 3, 30], ["keyword_argument", "N0"], 5], ["Insert", "N0", ["identifier:encoding", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["string:\"utf-8\"", "T"], 2]]
luisramirez-m/Twitter-Follow-and-Unfollow-Bot@7c2420ebd2f61fb3b35b4f873236a80ccb2c6563
fix encoding issue in follow_keywords
[ { "sha": "fcb2ed86569bc7581426a30150756cddf7ea48bc", "filename": "FollowUnfollowBot.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/luisramirez-m/Twitter-Follow-and-Unfollow-Bot/blob/7c2420ebd2f61fb3b35b4f873236a80ccb2c6563/FollowUnfollowBot.py", "raw_url": "https://github.com/luisramirez-m/Twitter-Follow-and-Unfollow-Bot/raw/7c2420ebd2f61fb3b35b4f873236a80ccb2c6563/FollowUnfollowBot.py", "contents_url": "https://api.github.com/repos/luisramirez-m/Twitter-Follow-and-Unfollow-Bot/contents/FollowUnfollowBot.py?ref=7c2420ebd2f61fb3b35b4f873236a80ccb2c6563", "patch": "@@ -141,7 +141,7 @@ def follow_all(followers, following, total_followed, whitelisted_users, blacklis\n \n # function to follow users based on a keyword:\n def follow_keyword(followers, following, total_followed, whitelisted_users, blacklisted_users):\n- with open('keywords.txt') as keywords_text:\n+ with open('keywords.txt', 'r', encoding=\"utf-8\") as keywords_text:\n keywords = keywords_text.read().splitlines()\n for i in keywords:\n # gets search result" } ]
interiit_project
88230c87ec96703477b249230bed260e360d79fc
35cbeaf703a13d69019ceda413625ba2def24852
interiit_project/settings.py
https://github.com/phoenixnitin/interiit_project
true
false
false
@@ -132,4 +132,4 @@ USE_TZ = True # https://docs.djangoproject.com/en/1.11/howto/static-files/ STATIC_URL = '/static/' -STATIC_ROOT = os.path.join(BASE_DIR, 'interiit_app/static/') +STATIC_ROOT = os.path.join(BASE_DIR, 'static/')
STATIC_ROOT = os . path . join ( BASE_DIR , 'interiit_app/static/' )
STATIC_ROOT = os . path . join ( BASE_DIR , 'static/' )
CHANGE_STRING_LITERAL
[["Update", ["string:'interiit_app/static/'", 3, 38, 3, 60], "'static/'"]]
phoenixnitin/interiit_project@88230c87ec96703477b249230bed260e360d79fc
rest_framework fixed for deploy
[ { "sha": "fca22190cc7c999fb3fde268e985e42a289119ae", "filename": "interiit_project/settings.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/phoenixnitin/interiit_project/blob/88230c87ec96703477b249230bed260e360d79fc/interiit_project%2Fsettings.py", "raw_url": "https://github.com/phoenixnitin/interiit_project/raw/88230c87ec96703477b249230bed260e360d79fc/interiit_project%2Fsettings.py", "contents_url": "https://api.github.com/repos/phoenixnitin/interiit_project/contents/interiit_project%2Fsettings.py?ref=88230c87ec96703477b249230bed260e360d79fc", "patch": "@@ -132,4 +132,4 @@\n # https://docs.djangoproject.com/en/1.11/howto/static-files/\n \n STATIC_URL = '/static/'\n-STATIC_ROOT = os.path.join(BASE_DIR, 'interiit_app/static/')\n+STATIC_ROOT = os.path.join(BASE_DIR, 'static/')" } ]
datavault-api-test
d4dde3ee5ead142d47957222628bb0fd7f303a73
283e5cd9593c265deb56cb92090dee1e66e2507c
api_test.py
https://github.com/tomhigginsuom/datavault-api-test
true
false
false
@@ -162,7 +162,7 @@ for x in range(0,10): while(len(tracked_depositIds) > 0): print("") - print("Tracking " + str(len(tracked_deposits)) + " deposits:") + print("Tracking " + str(len(tracked_depositIds)) + " deposits:") for tracked_depositId in tracked_depositIds: deposit = get_deposit(vaultId, tracked_depositId) print("Deposit: " + tracked_depositIds + " - " + deposit['status'])
print ( "Tracking " + str ( len ( tracked_deposits ) ) + " deposits:" )
print ( "Tracking " + str ( len ( tracked_depositIds ) ) + " deposits:" )
CHANGE_IDENTIFIER_USED
[["Update", ["identifier:tracked_deposits", 3, 31, 3, 47], "tracked_depositIds"]]
tomhigginsuom/datavault-api-test@d4dde3ee5ead142d47957222628bb0fd7f303a73
Fix ref
[ { "sha": "60839ee158062b380a4e53b749791a65fb9b07d5", "filename": "api_test.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/tomhigginsuom/datavault-api-test/blob/d4dde3ee5ead142d47957222628bb0fd7f303a73/api_test.py", "raw_url": "https://github.com/tomhigginsuom/datavault-api-test/raw/d4dde3ee5ead142d47957222628bb0fd7f303a73/api_test.py", "contents_url": "https://api.github.com/repos/tomhigginsuom/datavault-api-test/contents/api_test.py?ref=d4dde3ee5ead142d47957222628bb0fd7f303a73", "patch": "@@ -162,7 +162,7 @@ def dump_info():\n \n while(len(tracked_depositIds) > 0):\n print(\"\")\n- print(\"Tracking \" + str(len(tracked_deposits)) + \" deposits:\")\n+ print(\"Tracking \" + str(len(tracked_depositIds)) + \" deposits:\")\n for tracked_depositId in tracked_depositIds:\n deposit = get_deposit(vaultId, tracked_depositId)\n print(\"Deposit: \" + tracked_depositIds + \" - \" + deposit['status'])" } ]
datavault-api-test
da7d96d11028c6535c7df8568a20ae764b7f9393
6c2aa7187269f6ded79c0fa821cef0edd80c4107
api_test.py
https://github.com/tomhigginsuom/datavault-api-test
true
false
true
@@ -110,7 +110,7 @@ def clear_directory(path): print("unlink: " + f) os.unlink(os.path.join(root, f)) for d in dirs: - print("rmtree: " + f) + print("rmtree: " + d) shutil.rmtree(os.path.join(root, d)) def generate_test_data():
print ( "rmtree: " + f )
print ( "rmtree: " + d )
CHANGE_BINARY_OPERAND
[["Update", ["identifier:f", 3, 26, 3, 27], "d"]]
tomhigginsuom/datavault-api-test@da7d96d11028c6535c7df8568a20ae764b7f9393
Fix logging
[ { "sha": "c8082f19c294418c760ec3eb7895fa26eac8637a", "filename": "api_test.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/tomhigginsuom/datavault-api-test/blob/da7d96d11028c6535c7df8568a20ae764b7f9393/api_test.py", "raw_url": "https://github.com/tomhigginsuom/datavault-api-test/raw/da7d96d11028c6535c7df8568a20ae764b7f9393/api_test.py", "contents_url": "https://api.github.com/repos/tomhigginsuom/datavault-api-test/contents/api_test.py?ref=da7d96d11028c6535c7df8568a20ae764b7f9393", "patch": "@@ -110,7 +110,7 @@ def clear_directory(path):\n print(\"unlink: \" + f)\n os.unlink(os.path.join(root, f))\n for d in dirs:\n- print(\"rmtree: \" + f)\n+ print(\"rmtree: \" + d)\n shutil.rmtree(os.path.join(root, d))\n \n def generate_test_data():" } ]
datavault-api-test
49edaec01ba4ca3069d1645011dc00f14b930b78
2cfc70e5e19b9fd3b5df3a79d04a27491b61e218
api_test.py
https://github.com/tomhigginsuom/datavault-api-test
true
false
false
@@ -166,7 +166,7 @@ print("Created file store: " + filestoreId) tracked_deposits = [] for x in range(0,4): - vault = create_vault("Test vault " + str(x), "Automatically created vault", vault_policy, vault_group) + vault = create_vault("Test vault " + str(x), "Automatically created vault", vault_policy, vault_group, vault_dataset) vaultId = vault['id'] print("Created vault with ID: " + vaultId)
vault = create_vault ( "Test vault " + str ( x ) , "Automatically created vault" , vault_policy , vault_group )
vault = create_vault ( "Test vault " + str ( x ) , "Automatically created vault" , vault_policy , vault_group , vault_dataset )
SAME_FUNCTION_MORE_ARGS
[["Insert", ["argument_list", 3, 23, 3, 105], [",:,", "T"], 8], ["Insert", ["argument_list", 3, 23, 3, 105], ["identifier:vault_dataset", "T"], 9]]
tomhigginsuom/datavault-api-test@49edaec01ba4ca3069d1645011dc00f14b930b78
Fix call to create_vault
[ { "sha": "7884d33b1dfad842a1203a72458aa2ff97f83ef6", "filename": "api_test.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/tomhigginsuom/datavault-api-test/blob/49edaec01ba4ca3069d1645011dc00f14b930b78/api_test.py", "raw_url": "https://github.com/tomhigginsuom/datavault-api-test/raw/49edaec01ba4ca3069d1645011dc00f14b930b78/api_test.py", "contents_url": "https://api.github.com/repos/tomhigginsuom/datavault-api-test/contents/api_test.py?ref=49edaec01ba4ca3069d1645011dc00f14b930b78", "patch": "@@ -166,7 +166,7 @@ def dump_info():\n tracked_deposits = []\n \n for x in range(0,4):\n- vault = create_vault(\"Test vault \" + str(x), \"Automatically created vault\", vault_policy, vault_group)\n+ vault = create_vault(\"Test vault \" + str(x), \"Automatically created vault\", vault_policy, vault_group, vault_dataset)\n vaultId = vault['id']\n print(\"Created vault with ID: \" + vaultId)\n " } ]
folderpodgen
d0f26a57b4cc34436b47e27890b853e462a6a71c
020a9ed41b20324f27641605cf58b8a12b8ac918
folderpodgen.py
https://github.com/lgaggini/folderpodgen
true
false
false
@@ -95,7 +95,7 @@ def generate(name, description, website, explicit, image, author_name, logging.debug('Episode url: %s' % (episode_url)) e.media = Media(episode_url, size, type='audio/mpeg') e.media.populate_duration_from(fpath) - pubdate = datetime.strptime(tag['TDRC'][0].text, '%Y-%m-%d') + pubdate = datetime.strptime(tag['TDRC'][0].text[:10], '%Y-%m-%d') pubdate = pubdate.replace(tzinfo=pytz.utc) e.publication_date = pubdate if blog:
pubdate = datetime . strptime ( tag [ 'TDRC' ] [ 0 ] . text , '%Y-%m-%d' )
pubdate = datetime . strptime ( tag [ 'TDRC' ] [ 0 ] . text [ : 10 ] , '%Y-%m-%d' )
SINGLE_STMT
[["Insert", ["argument_list", 3, 36, 3, 69], ["subscript", "N0"], 1], ["Move", "N0", ["attribute", 3, 37, 3, 56], 0], ["Insert", "N0", ["[:[", "T"], 1], ["Insert", "N0", ["slice", "N1"], 2], ["Insert", "N0", ["]:]", "T"], 3], ["Insert", "N1", [":::", "T"], 0], ["Insert", "N1", ["integer:10", "T"], 1]]
lgaggini/folderpodgen@d0f26a57b4cc34436b47e27890b853e462a6a71c
fixes date parsing
[ { "sha": "0d6463bb5c6d0956ec87339cce0e36de67791d6b", "filename": "folderpodgen.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/lgaggini/folderpodgen/blob/d0f26a57b4cc34436b47e27890b853e462a6a71c/folderpodgen.py", "raw_url": "https://github.com/lgaggini/folderpodgen/raw/d0f26a57b4cc34436b47e27890b853e462a6a71c/folderpodgen.py", "contents_url": "https://api.github.com/repos/lgaggini/folderpodgen/contents/folderpodgen.py?ref=d0f26a57b4cc34436b47e27890b853e462a6a71c", "patch": "@@ -95,7 +95,7 @@ def generate(name, description, website, explicit, image, author_name,\n logging.debug('Episode url: %s' % (episode_url))\n e.media = Media(episode_url, size, type='audio/mpeg')\n e.media.populate_duration_from(fpath)\n- pubdate = datetime.strptime(tag['TDRC'][0].text, '%Y-%m-%d')\n+ pubdate = datetime.strptime(tag['TDRC'][0].text[:10], '%Y-%m-%d')\n pubdate = pubdate.replace(tzinfo=pytz.utc)\n e.publication_date = pubdate\n if blog:" } ]
folderpodgen
2bbc0afc089407f1177fd9bdeb299b4f434d9899
d0f26a57b4cc34436b47e27890b853e462a6a71c
setup.py
https://github.com/lgaggini/folderpodgen
true
false
false
@@ -7,7 +7,7 @@ setup( name='folderpodgen', version='0.2', author_email='lg@lgaggini.net', - url='https://github.com/lgaggini/drowse', + url='https://github.com/lgaggini/folderpodgen', license='LICENSE', py_modules=['folderpodgen'], keywords=['PODCAST', 'MP3', 'RSS'],
url = 'https://github.com/lgaggini/drowse' ,
url = 'https://github.com/lgaggini/folderpodgen' ,
CHANGE_STRING_LITERAL
[["Update", ["string:'https://github.com/lgaggini/drowse'", 3, 9, 3, 45], "'https://github.com/lgaggini/folderpodgen'"]]
lgaggini/folderpodgen@2bbc0afc089407f1177fd9bdeb299b4f434d9899
fixes project ulr
[ { "sha": "949b63ebdb84109930215c739edaf02e38fb1229", "filename": "setup.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/lgaggini/folderpodgen/blob/2bbc0afc089407f1177fd9bdeb299b4f434d9899/setup.py", "raw_url": "https://github.com/lgaggini/folderpodgen/raw/2bbc0afc089407f1177fd9bdeb299b4f434d9899/setup.py", "contents_url": "https://api.github.com/repos/lgaggini/folderpodgen/contents/setup.py?ref=2bbc0afc089407f1177fd9bdeb299b4f434d9899", "patch": "@@ -7,7 +7,7 @@\n name='folderpodgen',\n version='0.2',\n author_email='lg@lgaggini.net',\n- url='https://github.com/lgaggini/drowse',\n+ url='https://github.com/lgaggini/folderpodgen',\n license='LICENSE',\n py_modules=['folderpodgen'],\n keywords=['PODCAST', 'MP3', 'RSS']," } ]
SickRage
e5addcc787feb23fc5a9ea500187b50f234bd9a4
5b5446030ea3c0a1e403cb3f1a02c804e20c2196
sickbeard/common.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -280,7 +280,7 @@ class Quality: if (checkName([r"480p|web.?dl|web(rip|mux|hd)|[sph]d.?tv|dsr|tv(rip|mux)|satrip", r"xvid|divx|[xh].?26[45]"], all) and not checkName([r"(720|1080)[pi]"], all) and not checkName([r"hr.ws.pdtv.[xh].?26[45]"], any)): ret = Quality.SDTV - elif (checkName([r"dvd(rip|mux)|b[rd](rip|mux)|blue?-?ray", r"xvid|divx|[xh].?26[45]"], any) + elif (checkName([r"dvd(rip|mux)|b[rd](rip|mux)|blue?-?ray", r"xvid|divx|[xh].?26[45]"], all) and not checkName([r"(720|1080)[pi]"], all) and not checkName([r"hr.ws.pdtv.[xh].?26[45]"], any)): ret = Quality.SDDVD elif (checkName([r"720p", r"hd.?tv", r"[xh].?26[45]"], all) or checkName([r"hr.ws.pdtv.[xh].?26[45]"], any)
if ( checkName ( [ r"480p|web.?dl|web(rip|mux|hd)|[sph]d.?tv|dsr|tv(rip|mux)|satrip" , r"xvid|divx|[xh].?26[45]" ] , all ) and not checkName ( [ r"(720|1080)[pi]" ] , all ) and not checkName ( [ r"hr.ws.pdtv.[xh].?26[45]" ] , any ) ) : ret = Quality . SDTV elif ( checkName ( [ r"dvd(rip|mux)|b[rd](rip|mux)|blue?-?ray" , r"xvid|divx|[xh].?26[45]" ] , any ) and not checkName ( [ r"(720|1080)[pi]" ] , all ) and not checkName ( [ r"hr.ws.pdtv.[xh].?26[45]" ] , any ) ) : ret = Quality . SDDVD
if ( checkName ( [ r"480p|web.?dl|web(rip|mux|hd)|[sph]d.?tv|dsr|tv(rip|mux)|satrip" , r"xvid|divx|[xh].?26[45]" ] , all ) and not checkName ( [ r"(720|1080)[pi]" ] , all ) and not checkName ( [ r"hr.ws.pdtv.[xh].?26[45]" ] , any ) ) : ret = Quality . SDTV elif ( checkName ( [ r"dvd(rip|mux)|b[rd](rip|mux)|blue?-?ray" , r"xvid|divx|[xh].?26[45]" ] , all ) and not checkName ( [ r"(720|1080)[pi]" ] , all ) and not checkName ( [ r"hr.ws.pdtv.[xh].?26[45]" ] , any ) ) : ret = Quality . SDDVD
CHANGE_IDENTIFIER_USED
[["Update", ["identifier:any", 3, 97, 3, 100], "all"]]
jackkiej/SickRage@e5addcc787feb23fc5a9ea500187b50f234bd9a4
Fix problem where anything that was not SD was being detected as SDDVD if it included "dvd(rip|mux)|b[rd](rip|mux)|blue?-?ray" or "xvid|divx|[xh].?26[45]" Fixes https://github.com/SiCKRAGETV/sickrage-issues/issues/3494
[ { "sha": "2364b05fe8af93177fe2a25142cf14faa2bc7ee6", "filename": "sickbeard/common.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/e5addcc787feb23fc5a9ea500187b50f234bd9a4/sickbeard%2Fcommon.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/e5addcc787feb23fc5a9ea500187b50f234bd9a4/sickbeard%2Fcommon.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fcommon.py?ref=e5addcc787feb23fc5a9ea500187b50f234bd9a4", "patch": "@@ -280,7 +280,7 @@ def sceneQuality(name, anime=False):\n if (checkName([r\"480p|web.?dl|web(rip|mux|hd)|[sph]d.?tv|dsr|tv(rip|mux)|satrip\", r\"xvid|divx|[xh].?26[45]\"], all)\n and not checkName([r\"(720|1080)[pi]\"], all) and not checkName([r\"hr.ws.pdtv.[xh].?26[45]\"], any)):\n ret = Quality.SDTV\n- elif (checkName([r\"dvd(rip|mux)|b[rd](rip|mux)|blue?-?ray\", r\"xvid|divx|[xh].?26[45]\"], any)\n+ elif (checkName([r\"dvd(rip|mux)|b[rd](rip|mux)|blue?-?ray\", r\"xvid|divx|[xh].?26[45]\"], all)\n and not checkName([r\"(720|1080)[pi]\"], all) and not checkName([r\"hr.ws.pdtv.[xh].?26[45]\"], any)):\n ret = Quality.SDDVD\n elif (checkName([r\"720p\", r\"hd.?tv\", r\"[xh].?26[45]\"], all) or checkName([r\"hr.ws.pdtv.[xh].?26[45]\"], any)" } ]
SickRage
713654b7f532375e83d41999da1a66c0b0f9fb4d
d29f5261b7cb38fe157594c67f1829204235a42d
sickbeard/__init__.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -1270,7 +1270,7 @@ def initialize(consoleLogging=True): if hasattr(curTorrentProvider, 'append_identifier'): curTorrentProvider.append_identifier = check_setting_str(CFG, curTorrentProvider.getID().upper(), - curTorrentProvider.getID() + '_append_identifier', '[' + curTorrentProvider.name + ']') + curTorrentProvider.getID() + '_append_identifier', '') if hasattr(curTorrentProvider, 'sorting'): curTorrentProvider.sorting = check_setting_str(CFG, curTorrentProvider.getID().upper(),
curTorrentProvider . append_identifier = check_setting_str ( CFG , curTorrentProvider . getID ( ) . upper ( ) , curTorrentProvider . getID ( ) + '_append_identifier' , '[' + curTorrentProvider . name + ']' )
curTorrentProvider . append_identifier = check_setting_str ( CFG , curTorrentProvider . getID ( ) . upper ( ) , curTorrentProvider . getID ( ) + '_append_identifier' , '' )
SINGLE_STMT
[["Update", ["string:'['", 3, 125, 3, 128], "''"], ["Move", ["argument_list", 2, 73, 3, 161], ["string:'['", 3, 125, 3, 128], 7], ["Delete", ["+:+", 3, 129, 3, 130]], ["Delete", ["identifier:curTorrentProvider", 3, 131, 3, 149]], ["Delete", [".:.", 3, 149, 3, 150]], ["Delete", ["identifier:name", 3, 150, 3, 154]], ["Delete", ["attribute", 3, 131, 3, 154]], ["Delete", ["binary_operator", 3, 125, 3, 154]], ["Delete", ["+:+", 3, 155, 3, 156]], ["Delete", ["string:']'", 3, 157, 3, 160]], ["Delete", ["binary_operator", 3, 125, 3, 160]]]
jackkiej/SickRage@713654b7f532375e83d41999da1a66c0b0f9fb4d
Make the "Append identifier" option blank by default to avoid n00b users confusion
[ { "sha": "09506ea4d93eb0a9530eb6bd1b0f780247d62753", "filename": "sickbeard/__init__.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/713654b7f532375e83d41999da1a66c0b0f9fb4d/sickbeard%2F__init__.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/713654b7f532375e83d41999da1a66c0b0f9fb4d/sickbeard%2F__init__.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2F__init__.py?ref=713654b7f532375e83d41999da1a66c0b0f9fb4d", "patch": "@@ -1270,7 +1270,7 @@ def path_leaf(path):\n \n if hasattr(curTorrentProvider, 'append_identifier'):\n curTorrentProvider.append_identifier = check_setting_str(CFG, curTorrentProvider.getID().upper(),\n- curTorrentProvider.getID() + '_append_identifier', '[' + curTorrentProvider.name + ']')\n+ curTorrentProvider.getID() + '_append_identifier', '')\n \n if hasattr(curTorrentProvider, 'sorting'):\n curTorrentProvider.sorting = check_setting_str(CFG, curTorrentProvider.getID().upper()," } ]
SickRage
6c1b489e0057c3fbb482c5a685c5f33eca7dbf4a
7d46a313069421cc152457ae53592e703e5383c6
sickbeard/__init__.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -1266,7 +1266,7 @@ def initialize(consoleLogging=True): if hasattr(curTorrentProvider, 'onlyspasearch'): curTorrentProvider.onlyspasearch = bool(check_setting_int(CFG, curTorrentProvider.getID().upper(), - curTorrentProvider.getID() + '_onlyspasearch', 1)) + curTorrentProvider.getID() + '_onlyspasearch', 0)) if hasattr(curTorrentProvider, 'append_identifier'): curTorrentProvider.append_identifier = check_setting_str(CFG, curTorrentProvider.getID().upper(),
curTorrentProvider . onlyspasearch = bool ( check_setting_int ( CFG , curTorrentProvider . getID ( ) . upper ( ) , curTorrentProvider . getID ( ) + '_onlyspasearch' , 1 ) )
curTorrentProvider . onlyspasearch = bool ( check_setting_int ( CFG , curTorrentProvider . getID ( ) . upper ( ) , curTorrentProvider . getID ( ) + '_onlyspasearch' , 0 ) )
CHANGE_NUMERIC_LITERAL
[["Update", ["integer:1", 3, 122, 3, 123], "0"]]
jackkiej/SickRage@6c1b489e0057c3fbb482c5a685c5f33eca7dbf4a
Make ,only download spanish results disabled by default aka n00b proof...
[ { "sha": "3ae461cc198702de12d8e2c111e7b73c1a1f1307", "filename": "sickbeard/__init__.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/6c1b489e0057c3fbb482c5a685c5f33eca7dbf4a/sickbeard%2F__init__.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/6c1b489e0057c3fbb482c5a685c5f33eca7dbf4a/sickbeard%2F__init__.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2F__init__.py?ref=6c1b489e0057c3fbb482c5a685c5f33eca7dbf4a", "patch": "@@ -1266,7 +1266,7 @@ def path_leaf(path):\n \n if hasattr(curTorrentProvider, 'onlyspasearch'):\n curTorrentProvider.onlyspasearch = bool(check_setting_int(CFG, curTorrentProvider.getID().upper(),\n- curTorrentProvider.getID() + '_onlyspasearch', 1))\n+ curTorrentProvider.getID() + '_onlyspasearch', 0))\n \n if hasattr(curTorrentProvider, 'append_identifier'):\n curTorrentProvider.append_identifier = check_setting_str(CFG, curTorrentProvider.getID().upper()," } ]
SickRage
68341f325689b286f8451dd254a2f10c824c85aa
1ba3d04a60ca8521a7b6480763b7ec94a3bdb1f2
sickbeard/name_parser/parser.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -78,7 +78,7 @@ class NameParser(object): def _compile_regexes(self, regexMode): if regexMode == self.ANIME_REGEX: dbg_str = u"ANIME" - uncompiled_regex = [regexes.anime_regexes, regexes.normal_regexes] + uncompiled_regex = [regexes.anime_regexes] elif regexMode == self.NORMAL_REGEX: dbg_str = u"NORMAL" uncompiled_regex = [regexes.normal_regexes]
uncompiled_regex = [ regexes . anime_regexes , regexes . normal_regexes ]
uncompiled_regex = [ regexes . anime_regexes ]
SINGLE_STMT
[["Delete", [",:,", 3, 54, 3, 55]], ["Delete", ["identifier:regexes", 3, 56, 3, 63]], ["Delete", [".:.", 3, 63, 3, 64]], ["Delete", ["identifier:normal_regexes", 3, 64, 3, 78]], ["Delete", ["attribute", 3, 56, 3, 78]]]
jackkiej/SickRage@68341f325689b286f8451dd254a2f10c824c85aa
Dont try normal regexes when we know the show is anime (still might need to flip the order on line 87) Closes https://github.com/SiCKRAGETV/sickrage-issues/issues/2834 Closes https://github.com/SiCKRAGETV/sickrage-issues/issues/3562 Closes https://github.com/SiCKRAGETV/sickrage-issues/issues/946
[ { "sha": "6c1a503a9d2508c04d77a26b8c66519fdf100256", "filename": "sickbeard/name_parser/parser.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/68341f325689b286f8451dd254a2f10c824c85aa/sickbeard%2Fname_parser%2Fparser.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/68341f325689b286f8451dd254a2f10c824c85aa/sickbeard%2Fname_parser%2Fparser.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fname_parser%2Fparser.py?ref=68341f325689b286f8451dd254a2f10c824c85aa", "patch": "@@ -78,7 +78,7 @@ def clean_series_name(series_name):\n def _compile_regexes(self, regexMode):\n if regexMode == self.ANIME_REGEX:\n dbg_str = u\"ANIME\"\n- uncompiled_regex = [regexes.anime_regexes, regexes.normal_regexes]\n+ uncompiled_regex = [regexes.anime_regexes]\n elif regexMode == self.NORMAL_REGEX:\n dbg_str = u\"NORMAL\"\n uncompiled_regex = [regexes.normal_regexes]" } ]
SickRage
8f775f8049fa3520710013994b1d2bf4413842ee
59f703760e42dad4799c2d7ab0a185cff20ed2d8
sickbeard/webapi.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -1512,7 +1512,7 @@ class CMD_SickBeardGetMessages(ApiCall): def run(self): messages = [] - for cur_notification in ui.notifications.get_notifications(self.request.remote_ip): + for cur_notification in ui.notifications.get_notifications(self.rh.request.remote_ip): messages.append({"title": cur_notification.title, "message": cur_notification.message, "type": cur_notification.type})
for cur_notification in ui . notifications . get_notifications ( self . request . remote_ip ) : messages . append ( { "title" : cur_notification . title , "message" : cur_notification . message , "type" : cur_notification . type } )
for cur_notification in ui . notifications . get_notifications ( self . rh . request . remote_ip ) : messages . append ( { "title" : cur_notification . title , "message" : cur_notification . message , "type" : cur_notification . type } )
ADD_ATTRIBUTE_ACCESS
[["Insert", ["attribute", 3, 68, 3, 80], ["attribute", "N0"], 0], ["Insert", ["attribute", 3, 68, 3, 80], [".:.", "T"], 1], ["Move", "N0", ["identifier:self", 3, 68, 3, 72], 0], ["Move", "N0", [".:.", 3, 72, 3, 73], 1], ["Insert", "N0", ["identifier:rh", "T"], 2]]
jackkiej/SickRage@8f775f8049fa3520710013994b1d2bf4413842ee
Fixes https://github.com/SiCKRAGETV/sickrage-issues/issues/3569 @MGaetan the inheritance chain is hella broken in webapi, we need some major changes
[ { "sha": "0023fe4877223ec76e1d0d46dcdc0d3f2d6503b4", "filename": "sickbeard/webapi.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/8f775f8049fa3520710013994b1d2bf4413842ee/sickbeard%2Fwebapi.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/8f775f8049fa3520710013994b1d2bf4413842ee/sickbeard%2Fwebapi.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fwebapi.py?ref=8f775f8049fa3520710013994b1d2bf4413842ee", "patch": "@@ -1512,7 +1512,7 @@ def __init__(self, args, kwargs):\n \n def run(self):\n messages = []\n- for cur_notification in ui.notifications.get_notifications(self.request.remote_ip):\n+ for cur_notification in ui.notifications.get_notifications(self.rh.request.remote_ip):\n messages.append({\"title\": cur_notification.title,\n \"message\": cur_notification.message,\n \"type\": cur_notification.type})" } ]
SickRage
54e27ebe30f5219aa1abd7d9fb058b6a01254925
88cfd533e870643a06be80858d53b6076f07bb49
sickbeard/webapi.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -1512,7 +1512,7 @@ class CMD_SickBeardGetMessages(ApiCall): def run(self): messages = [] - for cur_notification in ui.notifications.get_notifications(self.request.remote_ip): + for cur_notification in ui.notifications.get_notifications(self.rh.request.remote_ip): messages.append({"title": cur_notification.title, "message": cur_notification.message, "type": cur_notification.type})
for cur_notification in ui . notifications . get_notifications ( self . request . remote_ip ) : messages . append ( { "title" : cur_notification . title , "message" : cur_notification . message , "type" : cur_notification . type } )
for cur_notification in ui . notifications . get_notifications ( self . rh . request . remote_ip ) : messages . append ( { "title" : cur_notification . title , "message" : cur_notification . message , "type" : cur_notification . type } )
ADD_ATTRIBUTE_ACCESS
[["Insert", ["attribute", 3, 68, 3, 80], ["attribute", "N0"], 0], ["Insert", ["attribute", 3, 68, 3, 80], [".:.", "T"], 1], ["Move", "N0", ["identifier:self", 3, 68, 3, 72], 0], ["Move", "N0", [".:.", 3, 72, 3, 73], 1], ["Insert", "N0", ["identifier:rh", "T"], 2]]
jackkiej/SickRage@54e27ebe30f5219aa1abd7d9fb058b6a01254925
Fixes https://github.com/SiCKRAGETV/sickrage-issues/issues/3569 @MGaetan the inheritance chain is hella broken in webapi, we need some major changes
[ { "sha": "94490a467c7306257b8fdb4edf79fb67c8ca849a", "filename": "sickbeard/webapi.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/54e27ebe30f5219aa1abd7d9fb058b6a01254925/sickbeard%2Fwebapi.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/54e27ebe30f5219aa1abd7d9fb058b6a01254925/sickbeard%2Fwebapi.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fwebapi.py?ref=54e27ebe30f5219aa1abd7d9fb058b6a01254925", "patch": "@@ -1512,7 +1512,7 @@ def __init__(self, args, kwargs):\n \n def run(self):\n messages = []\n- for cur_notification in ui.notifications.get_notifications(self.request.remote_ip):\n+ for cur_notification in ui.notifications.get_notifications(self.rh.request.remote_ip):\n messages.append({\"title\": cur_notification.title,\n \"message\": cur_notification.message,\n \"type\": cur_notification.type})" } ]
SickRage
bbbc7469fbaba6942b075c544967c11759c6441f
7e0bb651b270361625b5850bd32b2247b3abc782
sickbeard/webserve.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -160,7 +160,7 @@ class MainHandler(RequestHandler): if status_code == 404: self.redirect('/home/') elif status_code == 401: - self.write(self.http_error_401_handler()) + self.finish(self.http_error_401_handler()) else: super(MainHandler, self).write_error(status_code, **kwargs)
self . write ( self . http_error_401_handler ( ) )
self . finish ( self . http_error_401_handler ( ) )
WRONG_FUNCTION_NAME
[["Update", ["identifier:write", 3, 18, 3, 23], "finish"]]
jackkiej/SickRage@bbbc7469fbaba6942b075c544967c11759c6441f
fix for tornado error handler
[ { "sha": "f1ef0e64b82329de4496299324d68c6be5ccb4c6", "filename": "sickbeard/webserve.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/bbbc7469fbaba6942b075c544967c11759c6441f/sickbeard%2Fwebserve.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/bbbc7469fbaba6942b075c544967c11759c6441f/sickbeard%2Fwebserve.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fwebserve.py?ref=bbbc7469fbaba6942b075c544967c11759c6441f", "patch": "@@ -160,7 +160,7 @@ def write_error(self, status_code, **kwargs):\n if status_code == 404:\n self.redirect('/home/')\n elif status_code == 401:\n- self.write(self.http_error_401_handler())\n+ self.finish(self.http_error_401_handler())\n else:\n super(MainHandler, self).write_error(status_code, **kwargs)\n " } ]
SickRage
b0149cc65df8a8091f9f51d1729c2e875a2f9747
688263bd62063250a7f8dd3b88a4571961ff06e7
sickbeard/name_parser/parser.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -246,7 +246,7 @@ class NameParser(object): result = max(matches, key=lambda x: x.score) if result.show: - if self.convert: + if self.convert and not self.naming_pattern: # scene convert result result = result.convert()
if self . convert : result = result . convert ( )
if self . convert and not self . naming_pattern : result = result . convert ( )
MORE_SPECIFIC_IF
[["Insert", ["if_statement", 3, 17, 5, 46], ["boolean_operator", "N0"], 1], ["Move", "N0", ["attribute", 3, 20, 3, 32], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Insert", "N0", ["not_operator", "N1"], 2], ["Insert", "N1", ["not:not", "T"], 0], ["Insert", "N1", ["attribute", "N2"], 1], ["Insert", "N2", ["identifier:self", "T"], 0], ["Insert", "N2", [".:.", "T"], 1], ["Insert", "N2", ["identifier:naming_pattern", "T"], 2]]
jackkiej/SickRage@b0149cc65df8a8091f9f51d1729c2e875a2f9747
Fix so that scene converting does not happening when performing naming pattern routines.
[ { "sha": "ad4dddf555c65a92f15714b408bbcc75a693e223", "filename": "sickbeard/name_parser/parser.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/b0149cc65df8a8091f9f51d1729c2e875a2f9747/sickbeard%2Fname_parser%2Fparser.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/b0149cc65df8a8091f9f51d1729c2e875a2f9747/sickbeard%2Fname_parser%2Fparser.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fname_parser%2Fparser.py?ref=b0149cc65df8a8091f9f51d1729c2e875a2f9747", "patch": "@@ -246,7 +246,7 @@ def _parse_string(self, name):\n result = max(matches, key=lambda x: x.score)\n \n if result.show:\n- if self.convert:\n+ if self.convert and not self.naming_pattern:\n # scene convert result\n result = result.convert()\n " } ]
SickRage
696a1a9f4af2e6c82afa6e12f2ca377e6b16bc82
10bea520a7ecddde9f1326da81e82b07e9909ee5
sickbeard/webserve.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -1483,7 +1483,7 @@ class ConfigBackupRestore(MainHandler): finalResult = '' if backupDir: - source = [os.path.join(sickbeard.DATA_DIR, 'sickbeard.db'), os.path.join(sickbeard.DATA_DIR, 'config.ini')] + source = [os.path.join(sickbeard.DATA_DIR, 'sickbeard.db'), sickbeard.CONFIG_FILE] target = os.path.join(backupDir, 'sickrage-' + time.strftime('%Y%m%d%H%M%S') + '.zip') if helpers.makeZip(source, target):
source = [ os . path . join ( sickbeard . DATA_DIR , 'sickbeard.db' ) , os . path . join ( sickbeard . DATA_DIR , 'config.ini' ) ]
source = [ os . path . join ( sickbeard . DATA_DIR , 'sickbeard.db' ) , sickbeard . CONFIG_FILE ]
SINGLE_STMT
[["Move", ["list", 3, 22, 3, 120], ["attribute", 3, 86, 3, 104], 3], ["Update", ["identifier:DATA_DIR", 3, 96, 3, 104], "CONFIG_FILE"], ["Delete", ["identifier:os", 3, 73, 3, 75]], ["Delete", [".:.", 3, 75, 3, 76]], ["Delete", ["identifier:path", 3, 76, 3, 80]], ["Delete", ["attribute", 3, 73, 3, 80]], ["Delete", [".:.", 3, 80, 3, 81]], ["Delete", ["identifier:join", 3, 81, 3, 85]], ["Delete", ["attribute", 3, 73, 3, 85]], ["Delete", ["(:(", 3, 85, 3, 86]], ["Delete", [",:,", 3, 104, 3, 105]], ["Delete", ["string:'config.ini'", 3, 106, 3, 118]], ["Delete", ["):)", 3, 118, 3, 119]], ["Delete", ["argument_list", 3, 85, 3, 119]], ["Delete", ["call", 3, 73, 3, 119]]]
jackkiej/SickRage@696a1a9f4af2e6c82afa6e12f2ca377e6b16bc82
Fixed issue with backup/resotre config file variable
[ { "sha": "1fbdc5ffd23b41bbb891049b81caa2fda23ae8aa", "filename": "sickbeard/webserve.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/696a1a9f4af2e6c82afa6e12f2ca377e6b16bc82/sickbeard%2Fwebserve.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/696a1a9f4af2e6c82afa6e12f2ca377e6b16bc82/sickbeard%2Fwebserve.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fwebserve.py?ref=696a1a9f4af2e6c82afa6e12f2ca377e6b16bc82", "patch": "@@ -1483,7 +1483,7 @@ def backup(self, backupDir=None):\n finalResult = ''\n \n if backupDir:\n- source = [os.path.join(sickbeard.DATA_DIR, 'sickbeard.db'), os.path.join(sickbeard.DATA_DIR, 'config.ini')]\n+ source = [os.path.join(sickbeard.DATA_DIR, 'sickbeard.db'), sickbeard.CONFIG_FILE]\n target = os.path.join(backupDir, 'sickrage-' + time.strftime('%Y%m%d%H%M%S') + '.zip')\n \n if helpers.makeZip(source, target):" } ]
SickRage
20aa4b63318e019c1edc18d690d5f447db777441
42e1994cbaf192fc5a9e7a1de035eed4da75929b
sickbeard/notifiers/trakt.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -73,7 +73,7 @@ class TraktNotifier: data = TraktCall("account/test/%API%", api, username, password, {}) - if data["status"] == "success": + if data and data["status"] == "success": return True def _username(self):
if data [ "status" ] == "success" : return True
if data and data [ "status" ] == "success" : return True
MORE_SPECIFIC_IF
[["Insert", ["if_statement", 2, 9, 3, 24], ["boolean_operator", "N0"], 1], ["Insert", "N0", ["identifier:data", "T"], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Move", "N0", ["comparison_operator", 2, 12, 2, 39], 2]]
jackkiej/SickRage@20aa4b63318e019c1edc18d690d5f447db777441
Fixed trakt.tv error, TypeError: 'NoneType' object has no attribute '__getitem__'
[ { "sha": "d16f63c38a42b5f42f4e1594f009fb48b75b889d", "filename": "sickbeard/notifiers/trakt.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/20aa4b63318e019c1edc18d690d5f447db777441/sickbeard%2Fnotifiers%2Ftrakt.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/20aa4b63318e019c1edc18d690d5f447db777441/sickbeard%2Fnotifiers%2Ftrakt.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fnotifiers%2Ftrakt.py?ref=20aa4b63318e019c1edc18d690d5f447db777441", "patch": "@@ -73,7 +73,7 @@ def test_notify(self, api, username, password):\n \"\"\"\n \n data = TraktCall(\"account/test/%API%\", api, username, password, {})\n- if data[\"status\"] == \"success\":\n+ if data and data[\"status\"] == \"success\":\n return True\n \n def _username(self):" } ]
SickRage
39f32b3b7cd9edb09d9597571c34c8f66434b456
b6e7635a32d79216ec7350d7629b1523d66a1629
SickBeard.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -331,7 +331,7 @@ def main(): sickbeard.showList = [] - if sickbeard.DAEMON: + if sickbeard.DAEMON and not sickbeard.restarted: daemonize() # Use this PID for everything
if sickbeard . DAEMON : daemonize ( )
if sickbeard . DAEMON and not sickbeard . restarted : daemonize ( )
MORE_SPECIFIC_IF
[["Insert", ["if_statement", 3, 5, 4, 20], ["boolean_operator", "N0"], 1], ["Move", "N0", ["attribute", 3, 8, 3, 24], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Insert", "N0", ["not_operator", "N1"], 2], ["Insert", "N1", ["not:not", "T"], 0], ["Insert", "N1", ["attribute", "N2"], 1], ["Insert", "N2", ["identifier:sickbeard", "T"], 0], ["Insert", "N2", [".:.", "T"], 1], ["Insert", "N2", ["identifier:restarted", "T"], 2]]
jackkiej/SickRage@39f32b3b7cd9edb09d9597571c34c8f66434b456
Fix for restarts/updates issues when running as a daemon.
[ { "sha": "f34033cf81f0dab08b44b2421030b37cdd39311e", "filename": "SickBeard.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/39f32b3b7cd9edb09d9597571c34c8f66434b456/SickBeard.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/39f32b3b7cd9edb09d9597571c34c8f66434b456/SickBeard.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/SickBeard.py?ref=39f32b3b7cd9edb09d9597571c34c8f66434b456", "patch": "@@ -331,7 +331,7 @@ def main():\n \n sickbeard.showList = []\n \n- if sickbeard.DAEMON:\n+ if sickbeard.DAEMON and not sickbeard.restarted:\n daemonize()\n \n # Use this PID for everything" } ]
SickRage
d091c3a138a32170a3aac6e8400f656f2e9b5305
13cbffb6d485828e73359df9def28a79176faa04
sickbeard/tvcache.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -56,7 +56,7 @@ class CacheDBConnection(db.DBConnection): "CREATE TABLE [" + providerName + "] (name TEXT, season NUMERIC, episodes TEXT, indexerid NUMERIC, url TEXT, time NUMERIC, quality TEXT)") else: # remove duplicates - self.action("DELETE FROM " + providerName + " WHERE url NOT IN (SELECT url FROM " + providerName + " GROUP BY url") + self.action("DELETE FROM " + providerName + " WHERE url NOT IN (SELECT url FROM " + providerName + " GROUP BY url)") except Exception, e: if str(e) != "table [" + providerName + "] already exists": raise
"CREATE TABLE [" + providerName + "] (name TEXT, season NUMERIC, episodes TEXT, indexerid NUMERIC, url TEXT, time NUMERIC, quality TEXT)" ) else : self . action ( "DELETE FROM " + providerName + " WHERE url NOT IN (SELECT url FROM " + providerName + " GROUP BY url" )
"CREATE TABLE [" + providerName + "] (name TEXT, season NUMERIC, episodes TEXT, indexerid NUMERIC, url TEXT, time NUMERIC, quality TEXT)" ) else : self . action ( "DELETE FROM " + providerName + " WHERE url NOT IN (SELECT url FROM " + providerName + " GROUP BY url)" )
CHANGE_BINARY_OPERAND
[["Update", ["string:\" GROUP BY url\"", 3, 116, 3, 131], "\" GROUP BY url)\""]]
jackkiej/SickRage@d091c3a138a32170a3aac6e8400f656f2e9b5305
Fixed SQL Syntax errors
[ { "sha": "39727d0a147a6f1e9dfe24835f45e4e474fbf83d", "filename": "sickbeard/tvcache.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/d091c3a138a32170a3aac6e8400f656f2e9b5305/sickbeard%2Ftvcache.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/d091c3a138a32170a3aac6e8400f656f2e9b5305/sickbeard%2Ftvcache.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Ftvcache.py?ref=d091c3a138a32170a3aac6e8400f656f2e9b5305", "patch": "@@ -56,7 +56,7 @@ def __init__(self, providerName):\n \"CREATE TABLE [\" + providerName + \"] (name TEXT, season NUMERIC, episodes TEXT, indexerid NUMERIC, url TEXT, time NUMERIC, quality TEXT)\")\n else:\n # remove duplicates\n- self.action(\"DELETE FROM \" + providerName + \" WHERE url NOT IN (SELECT url FROM \" + providerName + \" GROUP BY url\")\n+ self.action(\"DELETE FROM \" + providerName + \" WHERE url NOT IN (SELECT url FROM \" + providerName + \" GROUP BY url)\")\n except Exception, e:\n if str(e) != \"table [\" + providerName + \"] already exists\":\n raise" } ]
SickRage
858951d31c511b02636e670e5d8b0107515c8289
d091c3a138a32170a3aac6e8400f656f2e9b5305
sickbeard/name_parser/parser.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -249,7 +249,7 @@ class NameParser(object): matches.append(result) if len(matches): - result = max(matches, key=lambda x: x.score) + result = max(sorted(matches, reverse=True, key=lambda x: x.which_regex), key=lambda x: x.score) if result.show: if self.convert and not self.naming_pattern:
result = max ( matches , key = lambda x : x . score )
result = max ( sorted ( matches , reverse = True , key = lambda x : x . which_regex ) , key = lambda x : x . score )
ADD_FUNCTION_AROUND_EXPRESSION
[["Insert", ["argument_list", 3, 25, 3, 57], ["call", "N0"], 1], ["Insert", ["argument_list", 3, 25, 3, 57], [",:,", "T"], 2], ["Insert", "N0", ["identifier:sorted", "T"], 0], ["Insert", "N0", ["argument_list", "N1"], 1], ["Insert", "N1", ["(:(", "T"], 0], ["Move", "N1", ["identifier:matches", 3, 26, 3, 33], 1], ["Move", "N1", [",:,", 3, 33, 3, 34], 2], ["Insert", "N1", ["keyword_argument", "N2"], 3], ["Insert", "N1", [",:,", "T"], 4], ["Insert", "N1", ["keyword_argument", "N3"], 5], ["Insert", "N1", ["):)", "T"], 6], ["Insert", "N2", ["identifier:reverse", "T"], 0], ["Insert", "N2", ["=:=", "T"], 1], ["Insert", "N2", ["true:True", "T"], 2], ["Insert", "N3", ["identifier:key", "T"], 0], ["Insert", "N3", ["=:=", "T"], 1], ["Insert", "N3", ["lambda", "N4"], 2], ["Insert", "N4", ["lambda:lambda", "T"], 0], ["Insert", "N4", ["lambda_parameters", "N5"], 1], ["Insert", "N4", [":::", "T"], 2], ["Insert", "N4", ["attribute", "N6"], 3], ["Insert", "N5", ["identifier:x", "T"], 0], ["Insert", "N6", ["identifier:x", "T"], 0], ["Insert", "N6", [".:.", "T"], 1], ["Insert", "N6", ["identifier:which_regex", "T"], 2]]
jackkiej/SickRage@858951d31c511b02636e670e5d8b0107515c8289
Fix for H.264 issues related to regexes and matching for parsing release names.
[ { "sha": "bf57c84ac409b2ba51af328ef59f18687d45bbbd", "filename": "sickbeard/name_parser/parser.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/858951d31c511b02636e670e5d8b0107515c8289/sickbeard%2Fname_parser%2Fparser.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/858951d31c511b02636e670e5d8b0107515c8289/sickbeard%2Fname_parser%2Fparser.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fname_parser%2Fparser.py?ref=858951d31c511b02636e670e5d8b0107515c8289", "patch": "@@ -249,7 +249,7 @@ def _parse_string(self, name):\n matches.append(result)\n \n if len(matches):\n- result = max(matches, key=lambda x: x.score)\n+ result = max(sorted(matches, reverse=True, key=lambda x: x.which_regex), key=lambda x: x.score)\n \n if result.show:\n if self.convert and not self.naming_pattern:" } ]
SickRage
c3e2ff5193856bf3af7cad10d68529945684775f
cbda4d424db613c376afbf6953fe0ee72df54e0b
SickBeard.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -331,7 +331,7 @@ def main(): sickbeard.showList = [] - if sickbeard.DAEMON and not sickbeard.restarted: + if sickbeard.DAEMON: daemonize() # Use this PID for everything
if sickbeard . DAEMON and not sickbeard . restarted : daemonize ( )
if sickbeard . DAEMON : daemonize ( )
SINGLE_STMT
[["Move", ["if_statement", 3, 5, 4, 20], ["attribute", 3, 8, 3, 24], 1], ["Delete", ["and:and", 3, 25, 3, 28]], ["Delete", ["not:not", 3, 29, 3, 32]], ["Delete", ["identifier:sickbeard", 3, 33, 3, 42]], ["Delete", [".:.", 3, 42, 3, 43]], ["Delete", ["identifier:restarted", 3, 43, 3, 52]], ["Delete", ["attribute", 3, 33, 3, 52]], ["Delete", ["not_operator", 3, 29, 3, 52]], ["Delete", ["boolean_operator", 3, 8, 3, 52]]]
jackkiej/SickRage@c3e2ff5193856bf3af7cad10d68529945684775f
Testing fix for shutdown issues on BSD
[ { "sha": "afdf45c325b7a0086f04101595ec233db7b1b994", "filename": "SickBeard.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/c3e2ff5193856bf3af7cad10d68529945684775f/SickBeard.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/c3e2ff5193856bf3af7cad10d68529945684775f/SickBeard.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/SickBeard.py?ref=c3e2ff5193856bf3af7cad10d68529945684775f", "patch": "@@ -331,7 +331,7 @@ def main():\n \n sickbeard.showList = []\n \n- if sickbeard.DAEMON and not sickbeard.restarted:\n+ if sickbeard.DAEMON:\n daemonize()\n \n # Use this PID for everything" } ]
SickRage
06e99ce4a76bfe046abb2877469d6f9eb9113235
145433e19a994a617cf379ba4f48600c717153a6
sickbeard/webserve.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -167,7 +167,7 @@ class MainHandler(RequestHandler): if status_code == 401: self.write(self.http_error_401_handler()) elif status_code == 404: - redirect('/home/') + self.redirect('/home/') else: logger.log(traceback.format_exc(), logger.DEBUG) super(MainHandler, self).write_error(status_code, **kwargs)
redirect ( '/home/' )
self . redirect ( '/home/' )
SINGLE_STMT
[["Insert", ["call", 3, 13, 3, 31], ["attribute", "N0"], 0], ["Insert", "N0", ["identifier:self", "T"], 0], ["Insert", "N0", [".:.", "T"], 1], ["Move", "N0", ["identifier:redirect", 3, 13, 3, 21], 2]]
jackkiej/SickRage@06e99ce4a76bfe046abb2877469d6f9eb9113235
Fix for uncaught exception error for 404 errors
[ { "sha": "76120f3e57032532eb95018896a06f9470dc6a0a", "filename": "sickbeard/webserve.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/06e99ce4a76bfe046abb2877469d6f9eb9113235/sickbeard%2Fwebserve.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/06e99ce4a76bfe046abb2877469d6f9eb9113235/sickbeard%2Fwebserve.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fwebserve.py?ref=06e99ce4a76bfe046abb2877469d6f9eb9113235", "patch": "@@ -167,7 +167,7 @@ def write_error(self, status_code, **kwargs):\n if status_code == 401:\n self.write(self.http_error_401_handler())\n elif status_code == 404:\n- redirect('/home/')\n+ self.redirect('/home/')\n else:\n logger.log(traceback.format_exc(), logger.DEBUG)\n super(MainHandler, self).write_error(status_code, **kwargs)" } ]
SickRage
2e8c8a262fab094108459b152b9180b88b6fa658
a16bf8ca2cf0adbb1ef60d3a521c332ce8db7521
sickbeard/webapi.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -120,7 +120,7 @@ class Api(webserve.MainHandler): def builder(self): """ expose the api-builder template """ - t = webserve.PageTemplate(file="apiBuilder.tmpl") + t = webserve.PageTemplate(headers=self.request.headers, file="apiBuilder.tmpl") def titler(x): if not x or sickbeard.SORT_ARTICLE:
t = webserve . PageTemplate ( file = "apiBuilder.tmpl" )
t = webserve . PageTemplate ( headers = self . request . headers , file = "apiBuilder.tmpl" )
SAME_FUNCTION_MORE_ARGS
[["Insert", ["argument_list", 3, 34, 3, 58], ["keyword_argument", "N0"], 1], ["Insert", ["argument_list", 3, 34, 3, 58], [",:,", "T"], 2], ["Insert", "N0", ["identifier:headers", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["attribute", "N1"], 2], ["Insert", "N1", ["attribute", "N2"], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:headers", "T"], 2], ["Insert", "N2", ["identifier:self", "T"], 0], ["Insert", "N2", [".:.", "T"], 1], ["Insert", "N2", ["identifier:request", "T"], 2]]
jackkiej/SickRage@2e8c8a262fab094108459b152b9180b88b6fa658
Fix for api builder.
[ { "sha": "4ec6d45b9c3c247dacdb8456ce3018292f0346c2", "filename": "sickbeard/webapi.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/2e8c8a262fab094108459b152b9180b88b6fa658/sickbeard%2Fwebapi.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/2e8c8a262fab094108459b152b9180b88b6fa658/sickbeard%2Fwebapi.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fwebapi.py?ref=2e8c8a262fab094108459b152b9180b88b6fa658", "patch": "@@ -120,7 +120,7 @@ def index(self, *args, **kwargs):\n \n def builder(self):\n \"\"\" expose the api-builder template \"\"\"\n- t = webserve.PageTemplate(file=\"apiBuilder.tmpl\")\n+ t = webserve.PageTemplate(headers=self.request.headers, file=\"apiBuilder.tmpl\")\n \n def titler(x):\n if not x or sickbeard.SORT_ARTICLE:" } ]
SickRage
e6eb1256bf6b8e08ba8c4ac76f4ca5009188a189
9f1250d75024f895799047a247e266178d465567
sickbeard/__init__.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -872,7 +872,7 @@ def initialize(consoleLogging=True): USE_ANIDB = check_setting_str(CFG, 'ANIDB', 'use_anidb', '') ANIDB_USERNAME = check_setting_str(CFG, 'ANIDB', 'anidb_username', '') ANIDB_PASSWORD = check_setting_str(CFG, 'ANIDB', 'anidb_password', '') - ANIDB_USE_MYLIST = check_setting_str(CFG, 'ANIDB', 'anidb_use_mylist', '') + ANIDB_USE_MYLIST = bool(check_setting_int(CFG, 'ANIDB', 'anidb_use_mylist', 0)) ANIME_SPLIT_HOME = bool(check_setting_int(CFG, 'ANIME', 'anime_split_home', 0)) METADATA_XBMC = check_setting_str(CFG, 'General', 'metadata_xbmc', '0|0|0|0|0|0|0|0|0|0')
ANIDB_USE_MYLIST = check_setting_str ( CFG , 'ANIDB' , 'anidb_use_mylist' , '' )
ANIDB_USE_MYLIST = bool ( check_setting_int ( CFG , 'ANIDB' , 'anidb_use_mylist' , 0 ) )
SINGLE_STMT
[["Insert", ["call", 3, 28, 3, 83], ["identifier:bool", "T"], 0], ["Insert", ["call", 3, 28, 3, 83], ["argument_list", "N0"], 1], ["Insert", "N0", ["(:(", "T"], 0], ["Insert", "N0", ["call", "N1"], 1], ["Insert", "N0", ["):)", "T"], 2], ["Update", ["identifier:check_setting_str", 3, 28, 3, 45], "check_setting_int"], ["Move", "N1", ["identifier:check_setting_str", 3, 28, 3, 45], 0], ["Move", "N1", ["argument_list", 3, 45, 3, 83], 1], ["Move", ["string:'ANIDB'", 3, 51, 3, 58], ["argument_list", 3, 45, 3, 83], 4], ["Insert", ["argument_list", 3, 45, 3, 83], [",:,", "T"], 4], ["Insert", ["argument_list", 3, 45, 3, 83], ["integer:0", "T"], 8], ["Delete", [",:,", 3, 49, 3, 50]], ["Delete", ["string:''", 3, 80, 3, 82]]]
jackkiej/SickRage@e6eb1256bf6b8e08ba8c4ac76f4ca5009188a189
Fix for 'add to my list' option defaulting to on upon a restart.
[ { "sha": "e1527183650db5ab3284d543f66ddb2def217e88", "filename": "sickbeard/__init__.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/e6eb1256bf6b8e08ba8c4ac76f4ca5009188a189/sickbeard%2F__init__.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/e6eb1256bf6b8e08ba8c4ac76f4ca5009188a189/sickbeard%2F__init__.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2F__init__.py?ref=e6eb1256bf6b8e08ba8c4ac76f4ca5009188a189", "patch": "@@ -872,7 +872,7 @@ def initialize(consoleLogging=True):\n USE_ANIDB = check_setting_str(CFG, 'ANIDB', 'use_anidb', '')\n ANIDB_USERNAME = check_setting_str(CFG, 'ANIDB', 'anidb_username', '')\n ANIDB_PASSWORD = check_setting_str(CFG, 'ANIDB', 'anidb_password', '')\n- ANIDB_USE_MYLIST = check_setting_str(CFG, 'ANIDB', 'anidb_use_mylist', '')\n+ ANIDB_USE_MYLIST = bool(check_setting_int(CFG, 'ANIDB', 'anidb_use_mylist', 0))\n ANIME_SPLIT_HOME = bool(check_setting_int(CFG, 'ANIME', 'anime_split_home', 0))\n \n METADATA_XBMC = check_setting_str(CFG, 'General', 'metadata_xbmc', '0|0|0|0|0|0|0|0|0|0')" } ]
SickRage
fe65ecd2c3f3323267867c79a8773725072b42de
bea3a13c2ba3b473fd685f9ede49ca2016c70ea7
sickbeard/name_parser/parser.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -233,7 +233,7 @@ class NameParser(object): tmp_extra_info = match.group('extra_info') # Show.S04.Special or Show.S05.Part.2.Extras is almost certainly not every episode in the season - if not (tmp_extra_info and cur_regex_name == 'season_only' and re.search( + if not (tmp_extra_info and 'season_only' in cur_regex_name and re.search( r'([. _-]|^)(special|extra)s?\w*([. _-]|$)', tmp_extra_info, re.I)): result.extra_info = tmp_extra_info result.score += 1
if not ( tmp_extra_info and cur_regex_name == 'season_only' and re . search ( r'([. _-]|^)(special|extra)s?\w*([. _-]|$)' , tmp_extra_info , re . I ) ) : result . extra_info = tmp_extra_info result . score += 1
if not ( tmp_extra_info and 'season_only' in cur_regex_name and re . search ( r'([. _-]|^)(special|extra)s?\w*([. _-]|$)' , tmp_extra_info , re . I ) ) : result . extra_info = tmp_extra_info result . score += 1
CHANGE_BINARY_OPERAND
[["Move", ["identifier:cur_regex_name", 3, 44, 3, 58], ["comparison_operator", 3, 44, 3, 75], 2], ["Insert", ["comparison_operator", 3, 44, 3, 75], ["in:in", "T"], 3], ["Delete", ["==:==", 3, 59, 3, 61]]]
jackkiej/SickRage@fe65ecd2c3f3323267867c79a8773725072b42de
Fixed issues with searches for show specials causing SR to think its a entire season.
[ { "sha": "197b1e25b4f4685557a6ce7de1f81afe6472f064", "filename": "sickbeard/name_parser/parser.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/fe65ecd2c3f3323267867c79a8773725072b42de/sickbeard%2Fname_parser%2Fparser.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/fe65ecd2c3f3323267867c79a8773725072b42de/sickbeard%2Fname_parser%2Fparser.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fname_parser%2Fparser.py?ref=fe65ecd2c3f3323267867c79a8773725072b42de", "patch": "@@ -233,7 +233,7 @@ def _parse_string(self, name):\n tmp_extra_info = match.group('extra_info')\n \n # Show.S04.Special or Show.S05.Part.2.Extras is almost certainly not every episode in the season\n- if not (tmp_extra_info and cur_regex_name == 'season_only' and re.search(\n+ if not (tmp_extra_info and 'season_only' in cur_regex_name and re.search(\n r'([. _-]|^)(special|extra)s?\\w*([. _-]|$)', tmp_extra_info, re.I)):\n result.extra_info = tmp_extra_info\n result.score += 1" } ]
SickRage
356ac845d4af3639be6ae8788d876c0b22f64aae
172dec10175425f370d3e562f14d7c911a506a89
sickbeard/notifiers/xbmc.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -143,7 +143,7 @@ class XBMCNotifier: command = '{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"%s","message":"%s", "image": "%s"},"id":1}' % ( title.encode("utf-8"), message.encode("utf-8"), self.sb_logo_url) notifyResult = self._send_to_xbmc_json(command, curHost, username, password) - if notifyResult: + if len(notifyResult) and getattr(notifyResult, 'result', None): result += curHost + ':' + notifyResult["result"].decode(sickbeard.SYS_ENCODING) else: if sickbeard.XBMC_ALWAYS_ON or force:
if notifyResult : result += curHost + ':' + notifyResult [ "result" ] . decode ( sickbeard . SYS_ENCODING ) else : if sickbeard . XBMC_ALWAYS_ON or force :
if len ( notifyResult ) and getattr ( notifyResult , 'result' , None ) : result += curHost + ':' + notifyResult [ "result" ] . decode ( sickbeard . SYS_ENCODING ) else : if sickbeard . XBMC_ALWAYS_ON or force :
SINGLE_STMT
[["Insert", ["if_statement", 3, 21, 6, 54], ["boolean_operator", "N0"], 1], ["Insert", "N0", ["call", "N1"], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Insert", "N0", ["call", "N2"], 2], ["Insert", "N1", ["identifier:len", "T"], 0], ["Insert", "N1", ["argument_list", "N3"], 1], ["Insert", "N2", ["identifier:getattr", "T"], 0], ["Insert", "N2", ["argument_list", "N4"], 1], ["Insert", "N3", ["(:(", "T"], 0], ["Move", "N3", ["identifier:notifyResult", 3, 24, 3, 36], 1], ["Insert", "N3", ["):)", "T"], 2], ["Insert", "N4", ["(:(", "T"], 0], ["Insert", "N4", ["identifier:notifyResult", "T"], 1], ["Insert", "N4", [",:,", "T"], 2], ["Insert", "N4", ["string:'result'", "T"], 3], ["Insert", "N4", [",:,", "T"], 4], ["Insert", "N4", ["none:None", "T"], 5], ["Insert", "N4", ["):)", "T"], 6]]
jackkiej/SickRage@356ac845d4af3639be6ae8788d876c0b22f64aae
Fix for XBMC notifier, KeyError: 'result'
[ { "sha": "e8966b178a2ca4ef282931ef6fc98327a843edb1", "filename": "sickbeard/notifiers/xbmc.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/356ac845d4af3639be6ae8788d876c0b22f64aae/sickbeard%2Fnotifiers%2Fxbmc.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/356ac845d4af3639be6ae8788d876c0b22f64aae/sickbeard%2Fnotifiers%2Fxbmc.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fnotifiers%2Fxbmc.py?ref=356ac845d4af3639be6ae8788d876c0b22f64aae", "patch": "@@ -143,7 +143,7 @@ def _notify_xbmc(self, message, title=\"SickRage\", host=None, username=None, pass\n command = '{\"jsonrpc\":\"2.0\",\"method\":\"GUI.ShowNotification\",\"params\":{\"title\":\"%s\",\"message\":\"%s\", \"image\": \"%s\"},\"id\":1}' % (\n title.encode(\"utf-8\"), message.encode(\"utf-8\"), self.sb_logo_url)\n notifyResult = self._send_to_xbmc_json(command, curHost, username, password)\n- if notifyResult:\n+ if len(notifyResult) and getattr(notifyResult, 'result', None):\n result += curHost + ':' + notifyResult[\"result\"].decode(sickbeard.SYS_ENCODING)\n else:\n if sickbeard.XBMC_ALWAYS_ON or force:" } ]
SickRage
c7e58cadb547593a3bebd0591cb4107a3e39b6e7
356ac845d4af3639be6ae8788d876c0b22f64aae
sickbeard/notifiers/xbmc.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -143,7 +143,7 @@ class XBMCNotifier: command = '{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"%s","message":"%s", "image": "%s"},"id":1}' % ( title.encode("utf-8"), message.encode("utf-8"), self.sb_logo_url) notifyResult = self._send_to_xbmc_json(command, curHost, username, password) - if len(notifyResult) and getattr(notifyResult, 'result', None): + if getattr(notifyResult, 'result', None): result += curHost + ':' + notifyResult["result"].decode(sickbeard.SYS_ENCODING) else: if sickbeard.XBMC_ALWAYS_ON or force:
if len ( notifyResult ) and getattr ( notifyResult , 'result' , None ) : result += curHost + ':' + notifyResult [ "result" ] . decode ( sickbeard . SYS_ENCODING ) else : if sickbeard . XBMC_ALWAYS_ON or force :
if getattr ( notifyResult , 'result' , None ) : result += curHost + ':' + notifyResult [ "result" ] . decode ( sickbeard . SYS_ENCODING ) else : if sickbeard . XBMC_ALWAYS_ON or force :
SINGLE_STMT
[["Move", ["if_statement", 3, 21, 6, 54], ["call", 3, 46, 3, 83], 1], ["Delete", ["identifier:len", 3, 24, 3, 27]], ["Delete", ["(:(", 3, 27, 3, 28]], ["Delete", ["identifier:notifyResult", 3, 28, 3, 40]], ["Delete", ["):)", 3, 40, 3, 41]], ["Delete", ["argument_list", 3, 27, 3, 41]], ["Delete", ["call", 3, 24, 3, 41]], ["Delete", ["and:and", 3, 42, 3, 45]], ["Delete", ["boolean_operator", 3, 24, 3, 83]]]
jackkiej/SickRage@c7e58cadb547593a3bebd0591cb4107a3e39b6e7
Fix for XBMC notifier
[ { "sha": "4a176427f7b3ebfeaf5b598d67bc3505a86defca", "filename": "sickbeard/notifiers/xbmc.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/c7e58cadb547593a3bebd0591cb4107a3e39b6e7/sickbeard%2Fnotifiers%2Fxbmc.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/c7e58cadb547593a3bebd0591cb4107a3e39b6e7/sickbeard%2Fnotifiers%2Fxbmc.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fnotifiers%2Fxbmc.py?ref=c7e58cadb547593a3bebd0591cb4107a3e39b6e7", "patch": "@@ -143,7 +143,7 @@ def _notify_xbmc(self, message, title=\"SickRage\", host=None, username=None, pass\n command = '{\"jsonrpc\":\"2.0\",\"method\":\"GUI.ShowNotification\",\"params\":{\"title\":\"%s\",\"message\":\"%s\", \"image\": \"%s\"},\"id\":1}' % (\n title.encode(\"utf-8\"), message.encode(\"utf-8\"), self.sb_logo_url)\n notifyResult = self._send_to_xbmc_json(command, curHost, username, password)\n- if len(notifyResult) and getattr(notifyResult, 'result', None):\n+ if getattr(notifyResult, 'result', None):\n result += curHost + ':' + notifyResult[\"result\"].decode(sickbeard.SYS_ENCODING)\n else:\n if sickbeard.XBMC_ALWAYS_ON or force:" } ]
SickRage
13f12b2635248c728e4188f1812b2596e9ef98e2
2f0683ec1e452848eaaac15de9a2f9064a8a4e16
sickbeard/webapi.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -974,7 +974,7 @@ class CMD_EpisodeSetStatus(ApiCall): sql_l = [] for epObj in ep_list: - if ep_segment == None and self.status == WANTED: + if self.status == WANTED: # figure out what episodes are wanted so we can backlog them if epObj.season in ep_segment: ep_segment[epObj.season].append(epObj)
if ep_segment == None and self . status == WANTED : if epObj . season in ep_segment : ep_segment [ epObj . season ] . append ( epObj )
if self . status == WANTED : if epObj . season in ep_segment : ep_segment [ epObj . season ] . append ( epObj )
SINGLE_STMT
[["Move", ["if_statement", 3, 13, 6, 59], ["comparison_operator", 3, 39, 3, 60], 1], ["Delete", ["identifier:ep_segment", 3, 16, 3, 26]], ["Delete", ["==:==", 3, 27, 3, 29]], ["Delete", ["none:None", 3, 30, 3, 34]], ["Delete", ["comparison_operator", 3, 16, 3, 34]], ["Delete", ["and:and", 3, 35, 3, 38]], ["Delete", ["boolean_operator", 3, 16, 3, 60]]]
jackkiej/SickRage@13f12b2635248c728e4188f1812b2596e9ef98e2
Fixed issue with WEB Api and setting episode statuses for backlog searches.
[ { "sha": "2832420c035038caf5e90d6e6fe335ccf7e62bc6", "filename": "sickbeard/webapi.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/13f12b2635248c728e4188f1812b2596e9ef98e2/sickbeard%2Fwebapi.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/13f12b2635248c728e4188f1812b2596e9ef98e2/sickbeard%2Fwebapi.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fwebapi.py?ref=13f12b2635248c728e4188f1812b2596e9ef98e2", "patch": "@@ -974,7 +974,7 @@ def _epResult(result_code, ep, msg=\"\"):\n \n sql_l = []\n for epObj in ep_list:\n- if ep_segment == None and self.status == WANTED:\n+ if self.status == WANTED:\n # figure out what episodes are wanted so we can backlog them\n if epObj.season in ep_segment:\n ep_segment[epObj.season].append(epObj)" } ]
SickRage
9f98aafd90c0087597335b22c384a63c8f405a54
42ab5503a02269a723872f75b2196cd7f3cc75e9
sickbeard/postProcessor.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -496,7 +496,7 @@ class PostProcessor(object): myDB = db.DBConnection() for curName in names: search_name = re.sub(r"[\.\- ]", "_", curName) - sql_results = myDB.select("SELECT showid, season, quality, version, resource FROM history WHERE resource LIKE ?", [search_name]) + sql_results = myDB.select("SELECT showid, season, quality, version, resource FROM history WHERE resource LIKE ? and action % 100 = 4", [search_name]) if len(sql_results) == 0: continue
sql_results = myDB . select ( "SELECT showid, season, quality, version, resource FROM history WHERE resource LIKE ?" , [ search_name ] )
sql_results = myDB . select ( "SELECT showid, season, quality, version, resource FROM history WHERE resource LIKE ? and action % 100 = 4" , [ search_name ] )
CHANGE_STRING_LITERAL
[["Update", ["string:\"SELECT showid, season, quality, version, resource FROM history WHERE resource LIKE ?\"", 3, 39, 3, 125], "\"SELECT showid, season, quality, version, resource FROM history WHERE resource LIKE ? and action % 100 = 4\""]]
jackkiej/SickRage@9f98aafd90c0087597335b22c384a63c8f405a54
Fix comparing snatched episode quality to itself. Amend SQL statement to only look for history entries with status "downloaded".
[ { "sha": "b6957cae5be2181e4db90ce9200ad150b7052bdd", "filename": "sickbeard/postProcessor.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/9f98aafd90c0087597335b22c384a63c8f405a54/sickbeard%2FpostProcessor.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/9f98aafd90c0087597335b22c384a63c8f405a54/sickbeard%2FpostProcessor.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2FpostProcessor.py?ref=9f98aafd90c0087597335b22c384a63c8f405a54", "patch": "@@ -496,7 +496,7 @@ def _history_lookup(self):\n myDB = db.DBConnection()\n for curName in names:\n search_name = re.sub(r\"[\\.\\- ]\", \"_\", curName)\n- sql_results = myDB.select(\"SELECT showid, season, quality, version, resource FROM history WHERE resource LIKE ?\", [search_name])\n+ sql_results = myDB.select(\"SELECT showid, season, quality, version, resource FROM history WHERE resource LIKE ? and action % 100 = 4\", [search_name])\n \n if len(sql_results) == 0:\n continue" } ]
SickRage
70a34cc19014d2b1bdd1bbf43682ca8078e94ff8
0fe5b091bff8d0334fbc200d6026bb7a3df92764
sickbeard/dailysearcher.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -59,7 +59,7 @@ class DailySearcher(object): curTime = datetime.datetime.now(network_timezones.sb_timezone) myDB = db.DBConnection() - sqlResults = myDB.select("SELECT showid, airdate, season, episode FROM tv_episodes WHERE status = ? AND season > 0 AND (airdate <= ? and airdate > 1)", + sqlResults = myDB.select("SELECT showid, airdate, season, episode FROM tv_episodes WHERE status = ? AND (airdate <= ? and airdate > 1)", [common.UNAIRED, curDate]) sql_l = []
sqlResults = myDB . select ( "SELECT showid, airdate, season, episode FROM tv_episodes WHERE status = ? AND season > 0 AND (airdate <= ? and airdate > 1)" , [ common . UNAIRED , curDate ] )
sqlResults = myDB . select ( "SELECT showid, airdate, season, episode FROM tv_episodes WHERE status = ? AND (airdate <= ? and airdate > 1)" , [ common . UNAIRED , curDate ] )
CHANGE_STRING_LITERAL
[["Update", ["string:\"SELECT showid, airdate, season, episode FROM tv_episodes WHERE status = ? AND season > 0 AND (airdate <= ? and airdate > 1)\"", 3, 34, 3, 159], "\"SELECT showid, airdate, season, episode FROM tv_episodes WHERE status = ? AND (airdate <= ? and airdate > 1)\""]]
jackkiej/SickRage@70a34cc19014d2b1bdd1bbf43682ca8078e94ff8
DailySearcher.run() minor bug fix
[ { "sha": "4df2176dc326b66a7d1781990afc71fd84fe5413", "filename": "sickbeard/dailysearcher.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/70a34cc19014d2b1bdd1bbf43682ca8078e94ff8/sickbeard%2Fdailysearcher.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/70a34cc19014d2b1bdd1bbf43682ca8078e94ff8/sickbeard%2Fdailysearcher.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fdailysearcher.py?ref=70a34cc19014d2b1bdd1bbf43682ca8078e94ff8", "patch": "@@ -59,7 +59,7 @@ def run(self, force=False):\n curTime = datetime.datetime.now(network_timezones.sb_timezone)\n \n myDB = db.DBConnection()\n- sqlResults = myDB.select(\"SELECT showid, airdate, season, episode FROM tv_episodes WHERE status = ? AND season > 0 AND (airdate <= ? and airdate > 1)\",\n+ sqlResults = myDB.select(\"SELECT showid, airdate, season, episode FROM tv_episodes WHERE status = ? AND (airdate <= ? and airdate > 1)\",\n [common.UNAIRED, curDate])\n \n sql_l = []" } ]
SickRage
3dd046bbb9279a84210cb1e29fdfd4a4b10a2190
07e7116c2e29be666f8ba73821d177c440bcbc01
sickbeard/webapi.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -2146,7 +2146,7 @@ class CMD_ShowAddNew(ApiCall): default_ep_status_after = self.future_status indexer_name = None - indexer_result = CMD_SickBeardSearchIndexers([], {indexer_ids[self.indexer]: self.indexerid}).run() + indexer_result = CMD_SickBeardSearchIndexers([], {indexer_ids[self.indexer]: self.indexerid, 'lang': self.lang}).run() if indexer_result['result'] == result_type_map[RESULT_SUCCESS]: if not indexer_result['data']['results']:
indexer_result = CMD_SickBeardSearchIndexers ( [ ] , { indexer_ids [ self . indexer ] : self . indexerid } ) . run ( )
indexer_result = CMD_SickBeardSearchIndexers ( [ ] , { indexer_ids [ self . indexer ] : self . indexerid , 'lang' : self . lang } ) . run ( )
ADD_ELEMENTS_TO_ITERABLE
[["Insert", ["dictionary", 3, 58, 3, 101], [",:,", "T"], 2], ["Insert", ["dictionary", 3, 58, 3, 101], ["pair", "N0"], 3], ["Insert", "N0", ["string:'lang'", "T"], 0], ["Insert", "N0", [":::", "T"], 1], ["Insert", "N0", ["attribute", "N1"], 2], ["Insert", "N1", ["identifier:self", "T"], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:lang", "T"], 2]]
jackkiej/SickRage@3dd046bbb9279a84210cb1e29fdfd4a4b10a2190
Fix API show.addnew not finding results for non-English shows.
[ { "sha": "3d407287cae355bf86642cac9147a086b0fe164e", "filename": "sickbeard/webapi.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/3dd046bbb9279a84210cb1e29fdfd4a4b10a2190/sickbeard%2Fwebapi.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/3dd046bbb9279a84210cb1e29fdfd4a4b10a2190/sickbeard%2Fwebapi.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fwebapi.py?ref=3dd046bbb9279a84210cb1e29fdfd4a4b10a2190", "patch": "@@ -2146,7 +2146,7 @@ def run(self):\n default_ep_status_after = self.future_status\n \n indexer_name = None\n- indexer_result = CMD_SickBeardSearchIndexers([], {indexer_ids[self.indexer]: self.indexerid}).run()\n+ indexer_result = CMD_SickBeardSearchIndexers([], {indexer_ids[self.indexer]: self.indexerid, 'lang': self.lang}).run()\n \n if indexer_result['result'] == result_type_map[RESULT_SUCCESS]:\n if not indexer_result['data']['results']:" } ]
SickRage
145edd439e638621772ef57c23aba23bf0348de9
552c95eb169dcfe1a7be1f61fc21513d991ca72c
sickbeard/providers/extratorrent.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -77,7 +77,7 @@ class ExtraTorrentProvider(TorrentProvider): for item in parser.findAll('item'): title = re.sub(r'^<!\[CDATA\[|\]\]>$', '', item.find('title').text) # info_hash = item.get('info_hash', '') - size = try_int(item.find('size').text, -1) + size = try_int(item.find('size').text, -1) if item.find('size') else -1 seeders = try_int(item.find('seeders').text) leechers = try_int(item.find('leechers').text) enclosure = item.find('enclosure')
size = try_int ( item . find ( 'size' ) . text , - 1 )
size = try_int ( item . find ( 'size' ) . text , - 1 ) if item . find ( 'size' ) else - 1
SINGLE_STMT
[["Insert", ["assignment", 3, 29, 3, 71], ["conditional_expression", "N0"], 2], ["Move", "N0", ["call", 3, 36, 3, 71], 0], ["Insert", "N0", ["if:if", "T"], 1], ["Insert", "N0", ["call", "N1"], 2], ["Insert", "N0", ["else:else", "T"], 3], ["Insert", "N0", ["unary_operator", "N2"], 4], ["Insert", "N1", ["attribute", "N3"], 0], ["Insert", "N1", ["argument_list", "N4"], 1], ["Insert", "N2", ["-:-", "T"], 0], ["Insert", "N2", ["integer:1", "T"], 1], ["Insert", "N3", ["identifier:item", "T"], 0], ["Insert", "N3", [".:.", "T"], 1], ["Insert", "N3", ["identifier:find", "T"], 2], ["Insert", "N4", ["(:(", "T"], 0], ["Insert", "N4", ["string:'size'", "T"], 1], ["Insert", "N4", ["):)", "T"], 2]]
jackkiej/SickRage@145edd439e638621772ef57c23aba23bf0348de9
Fix small extratorrent provider bug
[ { "sha": "0af6bed1dc24cde352381cd9d42efbb771732422", "filename": "sickbeard/providers/extratorrent.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/145edd439e638621772ef57c23aba23bf0348de9/sickbeard%2Fproviders%2Fextratorrent.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/145edd439e638621772ef57c23aba23bf0348de9/sickbeard%2Fproviders%2Fextratorrent.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fproviders%2Fextratorrent.py?ref=145edd439e638621772ef57c23aba23bf0348de9", "patch": "@@ -77,7 +77,7 @@ def search(self, search_strings, age=0, ep_obj=None):\n for item in parser.findAll('item'):\n title = re.sub(r'^<!\\[CDATA\\[|\\]\\]>$', '', item.find('title').text)\n # info_hash = item.get('info_hash', '')\n- size = try_int(item.find('size').text, -1)\n+ size = try_int(item.find('size').text, -1) if item.find('size') else -1\n seeders = try_int(item.find('seeders').text)\n leechers = try_int(item.find('leechers').text)\n enclosure = item.find('enclosure')" } ]
SickRage
7568f45ab09528cec96240964a9aee5e5e713e41
1717939c621902a2f86b10f488d890e8882b9590
sickbeard/providers/danishbits.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -129,7 +129,7 @@ class DanishbitsProvider(TorrentProvider): # pylint: disable=too-many-instance- continue try: - with BS4Parser(data.decode('iso-8859-1'), features=["html5lib", "permissive"]) as html: + with BS4Parser(data,"html5lib") as html: # Collecting entries entries = html.find_all('tr', attrs={'class': 'torrent'})
with BS4Parser ( data . decode ( 'iso-8859-1' ) , features = [ "html5lib" , "permissive" ] ) as html : entries = html . find_all ( 'tr' , attrs = { 'class' : 'torrent' } )
with BS4Parser ( data , "html5lib" ) as html : entries = html . find_all ( 'tr' , attrs = { 'class' : 'torrent' } )
SINGLE_STMT
[["Move", ["argument_list", 3, 35, 3, 99], ["identifier:data", 3, 36, 3, 40], 1], ["Move", ["argument_list", 3, 35, 3, 99], ["string:\"html5lib\"", 3, 73, 3, 83], 4], ["Move", ["argument_list", 3, 35, 3, 99], ["):)", 3, 60, 3, 61], 5], ["Delete", [".:.", 3, 40, 3, 41]], ["Delete", ["identifier:decode", 3, 41, 3, 47]], ["Delete", ["attribute", 3, 36, 3, 47]], ["Delete", ["(:(", 3, 47, 3, 48]], ["Delete", ["string:'iso-8859-1'", 3, 48, 3, 60]], ["Delete", ["argument_list", 3, 47, 3, 61]], ["Delete", ["call", 3, 36, 3, 61]], ["Delete", ["identifier:features", 3, 63, 3, 71]], ["Delete", ["=:=", 3, 71, 3, 72]], ["Delete", ["[:[", 3, 72, 3, 73]], ["Delete", [",:,", 3, 83, 3, 84]], ["Delete", ["string:\"permissive\"", 3, 85, 3, 97]], ["Delete", ["]:]", 3, 97, 3, 98]], ["Delete", ["list", 3, 72, 3, 98]], ["Delete", ["keyword_argument", 3, 63, 3, 98]], ["Delete", ["):)", 3, 98, 3, 99]]]
jackkiej/SickRage@7568f45ab09528cec96240964a9aee5e5e713e41
The data.decode was giving errors. Returned html should be in unicode, so don't see any reason to decode. But maybe i'm wrong? For this worked, tested for a limited set of shows.
[ { "sha": "f3192ff29df51ea8a0b7381299023910828ac98b", "filename": "sickbeard/providers/danishbits.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/7568f45ab09528cec96240964a9aee5e5e713e41/sickbeard%2Fproviders%2Fdanishbits.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/7568f45ab09528cec96240964a9aee5e5e713e41/sickbeard%2Fproviders%2Fdanishbits.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fproviders%2Fdanishbits.py?ref=7568f45ab09528cec96240964a9aee5e5e713e41", "patch": "@@ -129,7 +129,7 @@ def search(self, search_params, age=0, ep_obj=None): # pylint: disable=too-many\n continue\n \n try:\n- with BS4Parser(data.decode('iso-8859-1'), features=[\"html5lib\", \"permissive\"]) as html:\n+ with BS4Parser(data,\"html5lib\") as html:\n # Collecting entries\n entries = html.find_all('tr', attrs={'class': 'torrent'})\n " } ]
SickRage
9d095d85867e196211fa520b96c8564873e2edbe
f1216b41fa32e362ba5bb6fddf8d1c895cb698c0
sickbeard/providers/bitsnoop.py
https://github.com/jackkiej/SickRage
true
false
false
@@ -22,7 +22,7 @@ from bs4 import BeautifulSoup import sickbeard from sickbeard import logger from sickbeard import tvcache -from sickrage.helper.common import try_int +from sickrage.helper.common import try_int, convert_size from sickrage.providers.torrent.TorrentProvider import TorrentProvider
from sickrage . helper . common import try_int
from sickrage . helper . common import try_int , convert_size
SINGLE_STMT
[["Insert", ["import_from_statement", 3, 1, 3, 43], [",:,", "T"], 4], ["Insert", ["import_from_statement", 3, 1, 3, 43], ["dotted_name", "N0"], 5], ["Insert", "N0", ["identifier:convert_size", "T"], 0]]
jackkiej/SickRage@9d095d85867e196211fa520b96c8564873e2edbe
Fix files size conversion for bitsnoop
[ { "sha": "c84e7e64a71f29e0c6371217af4fd2b69d673a27", "filename": "sickbeard/providers/bitsnoop.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/9d095d85867e196211fa520b96c8564873e2edbe/sickbeard%2Fproviders%2Fbitsnoop.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/9d095d85867e196211fa520b96c8564873e2edbe/sickbeard%2Fproviders%2Fbitsnoop.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fproviders%2Fbitsnoop.py?ref=9d095d85867e196211fa520b96c8564873e2edbe", "patch": "@@ -22,7 +22,7 @@\n import sickbeard\n from sickbeard import logger\n from sickbeard import tvcache\n-from sickrage.helper.common import try_int\n+from sickrage.helper.common import try_int, convert_size\n from sickrage.providers.torrent.TorrentProvider import TorrentProvider\n \n " } ]
SickRage
66db656b67b1305d874455fec019edef0b5f5220
77c9f8bc1343c4f3d7154d437842e82f0cc21201
tests/search_tests.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -64,7 +64,7 @@ def test_generator(cur_data, cur_name, cur_provider): :return: """ - def do_test(): + def do_test(self): """ Test to perform
def do_test ( ) : """ Test to perform
def do_test ( self ) : """ Test to perform
SINGLE_STMT
[["Insert", ["parameters", 3, 16, 3, 18], ["identifier:self", "T"], 1]]
jackkiej/SickRage@66db656b67b1305d874455fec019edef0b5f5220
Fix search tests
[ { "sha": "ad2719e02f05e197ba3d92494f958a764de7c718", "filename": "tests/search_tests.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/66db656b67b1305d874455fec019edef0b5f5220/tests%2Fsearch_tests.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/66db656b67b1305d874455fec019edef0b5f5220/tests%2Fsearch_tests.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/tests%2Fsearch_tests.py?ref=66db656b67b1305d874455fec019edef0b5f5220", "patch": "@@ -64,7 +64,7 @@ def test_generator(cur_data, cur_name, cur_provider):\n :return:\n \"\"\"\n \n- def do_test():\n+ def do_test(self):\n \"\"\"\n Test to perform\n \"\"\"" } ]
SickRage
e98556500eff8fdcf95d32185400d5aaf7b7160c
3ed98522ab640852024d945f256ca409a8ca49ae
sickbeard/auto_postprocessor.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -47,7 +47,7 @@ class PostProcessor(object): return if not (force or ek(os.path.isabs, sickbeard.TV_DOWNLOAD_DIR)): - logger.log(u"Automatic post-processing attempted but directory is relatve " + logger.log(u"Automatic post-processing attempted but directory is relative " u"(and probably not what you really want to process): %s" % sickbeard.TV_DOWNLOAD_DIR, logger.ERROR) self.amActive = False
logger . log ( u"Automatic post-processing attempted but directory is relatve " u"(and probably not what you really want to process): %s" % sickbeard . TV_DOWNLOAD_DIR , logger . ERROR )
logger . log ( u"Automatic post-processing attempted but directory is relative " u"(and probably not what you really want to process): %s" % sickbeard . TV_DOWNLOAD_DIR , logger . ERROR )
CHANGE_STRING_LITERAL
[["Update", ["string:u\"Automatic post-processing attempted but directory is relatve \"", 3, 24, 3, 88], "u\"Automatic post-processing attempted but directory is relative \""]]
jackkiej/SickRage@e98556500eff8fdcf95d32185400d5aaf7b7160c
Fix typo
[ { "sha": "ff804c7ad4ff934871187422a2d9c1bcc22c6b6b", "filename": "sickbeard/auto_postprocessor.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/e98556500eff8fdcf95d32185400d5aaf7b7160c/sickbeard%2Fauto_postprocessor.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/e98556500eff8fdcf95d32185400d5aaf7b7160c/sickbeard%2Fauto_postprocessor.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fauto_postprocessor.py?ref=e98556500eff8fdcf95d32185400d5aaf7b7160c", "patch": "@@ -47,7 +47,7 @@ def run(self, force=False):\n return\n \n if not (force or ek(os.path.isabs, sickbeard.TV_DOWNLOAD_DIR)):\n- logger.log(u\"Automatic post-processing attempted but directory is relatve \"\n+ logger.log(u\"Automatic post-processing attempted but directory is relative \"\n u\"(and probably not what you really want to process): %s\" %\n sickbeard.TV_DOWNLOAD_DIR, logger.ERROR)\n self.amActive = False" } ]
SickRage
6ae316a7beba55dd18ba4312e1bc7aff641a9991
3a013c3d1c913431c0ebd881754d41db09aeab72
sickbeard/notifiers/kodi.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -439,7 +439,7 @@ class KODINotifier(object): logger.log(u"Updating library in KODI via JSON method for show " + showName, logger.DEBUG) # let's try letting kodi filter the shows - showsCommand = '{"jsonrpc":"2.0","method":"VideoLibrary.GetTVShows","params":{"filter":{"field":"title","operator":"is","value":"%s"},"properties":["title",]},"id":"SickRage"}' + showsCommand = '{"jsonrpc":"2.0","method":"VideoLibrary.GetTVShows","params":{"filter":{"field":"title","operator":"is","value":"%s"},"properties":["title"]},"id":"SickRage"}' # get tvshowid by showName showsResponse = self._send_to_kodi_json(showsCommand % showName, host)
showsCommand = '{"jsonrpc":"2.0","method":"VideoLibrary.GetTVShows","params":{"filter":{"field":"title","operator":"is","value":"%s"},"properties":["title",]},"id":"SickRage"}'
showsCommand = '{"jsonrpc":"2.0","method":"VideoLibrary.GetTVShows","params":{"filter":{"field":"title","operator":"is","value":"%s"},"properties":["title"]},"id":"SickRage"}'
CHANGE_STRING_LITERAL
[["Update", ["string:'{\"jsonrpc\":\"2.0\",\"method\":\"VideoLibrary.GetTVShows\",\"params\":{\"filter\":{\"field\":\"title\",\"operator\":\"is\",\"value\":\"%s\"},\"properties\":[\"title\",]},\"id\":\"SickRage\"}'", 3, 28, 3, 189], "'{\"jsonrpc\":\"2.0\",\"method\":\"VideoLibrary.GetTVShows\",\"params\":{\"filter\":{\"field\":\"title\",\"operator\":\"is\",\"value\":\"%s\"},\"properties\":[\"title\"]},\"id\":\"SickRage\"}'"]]
jackkiej/SickRage@6ae316a7beba55dd18ba4312e1bc7aff641a9991
Fixed KODI Notifier extra comma in GetTVShowDetail
[ { "sha": "e4930e9e2ebd77ca21eafc3ad9ab1db7b5c3b450", "filename": "sickbeard/notifiers/kodi.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/6ae316a7beba55dd18ba4312e1bc7aff641a9991/sickbeard%2Fnotifiers%2Fkodi.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/6ae316a7beba55dd18ba4312e1bc7aff641a9991/sickbeard%2Fnotifiers%2Fkodi.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fnotifiers%2Fkodi.py?ref=6ae316a7beba55dd18ba4312e1bc7aff641a9991", "patch": "@@ -439,7 +439,7 @@ def _update_library_json(self, host=None, showName=None): # pylint: disable=too\n logger.log(u\"Updating library in KODI via JSON method for show \" + showName, logger.DEBUG)\n \n # let's try letting kodi filter the shows\n- showsCommand = '{\"jsonrpc\":\"2.0\",\"method\":\"VideoLibrary.GetTVShows\",\"params\":{\"filter\":{\"field\":\"title\",\"operator\":\"is\",\"value\":\"%s\"},\"properties\":[\"title\",]},\"id\":\"SickRage\"}'\n+ showsCommand = '{\"jsonrpc\":\"2.0\",\"method\":\"VideoLibrary.GetTVShows\",\"params\":{\"filter\":{\"field\":\"title\",\"operator\":\"is\",\"value\":\"%s\"},\"properties\":[\"title\"]},\"id\":\"SickRage\"}'\n \n # get tvshowid by showName\n showsResponse = self._send_to_kodi_json(showsCommand % showName, host)" } ]
SickRage
006fbfedc2cd0e928d79486f5ee89a79d64fda5f
abfff93b766d6b8eb81cb2ca4c410b795f5343e5
sickbeard/providers/omgwtfnzbs.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -111,7 +111,7 @@ class OmgwtfnzbsProvider(NZBProvider): if not data: continue - if self._checkAuthFromData(data, is_XML=False): + if not self._checkAuthFromData(data, is_XML=False): continue for item in data:
if self . _checkAuthFromData ( data , is_XML = False ) : continue
if not self . _checkAuthFromData ( data , is_XML = False ) : continue
CHANGE_UNARY_OPERATOR
[["Insert", ["if_statement", 3, 17, 4, 29], ["not_operator", "N0"], 1], ["Insert", "N0", ["not:not", "T"], 0], ["Move", "N0", ["call", 3, 20, 3, 63], 1]]
jackkiej/SickRage@006fbfedc2cd0e928d79486f5ee89a79d64fda5f
Fix manual/backlog for omgwtfnzbs
[ { "sha": "3680a361684f35a21a798dd5e3cbc90155d6fdba", "filename": "sickbeard/providers/omgwtfnzbs.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/006fbfedc2cd0e928d79486f5ee89a79d64fda5f/sickbeard%2Fproviders%2Fomgwtfnzbs.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/006fbfedc2cd0e928d79486f5ee89a79d64fda5f/sickbeard%2Fproviders%2Fomgwtfnzbs.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fproviders%2Fomgwtfnzbs.py?ref=006fbfedc2cd0e928d79486f5ee89a79d64fda5f", "patch": "@@ -111,7 +111,7 @@ def search(self, search_strings, age=0, ep_obj=None):\n if not data:\n continue\n \n- if self._checkAuthFromData(data, is_XML=False):\n+ if not self._checkAuthFromData(data, is_XML=False):\n continue\n \n for item in data:" } ]
SickRage
92ce0372dbd5eaca1cdc510f04ccb3cfe4acbd6a
5af109a04234d8f9d84e4d5302f2f615aaf7d3a6
sickbeard/providers/kat.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -139,7 +139,7 @@ class KatProvider(TorrentProvider): # pylint: disable=too-many-instance-attribu item = title, download_url, size, seeders, leechers, info_hash if mode != 'RSS': - logger.log(u"Found result: %s " % title, logger.DEBUG) + logger.log(u"Found result: %s with %s seeders and %s leechers" % (title, seeders, leechers), logger.DEBUG) items.append(item)
logger . log ( u"Found result: %s " % title , logger . DEBUG )
logger . log ( u"Found result: %s with %s seeders and %s leechers" % ( title , seeders , leechers ) , logger . DEBUG )
SINGLE_STMT
[["Update", ["string:u\"Found result: %s \"", 3, 40, 3, 60], "u\"Found result: %s with %s seeders and %s leechers\""], ["Insert", ["binary_operator", 3, 40, 3, 68], ["tuple", "N0"], 2], ["Insert", "N0", ["(:(", "T"], 0], ["Move", "N0", ["identifier:title", 3, 63, 3, 68], 1], ["Insert", "N0", [",:,", "T"], 2], ["Insert", "N0", ["identifier:seeders", "T"], 3], ["Insert", "N0", [",:,", "T"], 4], ["Insert", "N0", ["identifier:leechers", "T"], 5], ["Insert", "N0", ["):)", "T"], 6]]
jackkiej/SickRage@92ce0372dbd5eaca1cdc510f04ccb3cfe4acbd6a
Temporary add number of seeders to log message to help debug kat not always parsing correct seeders from website
[ { "sha": "484864c702ed028d3ab0aad78f984a3d3421cf57", "filename": "sickbeard/providers/kat.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/92ce0372dbd5eaca1cdc510f04ccb3cfe4acbd6a/sickbeard%2Fproviders%2Fkat.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/92ce0372dbd5eaca1cdc510f04ccb3cfe4acbd6a/sickbeard%2Fproviders%2Fkat.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fproviders%2Fkat.py?ref=92ce0372dbd5eaca1cdc510f04ccb3cfe4acbd6a", "patch": "@@ -139,7 +139,7 @@ def search(self, search_strings, age=0, ep_obj=None): # pylint: disable=too-man\n \n item = title, download_url, size, seeders, leechers, info_hash\n if mode != 'RSS':\n- logger.log(u\"Found result: %s \" % title, logger.DEBUG)\n+ logger.log(u\"Found result: %s with %s seeders and %s leechers\" % (title, seeders, leechers), logger.DEBUG)\n \n items.append(item)\n " } ]
SickRage
f143608cb40f11b3d51494a9e71a3064797170c2
d131dbafc6a8457faf5dd9189c557cde413c4c40
sickbeard/providers/thepiratebay.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -121,7 +121,7 @@ class ThePirateBayProvider(TorrentProvider): # pylint: disable=too-many-instanc continue # Accept Torrent only from Good People for every Episode Search - if self.confirmed and result.find(alt=re.compile(r'(VIP|Trusted|Helper|Moderator)')): + if self.confirmed and not result.find(alt=re.compile(r'VIP|Trusted')): if mode != 'RSS': logger.log(u"Found result %s but that doesn't seem like a trusted result so I'm ignoring it" % title, logger.DEBUG) continue
if self . confirmed and result . find ( alt = re . compile ( r'(VIP|Trusted|Helper|Moderator)' ) ) : if mode != 'RSS' : logger . log ( u"Found result %s but that doesn't seem like a trusted result so I'm ignoring it" % title , logger . DEBUG ) continue
if self . confirmed and not result . find ( alt = re . compile ( r'VIP|Trusted' ) ) : if mode != 'RSS' : logger . log ( u"Found result %s but that doesn't seem like a trusted result so I'm ignoring it" % title , logger . DEBUG ) continue
CHANGE_BINARY_OPERAND
[["Insert", ["boolean_operator", 3, 32, 3, 113], ["not_operator", "N0"], 2], ["Insert", "N0", ["not:not", "T"], 0], ["Move", "N0", ["call", 3, 51, 3, 113], 1], ["Update", ["string:r'(VIP|Trusted|Helper|Moderator)'", 3, 78, 3, 111], "r'VIP|Trusted'"]]
jackkiej/SickRage@f143608cb40f11b3d51494a9e71a3064797170c2
Fix confirmed/trusted downloads checking for TPB provider
[ { "sha": "48a43cd5b6109f1bcdb61bced54cf14e31b801c0", "filename": "sickbeard/providers/thepiratebay.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/f143608cb40f11b3d51494a9e71a3064797170c2/sickbeard%2Fproviders%2Fthepiratebay.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/f143608cb40f11b3d51494a9e71a3064797170c2/sickbeard%2Fproviders%2Fthepiratebay.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fproviders%2Fthepiratebay.py?ref=f143608cb40f11b3d51494a9e71a3064797170c2", "patch": "@@ -121,7 +121,7 @@ def process_column_header(th):\n continue\n \n # Accept Torrent only from Good People for every Episode Search\n- if self.confirmed and result.find(alt=re.compile(r'(VIP|Trusted|Helper|Moderator)')):\n+ if self.confirmed and not result.find(alt=re.compile(r'VIP|Trusted')):\n if mode != 'RSS':\n logger.log(u\"Found result %s but that doesn't seem like a trusted result so I'm ignoring it\" % title, logger.DEBUG)\n continue" } ]
SickRage
f67f6e90fc71e6e5ad30a264b3ce4aea68f8e23f
3f5939e4edb157c1cecccfc51a4203b47f6761e0
sickbeard/providers/thepiratebay.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -118,7 +118,7 @@ class ThePirateBayProvider(TorrentProvider): # pylint: disable=too-many-instanc continue # Accept Torrent only from Good People for every Episode Search - if self.confirmed and result.find(alt=re.compile(r'(VIP|Trusted|Helper|Moderator)')): + if self.confirmed and not result.find(alt=re.compile(r'VIP|Trusted')): if mode != 'RSS': logger.log(u"Found result %s but that doesn't seem like a trusted result so I'm ignoring it" % title, logger.DEBUG) continue
if self . confirmed and result . find ( alt = re . compile ( r'(VIP|Trusted|Helper|Moderator)' ) ) : if mode != 'RSS' : logger . log ( u"Found result %s but that doesn't seem like a trusted result so I'm ignoring it" % title , logger . DEBUG ) continue
if self . confirmed and not result . find ( alt = re . compile ( r'VIP|Trusted' ) ) : if mode != 'RSS' : logger . log ( u"Found result %s but that doesn't seem like a trusted result so I'm ignoring it" % title , logger . DEBUG ) continue
CHANGE_BINARY_OPERAND
[["Insert", ["boolean_operator", 3, 32, 3, 113], ["not_operator", "N0"], 2], ["Insert", "N0", ["not:not", "T"], 0], ["Move", "N0", ["call", 3, 51, 3, 113], 1], ["Update", ["string:r'(VIP|Trusted|Helper|Moderator)'", 3, 78, 3, 111], "r'VIP|Trusted'"]]
jackkiej/SickRage@f67f6e90fc71e6e5ad30a264b3ce4aea68f8e23f
Fix confirmed/trusted downloads checking for TPB provider
[ { "sha": "f83fcaa4228599eec4b2628126e1a9c58075ae8e", "filename": "sickbeard/providers/thepiratebay.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/f67f6e90fc71e6e5ad30a264b3ce4aea68f8e23f/sickbeard%2Fproviders%2Fthepiratebay.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/f67f6e90fc71e6e5ad30a264b3ce4aea68f8e23f/sickbeard%2Fproviders%2Fthepiratebay.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fproviders%2Fthepiratebay.py?ref=f67f6e90fc71e6e5ad30a264b3ce4aea68f8e23f", "patch": "@@ -118,7 +118,7 @@ def process_column_header(th):\n continue\n \n # Accept Torrent only from Good People for every Episode Search\n- if self.confirmed and result.find(alt=re.compile(r'(VIP|Trusted|Helper|Moderator)')):\n+ if self.confirmed and not result.find(alt=re.compile(r'VIP|Trusted')):\n if mode != 'RSS':\n logger.log(u\"Found result %s but that doesn't seem like a trusted result so I'm ignoring it\" % title, logger.DEBUG)\n continue" } ]
SickRage
2508a85d9426f46a6ca8c098a410e9c8a809062a
f143608cb40f11b3d51494a9e71a3064797170c2
sickbeard/webserve.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -723,7 +723,7 @@ class Home(WebRoot): sql_statement += ' (SELECT airdate FROM tv_episodes WHERE showid=tv_eps.showid AND airdate >= ' + today + ' AND (status = ' + str(UNAIRED) + ' OR status = ' + str(WANTED) + ') ORDER BY airdate ASC LIMIT 1) AS ep_airs_next, ' sql_statement += ' (SELECT airdate FROM tv_episodes WHERE showid=tv_eps.showid AND airdate > 1 AND status <> ' + str(UNAIRED) + ' ORDER BY airdate DESC LIMIT 1) AS ep_airs_prev, ' - sql_statement += ' (SELECT SUM(file_size) FROM tv_episodes WHERE showid=tv_eps.showid) AS show_size' + sql_statement += ' (SELECT SUM(file_size) FROM (SELECT DISTINCT location, file_size FROM tv_episodes WHERE showid=tv_eps.showid)) AS show_size' sql_statement += ' FROM tv_episodes tv_eps GROUP BY showid'
sql_statement += ' (SELECT SUM(file_size) FROM tv_episodes WHERE showid=tv_eps.showid) AS show_size'
sql_statement += ' (SELECT SUM(file_size) FROM (SELECT DISTINCT location, file_size FROM tv_episodes WHERE showid=tv_eps.showid)) AS show_size'
CHANGE_STRING_LITERAL
[["Update", ["string:' (SELECT SUM(file_size) FROM tv_episodes WHERE showid=tv_eps.showid) AS show_size'", 3, 26, 3, 109], "' (SELECT SUM(file_size) FROM (SELECT DISTINCT location, file_size FROM tv_episodes WHERE showid=tv_eps.showid)) AS show_size'"]]
jackkiej/SickRage@2508a85d9426f46a6ca8c098a410e9c8a809062a
Select only distinct file locations when calculating show size for home layout. Fixes https://github.com/SickRage/sickrage-issues/issues/596
[ { "sha": "59bb8b7edaee2972217e8d5d897598fb3b39e423", "filename": "sickbeard/webserve.py", "status": "modified", "additions": 15, "deletions": 15, "changes": 30, "blob_url": "https://github.com/jackkiej/SickRage/blob/2508a85d9426f46a6ca8c098a410e9c8a809062a/sickbeard%2Fwebserve.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/2508a85d9426f46a6ca8c098a410e9c8a809062a/sickbeard%2Fwebserve.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fwebserve.py?ref=2508a85d9426f46a6ca8c098a410e9c8a809062a", "patch": "@@ -723,7 +723,7 @@ def show_statistics():\n \n sql_statement += ' (SELECT airdate FROM tv_episodes WHERE showid=tv_eps.showid AND airdate >= ' + today + ' AND (status = ' + str(UNAIRED) + ' OR status = ' + str(WANTED) + ') ORDER BY airdate ASC LIMIT 1) AS ep_airs_next, '\n sql_statement += ' (SELECT airdate FROM tv_episodes WHERE showid=tv_eps.showid AND airdate > 1 AND status <> ' + str(UNAIRED) + ' ORDER BY airdate DESC LIMIT 1) AS ep_airs_prev, '\n- sql_statement += ' (SELECT SUM(file_size) FROM tv_episodes WHERE showid=tv_eps.showid) AS show_size'\n+ sql_statement += ' (SELECT SUM(file_size) FROM (SELECT DISTINCT location, file_size FROM tv_episodes WHERE showid=tv_eps.showid)) AS show_size'\n sql_statement += ' FROM tv_episodes tv_eps GROUP BY showid'\n \n sql_result = main_db_con.select(sql_statement)\n@@ -2655,33 +2655,33 @@ def addShowByID(self, indexer_id, show_name, indexer=\"TVDB\", which_series=None,\n \n if Show.find(sickbeard.showList, int(indexer_id)):\n return\n- \n+\n # Sanitize the paramater anyQualities and bestQualities. As these would normally be passed as lists\n if any_qualities:\n- any_qualities = any_qualities.split(',') \n+ any_qualities = any_qualities.split(',')\n else:\n any_qualities = []\n \n if best_qualities:\n best_qualities = best_qualities.split(',')\n else:\n best_qualities = []\n- \n+\n # If configure_show_options is enabled let's use the provided settings\n configure_show_options = config.checkbox_to_value(configure_show_options)\n- \n+\n if configure_show_options:\n # prepare the inputs for passing along\n scene = config.checkbox_to_value(scene)\n anime = config.checkbox_to_value(anime)\n flatten_folders = config.checkbox_to_value(flatten_folders)\n subtitles = config.checkbox_to_value(subtitles)\n- \n+\n if whitelist:\n whitelist = short_group_names(whitelist)\n if blacklist:\n blacklist = short_group_names(blacklist)\n- \n+\n if not any_qualities:\n any_qualities = []\n if not best_qualities or try_int(quality_preset, None):\n@@ -2691,9 +2691,9 @@ def addShowByID(self, indexer_id, show_name, indexer=\"TVDB\", which_series=None,\n if not isinstance(best_qualities, list):\n bestQualities = [best_qualities]\n quality = Quality.combineQualities([int(q) for q in any_qualities], [int(q) for q in best_qualities])\n- \n+\n location = root_dir\n- \n+\n else:\n default_status=sickbeard.STATUS_DEFAULT\n quality=sickbeard.QUALITY_DEFAULT\n@@ -2702,8 +2702,8 @@ def addShowByID(self, indexer_id, show_name, indexer=\"TVDB\", which_series=None,\n anime=sickbeard.ANIME_DEFAULT\n scene=sickbeard.SCENE_DEFAULT\n default_status_after=sickbeard.STATUS_DEFAULT_AFTER\n- \n- \n+\n+\n if sickbeard.ROOT_DIRS:\n root_dirs = sickbeard.ROOT_DIRS.split('|')\n location = root_dirs[int(root_dirs[0]) + 1]\n@@ -2716,12 +2716,12 @@ def addShowByID(self, indexer_id, show_name, indexer=\"TVDB\", which_series=None,\n \n show_name = get_showname_from_indexer(1, indexer_id)\n show_dir = None\n- \n+\n # add the show\n- sickbeard.showQueueScheduler.action.addShow(1, int(indexer_id), show_dir, int(default_status), quality, flatten_folders, \n- indexer_lang, subtitles, anime, scene, None, blacklist, whitelist, \n+ sickbeard.showQueueScheduler.action.addShow(1, int(indexer_id), show_dir, int(default_status), quality, flatten_folders,\n+ indexer_lang, subtitles, anime, scene, None, blacklist, whitelist,\n int(default_status_after), root_dir=location)\n- \n+\n ui.notifications.message('Show added', 'Adding the specified show {0}'.format(show_name))\n \n # done adding show" } ]
SickRage
11a6ba06432988926dd1b28d142f9bf05ec3a941
47b436d5e494f3310a0fd83042c2eddb390bf82d
sickbeard/traktChecker.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -232,7 +232,7 @@ class TraktChecker(object): trakt_id = sickbeard.indexerApi(cur_episode["indexer"]).config['trakt_id'] if not self._checkInList(trakt_id, str(cur_episode["showid"]), str(cur_episode["season"]), str(cur_episode["episode"]), List='Collection'): - logger.log(u"Adding Episode {show{ {ep} to collection".format + logger.log(u"Adding Episode {show} {ep} to collection".format (show=cur_episode["show_name"], ep=episode_num(cur_episode["season"], cur_episode["episode"])), logger.DEBUG)
logger . log ( u"Adding Episode {show{ {ep} to collection" . format ( show = cur_episode [ "show_name" ] , ep = episode_num ( cur_episode [ "season" ] , cur_episode [ "episode" ] ) ) , logger . DEBUG )
logger . log ( u"Adding Episode {show} {ep} to collection" . format ( show = cur_episode [ "show_name" ] , ep = episode_num ( cur_episode [ "season" ] , cur_episode [ "episode" ] ) ) , logger . DEBUG )
CHANGE_STRING_LITERAL
[["Update", ["string:u\"Adding Episode {show{ {ep} to collection\"", 3, 36, 3, 79], "u\"Adding Episode {show} {ep} to collection\""]]
jackkiej/SickRage@11a6ba06432988926dd1b28d142f9bf05ec3a941
Fixed small typo
[ { "sha": "5cce7bd4d80b141164c5c53a81bb184a1c35565b", "filename": "sickbeard/traktChecker.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/11a6ba06432988926dd1b28d142f9bf05ec3a941/sickbeard%2FtraktChecker.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/11a6ba06432988926dd1b28d142f9bf05ec3a941/sickbeard%2FtraktChecker.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2FtraktChecker.py?ref=11a6ba06432988926dd1b28d142f9bf05ec3a941", "patch": "@@ -232,7 +232,7 @@ def addEpisodeToTraktCollection(self):\n trakt_id = sickbeard.indexerApi(cur_episode[\"indexer\"]).config['trakt_id']\n \n if not self._checkInList(trakt_id, str(cur_episode[\"showid\"]), str(cur_episode[\"season\"]), str(cur_episode[\"episode\"]), List='Collection'):\n- logger.log(u\"Adding Episode {show{ {ep} to collection\".format\n+ logger.log(u\"Adding Episode {show} {ep} to collection\".format\n (show=cur_episode[\"show_name\"],\n ep=episode_num(cur_episode[\"season\"], cur_episode[\"episode\"])),\n logger.DEBUG)" } ]
SickRage
571202633c3ad99ab2b201dd302a5e516729b9e3
1794e2f924f530f4ce22d570eadbaa783f134a2d
tests/all_tests.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -54,7 +54,7 @@ class AllTests(unittest.TestCase): def _get_module_strings(self): modules = [] for file_string in self.test_file_strings: - modules.append(file_string[len(tests_dir):len(file_string) - 3].replace('/', '.')) + modules.append(file_string[len(tests_dir):len(file_string) - 3].replace(os.sep, '.')) return modules
modules . append ( file_string [ len ( tests_dir ) : len ( file_string ) - 3 ] . replace ( '/' , '.' ) )
modules . append ( file_string [ len ( tests_dir ) : len ( file_string ) - 3 ] . replace ( os . sep , '.' ) )
SINGLE_STMT
[["Insert", ["argument_list", 3, 84, 3, 94], ["attribute", "N0"], 1], ["Insert", "N0", ["identifier:os", "T"], 0], ["Insert", "N0", [".:.", "T"], 1], ["Insert", "N0", ["identifier:sep", "T"], 2], ["Delete", ["string:'/'", 3, 85, 3, 88]]]
jackkiej/SickRage@571202633c3ad99ab2b201dd302a5e516729b9e3
fix all_tests directory separator for windows
[ { "sha": "de388878e699e32834af523c5ecf68227e96410d", "filename": "tests/all_tests.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/571202633c3ad99ab2b201dd302a5e516729b9e3/tests%2Fall_tests.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/571202633c3ad99ab2b201dd302a5e516729b9e3/tests%2Fall_tests.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/tests%2Fall_tests.py?ref=571202633c3ad99ab2b201dd302a5e516729b9e3", "patch": "@@ -54,7 +54,7 @@ def testAll(self):\n def _get_module_strings(self):\n modules = []\n for file_string in self.test_file_strings:\n- modules.append(file_string[len(tests_dir):len(file_string) - 3].replace('/', '.'))\n+ modules.append(file_string[len(tests_dir):len(file_string) - 3].replace(os.sep, '.'))\n \n return modules\n " } ]
SickRage
b61d3be18a466aa9494bce08e1f3ffe099ce70d8
901d1114a1cd16e59cc4895b8bd5ac786d1c874e
sickbeard/searchBacklog.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -144,7 +144,7 @@ class BacklogSearcher: logger.log(u"Seeing if we need anything from {show_name}".format(show_name=show.name), logger.DEBUG) myDB = db.DBConnection() - sqlResults = myDB.select("SELECT status, season, episode FROM tv_episodes WHERE season > 0 AND airdate > ? AND showid = ?", + sqlResults = myDB.select("SELECT status, season, episode FROM tv_episodes WHERE airdate > ? AND showid = ?", [fromDate.toordinal(), show.indexerid]) # check through the list of statuses to see if we want any
sqlResults = myDB . select ( "SELECT status, season, episode FROM tv_episodes WHERE season > 0 AND airdate > ? AND showid = ?" , [ fromDate . toordinal ( ) , show . indexerid ] )
sqlResults = myDB . select ( "SELECT status, season, episode FROM tv_episodes WHERE airdate > ? AND showid = ?" , [ fromDate . toordinal ( ) , show . indexerid ] )
CHANGE_STRING_LITERAL
[["Update", ["string:\"SELECT status, season, episode FROM tv_episodes WHERE season > 0 AND airdate > ? AND showid = ?\"", 3, 34, 3, 131], "\"SELECT status, season, episode FROM tv_episodes WHERE airdate > ? AND showid = ?\""]]
jackkiej/SickRage@b61d3be18a466aa9494bce08e1f3ffe099ce70d8
Fix backlog searches for episodes in season 0
[ { "sha": "5f9f8d9a48ce8d3fffd7ffe7c90cf4a483615267", "filename": "sickbeard/searchBacklog.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/b61d3be18a466aa9494bce08e1f3ffe099ce70d8/sickbeard%2FsearchBacklog.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/b61d3be18a466aa9494bce08e1f3ffe099ce70d8/sickbeard%2FsearchBacklog.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2FsearchBacklog.py?ref=b61d3be18a466aa9494bce08e1f3ffe099ce70d8", "patch": "@@ -144,7 +144,7 @@ def _get_segments(self, show, fromDate):\n logger.log(u\"Seeing if we need anything from {show_name}\".format(show_name=show.name), logger.DEBUG)\n \n myDB = db.DBConnection()\n- sqlResults = myDB.select(\"SELECT status, season, episode FROM tv_episodes WHERE season > 0 AND airdate > ? AND showid = ?\",\n+ sqlResults = myDB.select(\"SELECT status, season, episode FROM tv_episodes WHERE airdate > ? AND showid = ?\",\n [fromDate.toordinal(), show.indexerid])\n \n # check through the list of statuses to see if we want any" } ]
SickRage
d2bfbe36b8fd99cf706e194ee4390c3baf04d3c8
73c423a2efc2ce5caac28268b8c918d5c8a5b4d4
sickbeard/__init__.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -609,7 +609,7 @@ def initialize(consoleLogging=True): GUI_NAME, HOME_LAYOUT, HISTORY_LAYOUT, DISPLAY_SHOW_SPECIALS, COMING_EPS_LAYOUT, COMING_EPS_SORT, COMING_EPS_DISPLAY_PAUSED, COMING_EPS_MISSED_RANGE, FUZZY_DATING, TRIM_ZERO, DATE_PRESET, TIME_PRESET, TIME_PRESET_W_SECONDS, THEME_NAME, \ POSTER_SORTBY, POSTER_SORTDIR, HISTORY_LIMIT, CREATE_MISSING_SHOW_DIRS, ADD_SHOWS_WO_DIR, \ METADATA_WDTV, METADATA_TIVO, METADATA_MEDE8ER, IGNORE_WORDS, TRACKERS_LIST, IGNORED_SUBS_LIST, REQUIRE_WORDS, CALENDAR_UNPROTECTED, CALENDAR_ICONS, NO_RESTART, \ - USE_SUBTITLES, SUBTITLES_LANGUAGES, SUBTITLES_DIR, SUBTITLES_SERVICES_LIST, SUBTITLES_SERVICES_ENABLED, SUBTITLES_HISTORY, SUBTITLES_FINDER_FREQUENCY, SUBTITLES_MULTI, EMBEDDED_SUBTITLES_ALL, SUBTITLES_EXTRA_SCRIPTS, subtitlesFinderScheduler, \ + USE_SUBTITLES, SUBTITLES_LANGUAGES, SUBTITLES_DIR, SUBTITLES_SERVICES_LIST, SUBTITLES_SERVICES_ENABLED, SUBTITLES_HISTORY, SUBTITLES_FINDER_FREQUENCY, SUBTITLES_MULTI, SUBTITLES_DOWNLOAD_IN_PP, EMBEDDED_SUBTITLES_ALL, SUBTITLES_EXTRA_SCRIPTS, subtitlesFinderScheduler, \ SUBTITLES_HEARING_IMPAIRED, ADDIC7ED_USER, ADDIC7ED_PASS, LEGENDASTV_USER, LEGENDASTV_PASS, OPENSUBTITLES_USER, OPENSUBTITLES_PASS, \ USE_FAILED_DOWNLOADS, DELETE_FAILED, ANON_REDIRECT, LOCALHOST_IP, DEBUG, DEFAULT_PAGE, PROXY_SETTING, PROXY_INDEXERS, \ AUTOPOSTPROCESSER_FREQUENCY, SHOWUPDATE_HOUR, \
GUI_NAME , HOME_LAYOUT , HISTORY_LAYOUT , DISPLAY_SHOW_SPECIALS , COMING_EPS_LAYOUT , COMING_EPS_SORT , COMING_EPS_DISPLAY_PAUSED , COMING_EPS_MISSED_RANGE , FUZZY_DATING , TRIM_ZERO , DATE_PRESET , TIME_PRESET , TIME_PRESET_W_SECONDS , THEME_NAME , POSTER_SORTBY , POSTER_SORTDIR , HISTORY_LIMIT , CREATE_MISSING_SHOW_DIRS , ADD_SHOWS_WO_DIR , METADATA_WDTV , METADATA_TIVO , METADATA_MEDE8ER , IGNORE_WORDS , TRACKERS_LIST , IGNORED_SUBS_LIST , REQUIRE_WORDS , CALENDAR_UNPROTECTED , CALENDAR_ICONS , NO_RESTART , USE_SUBTITLES , SUBTITLES_LANGUAGES , SUBTITLES_DIR , SUBTITLES_SERVICES_LIST , SUBTITLES_SERVICES_ENABLED , SUBTITLES_HISTORY , SUBTITLES_FINDER_FREQUENCY , SUBTITLES_MULTI , EMBEDDED_SUBTITLES_ALL , SUBTITLES_EXTRA_SCRIPTS , subtitlesFinderScheduler , SUBTITLES_HEARING_IMPAIRED , ADDIC7ED_USER , ADDIC7ED_PASS , LEGENDASTV_USER , LEGENDASTV_PASS , OPENSUBTITLES_USER , OPENSUBTITLES_PASS , USE_FAILED_DOWNLOADS , DELETE_FAILED , ANON_REDIRECT , LOCALHOST_IP , DEBUG , DEFAULT_PAGE , PROXY_SETTING , PROXY_INDEXERS , AUTOPOSTPROCESSER_FREQUENCY , SHOWUPDATE_HOUR ,
GUI_NAME , HOME_LAYOUT , HISTORY_LAYOUT , DISPLAY_SHOW_SPECIALS , COMING_EPS_LAYOUT , COMING_EPS_SORT , COMING_EPS_DISPLAY_PAUSED , COMING_EPS_MISSED_RANGE , FUZZY_DATING , TRIM_ZERO , DATE_PRESET , TIME_PRESET , TIME_PRESET_W_SECONDS , THEME_NAME , POSTER_SORTBY , POSTER_SORTDIR , HISTORY_LIMIT , CREATE_MISSING_SHOW_DIRS , ADD_SHOWS_WO_DIR , METADATA_WDTV , METADATA_TIVO , METADATA_MEDE8ER , IGNORE_WORDS , TRACKERS_LIST , IGNORED_SUBS_LIST , REQUIRE_WORDS , CALENDAR_UNPROTECTED , CALENDAR_ICONS , NO_RESTART , USE_SUBTITLES , SUBTITLES_LANGUAGES , SUBTITLES_DIR , SUBTITLES_SERVICES_LIST , SUBTITLES_SERVICES_ENABLED , SUBTITLES_HISTORY , SUBTITLES_FINDER_FREQUENCY , SUBTITLES_MULTI , SUBTITLES_DOWNLOAD_IN_PP , EMBEDDED_SUBTITLES_ALL , SUBTITLES_EXTRA_SCRIPTS , subtitlesFinderScheduler , SUBTITLES_HEARING_IMPAIRED , ADDIC7ED_USER , ADDIC7ED_PASS , LEGENDASTV_USER , LEGENDASTV_PASS , OPENSUBTITLES_USER , OPENSUBTITLES_PASS , USE_FAILED_DOWNLOADS , DELETE_FAILED , ANON_REDIRECT , LOCALHOST_IP , DEBUG , DEFAULT_PAGE , PROXY_SETTING , PROXY_INDEXERS , AUTOPOSTPROCESSER_FREQUENCY , SHOWUPDATE_HOUR ,
SINGLE_STMT
[["Move", [",:,", 0, 21, 0, 22], ["expression_statement", 0, 13, 6, 58], 108], ["Insert", ["expression_statement", 0, 13, 6, 58], [",:,", "T"], 1], ["Insert", ["expression_statement", 0, 13, 6, 58], ["identifier:SUBTITLES_DOWNLOAD_IN_PP", "T"], 75], ["Insert", ["expression_statement", 0, 13, 6, 58], [",:,", "T"], 76], ["Delete", [",:,", 6, 40, 6, 41]]]
jackkiej/SickRage@d2bfbe36b8fd99cf706e194ee4390c3baf04d3c8
Another error from rebased Last one. Checked everything
[ { "sha": "4079965bb78696d3e66592d570f0e4e89ccf99bd", "filename": "sickbeard/__init__.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/d2bfbe36b8fd99cf706e194ee4390c3baf04d3c8/sickbeard%2F__init__.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/d2bfbe36b8fd99cf706e194ee4390c3baf04d3c8/sickbeard%2F__init__.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2F__init__.py?ref=d2bfbe36b8fd99cf706e194ee4390c3baf04d3c8", "patch": "@@ -609,7 +609,7 @@ def initialize(consoleLogging=True):\n GUI_NAME, HOME_LAYOUT, HISTORY_LAYOUT, DISPLAY_SHOW_SPECIALS, COMING_EPS_LAYOUT, COMING_EPS_SORT, COMING_EPS_DISPLAY_PAUSED, COMING_EPS_MISSED_RANGE, FUZZY_DATING, TRIM_ZERO, DATE_PRESET, TIME_PRESET, TIME_PRESET_W_SECONDS, THEME_NAME, \\\n POSTER_SORTBY, POSTER_SORTDIR, HISTORY_LIMIT, CREATE_MISSING_SHOW_DIRS, ADD_SHOWS_WO_DIR, \\\n METADATA_WDTV, METADATA_TIVO, METADATA_MEDE8ER, IGNORE_WORDS, TRACKERS_LIST, IGNORED_SUBS_LIST, REQUIRE_WORDS, CALENDAR_UNPROTECTED, CALENDAR_ICONS, NO_RESTART, \\\n- USE_SUBTITLES, SUBTITLES_LANGUAGES, SUBTITLES_DIR, SUBTITLES_SERVICES_LIST, SUBTITLES_SERVICES_ENABLED, SUBTITLES_HISTORY, SUBTITLES_FINDER_FREQUENCY, SUBTITLES_MULTI, EMBEDDED_SUBTITLES_ALL, SUBTITLES_EXTRA_SCRIPTS, subtitlesFinderScheduler, \\\n+ USE_SUBTITLES, SUBTITLES_LANGUAGES, SUBTITLES_DIR, SUBTITLES_SERVICES_LIST, SUBTITLES_SERVICES_ENABLED, SUBTITLES_HISTORY, SUBTITLES_FINDER_FREQUENCY, SUBTITLES_MULTI, SUBTITLES_DOWNLOAD_IN_PP, EMBEDDED_SUBTITLES_ALL, SUBTITLES_EXTRA_SCRIPTS, subtitlesFinderScheduler, \\\n SUBTITLES_HEARING_IMPAIRED, ADDIC7ED_USER, ADDIC7ED_PASS, LEGENDASTV_USER, LEGENDASTV_PASS, OPENSUBTITLES_USER, OPENSUBTITLES_PASS, \\\n USE_FAILED_DOWNLOADS, DELETE_FAILED, ANON_REDIRECT, LOCALHOST_IP, DEBUG, DEFAULT_PAGE, PROXY_SETTING, PROXY_INDEXERS, \\\n AUTOPOSTPROCESSER_FREQUENCY, SHOWUPDATE_HOUR, \\" } ]
SickRage
4a1406fc93975aa112eec7f7f39a4fcab9ca2986
bf49cee0e5e106dbab6e479d0494acdf997560c9
sickbeard/subtitles.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -233,7 +233,7 @@ def download_subtitles(subtitles_info): def refresh_subtitles(episode_info, existing_subtitles): - video = get_video(episode_info['location']) + video = get_video(episode_info['location'].encode(sickbeard.SYS_ENCODING)) if not video: logger.log(u"Exception caught in subliminal.scan_video, subtitles couldn't be refreshed", logger.DEBUG) return (existing_subtitles, None)
video = get_video ( episode_info [ 'location' ] )
video = get_video ( episode_info [ 'location' ] . encode ( sickbeard . SYS_ENCODING ) )
ADD_METHOD_CALL
[["Insert", ["argument_list", 3, 22, 3, 48], ["call", "N0"], 1], ["Insert", ["argument_list", 3, 22, 3, 48], ["):)", "T"], 2], ["Insert", "N0", ["attribute", "N1"], 0], ["Insert", "N0", ["argument_list", "N2"], 1], ["Move", "N1", ["subscript", 3, 23, 3, 47], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:encode", "T"], 2], ["Insert", "N2", ["(:(", "T"], 0], ["Insert", "N2", ["attribute", "N3"], 1], ["Move", "N2", ["):)", 3, 47, 3, 48], 2], ["Insert", "N3", ["identifier:sickbeard", "T"], 0], ["Insert", "N3", [".:.", "T"], 1], ["Insert", "N3", ["identifier:SYS_ENCODING", "T"], 2]]
jackkiej/SickRage@4a1406fc93975aa112eec7f7f39a4fcab9ca2986
fix encoding issues
[ { "sha": "bc69e645981e9ce5cedeb8e7cb8142ef5267bb57", "filename": "sickbeard/subtitles.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/4a1406fc93975aa112eec7f7f39a4fcab9ca2986/sickbeard%2Fsubtitles.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/4a1406fc93975aa112eec7f7f39a4fcab9ca2986/sickbeard%2Fsubtitles.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fsubtitles.py?ref=4a1406fc93975aa112eec7f7f39a4fcab9ca2986", "patch": "@@ -233,7 +233,7 @@ def download_subtitles(subtitles_info):\n \n \n def refresh_subtitles(episode_info, existing_subtitles):\n- video = get_video(episode_info['location'])\n+ video = get_video(episode_info['location'].encode(sickbeard.SYS_ENCODING))\n if not video:\n logger.log(u\"Exception caught in subliminal.scan_video, subtitles couldn't be refreshed\", logger.DEBUG)\n return (existing_subtitles, None)" } ]
SickRage
8e62b15e668e31989deb18cc8bc4e4c0678a4d0b
718405a37cbeb5a903fe34e8b56865980bf6eddd
sickrage/show/History.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -96,7 +96,7 @@ class History: @staticmethod def _get_actions(action): - action = action.lower() if isinstance(action, str) else '' + action = action.lower() if isinstance(action, (str, unicode)) else '' if action == 'downloaded': return Quality.DOWNLOADED
action = action . lower ( ) if isinstance ( action , str ) else ''
action = action . lower ( ) if isinstance ( action , ( str , unicode ) ) else ''
SINGLE_STMT
[["Insert", ["argument_list", 3, 46, 3, 59], ["tuple", "N0"], 3], ["Insert", ["argument_list", 3, 46, 3, 59], ["):)", "T"], 4], ["Insert", "N0", ["(:(", "T"], 0], ["Move", "N0", ["identifier:str", 3, 55, 3, 58], 1], ["Insert", "N0", [",:,", "T"], 2], ["Insert", "N0", ["identifier:unicode", "T"], 3], ["Move", "N0", ["):)", 3, 58, 3, 59], 4]]
jackkiej/SickRage@8e62b15e668e31989deb18cc8bc4e4c0678a4d0b
Fix unicode for History._get_actions.
[ { "sha": "87ecd0bb90f47f3c9c8c2d4de4d06be2ec9d5544", "filename": "sickrage/show/History.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/8e62b15e668e31989deb18cc8bc4e4c0678a4d0b/sickrage%2Fshow%2FHistory.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/8e62b15e668e31989deb18cc8bc4e4c0678a4d0b/sickrage%2Fshow%2FHistory.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickrage%2Fshow%2FHistory.py?ref=8e62b15e668e31989deb18cc8bc4e4c0678a4d0b", "patch": "@@ -96,7 +96,7 @@ def trim(self):\n \n @staticmethod\n def _get_actions(action):\n- action = action.lower() if isinstance(action, str) else ''\n+ action = action.lower() if isinstance(action, (str, unicode)) else ''\n \n if action == 'downloaded':\n return Quality.DOWNLOADED" } ]
SickRage
038d891c737128b9c8d1cf622c7c66b597269561
c89376b1847910b128f07b0aa6bf4ca701186e02
sickbeard/webserve.py
https://github.com/jackkiej/SickRage
true
false
false
@@ -1489,7 +1489,7 @@ class Home(WebRoot): showObj.rls_ignore_words = rls_ignore_words.strip() showObj.rls_require_words = rls_require_words.strip() - location = unicode(location, 'UTF-8') + location = location.decode('UTF-8') # if we change location clear the db of episodes, change it, write to db, and rescan if os.path.normpath(showObj._location) != os.path.normpath(location): logger.log(os.path.normpath(showObj._location) + " != " + os.path.normpath(location), logger.DEBUG)
location = unicode ( location , 'UTF-8' )
location = location . decode ( 'UTF-8' )
SINGLE_STMT
[["Insert", ["call", 3, 24, 3, 50], ["attribute", "N0"], 0], ["Move", "N0", ["identifier:location", 3, 32, 3, 40], 0], ["Insert", "N0", [".:.", "T"], 1], ["Insert", "N0", ["identifier:decode", "T"], 2], ["Delete", ["identifier:unicode", 3, 24, 3, 31]], ["Delete", [",:,", 3, 40, 3, 41]]]
jackkiej/SickRage@038d891c737128b9c8d1cf622c7c66b597269561
.decode instead of unicode() incase string is already unicode Fixes https://github.com/SickRage/sickrage-issues/issues/105
[ { "sha": "79d20f81c6a9612f013c5dbc3fc228249ff2d0a5", "filename": "sickbeard/webserve.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/038d891c737128b9c8d1cf622c7c66b597269561/sickbeard%2Fwebserve.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/038d891c737128b9c8d1cf622c7c66b597269561/sickbeard%2Fwebserve.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fwebserve.py?ref=038d891c737128b9c8d1cf622c7c66b597269561", "patch": "@@ -1489,7 +1489,7 @@ def editShow(self, show=None, location=None, anyQualities=[], bestQualities=[],\n showObj.rls_ignore_words = rls_ignore_words.strip()\n showObj.rls_require_words = rls_require_words.strip()\n \n- location = unicode(location, 'UTF-8')\n+ location = location.decode('UTF-8')\n # if we change location clear the db of episodes, change it, write to db, and rescan\n if os.path.normpath(showObj._location) != os.path.normpath(location):\n logger.log(os.path.normpath(showObj._location) + \" != \" + os.path.normpath(location), logger.DEBUG)" } ]
SickRage
dc58c8275ac6df4deb8dd1bd539fa18b39e8f55e
a4f6c632e5db46ebaae065846910f82c5d23c167
sickbeard/metadata/generic.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -94,7 +94,7 @@ class GenericMetadata(object): return u'|'.join([str(int(x)) for x in config_list]) def get_id(self): - return GenericMetadata.make_id(self.name) + return GenericMetadata.makeID(self.name) @staticmethod def makeID(name):
return GenericMetadata . make_id ( self . name )
return GenericMetadata . makeID ( self . name )
WRONG_FUNCTION_NAME
[["Update", ["identifier:make_id", 3, 32, 3, 39], "makeID"]]
jackkiej/SickRage@dc58c8275ac6df4deb8dd1bd539fa18b39e8f55e
Fix SickRage/sickrage-issues/issues/163
[ { "sha": "c4d22bc051a73f2f11846c96e02d5ba3baefafaf", "filename": "sickbeard/metadata/generic.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/dc58c8275ac6df4deb8dd1bd539fa18b39e8f55e/sickbeard%2Fmetadata%2Fgeneric.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/dc58c8275ac6df4deb8dd1bd539fa18b39e8f55e/sickbeard%2Fmetadata%2Fgeneric.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fmetadata%2Fgeneric.py?ref=dc58c8275ac6df4deb8dd1bd539fa18b39e8f55e", "patch": "@@ -94,7 +94,7 @@ def get_config(self):\n return u'|'.join([str(int(x)) for x in config_list])\n \n def get_id(self):\n- return GenericMetadata.make_id(self.name)\n+ return GenericMetadata.makeID(self.name)\n \n @staticmethod\n def makeID(name):" } ]
sputnik
b3fd8a3e75f739fd42dbcc62bfafab64036dca7e
953fac0ec987a9210e5d43a86a95a9a04964e1fe
podcasts/management/commands/fetchepisodes.py
https://github.com/matachi/sputnik
true
false
true
@@ -9,7 +9,7 @@ class Command(BaseCommand): def handle(self, *args, **kwargs): for podcast in Podcast.objects.all(): - episodes = podcast.episode_set + episodes = podcast.episodes feed = feedparser.parse(podcast.feed) for feed_episode in feed.entries: try:
episodes = podcast . episode_set
episodes = podcast . episodes
CHANGE_ATTRIBUTE_USED
[["Update", ["identifier:episode_set", 3, 32, 3, 43], "episodes"]]
matachi/sputnik@b3fd8a3e75f739fd42dbcc62bfafab64036dca7e
Fix error in fetchepisodes.py
[ { "sha": "177152888381e9649e46c8b3d5731070732d788f", "filename": "podcasts/management/commands/fetchepisodes.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/matachi/sputnik/blob/b3fd8a3e75f739fd42dbcc62bfafab64036dca7e/podcasts%2Fmanagement%2Fcommands%2Ffetchepisodes.py", "raw_url": "https://github.com/matachi/sputnik/raw/b3fd8a3e75f739fd42dbcc62bfafab64036dca7e/podcasts%2Fmanagement%2Fcommands%2Ffetchepisodes.py", "contents_url": "https://api.github.com/repos/matachi/sputnik/contents/podcasts%2Fmanagement%2Fcommands%2Ffetchepisodes.py?ref=b3fd8a3e75f739fd42dbcc62bfafab64036dca7e", "patch": "@@ -9,7 +9,7 @@ class Command(BaseCommand):\n \n def handle(self, *args, **kwargs):\n for podcast in Podcast.objects.all():\n- episodes = podcast.episode_set\n+ episodes = podcast.episodes\n feed = feedparser.parse(podcast.feed)\n for feed_episode in feed.entries:\n try:" } ]
sputnik
a5733d0ce9e2e0740c2447800b9cf27a95c19535
44ef2f5c15caaee5ef7f72efa751693e09a3ea53
podcasts/management/commands/fetchepisodes.py
https://github.com/matachi/sputnik
true
false
true
@@ -33,7 +33,7 @@ class Command(BaseCommand): @staticmethod def get_link(episode): - getattr(episode, 'link', ''), + return getattr(episode, 'link', ''), @staticmethod def get_published(episode):
getattr ( episode , 'link' , '' ) ,
return getattr ( episode , 'link' , '' ) ,
SINGLE_STMT
[["Insert", ["block", 3, 9, 3, 38], ["return_statement", "N0"], 0], ["Insert", "N0", ["return:return", "T"], 0], ["Insert", "N0", ["expression_list", "N1"], 1], ["Move", "N1", ["call", 3, 9, 3, 37], 0], ["Move", "N1", [",:,", 3, 37, 3, 38], 1], ["Delete", ["expression_statement", 3, 9, 3, 38]]]
matachi/sputnik@a5733d0ce9e2e0740c2447800b9cf27a95c19535
Fix a small bug in fetchepisodes.py
[ { "sha": "6d02deb9b12d9871b57f55a48b0ff073ce5c9ae0", "filename": "podcasts/management/commands/fetchepisodes.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/matachi/sputnik/blob/a5733d0ce9e2e0740c2447800b9cf27a95c19535/podcasts%2Fmanagement%2Fcommands%2Ffetchepisodes.py", "raw_url": "https://github.com/matachi/sputnik/raw/a5733d0ce9e2e0740c2447800b9cf27a95c19535/podcasts%2Fmanagement%2Fcommands%2Ffetchepisodes.py", "contents_url": "https://api.github.com/repos/matachi/sputnik/contents/podcasts%2Fmanagement%2Fcommands%2Ffetchepisodes.py?ref=a5733d0ce9e2e0740c2447800b9cf27a95c19535", "patch": "@@ -33,7 +33,7 @@ def handle(self, *args, **kwargs):\n \n @staticmethod\n def get_link(episode):\n- getattr(episode, 'link', ''),\n+ return getattr(episode, 'link', ''),\n \n @staticmethod\n def get_published(episode):" } ]
sputnik
324585fbf4a4e8b2a28efec111d9ec5aa1839e01
7790ef36fba1b90bd55c3a5a3e63c6aaffb9ed6f
podcasts/management/commands/fetchepisodes.py
https://github.com/matachi/sputnik
true
false
true
@@ -33,7 +33,7 @@ class Command(BaseCommand): @staticmethod def get_link(episode): - return getattr(episode, 'link', ''), + return getattr(episode, 'link', '') @staticmethod def get_published(episode):
return getattr ( episode , 'link' , '' ) ,
return getattr ( episode , 'link' , '' )
SINGLE_STMT
[["Move", ["return_statement", 3, 9, 3, 45], ["call", 3, 16, 3, 44], 1], ["Delete", [",:,", 3, 44, 3, 45]], ["Delete", ["expression_list", 3, 16, 3, 45]]]
matachi/sputnik@324585fbf4a4e8b2a28efec111d9ec5aa1839e01
Fix small bug in fetchepisodes.py
[ { "sha": "4b425b08842ebc3fbff1aca0e361a8dc185ef3fb", "filename": "podcasts/management/commands/fetchepisodes.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/matachi/sputnik/blob/324585fbf4a4e8b2a28efec111d9ec5aa1839e01/podcasts%2Fmanagement%2Fcommands%2Ffetchepisodes.py", "raw_url": "https://github.com/matachi/sputnik/raw/324585fbf4a4e8b2a28efec111d9ec5aa1839e01/podcasts%2Fmanagement%2Fcommands%2Ffetchepisodes.py", "contents_url": "https://api.github.com/repos/matachi/sputnik/contents/podcasts%2Fmanagement%2Fcommands%2Ffetchepisodes.py?ref=324585fbf4a4e8b2a28efec111d9ec5aa1839e01", "patch": "@@ -33,7 +33,7 @@ def handle(self, *args, **kwargs):\n \n @staticmethod\n def get_link(episode):\n- return getattr(episode, 'link', ''),\n+ return getattr(episode, 'link', '')\n \n @staticmethod\n def get_published(episode):" } ]
sputnik
d0710fe6a31271f5ba7a482decd0ba1cd02cd437
16e319183bfdbd54da59f352f351a4e521070d03
fabfile.py
https://github.com/matachi/sputnik
true
false
true
@@ -14,7 +14,7 @@ def setup_dev(): with cd('"{}"'.format(os.path.dirname(__file__))): run('python3 manage.py syncdb') run('python3 manage.py loaddata sample_podcasts') - update_podcasts() + run('python3 manage.py updatepodcasts') run('python3 manage.py fetchepisodes') run('python3 manage.py update_index')
update_podcasts ( )
run ( 'python3 manage.py updatepodcasts' )
SINGLE_STMT
[["Update", ["identifier:update_podcasts", 3, 9, 3, 24], "run"], ["Insert", ["argument_list", 3, 24, 3, 26], ["string:'python3 manage.py updatepodcasts'", "T"], 1]]
matachi/sputnik@d0710fe6a31271f5ba7a482decd0ba1cd02cd437
Fix error in fabfile.py
[ { "sha": "e203ee78aadc3960994163a1b942490deccf1001", "filename": "fabfile.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/matachi/sputnik/blob/d0710fe6a31271f5ba7a482decd0ba1cd02cd437/fabfile.py", "raw_url": "https://github.com/matachi/sputnik/raw/d0710fe6a31271f5ba7a482decd0ba1cd02cd437/fabfile.py", "contents_url": "https://api.github.com/repos/matachi/sputnik/contents/fabfile.py?ref=d0710fe6a31271f5ba7a482decd0ba1cd02cd437", "patch": "@@ -14,7 +14,7 @@ def setup_dev():\n with cd('\"{}\"'.format(os.path.dirname(__file__))):\n run('python3 manage.py syncdb')\n run('python3 manage.py loaddata sample_podcasts')\n- update_podcasts()\n+ run('python3 manage.py updatepodcasts')\n run('python3 manage.py fetchepisodes')\n run('python3 manage.py update_index')\n " } ]
sputnik
c7f95ca01dc40a53d05c91faf5c5b03af97dfffe
4ba4a81f739acb321acbe9ca7396bc772fd696af
create_secret_key.py
https://github.com/matachi/sputnik
true
false
false
@@ -7,7 +7,7 @@ chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)' secret_key = get_random_string(50, chars) current_file_dir = path.dirname(path.abspath(__file__)) -settings_file_name = path.join(current_file_dir, 'hydra', 'settings.py') +settings_file_name = path.join(current_file_dir, 'sputnik', 'settings.py') # Solution found on http://stackoverflow.com/a/2962828/595990 for line in fileinput.input(settings_file_name, inplace=True):
settings_file_name = path . join ( current_file_dir , 'hydra' , 'settings.py' )
settings_file_name = path . join ( current_file_dir , 'sputnik' , 'settings.py' )
CHANGE_STRING_LITERAL
[["Update", ["string:'hydra'", 3, 50, 3, 57], "'sputnik'"]]
matachi/sputnik@c7f95ca01dc40a53d05c91faf5c5b03af97dfffe
Fix a wrong path
[ { "sha": "97f4d6809163b8e039df924bc2164a941a839dbe", "filename": "create_secret_key.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/matachi/sputnik/blob/c7f95ca01dc40a53d05c91faf5c5b03af97dfffe/create_secret_key.py", "raw_url": "https://github.com/matachi/sputnik/raw/c7f95ca01dc40a53d05c91faf5c5b03af97dfffe/create_secret_key.py", "contents_url": "https://api.github.com/repos/matachi/sputnik/contents/create_secret_key.py?ref=c7f95ca01dc40a53d05c91faf5c5b03af97dfffe", "patch": "@@ -7,7 +7,7 @@\n secret_key = get_random_string(50, chars)\n \n current_file_dir = path.dirname(path.abspath(__file__))\n-settings_file_name = path.join(current_file_dir, 'hydra', 'settings.py')\n+settings_file_name = path.join(current_file_dir, 'sputnik', 'settings.py')\n \n # Solution found on http://stackoverflow.com/a/2962828/595990\n for line in fileinput.input(settings_file_name, inplace=True):" } ]
tensor2tensor
2951d5705cc389da6db5a94c21cb0da10948e7f3
2f03f0cad63c2142595aaffdacc72427496653f3
tensor2tensor/data_generators/text_encoder.py
https://github.com/medicode/tensor2tensor
true
false
false
@@ -285,7 +285,7 @@ class SubwordTextEncoder(TextEncoder): subtokenizer.build_from_token_counts(token_counts, store_filename, present_count, num_iterations) - if min_val == max_val or subtokenizer.vocab_size == target_size: + if min_val >= max_val or subtokenizer.vocab_size == target_size: return subtokenizer elif subtokenizer.vocab_size > target_size: other_subtokenizer = cls.build_to_target_size(
if min_val == max_val or subtokenizer . vocab_size == target_size : return subtokenizer
if min_val >= max_val or subtokenizer . vocab_size == target_size : return subtokenizer
CHANGE_BINARY_OPERATOR
[["Insert", ["comparison_operator", 3, 8, 3, 26], [">=:>=", "T"], 1], ["Delete", ["==:==", 3, 16, 3, 18]]]
medicode/tensor2tensor@2951d5705cc389da6db5a94c21cb0da10948e7f3
Fix SubworkTextEncoder binary search for small vocab sizes
[ { "sha": "78bc056619e55005cc2114e2210210a3f1714d03", "filename": "tensor2tensor/data_generators/text_encoder.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/medicode/tensor2tensor/blob/2951d5705cc389da6db5a94c21cb0da10948e7f3/tensor2tensor%2Fdata_generators%2Ftext_encoder.py", "raw_url": "https://github.com/medicode/tensor2tensor/raw/2951d5705cc389da6db5a94c21cb0da10948e7f3/tensor2tensor%2Fdata_generators%2Ftext_encoder.py", "contents_url": "https://api.github.com/repos/medicode/tensor2tensor/contents/tensor2tensor%2Fdata_generators%2Ftext_encoder.py?ref=2951d5705cc389da6db5a94c21cb0da10948e7f3", "patch": "@@ -285,7 +285,7 @@ def build_to_target_size(cls,\n subtokenizer.build_from_token_counts(token_counts, store_filename,\n present_count, num_iterations)\n \n- if min_val == max_val or subtokenizer.vocab_size == target_size:\n+ if min_val >= max_val or subtokenizer.vocab_size == target_size:\n return subtokenizer\n elif subtokenizer.vocab_size > target_size:\n other_subtokenizer = cls.build_to_target_size(" } ]
tensor2tensor
bbff1ec1e22e7bc9f86a81784bce7ccb088a1da6
9fbfa3ddafaa77d258f2af70a5868de46b659901
tensor2tensor/data_generators/generator_utils.py
https://github.com/medicode/tensor2tensor
true
false
false
@@ -27,7 +27,7 @@ import tarfile import six from six.moves import xrange # pylint: disable=redefined-builtin -import six.moves.urllib_request # Imports urllib on Python2, urllib.request on Python3 +import six.moves.urllib_request as urllib # Imports urllib on Python2, urllib.request on Python3 from tensor2tensor.data_generators.text_encoder import SubwordTextEncoder from tensor2tensor.data_generators.tokenizer import Tokenizer
import six . moves . urllib_request
import six . moves . urllib_request as urllib
SINGLE_STMT
[["Insert", ["import_statement", 3, 1, 3, 32], ["aliased_import", "N0"], 1], ["Move", "N0", ["dotted_name", 3, 8, 3, 32], 0], ["Insert", "N0", ["as:as", "T"], 1], ["Insert", "N0", ["identifier:urllib", "T"], 2]]
medicode/tensor2tensor@bbff1ec1e22e7bc9f86a81784bce7ccb088a1da6
Fixed import
[ { "sha": "c50d19afac7d5ecec0333f8f61a320076b0def33", "filename": "tensor2tensor/data_generators/generator_utils.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/medicode/tensor2tensor/blob/bbff1ec1e22e7bc9f86a81784bce7ccb088a1da6/tensor2tensor%2Fdata_generators%2Fgenerator_utils.py", "raw_url": "https://github.com/medicode/tensor2tensor/raw/bbff1ec1e22e7bc9f86a81784bce7ccb088a1da6/tensor2tensor%2Fdata_generators%2Fgenerator_utils.py", "contents_url": "https://api.github.com/repos/medicode/tensor2tensor/contents/tensor2tensor%2Fdata_generators%2Fgenerator_utils.py?ref=bbff1ec1e22e7bc9f86a81784bce7ccb088a1da6", "patch": "@@ -27,7 +27,7 @@\n \n import six\n from six.moves import xrange # pylint: disable=redefined-builtin\n-import six.moves.urllib_request # Imports urllib on Python2, urllib.request on Python3\n+import six.moves.urllib_request as urllib # Imports urllib on Python2, urllib.request on Python3\n \n from tensor2tensor.data_generators.text_encoder import SubwordTextEncoder\n from tensor2tensor.data_generators.tokenizer import Tokenizer" } ]
tensor2tensor
1c775fa991a90bb1230f4b9489f8d8c5aebccc43
a2a6178801217661e4dee1ea8cdbfc6845a3c32b
tensor2tensor/data_generators/problem_hparams.py
https://github.com/medicode/tensor2tensor
true
false
true
@@ -78,7 +78,7 @@ def parse_problem_name(problem_name): def _lookup_problem_hparams_fn(name): if name not in PROBLEM_HPARAMS_MAP: - map_str = "\n* ".join(PROBLEM_HPARAMS_MAP.keys()) + map_str = "* " + "\n* ".join(sorted(PROBLEM_HPARAMS_MAP.keys())) error_msg = "%s not in the supported set of problems:\n%s" % (name, map_str) raise ValueError(error_msg) return PROBLEM_HPARAMS_MAP.get(name)
map_str = "\n* " . join ( PROBLEM_HPARAMS_MAP . keys ( ) )
map_str = "* " + "\n* " . join ( sorted ( PROBLEM_HPARAMS_MAP . keys ( ) ) )
SINGLE_STMT
[["Insert", ["assignment", 3, 5, 3, 54], ["binary_operator", "N0"], 2], ["Insert", "N0", ["string:\"* \"", "T"], 0], ["Insert", "N0", ["+:+", "T"], 1], ["Move", "N0", ["call", 3, 15, 3, 54], 2], ["Insert", ["call", 3, 15, 3, 54], ["argument_list", "N1"], 1], ["Insert", "N1", ["(:(", "T"], 0], ["Insert", "N1", ["call", "N2"], 1], ["Insert", "N1", ["):)", "T"], 2], ["Insert", "N2", ["identifier:sorted", "T"], 0], ["Move", "N2", ["argument_list", 3, 26, 3, 54], 1]]
medicode/tensor2tensor@1c775fa991a90bb1230f4b9489f8d8c5aebccc43
Improve error message for missing problems
[ { "sha": "884a1b1afe33cc774424a1d2e6369009788de8f2", "filename": "tensor2tensor/data_generators/problem_hparams.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/medicode/tensor2tensor/blob/1c775fa991a90bb1230f4b9489f8d8c5aebccc43/tensor2tensor%2Fdata_generators%2Fproblem_hparams.py", "raw_url": "https://github.com/medicode/tensor2tensor/raw/1c775fa991a90bb1230f4b9489f8d8c5aebccc43/tensor2tensor%2Fdata_generators%2Fproblem_hparams.py", "contents_url": "https://api.github.com/repos/medicode/tensor2tensor/contents/tensor2tensor%2Fdata_generators%2Fproblem_hparams.py?ref=1c775fa991a90bb1230f4b9489f8d8c5aebccc43", "patch": "@@ -78,7 +78,7 @@ def parse_problem_name(problem_name):\n \n def _lookup_problem_hparams_fn(name):\n if name not in PROBLEM_HPARAMS_MAP:\n- map_str = \"\\n* \".join(PROBLEM_HPARAMS_MAP.keys())\n+ map_str = \"* \" + \"\\n* \".join(sorted(PROBLEM_HPARAMS_MAP.keys()))\n error_msg = \"%s not in the supported set of problems:\\n%s\" % (name, map_str)\n raise ValueError(error_msg)\n return PROBLEM_HPARAMS_MAP.get(name)" } ]
tensor2tensor
b1ad6f076c734f9b4823af7f05f1ca0d643afd83
006ecb50f6b63a18e0665d7d97869f95a3003dc1
tensor2tensor/data_generators/text_encoder.py
https://github.com/medicode/tensor2tensor
true
false
true
@@ -473,7 +473,7 @@ class SubwordTextEncoder(TextEncoder): - assert isinstance(token, unicode) + assert isinstance(token, six.text_type) token = token.replace(u"\\", u"\\\\").replace(u"_", u"\\u") + u"_" ret = u"" for c in token:
assert isinstance ( token , unicode )
assert isinstance ( token , six . text_type )
SINGLE_STMT
[["Insert", ["argument_list", 0, 22, 0, 38], ["attribute", "N0"], 3], ["Update", ["identifier:unicode", 0, 30, 0, 37], "six"], ["Move", "N0", ["identifier:unicode", 0, 30, 0, 37], 0], ["Insert", "N0", [".:.", "T"], 1], ["Insert", "N0", ["identifier:text_type", "T"], 2]]
medicode/tensor2tensor@b1ad6f076c734f9b4823af7f05f1ca0d643afd83
replace unicode with six.text_type
[ { "sha": "4184a7e87586ab678f10bb8167a9ffc3ce994525", "filename": "tensor2tensor/data_generators/text_encoder.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/medicode/tensor2tensor/blob/b1ad6f076c734f9b4823af7f05f1ca0d643afd83/tensor2tensor%2Fdata_generators%2Ftext_encoder.py", "raw_url": "https://github.com/medicode/tensor2tensor/raw/b1ad6f076c734f9b4823af7f05f1ca0d643afd83/tensor2tensor%2Fdata_generators%2Ftext_encoder.py", "contents_url": "https://api.github.com/repos/medicode/tensor2tensor/contents/tensor2tensor%2Fdata_generators%2Ftext_encoder.py?ref=b1ad6f076c734f9b4823af7f05f1ca0d643afd83", "patch": "@@ -473,7 +473,7 @@ def _escape_token(self, token):\n Returns:\n escaped_token: a unicode string\n \"\"\"\n- assert isinstance(token, unicode)\n+ assert isinstance(token, six.text_type)\n token = token.replace(u\"\\\\\", u\"\\\\\\\\\").replace(u\"_\", u\"\\\\u\") + u\"_\"\n ret = u\"\"\n for c in token:" } ]
tensor2tensor
78acdb4f3b0908bbdf32fea8b98eee5b65641ef9
80dba8903f053314510ae4042e0171ec970e2f83
tensor2tensor/data_generators/text_encoder.py
https://github.com/medicode/tensor2tensor
true
false
true
@@ -530,4 +530,4 @@ class SubwordTextEncoder(TextEncoder): # Convert '\u' to '_' and '\\' to '\' return u"_" if m.group(0) == u"\\u" else u"\\" # Cut off the trailing underscore and apply the regex substitution - return self._UNESCAPE_REGEX.sub(match, escaped_token[:-1]) + return _UNESCAPE_REGEX.sub(match, escaped_token[:-1])
return self . _UNESCAPE_REGEX . sub ( match , escaped_token [ : - 1 ] )
return _UNESCAPE_REGEX . sub ( match , escaped_token [ : - 1 ] )
SINGLE_STMT
[["Move", ["attribute", 3, 12, 3, 36], ["identifier:_UNESCAPE_REGEX", 3, 17, 3, 32], 0], ["Delete", ["identifier:self", 3, 12, 3, 16]], ["Delete", [".:.", 3, 16, 3, 17]], ["Delete", ["attribute", 3, 12, 3, 32]]]
medicode/tensor2tensor@78acdb4f3b0908bbdf32fea8b98eee5b65641ef9
Fix a bug in text_encoder. "self._UNESCAPE_REGEX -> _UNESCAPE_REGEX" PiperOrigin-RevId: 162542600
[ { "sha": "8be22ce0b7342bda7c711a7104846f562dd6d709", "filename": "tensor2tensor/data_generators/text_encoder.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/medicode/tensor2tensor/blob/78acdb4f3b0908bbdf32fea8b98eee5b65641ef9/tensor2tensor%2Fdata_generators%2Ftext_encoder.py", "raw_url": "https://github.com/medicode/tensor2tensor/raw/78acdb4f3b0908bbdf32fea8b98eee5b65641ef9/tensor2tensor%2Fdata_generators%2Ftext_encoder.py", "contents_url": "https://api.github.com/repos/medicode/tensor2tensor/contents/tensor2tensor%2Fdata_generators%2Ftext_encoder.py?ref=78acdb4f3b0908bbdf32fea8b98eee5b65641ef9", "patch": "@@ -530,4 +530,4 @@ def match(m):\n # Convert '\\u' to '_' and '\\\\' to '\\'\n return u\"_\" if m.group(0) == u\"\\\\u\" else u\"\\\\\"\n # Cut off the trailing underscore and apply the regex substitution\n- return self._UNESCAPE_REGEX.sub(match, escaped_token[:-1])\n+ return _UNESCAPE_REGEX.sub(match, escaped_token[:-1])" } ]
tensor2tensor
0416d957cc04f6778cb18d11e4426522e1c69b1d
7db5ee881c6e9b961ff83fd316c6e983951fdf76
tensor2tensor/data_generators/text_encoder.py
https://github.com/medicode/tensor2tensor
true
false
false
@@ -54,7 +54,7 @@ else: # '\\' is converted to '\' # '\213;' is converted to unichr(213) _UNESCAPE_REGEX = re.compile(r"\\u|\\\\|\\([0-9]+);") -_ESCAPE_CHARS = set(u"\\_;0123456789") +_ESCAPE_CHARS = set(u"\\_u;0123456789") def native_to_unicode_py2(s):
_ESCAPE_CHARS = set ( u"\\_;0123456789" )
_ESCAPE_CHARS = set ( u"\\_u;0123456789" )
CHANGE_STRING_LITERAL
[["Update", ["string:u\"\\\\_;0123456789\"", 3, 21, 3, 38], "u\"\\\\_u;0123456789\""]]
medicode/tensor2tensor@0416d957cc04f6778cb18d11e4426522e1c69b1d
Prevent extremely unlikely bug around escaping characters. PiperOrigin-RevId: 163522446
[ { "sha": "21215472da38a4ef3be0e29132678a31ca40225c", "filename": "tensor2tensor/data_generators/text_encoder.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/medicode/tensor2tensor/blob/0416d957cc04f6778cb18d11e4426522e1c69b1d/tensor2tensor%2Fdata_generators%2Ftext_encoder.py", "raw_url": "https://github.com/medicode/tensor2tensor/raw/0416d957cc04f6778cb18d11e4426522e1c69b1d/tensor2tensor%2Fdata_generators%2Ftext_encoder.py", "contents_url": "https://api.github.com/repos/medicode/tensor2tensor/contents/tensor2tensor%2Fdata_generators%2Ftext_encoder.py?ref=0416d957cc04f6778cb18d11e4426522e1c69b1d", "patch": "@@ -54,7 +54,7 @@\n # '\\\\' is converted to '\\'\n # '\\213;' is converted to unichr(213)\n _UNESCAPE_REGEX = re.compile(r\"\\\\u|\\\\\\\\|\\\\([0-9]+);\")\n-_ESCAPE_CHARS = set(u\"\\\\_;0123456789\")\n+_ESCAPE_CHARS = set(u\"\\\\_u;0123456789\")\n \n \n def native_to_unicode_py2(s):" } ]
tensor2tensor
daee057e764f008230cc9b88a61165d62a17891a
342e3090a47b0f625e2bba9d4f40ca995a8067c0
tensor2tensor/utils/t2t_model.py
https://github.com/medicode/tensor2tensor
true
false
true
@@ -425,7 +425,7 @@ class T2TModel(object): else: body_outputs, losses = self.model_fn_body_sharded( transformed_features) - if isinstance(losses, tf.Tensor): # If it's a single extra loss. + if not isinstance(losses, dict): # If it's a single extra loss. losses = {"extra": losses} with tf.variable_scope(target_modality.name, reuse=target_reuse):
if isinstance ( losses , tf . Tensor ) : losses = { "extra" : losses }
if not isinstance ( losses , dict ) : losses = { "extra" : losses }
SINGLE_STMT
[["Insert", ["if_statement", 3, 9, 4, 37], ["not_operator", "N0"], 1], ["Insert", "N0", ["not:not", "T"], 0], ["Move", "N0", ["call", 3, 12, 3, 41], 1], ["Update", ["identifier:tf", 3, 31, 3, 33], "dict"], ["Move", ["argument_list", 3, 22, 3, 41], ["identifier:tf", 3, 31, 3, 33], 3], ["Delete", [".:.", 3, 33, 3, 34]], ["Delete", ["identifier:Tensor", 3, 34, 3, 40]], ["Delete", ["attribute", 3, 31, 3, 40]]]
medicode/tensor2tensor@daee057e764f008230cc9b88a61165d62a17891a
Fix a bug in t2t_model for the case where the model returns a float PiperOrigin-RevId: 164662524
[ { "sha": "a33b0e0cd7e09368fe28f60acb4f548effd2b64f", "filename": "tensor2tensor/utils/t2t_model.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/medicode/tensor2tensor/blob/daee057e764f008230cc9b88a61165d62a17891a/tensor2tensor%2Futils%2Ft2t_model.py", "raw_url": "https://github.com/medicode/tensor2tensor/raw/daee057e764f008230cc9b88a61165d62a17891a/tensor2tensor%2Futils%2Ft2t_model.py", "contents_url": "https://api.github.com/repos/medicode/tensor2tensor/contents/tensor2tensor%2Futils%2Ft2t_model.py?ref=daee057e764f008230cc9b88a61165d62a17891a", "patch": "@@ -425,7 +425,7 @@ def model_fn(self, features, skip=False, last_position_only=False):\n else:\n body_outputs, losses = self.model_fn_body_sharded(\n transformed_features)\n- if isinstance(losses, tf.Tensor): # If it's a single extra loss.\n+ if not isinstance(losses, dict): # If it's a single extra loss.\n losses = {\"extra\": losses}\n \n with tf.variable_scope(target_modality.name, reuse=target_reuse):" } ]
SickRage
3de156342fff5c5b886327456cd617c976f1cef5
229b556aedb919df99739c7af6a43ff39512b97e
sickbeard/providers/btdigg.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -62,7 +62,7 @@ class BTDiggProvider(TorrentProvider): else: search_params["order"] = 2 - jdata = self.get_url(self.urls["api"], params=search_params, response="json") + jdata = self.get_url(self.urls["api"], params=search_params, returns="json") if not jdata: logger.log("Provider did not return data", logger.DEBUG) continue
jdata = self . get_url ( self . urls [ "api" ] , params = search_params , response = "json" )
jdata = self . get_url ( self . urls [ "api" ] , params = search_params , returns = "json" )
CHANGE_KEYWORD_ARGUMENT_USED
[["Update", ["identifier:response", 3, 78, 3, 86], "returns"]]
jackkiej/SickRage@3de156342fff5c5b886327456cd617c976f1cef5
RARBG: * Use unicode literals, remove u prefixes, use " over ' for strings * Use .format over token string formatting * Pass returns="json" * Remove excess logging, pop elements as they are used from the json
[ { "sha": "0d7b517ccbe8ccfb1701f9923162fe82da2c2ca3", "filename": "sickbeard/providers/btdigg.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/3de156342fff5c5b886327456cd617c976f1cef5/sickbeard%2Fproviders%2Fbtdigg.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/3de156342fff5c5b886327456cd617c976f1cef5/sickbeard%2Fproviders%2Fbtdigg.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fproviders%2Fbtdigg.py?ref=3de156342fff5c5b886327456cd617c976f1cef5", "patch": "@@ -62,7 +62,7 @@ def search(self, search_strings, age=0, ep_obj=None): # pylint: disable=too-man\n else:\n search_params[\"order\"] = 2\n \n- jdata = self.get_url(self.urls[\"api\"], params=search_params, response=\"json\")\n+ jdata = self.get_url(self.urls[\"api\"], params=search_params, returns=\"json\")\n if not jdata:\n logger.log(\"Provider did not return data\", logger.DEBUG)\n continue" } ]
SickRage
72b9c0be41b8b3edbf5aa61be02a1b25576b62dc
f4f27521c9a585bc8db47b16664d0a536307ef26
sickbeard/helpers.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -353,7 +353,7 @@ def copyFile(srcFile, destFile): try: ek(shutil.copyfile, srcFile, destFile) except (SpecialFileError, Error) as error: - logger.log(error, logger.WARNING) + logger.log(u'{}'.format(error), logger.WARNING) except Exception as error: logger.log(u'{}'.format(error), logger.ERROR) else:
logger . log ( error , logger . WARNING )
logger . log ( u'{}' . format ( error ) , logger . WARNING )
ADD_FUNCTION_AROUND_EXPRESSION
[["Insert", ["argument_list", 3, 19, 3, 42], ["call", "N0"], 1], ["Insert", "N0", ["attribute", "N1"], 0], ["Insert", "N0", ["argument_list", "N2"], 1], ["Insert", "N1", ["string:u'{}'", "T"], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:format", "T"], 2], ["Insert", "N2", ["(:(", "T"], 0], ["Move", "N2", ["identifier:error", 3, 20, 3, 25], 1], ["Insert", "N2", ["):)", "T"], 2]]
jackkiej/SickRage@72b9c0be41b8b3edbf5aa61be02a1b25576b62dc
Fixes https://github.com/SickRage/sickrage-issues/issues/1046
[ { "sha": "3acfbe352a8dc7c71f175dd816d24b6fe44cc935", "filename": "sickbeard/helpers.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/72b9c0be41b8b3edbf5aa61be02a1b25576b62dc/sickbeard%2Fhelpers.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/72b9c0be41b8b3edbf5aa61be02a1b25576b62dc/sickbeard%2Fhelpers.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fhelpers.py?ref=72b9c0be41b8b3edbf5aa61be02a1b25576b62dc", "patch": "@@ -353,7 +353,7 @@ def copyFile(srcFile, destFile):\n try:\n ek(shutil.copyfile, srcFile, destFile)\n except (SpecialFileError, Error) as error:\n- logger.log(error, logger.WARNING)\n+ logger.log(u'{}'.format(error), logger.WARNING)\n except Exception as error:\n logger.log(u'{}'.format(error), logger.ERROR)\n else:" } ]
SickRage
df65bfb01fd667441592932068a76a6bfb9b954f
06cc9277398bc1814796f5b5b985b7f5c772f4e6
sickbeard/helpers.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -353,7 +353,7 @@ def copyFile(srcFile, destFile): try: ek(shutil.copyfile, srcFile, destFile) except (SpecialFileError, Error) as error: - logger.log(error, logger.WARNING) + logger.log(u'{}'.format(error), logger.WARNING) except Exception as error: logger.log(u'{}'.format(error), logger.ERROR) else:
logger . log ( error , logger . WARNING )
logger . log ( u'{}' . format ( error ) , logger . WARNING )
ADD_FUNCTION_AROUND_EXPRESSION
[["Insert", ["argument_list", 3, 19, 3, 42], ["call", "N0"], 1], ["Insert", "N0", ["attribute", "N1"], 0], ["Insert", "N0", ["argument_list", "N2"], 1], ["Insert", "N1", ["string:u'{}'", "T"], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:format", "T"], 2], ["Insert", "N2", ["(:(", "T"], 0], ["Move", "N2", ["identifier:error", 3, 20, 3, 25], 1], ["Insert", "N2", ["):)", "T"], 2]]
jackkiej/SickRage@df65bfb01fd667441592932068a76a6bfb9b954f
Fixes https://github.com/SickRage/sickrage-issues/issues/1046
[ { "sha": "3acfbe352a8dc7c71f175dd816d24b6fe44cc935", "filename": "sickbeard/helpers.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/df65bfb01fd667441592932068a76a6bfb9b954f/sickbeard%2Fhelpers.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/df65bfb01fd667441592932068a76a6bfb9b954f/sickbeard%2Fhelpers.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fhelpers.py?ref=df65bfb01fd667441592932068a76a6bfb9b954f", "patch": "@@ -353,7 +353,7 @@ def copyFile(srcFile, destFile):\n try:\n ek(shutil.copyfile, srcFile, destFile)\n except (SpecialFileError, Error) as error:\n- logger.log(error, logger.WARNING)\n+ logger.log(u'{}'.format(error), logger.WARNING)\n except Exception as error:\n logger.log(u'{}'.format(error), logger.ERROR)\n else:" } ]
SickRage
28a2af78ed3bdb3d94ade88dea06b6c23e5e672b
72b9c0be41b8b3edbf5aa61be02a1b25576b62dc
sickbeard/providers/danishbits.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -126,7 +126,7 @@ class DanishbitsProvider(TorrentProvider): # pylint: disable=too-many-instance- continue with BS4Parser(data, 'html5lib') as html: - torrent_table = html.find('table', class_='torrent_table') + torrent_table = html.find('table', id='torrent_table') torrent_rows = torrent_table.find_all('tr') if torrent_table else [] # Continue only if at least one Release is found
torrent_table = html . find ( 'table' , class_ = 'torrent_table' )
torrent_table = html . find ( 'table' , id = 'torrent_table' )
CHANGE_KEYWORD_ARGUMENT_USED
[["Update", ["identifier:class_", 3, 56, 3, 62], "id"]]
jackkiej/SickRage@28a2af78ed3bdb3d94ade88dea06b6c23e5e672b
fix: Danishbits provider now works again Aparently, BS4 `class_` lookup does not work when element has more than one class? Anywho, replaced the lookup with `id`
[ { "sha": "8b07e72d1843e63c5d799da0d7ab4525bcadab2a", "filename": "sickbeard/providers/danishbits.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/28a2af78ed3bdb3d94ade88dea06b6c23e5e672b/sickbeard%2Fproviders%2Fdanishbits.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/28a2af78ed3bdb3d94ade88dea06b6c23e5e672b/sickbeard%2Fproviders%2Fdanishbits.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fproviders%2Fdanishbits.py?ref=28a2af78ed3bdb3d94ade88dea06b6c23e5e672b", "patch": "@@ -126,7 +126,7 @@ def process_column_header(td):\n continue\n \n with BS4Parser(data, 'html5lib') as html:\n- torrent_table = html.find('table', class_='torrent_table')\n+ torrent_table = html.find('table', id='torrent_table')\n torrent_rows = torrent_table.find_all('tr') if torrent_table else []\n \n # Continue only if at least one Release is found" } ]
SickRage
1318adb4b087485055f3a82ed68289e2c9883eeb
7010f0b2ab59bb2c771fd4e0a9ebad5fc1fba953
sickbeard/providers/gftracker.py
https://github.com/jackkiej/SickRage
true
false
false
@@ -25,7 +25,7 @@ from sickbeard import logger from sickbeard import tvcache from sickbeard.bs4_parser import BS4Parser from sickrage.helper.exceptions import AuthException -from sickrage.providers.TorrentProvider import TorrentProvider +from sickrage.providers.torrent.TorrentProvider import TorrentProvider class GFTrackerProvider(TorrentProvider):
from sickrage . providers . TorrentProvider import TorrentProvider
from sickrage . providers . torrent . TorrentProvider import TorrentProvider
SINGLE_STMT
[["Insert", ["dotted_name", 3, 6, 3, 40], ["identifier:torrent", "T"], 4], ["Insert", ["dotted_name", 3, 6, 3, 40], [".:.", "T"], 5]]
jackkiej/SickRage@1318adb4b087485055f3a82ed68289e2c9883eeb
Fixup
[ { "sha": "79da127b9418f064b86bf7bda3e0b8cb42f4e6f4", "filename": "sickbeard/providers/gftracker.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/1318adb4b087485055f3a82ed68289e2c9883eeb/sickbeard%2Fproviders%2Fgftracker.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/1318adb4b087485055f3a82ed68289e2c9883eeb/sickbeard%2Fproviders%2Fgftracker.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fproviders%2Fgftracker.py?ref=1318adb4b087485055f3a82ed68289e2c9883eeb", "patch": "@@ -25,7 +25,7 @@\n from sickbeard import tvcache\n from sickbeard.bs4_parser import BS4Parser\n from sickrage.helper.exceptions import AuthException\n-from sickrage.providers.TorrentProvider import TorrentProvider\n+from sickrage.providers.torrent.TorrentProvider import TorrentProvider\n \n \n class GFTrackerProvider(TorrentProvider):" } ]
SickRage
35dc0d44a5df0da28267887f33eba91e11d7c27f
48e9e9c322fa6a6ba69655aa03f87a76e0d6ed86
sickbeard/providers/thepiratebay.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -47,7 +47,7 @@ class ThePirateBayProvider(TorrentProvider): # pylint: disable=too-many-instanc self.url = 'https://thepiratebay.se/' self.urls = { 'search': self.url + 's/', - 'rss': self.url + 'browse/205' + 'rss': self.url + 'browse/200' } self.custom_url = None
self . urls = { 'search' : self . url + 's/' , 'rss' : self . url + 'browse/205' }
self . urls = { 'search' : self . url + 's/' , 'rss' : self . url + 'browse/200' }
CHANGE_BINARY_OPERAND
[["Update", ["string:'browse/205'", 3, 31, 3, 43], "'browse/200'"]]
jackkiej/SickRage@35dc0d44a5df0da28267887f33eba91e11d7c27f
Fix TPB RSS category
[ { "sha": "873b647ee9cede0c9d37757976178c27eb3dd485", "filename": "sickbeard/providers/thepiratebay.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/35dc0d44a5df0da28267887f33eba91e11d7c27f/sickbeard%2Fproviders%2Fthepiratebay.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/35dc0d44a5df0da28267887f33eba91e11d7c27f/sickbeard%2Fproviders%2Fthepiratebay.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fproviders%2Fthepiratebay.py?ref=35dc0d44a5df0da28267887f33eba91e11d7c27f", "patch": "@@ -47,7 +47,7 @@ def __init__(self):\n self.url = 'https://thepiratebay.se/'\n self.urls = {\n 'search': self.url + 's/',\n- 'rss': self.url + 'browse/205'\n+ 'rss': self.url + 'browse/200'\n }\n \n self.custom_url = None" } ]
SickRage
c08b27171e749cd171b95c6d0278f14110a3b6fc
338ffb34f4bb2c21e2e21f1142a691bcc6e250cf
sickbeard/webserve.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -3206,7 +3206,7 @@ class Manage(Home, WebRoot): epCats = {} sql_results = main_db_con.select( - "SELECT status, season, episode, name, airdate FROM tv_episodes WHERE tv_episodes.showid in (SELECT tv_shows.indexer_id FROM tv_shows WHERE tv_shows.indexer_id = ? AND paused = 0) ORDER BY tv_episodes.season DESC, tv_episodes.episode DESC", + "SELECT status, season, episode, name, airdate FROM tv_episodes WHERE tv_episodes.season IS NOT NULL AND tv_episodes.showid in (SELECT tv_shows.indexer_id FROM tv_shows WHERE tv_shows.indexer_id = ? AND paused = 0) ORDER BY tv_episodes.season DESC, tv_episodes.episode DESC", [curShow.indexerid]) for curResult in sql_results:
sql_results = main_db_con . select ( "SELECT status, season, episode, name, airdate FROM tv_episodes WHERE tv_episodes.showid in (SELECT tv_shows.indexer_id FROM tv_shows WHERE tv_shows.indexer_id = ? AND paused = 0) ORDER BY tv_episodes.season DESC, tv_episodes.episode DESC" , [ curShow . indexerid ] )
sql_results = main_db_con . select ( "SELECT status, season, episode, name, airdate FROM tv_episodes WHERE tv_episodes.season IS NOT NULL AND tv_episodes.showid in (SELECT tv_shows.indexer_id FROM tv_shows WHERE tv_shows.indexer_id = ? AND paused = 0) ORDER BY tv_episodes.season DESC, tv_episodes.episode DESC" , [ curShow . indexerid ] )
CHANGE_STRING_LITERAL
[["Update", ["string:\"SELECT status, season, episode, name, airdate FROM tv_episodes WHERE tv_episodes.showid in (SELECT tv_shows.indexer_id FROM tv_shows WHERE tv_shows.indexer_id = ? AND paused = 0) ORDER BY tv_episodes.season DESC, tv_episodes.episode DESC\"", 3, 17, 3, 256], "\"SELECT status, season, episode, name, airdate FROM tv_episodes WHERE tv_episodes.season IS NOT NULL AND tv_episodes.showid in (SELECT tv_shows.indexer_id FROM tv_shows WHERE tv_shows.indexer_id = ? AND paused = 0) ORDER BY tv_episodes.season DESC, tv_episodes.episode DESC\""]]
jackkiej/SickRage@c08b27171e749cd171b95c6d0278f14110a3b6fc
also do the same fix for backlogOverview
[ { "sha": "49beb0a53f30eed8801fcd8388471411ff06e60c", "filename": "sickbeard/webserve.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/c08b27171e749cd171b95c6d0278f14110a3b6fc/sickbeard%2Fwebserve.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/c08b27171e749cd171b95c6d0278f14110a3b6fc/sickbeard%2Fwebserve.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fwebserve.py?ref=c08b27171e749cd171b95c6d0278f14110a3b6fc", "patch": "@@ -3206,7 +3206,7 @@ def backlogOverview(self):\n epCats = {}\n \n sql_results = main_db_con.select(\n- \"SELECT status, season, episode, name, airdate FROM tv_episodes WHERE tv_episodes.showid in (SELECT tv_shows.indexer_id FROM tv_shows WHERE tv_shows.indexer_id = ? AND paused = 0) ORDER BY tv_episodes.season DESC, tv_episodes.episode DESC\",\n+ \"SELECT status, season, episode, name, airdate FROM tv_episodes WHERE tv_episodes.season IS NOT NULL AND tv_episodes.showid in (SELECT tv_shows.indexer_id FROM tv_shows WHERE tv_shows.indexer_id = ? AND paused = 0) ORDER BY tv_episodes.season DESC, tv_episodes.episode DESC\",\n [curShow.indexerid])\n \n for curResult in sql_results:" } ]
SickRage
b25ff7454e38ebaf9e6cec88d5a8b4472f506099
a2c43b5cde0d080f335ef08b29a0b7a135a59ca4
sickbeard/logger.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -91,7 +91,7 @@ class CensoredFormatter(logging.Formatter, object): msg = msg.replace(value, len(value) * '*') # Needed because Newznab apikey isn't stored as key=value in a section. - msg = re.sub(r'([&?]r|[&?]apikey|[&?]api_key)=[^&]*([&\w]?)', r'\1=**********\2', msg) + msg = re.sub(r'([&?]r|[&?]apikey|[&?]api_key)=[^&]*([&\w]?)', r'\1=**********\2', msg, re.I) return msg
msg = re . sub ( r'([&?]r|[&?]apikey|[&?]api_key)=[^&]*([&\w]?)' , r'\1=**********\2' , msg )
msg = re . sub ( r'([&?]r|[&?]apikey|[&?]api_key)=[^&]*([&\w]?)' , r'\1=**********\2' , msg , re . I )
SAME_FUNCTION_MORE_ARGS
[["Insert", ["argument_list", 3, 21, 3, 95], [",:,", "T"], 6], ["Insert", ["argument_list", 3, 21, 3, 95], ["attribute", "N0"], 7], ["Insert", "N0", ["identifier:re", "T"], 0], ["Insert", "N0", [".:.", "T"], 1], ["Insert", "N0", ["identifier:I", "T"], 2]]
jackkiej/SickRage@b25ff7454e38ebaf9e6cec88d5a8b4472f506099
Fix SickRage/sickrage-issues/issues/621
[ { "sha": "75f58589c01061d97f0f4c9febd35a3f08a6d3d1", "filename": "sickbeard/logger.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/b25ff7454e38ebaf9e6cec88d5a8b4472f506099/sickbeard%2Flogger.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/b25ff7454e38ebaf9e6cec88d5a8b4472f506099/sickbeard%2Flogger.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Flogger.py?ref=b25ff7454e38ebaf9e6cec88d5a8b4472f506099", "patch": "@@ -91,7 +91,7 @@ def format(self, record):\n msg = msg.replace(value, len(value) * '*')\n \n # Needed because Newznab apikey isn't stored as key=value in a section.\n- msg = re.sub(r'([&?]r|[&?]apikey|[&?]api_key)=[^&]*([&\\w]?)', r'\\1=**********\\2', msg)\n+ msg = re.sub(r'([&?]r|[&?]apikey|[&?]api_key)=[^&]*([&\\w]?)', r'\\1=**********\\2', msg, re.I)\n return msg\n \n " } ]
SickRage
63e401abfb58a4f1866738a2eb349a461e6ddcbe
b546f2f4ee1c8e9072ab6d9127c589960e5f4db9
sickbeard/versionChecker.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -374,7 +374,7 @@ class GitUpdateManager(UpdateManager): return self._newest_commit_hash def get_cur_version(self): - return self._run_git(self._git_path, "describe --abbrev=0 " + self._cur_commit_hash)[0] + return self._run_git(self._git_path, 'describe --abbrev=0 {}'.format(self._cur_commit_hash))[0] def get_newest_version(self): if self._newest_commit_hash:
return self . _run_git ( self . _git_path , "describe --abbrev=0 " + self . _cur_commit_hash ) [ 0 ]
return self . _run_git ( self . _git_path , 'describe --abbrev=0 {}' . format ( self . _cur_commit_hash ) ) [ 0 ]
SINGLE_STMT
[["Insert", ["argument_list", 3, 29, 3, 93], ["call", "N0"], 3], ["Insert", "N0", ["attribute", "N1"], 0], ["Insert", "N0", ["argument_list", "N2"], 1], ["Update", ["string:\"describe --abbrev=0 \"", 3, 46, 3, 68], "'describe --abbrev=0 {}'"], ["Move", "N1", ["string:\"describe --abbrev=0 \"", 3, 46, 3, 68], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:format", "T"], 2], ["Insert", "N2", ["(:(", "T"], 0], ["Move", "N2", ["attribute", 3, 71, 3, 92], 1], ["Insert", "N2", ["):)", "T"], 2], ["Delete", ["+:+", 3, 69, 3, 70]], ["Delete", ["binary_operator", 3, 46, 3, 92]]]
jackkiej/SickRage@63e401abfb58a4f1866738a2eb349a461e6ddcbe
Hot-fix help & info not displaying without git.
[ { "sha": "3e4b720d582cbe3d9d7bbd15b28af8887546016c", "filename": "sickbeard/versionChecker.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/63e401abfb58a4f1866738a2eb349a461e6ddcbe/sickbeard%2FversionChecker.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/63e401abfb58a4f1866738a2eb349a461e6ddcbe/sickbeard%2FversionChecker.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2FversionChecker.py?ref=63e401abfb58a4f1866738a2eb349a461e6ddcbe", "patch": "@@ -374,7 +374,7 @@ def get_newest_commit_hash(self):\n return self._newest_commit_hash\n \n def get_cur_version(self):\n- return self._run_git(self._git_path, \"describe --abbrev=0 \" + self._cur_commit_hash)[0]\n+ return self._run_git(self._git_path, 'describe --abbrev=0 {}'.format(self._cur_commit_hash))[0]\n \n def get_newest_version(self):\n if self._newest_commit_hash:" } ]
SickRage
3dd13c33887e3e09d706646f007d92678b0697c0
5195b784b76916a2acfe21c1fffd12f837ce0e93
sickbeard/versionChecker.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -374,7 +374,7 @@ class GitUpdateManager(UpdateManager): return self._newest_commit_hash def get_cur_version(self): - return self._run_git(self._git_path, "describe --abbrev=0 " + self._cur_commit_hash)[0] + return self._run_git(self._git_path, 'describe --abbrev=0 {}'.format(self._cur_commit_hash))[0] def get_newest_version(self): if self._newest_commit_hash:
return self . _run_git ( self . _git_path , "describe --abbrev=0 " + self . _cur_commit_hash ) [ 0 ]
return self . _run_git ( self . _git_path , 'describe --abbrev=0 {}' . format ( self . _cur_commit_hash ) ) [ 0 ]
SINGLE_STMT
[["Insert", ["argument_list", 3, 29, 3, 93], ["call", "N0"], 3], ["Insert", "N0", ["attribute", "N1"], 0], ["Insert", "N0", ["argument_list", "N2"], 1], ["Update", ["string:\"describe --abbrev=0 \"", 3, 46, 3, 68], "'describe --abbrev=0 {}'"], ["Move", "N1", ["string:\"describe --abbrev=0 \"", 3, 46, 3, 68], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:format", "T"], 2], ["Insert", "N2", ["(:(", "T"], 0], ["Move", "N2", ["attribute", 3, 71, 3, 92], 1], ["Insert", "N2", ["):)", "T"], 2], ["Delete", ["+:+", 3, 69, 3, 70]], ["Delete", ["binary_operator", 3, 46, 3, 92]]]
jackkiej/SickRage@3dd13c33887e3e09d706646f007d92678b0697c0
Hot-fix help & info not displaying without git.
[ { "sha": "3e4b720d582cbe3d9d7bbd15b28af8887546016c", "filename": "sickbeard/versionChecker.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/3dd13c33887e3e09d706646f007d92678b0697c0/sickbeard%2FversionChecker.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/3dd13c33887e3e09d706646f007d92678b0697c0/sickbeard%2FversionChecker.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2FversionChecker.py?ref=3dd13c33887e3e09d706646f007d92678b0697c0", "patch": "@@ -374,7 +374,7 @@ def get_newest_commit_hash(self):\n return self._newest_commit_hash\n \n def get_cur_version(self):\n- return self._run_git(self._git_path, \"describe --abbrev=0 \" + self._cur_commit_hash)[0]\n+ return self._run_git(self._git_path, 'describe --abbrev=0 {}'.format(self._cur_commit_hash))[0]\n \n def get_newest_version(self):\n if self._newest_commit_hash:" } ]
SickRage
cb4ca115753509b8145bdd95ad4571949e22cf03
b2f3e8539bbf57fcf7e02f9d97367b9a29f01dbb
tests/search_tests.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -64,7 +64,7 @@ def generator(cur_data, cur_name, cur_provider): :return: """ - def do_test(): + def do_test(self): """ Test to perform
def do_test ( ) : """ Test to perform
def do_test ( self ) : """ Test to perform
SINGLE_STMT
[["Insert", ["parameters", 3, 16, 3, 18], ["identifier:self", "T"], 1]]
jackkiej/SickRage@cb4ca115753509b8145bdd95ad4571949e22cf03
Fix testing providers search types manually
[ { "sha": "104388d8fb54fcb8be57098f772b540025e5ae89", "filename": "tests/search_tests.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/cb4ca115753509b8145bdd95ad4571949e22cf03/tests%2Fsearch_tests.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/cb4ca115753509b8145bdd95ad4571949e22cf03/tests%2Fsearch_tests.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/tests%2Fsearch_tests.py?ref=cb4ca115753509b8145bdd95ad4571949e22cf03", "patch": "@@ -64,7 +64,7 @@ def generator(cur_data, cur_name, cur_provider):\n :return:\n \"\"\"\n \n- def do_test():\n+ def do_test(self):\n \"\"\"\n Test to perform\n \"\"\"" } ]
SickRage
a3ce2875158016311d8d7d8608eee8ea7ed49e30
616c625e40b3188c8a2f7b3cff18f786e19a9508
sickrage/show/ComingEpisodes.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -65,7 +65,7 @@ class ComingEpisodes(object): db = DBConnection() fields_to_select = ', '.join( - ['airdate', 'airs', 'description', 'episode', 'imdb_id', 'e.indexer', 'indexer_id', 'name', 'network', + ['airdate', 'airs', 'e.description as description', 'episode', 'imdb_id', 'e.indexer', 'indexer_id', 'name', 'network', 'paused', 'quality', 'runtime', 'season', 'show_name', 'showid', 's.status'] ) results = db.select(
fields_to_select = ', ' . join ( [ 'airdate' , 'airs' , 'description' , 'episode' , 'imdb_id' , 'e.indexer' , 'indexer_id' , 'name' , 'network' , 'paused' , 'quality' , 'runtime' , 'season' , 'show_name' , 'showid' , 's.status' ] )
fields_to_select = ', ' . join ( [ 'airdate' , 'airs' , 'e.description as description' , 'episode' , 'imdb_id' , 'e.indexer' , 'indexer_id' , 'name' , 'network' , 'paused' , 'quality' , 'runtime' , 'season' , 'show_name' , 'showid' , 's.status' ] )
CHANGE_STRING_LITERAL
[["Update", ["string:'description'", 3, 33, 3, 46], "'e.description as description'"]]
jackkiej/SickRage@a3ce2875158016311d8d7d8608eee8ea7ed49e30
Fix schedule so it doesnt bork when db upgrade
[ { "sha": "73cbd6e449c4437cedcd87ce351235c99fad09d5", "filename": "sickrage/show/ComingEpisodes.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/a3ce2875158016311d8d7d8608eee8ea7ed49e30/sickrage%2Fshow%2FComingEpisodes.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/a3ce2875158016311d8d7d8608eee8ea7ed49e30/sickrage%2Fshow%2FComingEpisodes.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickrage%2Fshow%2FComingEpisodes.py?ref=a3ce2875158016311d8d7d8608eee8ea7ed49e30", "patch": "@@ -65,7 +65,7 @@ def get_coming_episodes(categories, sort, group, paused=sickbeard.COMING_EPS_DIS\n \n db = DBConnection()\n fields_to_select = ', '.join(\n- ['airdate', 'airs', 'description', 'episode', 'imdb_id', 'e.indexer', 'indexer_id', 'name', 'network',\n+ ['airdate', 'airs', 'e.description as description', 'episode', 'imdb_id', 'e.indexer', 'indexer_id', 'name', 'network',\n 'paused', 'quality', 'runtime', 'season', 'show_name', 'showid', 's.status']\n )\n results = db.select(" } ]
SickRage
e9d9b84d8f297dc4a51f7919f06a8f38434e6a46
db17eff0fca4a53891b6f8019142ae937e77c50e
sickbeard/logger.py
https://github.com/jackkiej/SickRage
true
false
true
@@ -91,7 +91,7 @@ class CensoredFormatter(logging.Formatter, object): msg = msg.replace(value, len(value) * '*') # Needed because Newznab apikey isn't stored as key=value in a section. - msg = re.sub(r'([&?]r|[&?]apikey|[&?]api_key)=[^&]*([&\w]?)', r'\1=**********\2', msg, re.I) + msg = re.sub(r'([&?]r|[&?]apikey|[&?]api_key)(?:=|%3D)[^&]*([&\w]?)', r'\1=**********\2', msg, re.I) return msg
msg = re . sub ( r'([&?]r|[&?]apikey|[&?]api_key)=[^&]*([&\w]?)' , r'\1=**********\2' , msg , re . I )
msg = re . sub ( r'([&?]r|[&?]apikey|[&?]api_key)(?:=|%3D)[^&]*([&\w]?)' , r'\1=**********\2' , msg , re . I )
CHANGE_STRING_LITERAL
[["Update", ["string:r'([&?]r|[&?]apikey|[&?]api_key)=[^&]*([&\\w]?)'", 3, 22, 3, 69], "r'([&?]r|[&?]apikey|[&?]api_key)(?:=|%3D)[^&]*([&\\w]?)'"]]
jackkiej/SickRage@e9d9b84d8f297dc4a51f7919f06a8f38434e6a46
Fix apikey shown in log when = is urlencoded as %3D
[ { "sha": "b860ffccde13e6dcac5e4964aff20a23cdffde54", "filename": "sickbeard/logger.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/e9d9b84d8f297dc4a51f7919f06a8f38434e6a46/sickbeard%2Flogger.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/e9d9b84d8f297dc4a51f7919f06a8f38434e6a46/sickbeard%2Flogger.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Flogger.py?ref=e9d9b84d8f297dc4a51f7919f06a8f38434e6a46", "patch": "@@ -91,7 +91,7 @@ def format(self, record):\n msg = msg.replace(value, len(value) * '*')\n \n # Needed because Newznab apikey isn't stored as key=value in a section.\n- msg = re.sub(r'([&?]r|[&?]apikey|[&?]api_key)=[^&]*([&\\w]?)', r'\\1=**********\\2', msg, re.I)\n+ msg = re.sub(r'([&?]r|[&?]apikey|[&?]api_key)(?:=|%3D)[^&]*([&\\w]?)', r'\\1=**********\\2', msg, re.I)\n return msg\n \n " } ]
SickRage
0a574d15af7da4628f79f73612c5c6626c12b853
a6d45c51405d9cd52f2ecbf375c0c27e1ba38c98
sickbeard/helpers.py
https://github.com/jackkiej/SickRage
true
false
false
@@ -1432,7 +1432,7 @@ def getURL(url, post_data=None, params=None, headers=None, # pylint:disable=too message = u'getURL default return type may change in the near future use returns=\'text\' instead.' if default is not None: warnings.warn(message, PendingDeprecationWarning, stacklevel=2) - logger.log(u'getURL continuing with deprecated arguments.') + logger.log(u'getURL continuing with deprecated arguments.', logger.DEBUG) response_type = kwargs.pop(u'returns', default) session = _setUpSession(session, headers)
logger . log ( u'getURL continuing with deprecated arguments.' )
logger . log ( u'getURL continuing with deprecated arguments.' , logger . DEBUG )
SAME_FUNCTION_MORE_ARGS
[["Insert", ["argument_list", 3, 19, 3, 68], [",:,", "T"], 2], ["Insert", ["argument_list", 3, 19, 3, 68], ["attribute", "N0"], 3], ["Insert", "N0", ["identifier:logger", "T"], 0], ["Insert", "N0", [".:.", "T"], 1], ["Insert", "N0", ["identifier:DEBUG", "T"], 2]]
jackkiej/SickRage@0a574d15af7da4628f79f73612c5c6626c12b853
Fix getURL log entry should be debug
[ { "sha": "2b6abcf85b58f110299a265ff725db4c3d5a6d2c", "filename": "sickbeard/helpers.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/jackkiej/SickRage/blob/0a574d15af7da4628f79f73612c5c6626c12b853/sickbeard%2Fhelpers.py", "raw_url": "https://github.com/jackkiej/SickRage/raw/0a574d15af7da4628f79f73612c5c6626c12b853/sickbeard%2Fhelpers.py", "contents_url": "https://api.github.com/repos/jackkiej/SickRage/contents/sickbeard%2Fhelpers.py?ref=0a574d15af7da4628f79f73612c5c6626c12b853", "patch": "@@ -1432,7 +1432,7 @@ def getURL(url, post_data=None, params=None, headers=None, # pylint:disable=too\n message = u'getURL default return type may change in the near future use returns=\\'text\\' instead.'\n if default is not None:\n warnings.warn(message, PendingDeprecationWarning, stacklevel=2)\n- logger.log(u'getURL continuing with deprecated arguments.')\n+ logger.log(u'getURL continuing with deprecated arguments.', logger.DEBUG)\n \n response_type = kwargs.pop(u'returns', default)\n session = _setUpSession(session, headers)" } ]
tensor2tensor
eb5d4cb6efd238a0f30ef8b885a5873093307405
4ffae909f97c05e9dcef4bedf7f403bb62fde7b8
tensor2tensor/utils/model_builder.py
https://github.com/medicode/tensor2tensor
true
false
false
@@ -288,7 +288,7 @@ def model_fn(model, diet_vars = [ v for v in tf.global_variables() if v.dtype == dtypes.float16_ref ] - _log_variable_sizes(diet_vars, "Diet Varaibles") + _log_variable_sizes(diet_vars, "Diet Variables") # Optimize total_loss = tf.identity(total_loss, name="total_loss")
_log_variable_sizes ( diet_vars , "Diet Varaibles" )
_log_variable_sizes ( diet_vars , "Diet Variables" )
CHANGE_STRING_LITERAL
[["Update", ["string:\"Diet Varaibles\"", 3, 34, 3, 50], "\"Diet Variables\""]]
medicode/tensor2tensor@eb5d4cb6efd238a0f30ef8b885a5873093307405
model_builder: fix log message for diet variables
[ { "sha": "6e0b32b133ada6dabd4bd7e24323329916d12d55", "filename": "tensor2tensor/utils/model_builder.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/medicode/tensor2tensor/blob/eb5d4cb6efd238a0f30ef8b885a5873093307405/tensor2tensor%2Futils%2Fmodel_builder.py", "raw_url": "https://github.com/medicode/tensor2tensor/raw/eb5d4cb6efd238a0f30ef8b885a5873093307405/tensor2tensor%2Futils%2Fmodel_builder.py", "contents_url": "https://api.github.com/repos/medicode/tensor2tensor/contents/tensor2tensor%2Futils%2Fmodel_builder.py?ref=eb5d4cb6efd238a0f30ef8b885a5873093307405", "patch": "@@ -288,7 +288,7 @@ def nth_model(n):\n diet_vars = [\n v for v in tf.global_variables() if v.dtype == dtypes.float16_ref\n ]\n- _log_variable_sizes(diet_vars, \"Diet Varaibles\")\n+ _log_variable_sizes(diet_vars, \"Diet Variables\")\n \n # Optimize\n total_loss = tf.identity(total_loss, name=\"total_loss\")" } ]
tensor2tensor
3a9c9503ddbae018894787d20261e3ae2de390d4
f9f41eb5df23460ce74f7c77d31a8a7bcbb8ea76
tensor2tensor/data_generators/cnn_dailymail.py
https://github.com/medicode/tensor2tensor
true
false
true
@@ -74,7 +74,7 @@ def story_generator(tmp_dir): for path in paths: for story_file in tf.gfile.Glob(path + "*"): story = u"" - for line in tf.gfile.Open(story_file): + for line in tf.gfile.Open(story_file, 'rb'): line = unicode(line, "utf-8") if six.PY2 else line.decode("utf-8") story += line yield story
for line in tf . gfile . Open ( story_file ) : line = unicode ( line , "utf-8" ) if six . PY2 else line . decode ( "utf-8" ) story += line
for line in tf . gfile . Open ( story_file , 'rb' ) : line = unicode ( line , "utf-8" ) if six . PY2 else line . decode ( "utf-8" ) story += line
SAME_FUNCTION_MORE_ARGS
[["Insert", ["argument_list", 3, 32, 3, 44], [",:,", "T"], 2], ["Insert", ["argument_list", 3, 32, 3, 44], ["string:'rb'", "T"], 3]]
medicode/tensor2tensor@3a9c9503ddbae018894787d20261e3ae2de390d4
Fixing #359: decoding str object instead of bytes (#360)
[ { "sha": "8fa1e52d005ca16484186062f864158e356c80d1", "filename": "tensor2tensor/data_generators/cnn_dailymail.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/medicode/tensor2tensor/blob/3a9c9503ddbae018894787d20261e3ae2de390d4/tensor2tensor%2Fdata_generators%2Fcnn_dailymail.py", "raw_url": "https://github.com/medicode/tensor2tensor/raw/3a9c9503ddbae018894787d20261e3ae2de390d4/tensor2tensor%2Fdata_generators%2Fcnn_dailymail.py", "contents_url": "https://api.github.com/repos/medicode/tensor2tensor/contents/tensor2tensor%2Fdata_generators%2Fcnn_dailymail.py?ref=3a9c9503ddbae018894787d20261e3ae2de390d4", "patch": "@@ -74,7 +74,7 @@ def story_generator(tmp_dir):\n for path in paths:\n for story_file in tf.gfile.Glob(path + \"*\"):\n story = u\"\"\n- for line in tf.gfile.Open(story_file):\n+ for line in tf.gfile.Open(story_file, 'rb'):\n line = unicode(line, \"utf-8\") if six.PY2 else line.decode(\"utf-8\")\n story += line\n yield story" } ]