mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-21 01:05:30 +00:00
Add imdb_id to movie api output
This commit is contained in:
parent
325d832c1b
commit
430a486438
3 changed files with 35 additions and 1 deletions
|
|
@ -128,7 +128,7 @@ class MovieViewSet(viewsets.ReadOnlyModelViewSet):
|
|||
'name': info.get('name', movie.name),
|
||||
'o_name': info.get('o_name', ''),
|
||||
'description': info.get('description', info.get('plot', movie.description)),
|
||||
'plot':info.get('plot', info.get('description', movie.description)),
|
||||
'plot': info.get('plot', info.get('description', movie.description)),
|
||||
'year': movie.year or info.get('year'),
|
||||
'release_date': (movie.custom_properties or {}).get('release_date') or info.get('release_date') or info.get('releasedate', ''),
|
||||
'genre': movie.genre or info.get('genre', ''),
|
||||
|
|
@ -137,6 +137,7 @@ class MovieViewSet(viewsets.ReadOnlyModelViewSet):
|
|||
'country': (movie.custom_properties or {}).get('country') or info.get('country', ''),
|
||||
'rating': movie.rating or info.get('rating', movie.rating or 0),
|
||||
'tmdb_id': movie.tmdb_id or info.get('tmdb_id', ''),
|
||||
'imdb_id': movie.imdb_id or info.get('imdb_id', ''),
|
||||
'youtube_trailer': (movie.custom_properties or {}).get('youtube_trailer') or info.get('youtube_trailer') or info.get('trailer', ''),
|
||||
'duration': movie.duration or (int(info.get('duration_secs', 0)) // 60 if info.get('duration_secs') else None),
|
||||
'duration_secs': info.get('duration_secs', (movie.duration or 0) * 60),
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 5.2.4 on 2025-08-07 23:55
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('vod', '0002_movie_series_custom_properties'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='episode',
|
||||
old_name='release_date',
|
||||
new_name='air_date',
|
||||
),
|
||||
]
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
from django.db import migrations, models
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('vod', '0003_rename_release_date_episode_air_date'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='m3umovierelation',
|
||||
name='last_advanced_refresh',
|
||||
field=models.DateTimeField(blank=True, null=True, help_text="Last time advanced data was fetched from provider"),
|
||||
),
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue