This commit is contained in:
+3
-2
@@ -128,7 +128,7 @@ async def get_movies_list(dependencies: dict,
|
||||
|
||||
# Get paginated results - PostgreSQL
|
||||
query = f"""
|
||||
SELECT imdb_id, path, released, dateadded, source, has_video_file, last_updated
|
||||
SELECT imdb_id, title, year, path, released, dateadded, source, has_video_file, last_updated
|
||||
FROM movies
|
||||
WHERE {where_clause}
|
||||
ORDER BY last_updated DESC
|
||||
@@ -139,7 +139,8 @@ async def get_movies_list(dependencies: dict,
|
||||
movies = []
|
||||
for row in cursor.fetchall():
|
||||
movie = dict(row)
|
||||
# Extract title from path for display
|
||||
# Use database title if available, otherwise extract from path
|
||||
if not movie.get('title'):
|
||||
try:
|
||||
movie['title'] = Path(movie['path']).name if movie['path'] else movie['imdb_id']
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user