Skip to content

Commit

Permalink
Fix TypeError: __init__() takes exactly 11 arguments (10 given)
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandog committed Jul 24, 2016
1 parent cd1290f commit 672b0f4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
3 changes: 2 additions & 1 deletion sickbeard/manual_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ def get_provider_cache_results(indexer, show_all_results=None, perform_search=No

# TODO: the implicit sqlite rowid is used, should be replaced with an explicit PK column
# If table doesn't exist, start a search to create table and new columns seeders, leechers and size
if table_exists and 'seeders' in columns and 'leechers' in columns and 'size' in columns and 'proper_tags' in columns:
required_columns = ['seeders', 'leechers', 'size', 'proper_tags']
if table_exists and all(required_column in columns for required_column in required_columns):
# The default sql, that's executed for each providers cache table
common_sql = b"SELECT rowid, ? AS 'provider_type', ? AS 'provider_image', \
? AS 'provider', ? AS 'provider_id', ? 'provider_minseed', ? 'provider_minleech', \
Expand Down
2 changes: 1 addition & 1 deletion sickbeard/name_parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ def __str__(self):
to_return += ' [GROUP: {0}]'.format(self.release_group)

if self.proper_tags:
to_return += ' [PROPER TAGs: {0}]'.format("|".join(self.proper_tags))
to_return += ' [PROPER TAGs: {0}]'.format('|'.join(self.proper_tags))

to_return += ' [ABD: {0}]'.format(self.is_air_by_date)
to_return += ' [ANIME: {0}]'.format(self.is_anime)
Expand Down
6 changes: 5 additions & 1 deletion sickbeard/properFinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,12 @@ def _get_proper_results(self): # pylint: disable=too-many-locals, too-many-bran
continue

if not parse_result.proper_tags:
logger.log('Skipping non-proper: {name}'.format(name=proper.name))
logger.log('Skipping non-proper: {name}'.format(name=cur_proper.name))
continue

logger.log('Proper tags for {proper}: {tags}'.format
(proper=cur_proper.name, tags=parse_result.proper_tags), logger.DEBUG)

if not parse_result.series_name:
logger.log('Ignoring invalid show: {name}'.format
(name=cur_proper.name), logger.DEBUG)
Expand Down Expand Up @@ -207,6 +210,7 @@ def _get_proper_results(self): # pylint: disable=too-many-locals, too-many-bran
cur_proper.version = parse_result.version
cur_proper.quality = Quality.nameQuality(cur_proper.name, parse_result.is_anime)
cur_proper.content = None
cur_proper.proper_tags = parse_result.proper_tags

# filter release
best_result = pickBestResult(cur_proper, parse_result.show)
Expand Down
5 changes: 1 addition & 4 deletions sickbeard/tvcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,8 @@ def _addCacheEntry(self, name, url, seeders, leechers, size, pubdate, torrent_ha
# get version
version = parse_result.version

# get proper_tags
proper_tags = parse_result.proper_tags

# Store proper_tags as proper1|proper2|proper3
proper_tags = "|".join(proper_tags)
proper_tags = '|'.join(parse_result.proper_tags)

logger.log('Added RSS item: [{0}] to cache: [{1}]'.format(name, self.provider_id), logger.DEBUG)

Expand Down
5 changes: 4 additions & 1 deletion sickrage/providers/GenericProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ def find_propers(self, proper_candidates):
pubdate = self._get_pubdate(item)
torrent_hash = self._get_hash(item)

results.append(Proper(title, url, datetime.today(), show_obj, seeders, leechers, size, pubdate, torrent_hash))
# This will be retrived from parser
proper_tags = None

results.append(Proper(title, url, datetime.today(), show_obj, seeders, leechers, size, pubdate, torrent_hash, proper_tags))

return results

Expand Down

0 comments on commit 672b0f4

Please sign in to comment.