Tracker URl

This commit is contained in:
xiaomlove
2025-06-20 22:59:02 +07:00
parent a0ff441f03
commit 73b4183d56
22 changed files with 333 additions and 16 deletions

View File

@@ -15,6 +15,7 @@ use App\Models\Setting;
use App\Models\Tag;
use App\Models\Torrent;
use App\Models\TorrentTag;
use App\Models\TrackerUrl;
use App\Models\User;
use App\Models\UserBanLog;
use App\Repositories\AttendanceRepository;
@@ -361,6 +362,19 @@ class Update extends Install
Artisan::call("upgrade:migrate_snatched_hr_id");
Artisan::call("upgrade:migrate_snatched_buy_log_id");
}
if (!Schema::hasTable("tracker_urls")) {
$this->runMigrate("database/migrations/2025_06_19_194137_create_tracker_urls_table.php");
$announceUrl = get_setting("security.https_announce_url");
if (empty($announceUrl)) {
$announceUrl = get_setting("basic.announce_url");
}
TrackerUrl::query()->create([
"url" => $announceUrl,
"enabled" => 1,
"is_default" => 1,
]);
NexusDB::cache_del("nexus_plugin_store_all");
}
}