Skip to content

Commit

Permalink
fix imdb id is not in plex db (#19)
Browse files Browse the repository at this point in the history
Co-authored-by: Maksym Ivanchenko <--set>
  • Loading branch information
vanchaxy authored Apr 5, 2024
1 parent 39fc8a8 commit aca6ce0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ app = 'plexio'
primary_region = 'iad'

[build]
image = 'ghcr.io/vanchaxy/plexio:0.0.1-rc8'
image = 'ghcr.io/vanchaxy/plexio:0.0.1-rc9'

[env]
CACHE_TYPE = 'redis'
Expand Down
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "0.0.1-rc8",
"version": "0.0.1-rc9",
"dependencies": {
"base-64": "^1.0.0",
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion plexio/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.0.1-rc8'
__version__ = '0.0.1-rc9'
7 changes: 5 additions & 2 deletions plexio/plex/media_server_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ async def imdb_to_plex_id(
'guid': f'com.plexapp.agents.imdb://{imdb_id}?lang=en',
},
)
guid = json['MediaContainer']['Metadata'][0]['guid']
return guid
media_container = json['MediaContainer']
if media_container['totalSize']:
return media_container['Metadata'][0]['guid']


async def get_episode_guid(
Expand Down Expand Up @@ -195,6 +196,8 @@ async def stremio_to_plex_id(
imdb_id=imdb_id,
media_type=media_type,
)
if not plex_id:
return None

if media_type == PlexMediaType.show:
media = await get_media(
Expand Down

0 comments on commit aca6ce0

Please sign in to comment.