Skip to content
Extraits de code Groupes Projets
Vérifiée Valider ff729d80 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

[FIX] DB: Don't fail when we don't need to back propagate

Edge case: all the queue has the same priority, do the get_previous_prio_diff
failed and it was treated as an error.
parent 991e7c2d
Branches
Étiquettes
1 requête de fusion!188[FIX] DB: Don't fail when we don't need to back propagate
Pipeline #2667 réussi
...@@ -579,14 +579,14 @@ ___database_back_propagate_priority(lkt_db *db) ...@@ -579,14 +579,14 @@ ___database_back_propagate_priority(lkt_db *db)
sqlite3_stmt *stmt = NULL; sqlite3_stmt *stmt = NULL;
/* Currently playing position */ /* Currently playing position */
SQLITE_PREPARE(db, stmt, SQL_GET_CURRENT, not_playing_or_no_need_to_back_propagate); SQLITE_PREPARE(db, stmt, SQL_GET_CURRENT, error);
SQLITE_STEP_ROW(db, stmt, not_playing_or_no_need_to_back_propagate); SQLITE_STEP_ROW(db, stmt, not_playing_or_no_need_to_back_propagate);
currently_playing_position = sqlite3_column_int64(stmt, 0); currently_playing_position = sqlite3_column_int64(stmt, 0);
sqlite3_finalize(stmt); sqlite3_finalize(stmt);
/* Next kara with priority > 1 */ /* Next kara with priority > 1 */
SQLITE_PREPARE(db, stmt, SQL_GET_POS_WITH_PRIO_SUP_1, error); SQLITE_PREPARE(db, stmt, SQL_GET_POS_WITH_PRIO_SUP_1, error);
SQLITE_STEP_ROW(db, stmt, error); SQLITE_STEP_ROW(db, stmt, not_playing_or_no_need_to_back_propagate);
next_kara_with_prio_sup_1 = sqlite3_column_int64(stmt, 0); next_kara_with_prio_sup_1 = sqlite3_column_int64(stmt, 0);
priority_to_back_propagate = sqlite3_column_int(stmt, 1); priority_to_back_propagate = sqlite3_column_int(stmt, 1);
sqlite3_finalize(stmt); sqlite3_finalize(stmt);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter