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
c534a3cb
Vérifiée
Valider
c534a3cb
rédigé
Il y a 5 ans
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Add metadata to downloaded kara
parent
e119a347
Aucune branche associée trouvée
Étiquettes
Étiquettes contenant la validation
1 requête de fusion
!77
Kara downloader update
Modifications
2
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
inc/lektor/mkv.h
+0
-8
0 ajout, 8 suppressions
inc/lektor/mkv.h
src/net/downloader.c
+8
-0
8 ajouts, 0 suppression
src/net/downloader.c
avec
8 ajouts
et
8 suppressions
inc/lektor/mkv.h
+
0
−
8
Voir le fichier @
c534a3cb
...
@@ -37,15 +37,7 @@ struct kara_metadata {
...
@@ -37,15 +37,7 @@ struct kara_metadata {
int
song_number
;
int
song_number
;
};
};
enum
kara_action
{
kara_action_none
=
0
,
/* Do nothing */
kara_action_add
=
(
1
<<
1
),
/* Add to database */
kara_action_delete
=
(
1
<<
2
),
/* Delete from database */
kara_action_unavail
=
(
1
<<
3
),
/* Mark kara as unavailable */
};
struct
kara
{
struct
kara
{
enum
kara_action
action
;
/* What to do with this kara. */
size_t
id
;
/* Should never be NULL. NEVER!! */
size_t
id
;
/* Should never be NULL. NEVER!! */
struct
kara_metadata
mdt
;
/* The metadata of the kara. */
struct
kara_metadata
mdt
;
/* The metadata of the kara. */
char
filename
[
PATH_MAX
];
/* The path to the matroska file. */
char
filename
[
PATH_MAX
];
/* The path to the matroska file. */
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/net/downloader.c
+
8
−
0
Voir le fichier @
c534a3cb
...
@@ -325,7 +325,10 @@ __handle_got_json(volatile sqlite3 *db, struct lkt_repo *repo, struct json_objec
...
@@ -325,7 +325,10 @@ __handle_got_json(volatile sqlite3 *db, struct lkt_repo *repo, struct json_objec
struct
kara
kara
;
struct
kara
kara
;
char
url
[
URL_MAX_LEN
];
char
url
[
URL_MAX_LEN
];
long
filestamp
,
timestamp
;
long
filestamp
,
timestamp
;
char
mkvpropedit
[
PATH_MAX
];
RETURN_UNLESS
(
len
>
0
&&
json_object_get_array
(
json
),
"Json invalid or array empty"
,
NOTHING
);
RETURN_UNLESS
(
len
>
0
&&
json_object_get_array
(
json
),
"Json invalid or array empty"
,
NOTHING
);
RETURN_UNLESS
(
database_config_get_text
(
db
,
"externals"
,
"mkvpropedit"
,
mkvpropedit
,
PATH_MAX
-
1
),
"Can't get the mkvpropedit executable path"
,
NOTHING
);
LOG_INFO_SCT
(
"REPO"
,
"Starting to process json for repo %s"
,
repo
->
name
);
LOG_INFO_SCT
(
"REPO"
,
"Starting to process json for repo %s"
,
repo
->
name
);
for
(
i
=
0
;
i
<
len
;
++
i
)
{
for
(
i
=
0
;
i
<
len
;
++
i
)
{
...
@@ -377,6 +380,11 @@ __handle_got_json(volatile sqlite3 *db, struct lkt_repo *repo, struct json_objec
...
@@ -377,6 +380,11 @@ __handle_got_json(volatile sqlite3 *db, struct lkt_repo *repo, struct json_objec
continue
;
continue
;
}
}
if
(
!
kara_metadata_write
(
&
kara
.
mdt
,
kara
.
filename
,
mkvpropedit
))
{
LOG_WARN_SCT
(
"REPO"
,
"Could not write metadata to kara '%ld' with path '%s'"
,
kara
.
id
,
kara
.
filename
);
continue
;
}
if
(
!
database_update_set_available
((
sqlite3
*
)
db
,
kara
.
id
))
{
if
(
!
database_update_set_available
((
sqlite3
*
)
db
,
kara
.
id
))
{
LOG_WARN_SCT
(
"REPO"
,
"Could not set kara %ld available"
,
kara
.
id
);
LOG_WARN_SCT
(
"REPO"
,
"Could not set kara %ld available"
,
kara
.
id
);
continue
;
continue
;
...
...
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