|
|
@ -61,6 +61,9 @@ class Dashboard(Plugin): |
|
|
|
.order_by(asc(LibraryTitle.simple_title)) |
|
|
|
|
|
|
|
active = q.all() |
|
|
|
movies = [] |
|
|
|
|
|
|
|
if len(active) > 0: |
|
|
|
|
|
|
|
# Do the shuffle |
|
|
|
if random: |
|
|
@ -92,6 +95,8 @@ class Dashboard(Plugin): |
|
|
|
if len(movie_ids) >= limit: |
|
|
|
break |
|
|
|
|
|
|
|
if len(movie_ids) > 0: |
|
|
|
|
|
|
|
# Get all movie information |
|
|
|
movies_raw = db.query(Movie) \ |
|
|
|
.options(joinedload_all('library.titles')) \ |
|
|
@ -105,7 +110,6 @@ class Dashboard(Plugin): |
|
|
|
for movie in movies_raw: |
|
|
|
movie_dict[movie.id] = movie |
|
|
|
|
|
|
|
movies = [] |
|
|
|
for movie_id in movie_ids: |
|
|
|
movies.append(movie_dict[movie_id].to_dict({ |
|
|
|
'library': {'titles': {}, 'files':{}}, |
|
|
|