Skip to content

Commit 016be16

Browse files
committed
Merge remote-tracking branch 'Minoshiro/master'
2 parents 919afe4 + 1f8f325 commit 016be16

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

minoshiro/minoshiro.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -566,9 +566,9 @@ async def __find_manga_updates(self, cached_ids, medium,
566566
mu_id
567567
)}, None
568568
else:
569-
return {'url': await mu.get_manga_url(
569+
return await mu.get_manga_url(
570570
self.session_manager, query, names, timeout
571-
)}, None
571+
), None
572572

573573
return None, None
574574

@@ -592,8 +592,8 @@ async def __find_lndb(self, cached_ids, medium, query, names, timeout):
592592
lndb_id
593593
)}, None
594594
else:
595-
return {'url': await lndb.get_light_novel_url(
596-
self.session_manager, query, names, timeout)}, None
595+
return await lndb.get_light_novel_url(
596+
self.session_manager, query, names, timeout), None
597597
return None, None
598598

599599
async def __find_novel_updates(self, cached_ids, medium,
@@ -616,9 +616,9 @@ async def __find_novel_updates(self, cached_ids, medium,
616616
return {'url': nu.get_light_novel_by_id(
617617
nu_id
618618
)}, None
619-
return {'url': await nu.get_light_novel_url(
619+
return await nu.get_light_novel_url(
620620
self.session_manager, query, names, timeout
621-
)}, None
621+
), None
622622

623623
return None, None
624624

minoshiro/web_api/ani_list.py

+2
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ async def get_page_by_popularity(session_manager, medium: Medium,
179179
}}
180180
synonyms
181181
id
182+
url: siteUrl
182183
type
183184
format
184185
}}
@@ -213,6 +214,7 @@ def __get_query_string(medium, query, search=False) -> str:
213214
english
214215
native
215216
}}
217+
url: siteUrl
216218
startDate {{
217219
year
218220
month

minoshiro/web_api/kitsu.py

+4
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ async def search_entries(self, medium: Medium,
110110
)
111111
if js:
112112
closest_entry = get_closest(query, js['data'])
113+
if closest_entry:
114+
closest_entry['url'] = closest_entry['links']['self']
113115
return closest_entry
114116

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

139141
first = js['data']
142+
if first[0]:
143+
first[0]['url'] = first[0]['links']['self']
140144
return first.pop()

minoshiro/web_api/mal.py

+4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ async def get_entry_details(session_manager, header_info: dict,
4848
if medium == Medium.ANIME:
4949
data = {
5050
'id': thing.find('id').text,
51+
'url': 'https://myanimelist.net/anime/'
52+
f'{thing.find("id").text}',
5153
'title': thing.find('title').text,
5254
'english': thing.find('english').text,
5355
'synonyms': synonyms,
@@ -62,6 +64,8 @@ async def get_entry_details(session_manager, header_info: dict,
6264
else:
6365
data = {
6466
'id': thing.find('id').text,
67+
'url': 'https://myanimelist.net/manga/'
68+
f'{thing.find("id").text}',
6569
'title': thing.find('title').text,
6670
'english': thing.find('english').text,
6771
'synonyms': synonyms,

0 commit comments

Comments
 (0)