Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
lektor
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Kubat
lektor
Validations
2025d3c6
Vérifiée
Valider
2025d3c6
rédigé
6 mai 2020
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Handle case to delete current kara (not if the kara is the last)
parent
98e6c32f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion
!79
Database update
Modifications
1
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
src/commands.c
+17
-7
17 ajouts, 7 suppressions
src/commands.c
avec
17 ajouts
et
7 suppressions
src/commands.c
+
17
−
7
Voir le fichier @
2025d3c6
...
...
@@ -271,20 +271,30 @@ command_crop(volatile sqlite3 *db, mpd_idle_flag *watch_mask_ptr)
bool
command_delid
(
volatile
sqlite3
*
db
,
struct
lkt_win
*
win
,
char
*
id_str
,
mpd_idle_flag
*
watch_mask_ptr
)
{
UNUSED
(
win
);
long
id
;
char
*
endptr
=
NULL
,
err
=
0
;
char
*
endptr
=
NULL
,
err
=
0
,
filepath
[
PATH_MAX
]
;
int
uri
=
0
;
*
watch_mask_ptr
|=
MPD_IDLE_PLAYLIST
;
STRTOL
(
id
,
id_str
,
endptr
,
err
);
RETURN_IF
(
err
,
"STRTOL failed"
,
false
);
/* If one day we allow suppression of the current kara, will need the `win`
pointer to reload the kara in the same position (but the kara won't be
the same). */
database_queue_current_kara
(
db
,
NULL
,
&
uri
);
RETURN_IF
(
id
==
(
long
)
uri
,
"Can't delete current kara"
,
false
);
if
(
id
==
(
long
)
uri
)
{
if
(
database_queue_skip_current
(
db
,
filepath
))
{
if
(
!
win
->
load_file
(
win
,
filepath
))
{
LOG_ERROR_SCT
(
"COMMAND"
,
"Failed to skip current kara to delete id %ld"
,
id
);
return
false
;
}
}
else
{
LOG_WARN_SCT
(
"COMMAND"
,
"Failed to skip current kara to delete id %ld, stop playback"
,
id
);
win
->
close
(
win
);
}
}
*
watch_mask_ptr
|=
MPD_IDLE_PLAYER
;
return
database_queue_del_id
(
db
,
id
);
}
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter