Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group history compact layout results by quality #9788

Merged
merged 2 commits into from
Aug 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions medusa/server/api/v2/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ def get(self, series_slug, path_param):
for item in results:
if item.get('showid') and item.get('season') and item.get('episode') and item.get('indexer_id'):
item['showslug'] = f"{indexer_id_to_name(item['indexer_id'])}{item['showid']}"
my_key = f"{item['showslug']}S{item['season']}E{item['episode']}"
res.setdefault(my_key, []).append(item)
group_by_key = f"{item['showslug']}S{item['season']}E{item['episode']}Q{item['quality']}"
res.setdefault(group_by_key, []).append(item)
results = res
headers['X-Pagination-Count'] = len(results)

Expand Down