Skip to content

Commit

Permalink
- Added IMDB id field to meta
Browse files Browse the repository at this point in the history
- Fixed date formatting
  • Loading branch information
SageTendo committed Feb 12, 2024
1 parent 852ec42 commit 3722346
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/routes/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def mal_to_meta(anime_item: dict):
start_date += '-'

if end_date := anime_item.get('end_date', None):
start_date += end_date
start_date += end_date[:4]

# Check for background key in anime_item
background = None
Expand Down
6 changes: 4 additions & 2 deletions app/routes/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def addon_meta(user_id: str, meta_type: str, meta_id: str):
"""
# ignore imdb ids for older versions of mal-stremio
if IMDB_ID_PREFIX in meta_id:
return {}
return respond_with({})

# Check if meta type exists in manifest
if meta_type not in MANIFEST['types']:
Expand Down Expand Up @@ -62,6 +62,7 @@ def kitsu_to_meta(kitsu_meta: dict):
cacheMaxAge = meta.get('cacheMaxAge', None)
runtime = meta.get('runtime', None)
videos = meta.get('videos', [])
imdb_id = meta.get('imdb_id', None)

return {
'cacheMaxAge': cacheMaxAge,
Expand All @@ -79,5 +80,6 @@ def kitsu_to_meta(kitsu_meta: dict):
'trailers': trailers,
'links': links,
'runtime': runtime,
'videos': videos
'videos': videos,
'imdb_id': imdb_id
}

0 comments on commit 3722346

Please sign in to comment.