Skip to content

Commit

Permalink
Merge remote-tracking branch 'Minoshiro/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
MaT1g3R committed Aug 17, 2017
2 parents 919afe4 + 1f8f325 commit 016be16
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
12 changes: 6 additions & 6 deletions minoshiro/minoshiro.py
Expand Up @@ -566,9 +566,9 @@ async def __find_manga_updates(self, cached_ids, medium,
mu_id
)}, None
else:
return {'url': await mu.get_manga_url(
return await mu.get_manga_url(
self.session_manager, query, names, timeout
)}, None
), None

return None, None

Expand All @@ -592,8 +592,8 @@ async def __find_lndb(self, cached_ids, medium, query, names, timeout):
lndb_id
)}, None
else:
return {'url': await lndb.get_light_novel_url(
self.session_manager, query, names, timeout)}, None
return await lndb.get_light_novel_url(
self.session_manager, query, names, timeout), None
return None, None

async def __find_novel_updates(self, cached_ids, medium,
Expand All @@ -616,9 +616,9 @@ async def __find_novel_updates(self, cached_ids, medium,
return {'url': nu.get_light_novel_by_id(
nu_id
)}, None
return {'url': await nu.get_light_novel_url(
return await nu.get_light_novel_url(
self.session_manager, query, names, timeout
)}, None
), None

return None, None

Expand Down
2 changes: 2 additions & 0 deletions minoshiro/web_api/ani_list.py
Expand Up @@ -179,6 +179,7 @@ async def get_page_by_popularity(session_manager, medium: Medium,
}}
synonyms
id
url: siteUrl
type
format
}}
Expand Down Expand Up @@ -213,6 +214,7 @@ def __get_query_string(medium, query, search=False) -> str:
english
native
}}
url: siteUrl
startDate {{
year
month
Expand Down
4 changes: 4 additions & 0 deletions minoshiro/web_api/kitsu.py
Expand Up @@ -110,6 +110,8 @@ async def search_entries(self, medium: Medium,
)
if js:
closest_entry = get_closest(query, js['data'])
if closest_entry:
closest_entry['url'] = closest_entry['links']['self']
return closest_entry

async def get_entry_by_id(self, medium, id_, timeout=3) -> Optional[dict]:
Expand Down Expand Up @@ -137,4 +139,6 @@ async def get_entry_by_id(self, medium, id_, timeout=3) -> Optional[dict]:
)

first = js['data']
if first[0]:
first[0]['url'] = first[0]['links']['self']
return first.pop()
4 changes: 4 additions & 0 deletions minoshiro/web_api/mal.py
Expand Up @@ -48,6 +48,8 @@ async def get_entry_details(session_manager, header_info: dict,
if medium == Medium.ANIME:
data = {
'id': thing.find('id').text,
'url': 'https://myanimelist.net/anime/'
f'{thing.find("id").text}',
'title': thing.find('title').text,
'english': thing.find('english').text,
'synonyms': synonyms,
Expand All @@ -62,6 +64,8 @@ async def get_entry_details(session_manager, header_info: dict,
else:
data = {
'id': thing.find('id').text,
'url': 'https://myanimelist.net/manga/'
f'{thing.find("id").text}',
'title': thing.find('title').text,
'english': thing.find('english').text,
'synonyms': synonyms,
Expand Down

0 comments on commit 016be16

Please sign in to comment.