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
fd3038f1
Vérifiée
Valider
fd3038f1
rédigé
12 avr. 2022
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
FIX: Fix cache process => don't use the cache to build the cache...
parent
44fb4156
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion
!192
Resolve "FEATURE: Use time stamp from kurisu in update process"
Modifications
3
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
inc/lektor/database.h
+1
-0
1 ajout, 0 suppression
inc/lektor/database.h
src/database/cache.c
+2
-2
2 ajouts, 2 suppressions
src/database/cache.c
src/database/queue.c
+18
-0
18 ajouts, 0 suppression
src/database/queue.c
avec
21 ajouts
et
2 suppressions
inc/lektor/database.h
+
1
−
0
Voir le fichier @
fd3038f1
...
...
@@ -67,6 +67,7 @@ bool database_queue_get_current_file (lkt_db *db, char filepath[PATH_MAX]);
bool
database_get_kara_id
(
lkt_db
*
db
,
char
filepath
[
PATH_MAX
],
int
*
id
);
bool
database_get_kara_path
(
lkt_db
*
db
,
int
id
,
char
filepath
[
PATH_MAX
]);
bool
database_get_kara_path_no_cache
(
lkt_db
*
db
,
int
id
,
char
filepath
[
PATH_MAX
]);
bool
database_get_kara_position
(
lkt_db
*
db
,
int
id
,
int
*
pos
);
bool
database_get_kara_mtime_id
(
lkt_db
*
db
,
int
id
,
uint64_t
*
mtime
);
bool
database_get_kara_duration_id
(
lkt_db
*
db
,
int
id
,
uint64_t
*
duration
);
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/database/cache.c
+
2
−
2
Voir le fichier @
fd3038f1
...
...
@@ -60,7 +60,7 @@ database_cache_kara_magic(lkt_db *db, int id)
/* Get the filepath */
char
filename
[
PATH_MAX
];
memset
(
filename
,
0
,
sizeof
(
filename
));
database_get_kara_path
(
db
,
id
,
filename
);
database_get_kara_path
_no_cache
(
db
,
id
,
filename
);
if
(
filename
[
0
]
==
0
)
{
LOG_ERROR
(
"CACHE"
,
"Failed to get filename for kara %ld"
,
id
);
return
;
...
...
@@ -152,7 +152,7 @@ database_cache_kara(lkt_db *db, int id)
{
char
filepath
[
PATH_MAX
];
if
(
!
database_get_kara_path
(
db
,
id
,
filepath
))
{
if
(
!
database_get_kara_path
_no_cache
(
db
,
id
,
filepath
))
{
LOG_ERROR
(
"CACHE"
,
"Failed to get a path for kara %d, don't update cache"
,
id
);
return
;
}
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/database/queue.c
+
18
−
0
Voir le fichier @
fd3038f1
...
...
@@ -900,6 +900,24 @@ error:
return
status
;
}
bool
database_get_kara_path_no_cache
(
lkt_db
*
db
,
int
id
,
char
filepath
[
PATH_MAX
])
{
bool
ret_code
=
false
;
sqlite3_stmt
*
stmt
=
NULL
;
static
const
char
*
SQL
=
"SELECT file_path FROM kara WHERE id = ?;"
;
RETURN_UNLESS
(
id
&&
db
,
"Invalid argument"
,
false
);
SQLITE_PREPARE
(
db
,
stmt
,
SQL
,
error
);
SQLITE_BIND_INT
(
db
,
stmt
,
1
,
id
,
error
);
SQLITE_STEP_ROW
(
db
,
stmt
,
error
);
if
(
filepath
!=
NULL
)
safe_strncpy
(
filepath
,
sqlite3_column_chars
(
stmt
,
0
),
PATH_MAX
);
ret_code
=
true
;
error:
sqlite3_finalize
(
stmt
);
return
ret_code
;
}
bool
database_get_kara_path
(
lkt_db
*
db
,
int
id
,
char
filepath
[
PATH_MAX
])
{
...
...
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