diff --git a/fly.toml b/fly.toml index 5bc10f0..5285460 100644 --- a/fly.toml +++ b/fly.toml @@ -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' diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 83ed393..c785982 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "frontend", - "version": "0.0.1-rc8", + "version": "0.0.1-rc9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "frontend", - "version": "0.0.1-rc8", + "version": "0.0.1-rc9", "dependencies": { "base-64": "^1.0.0", "react": "^18.2.0", diff --git a/frontend/package.json b/frontend/package.json index 206545d..67a9949 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -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", diff --git a/plexio/__init__.py b/plexio/__init__.py index 5d1c00d..5f7ec56 100644 --- a/plexio/__init__.py +++ b/plexio/__init__.py @@ -1 +1 @@ -__version__ = '0.0.1-rc8' +__version__ = '0.0.1-rc9' diff --git a/plexio/plex/media_server_api.py b/plexio/plex/media_server_api.py index b8af1e9..be28d14 100644 --- a/plexio/plex/media_server_api.py +++ b/plexio/plex/media_server_api.py @@ -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( @@ -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(