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

Remove not needed ifs/elses

parent a56a0573
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!76Database update from FS
...@@ -350,12 +350,11 @@ __handle_got_json(volatile sqlite3 *db, struct lkt_repo *repo, struct json_objec ...@@ -350,12 +350,11 @@ __handle_got_json(volatile sqlite3 *db, struct lkt_repo *repo, struct json_objec
if (safe_json_get_long(kara_json, "unix_timestamp", &timestamp)) if (safe_json_get_long(kara_json, "unix_timestamp", &timestamp))
continue; continue;
filestamp = get_mtime(kara.filename); filestamp = get_mtime(kara.filename);
if (database_get_timestamp(db) < filestamp) if (database_get_timestamp(db) >= filestamp && filestamp > timestamp) {
LOG_WARN_SCT("REPO", "Download kara '%ld' with path '%s'", kara.id, kara.filename);
else if (filestamp > timestamp) {
LOG_INFO_SCT("REPO", "Ignore kara '%ld' with path '%s'", kara.id, kara.filename); LOG_INFO_SCT("REPO", "Ignore kara '%ld' with path '%s'", kara.id, kara.filename);
continue; continue;
} }
LOG_WARN_SCT("REPO", "Download kara '%ld' with path '%s'", kara.id, kara.filename);
err |= safe_json_get_string(kara_json, "song_name", kara.mdt.song_name, LEKTOR_TAG_MAX); err |= safe_json_get_string(kara_json, "song_name", kara.mdt.song_name, LEKTOR_TAG_MAX);
err |= safe_json_get_string(kara_json, "source_name", kara.mdt.source_name, LEKTOR_TAG_MAX); err |= safe_json_get_string(kara_json, "source_name", kara.mdt.source_name, LEKTOR_TAG_MAX);
......
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