Normal scan option added

This commit is contained in:
2020-12-26 15:43:54 +01:00
parent 69375796a6
commit d32105e5c5
3 changed files with 51 additions and 4 deletions
+9 -1
View File
@@ -27,6 +27,13 @@ function redirect($path)
}
if (isset($_GET["rescan"]))
{
$lib->rescan_library(json_decode(file_get_contents("session/settings.json"), true)["osu_folder"]);
$lib->save_db();
redirect("./");
}
if (isset($_GET["scan"]))
{
$lib->scan_library(json_decode(file_get_contents("session/settings.json"), true)["osu_folder"]);
$lib->save_db();
@@ -61,7 +68,8 @@ $start = file_get_contents("resources/start.html");
$start = str_replace("{{ STYLE }}", file_get_contents("resources/style.css"), $start);
echo $start;
dump($lib, "lib");
echo '<a href="./?rescan">[Rescan]</a> ';
echo '<a href="./?scan">[Scan]</a> ';
echo '<a href="./?rescan">[Force rescan]</a> ';
echo '<a href="./?blacken">[Blacken]</a> ';
echo '<a href="./?nosb">[NoSB]</a> ';
echo '<a href="./?novid">[Novid]</a> ';