Skip to content

Commit

Permalink
Merge pull request #47 from Cazzar/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
Cazzar authored Mar 25, 2022
2 parents c3db3e0 + 7b545b5 commit a78b876
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 11 additions & 9 deletions Contents/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,24 @@ def Update(self, metadata, media, lang, force, movie):
if year:
metadata.year = int(year)

collections = []
if series['localsize'] > 1:
collections.append(series['name'])

else:
series = HttpReq("api/serie?id=%s&level=3&allpics=1&tagfilter=%d" % (aid, flags))

metadata.summary = summary_sanitizer(try_get(series, 'summary'))
metadata.title = series['name']
metadata.rating = float(series['rating'])

groupinfo = HttpReq("api/serie/groups?id=%s&level=2" % aid);
collections = []
for group in groupinfo:
if (len(group['series']) > 1):
collections.append(group['name'])

metadata.collections = collections

tags = []
for tag in try_get(series, 'tags', []):
Expand All @@ -167,15 +178,6 @@ def Update(self, metadata, media, lang, force, movie):
self.metadata_add(metadata.posters, try_get(series['art'], 'thumb', []))
self.metadata_add(metadata.art, try_get(series['art'], 'fanart', []))

groupinfo = HttpReq("api/serie/groups?id=%s&level=2" % aid);
collections = []
for group in groupinfo:
if (len(group['series']) > 1):
collections.append(group['name'])

metadata.collections = collections



### Generate general content ratings.
### VERY rough approximation to: https://www.healthychildren.org/English/family-life/Media/Pages/TV-Ratings-A-Guide-for-Parents.aspx
Expand Down
2 changes: 1 addition & 1 deletion Contents/Resources/Series/Shoko Series Scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
'Username': 'Default',
'Password': '',
'IncludeSpecials': True,
'IncludeOther': True,
'IncludeOther': False,
'SingleSeasonOrdering': False
}

Expand Down

0 comments on commit a78b876

Please sign in to comment.