Fix quality profile settings not persisting to quality_profiles table - #1103
Open
Jean-LucPicard72 wants to merge 7 commits into
Open
Fix quality profile settings not persisting to quality_profiles table#1103Jean-LucPicard72 wants to merge 7 commits into
Jean-LucPicard72 wants to merge 7 commits into
Conversation
_write_default_quality_profile_row() only wrote 6 of the 14 columns the Settings -> Quality page can edit. Toggling acoustid_required, downsample_enabled, deep_audio_verify, replace_lower_quality, or any of the lossy_copy_* fields reported success from POST /api/quality-profile, but the write-through to the is_default=1 row (which get_quality_profile()/GET /api/quality-profile actually reads) silently dropped those columns, so the UI/API kept reporting the old value and the setting never took effect. Adds the missing columns to the UPDATE statement and parameter tuple.
Owner
|
Sorry I will be reviewing PR soon, trying to wrap up this react migration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_write_default_quality_profile_row()only writes 6 of the 14 columns the Settings → Quality page can edit. Togglingacoustid_required,downsample_enabled,deep_audio_verify,replace_lower_quality, or any of thelossy_copy_*fields returns{"success": true}fromPOST /api/quality-profile, but the write-through to theis_default=1row inquality_profiles— whichget_quality_profile()/GET /api/quality-profileactually reads — silently drops those columns. The UI/API keeps reporting the old value and the setting never takes effect.Repro:
POST /api/quality-profilewithreplace_lower_quality: true(full profile object) →{"success": true}GET /api/quality-profile→replace_lower_qualityis stillfalsequality_profilestable: the row'sreplace_lower_qualitycolumn is unchanged.Fix
Adds the missing columns (
acoustid_required,downsample_enabled,deep_audio_verify,replace_lower_quality,lossy_copy_enabled,lossy_copy_codec,lossy_copy_bitrate,lossy_copy_delete_original) to theUPDATEstatement and parameter tuple, mirroring the same coercion style already used for the existing columns.Test plan
POSTa profile withreplace_lower_quality: true, confirmedGET /api/quality-profilenow returnstrueand thequality_profilesrow reflects it.lossy_copy_bitratetype coercion (stored asTEXTin schema; profile payload can send it as either a string or number depending on client).