Skip to content

Commit

Permalink
fix: update resolution keys in ranking settings to include 'r' prefix (
Browse files Browse the repository at this point in the history
…#181)

* fix: update resolution keys in ranking settings to include 'r' prefix

* fix formatting
  • Loading branch information
davidemarcoli authored Nov 25, 2024
1 parent 693d3f1 commit efba13e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/lib/forms/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -792,11 +792,11 @@ export function rankingSettingsToPass(data: RankingData) {
require: data.ranking.require,
exclude: data.ranking.exclude,
preferred: data.ranking.preferred,
resolution_2160p: data.ranking.resolutions['2160p'],
resolution_1080p: data.ranking.resolutions['1080p'],
resolution_720p: data.ranking.resolutions['720p'],
resolution_480p: data.ranking.resolutions['480p'],
resolution_360p: data.ranking.resolutions['360p'],
resolution_2160p: data.ranking.resolutions['r2160p'],
resolution_1080p: data.ranking.resolutions['r1080p'],
resolution_720p: data.ranking.resolutions['r720p'],
resolution_480p: data.ranking.resolutions['r480p'],
resolution_360p: data.ranking.resolutions['r360p'],
resolution_unknown: data.ranking.resolutions.unknown,
title_similarity: data.ranking.options.title_similarity,
remove_all_trash: data.ranking.options.remove_all_trash,
Expand Down Expand Up @@ -917,11 +917,11 @@ export function rankingSettingsToSet(form: SuperValidated<Infer<RankingSettingsS
exclude: form.data.exclude,
preferred: form.data.preferred,
resolutions: {
'2160p': form.data.resolution_2160p,
'1080p': form.data.resolution_1080p,
'720p': form.data.resolution_720p,
'480p': form.data.resolution_480p,
'360p': form.data.resolution_360p,
r2160p: form.data.resolution_2160p,
r1080p: form.data.resolution_1080p,
r720p: form.data.resolution_720p,
r480p: form.data.resolution_480p,
r360p: form.data.resolution_360p,
unknown: form.data.resolution_unknown
},
options: {
Expand Down

1 comment on commit efba13e

@dreulavelle
Copy link
Member

@dreulavelle dreulavelle commented on efba13e Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should use the schema instead as the ranking settings can occasionally change. The schema is available in the api I believe at /schema

Please sign in to comment.