Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Providers #78

Merged
merged 4 commits into from
Mar 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions sickbeard/providers/rarbg.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def login(self):
"app_id": "sickrage2"
}

#Maximum requests allowed are 1req/2sec
time.sleep(3)
# Maximum requests allowed are 1req/2sec
time.sleep(max(2, cpu_presets[sickbeard.CPU_PRESET]))

response = self.get_url(self.urls["api"], params=login_params, timeout=30, returns="json")
if not response:
Expand Down Expand Up @@ -127,8 +127,8 @@ def search(self, search_strings, age=0, ep_obj=None): # pylint: disable=too-man
if not self.login():
continue

#Maximum requests allowed are 1req/2sec
time.sleep(3)
# Maximum requests allowed are 1req/2sec
time.sleep(max(2, cpu_presets[CPU_PRESET]))

data = self.get_url(self.urls["api"], params=search_params, returns="json")
if not isinstance(data, dict):
Expand Down
2 changes: 1 addition & 1 deletion sickbeard/providers/tvchaosuk.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def search(self, search_strings, age=0, ep_obj=None): # pylint: disable=too-man
torrent_size = torrent.find_all('td')[labels.index('Size')].get_text(strip=True)
size = convert_size(torrent_size, units=units) or -1

item = title, download_url, size, seeders, leechers
item = title + '.hdtv.x264', download_url, size, seeders, leechers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we assume that for all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per @duramato it's a safe assumption based on their labeling of releases. If it's not an HD release, it won't have 720p or 1080p in the title so it won't parse as HD. If it's BluRay or Web-dl then the HDTV will be ignored (as we test qualities from highest to lowest). If its already labeled HDTV, double detection won't cause the check to fail.

if mode != 'RSS':
logger.log(u"Found result: {} with {} seeders and {} leechers".format
(title, seeders, leechers), logger.DEBUG)
Expand Down
2 changes: 1 addition & 1 deletion sickrage/recompiled/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Sources
tv = re.compile(r'([sph]d).?tv|tv(rip|mux)', re.IGNORECASE)
dvd = re.compile(r'(?P<hd>hd)?dvd(?P<rip>rip|mux)?', re.IGNORECASE)
web = re.compile(r'(web.?(?P<dl>dl)|web(?P<rip>rip|mux|hd))', re.IGNORECASE)
web = re.compile(r'(web(?P<type>rip|mux|hd|.?dl|\b))', re.IGNORECASE)
bluray = re.compile(r'(blue?-?ray|b[rd](?:rip|mux))', re.IGNORECASE)
sat = re.compile(r'(dsr|satrip)', re.IGNORECASE)
itunes = re.compile(r'(itunes)', re.IGNORECASE)
Expand Down
9 changes: 6 additions & 3 deletions sickrage/tagger/episode.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,12 @@ def web(self):

:returns: an empty string if not found
"""
attr = 'web'
match = self._get_match_obj(attr)
return '' if not match else match.group('dl') or match.group('rip')
if 'dlmux' in self.name.lower():
return 'dlmux'
else:
attr = 'web'
match = self._get_match_obj(attr)
return '' if not match else match.group('type')

@property
def sat(self):
Expand Down