Disable download by default
This commit is contained in:
parent
0d1c3e60cd
commit
e5d2724f8c
@ -39,6 +39,9 @@ public interface IAppSettings
|
||||
|
||||
[Option(DefaultValue = Configs.DEFAULT_RELAY_PORT)]
|
||||
int RelayPort { get; }
|
||||
|
||||
[Option(DefaultValue = false)]
|
||||
bool DownloadEvents { get; }
|
||||
|
||||
[Option(DefaultValue = null)]
|
||||
IEnumerable<int>? UnlockableSongIds { get; }
|
||||
|
@ -9,12 +9,59 @@
|
||||
"MusicDbName": "music471omni.db3",
|
||||
"ServerIp": "127.0.0.1",
|
||||
"EventFolder": "event",
|
||||
"DownloadEvents": false,
|
||||
"RelayServer": "127.0.0.1",
|
||||
"RelayPort": 54321,
|
||||
"UnlockableSongIds": [
|
||||
11, 13, 149, 273, 291, 320, 321, 371, 378, 384, 464, 471, 474, 475, 492, 494, 498, 520,
|
||||
548, 551, 558, 561, 565, 570, 577, 583, 612, 615, 622, 632, 659, 666, 668, 670, 672, 676,
|
||||
680, 682, 685, 686, 697, 700, 701, 711, 720, 749, 875, 876, 877
|
||||
11,
|
||||
13,
|
||||
149,
|
||||
273,
|
||||
291,
|
||||
320,
|
||||
321,
|
||||
371,
|
||||
378,
|
||||
384,
|
||||
464,
|
||||
471,
|
||||
474,
|
||||
475,
|
||||
492,
|
||||
494,
|
||||
498,
|
||||
520,
|
||||
548,
|
||||
551,
|
||||
558,
|
||||
561,
|
||||
565,
|
||||
570,
|
||||
577,
|
||||
583,
|
||||
612,
|
||||
615,
|
||||
622,
|
||||
632,
|
||||
659,
|
||||
666,
|
||||
668,
|
||||
670,
|
||||
672,
|
||||
676,
|
||||
680,
|
||||
682,
|
||||
685,
|
||||
686,
|
||||
697,
|
||||
700,
|
||||
701,
|
||||
711,
|
||||
720,
|
||||
749,
|
||||
875,
|
||||
876,
|
||||
877
|
||||
],
|
||||
"ResponseData": [
|
||||
{
|
||||
|
@ -101,7 +101,11 @@ public class ServerController : WebApiController
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
var data = responseList[i];
|
||||
var fileUrl = data.FileName.StartsWith("/") ? $"{DataUrl}{data.FileName}" : $"{DataUrl}/{data.FileName}";
|
||||
var fileUrl = data.FileName;
|
||||
if (Configs.SETTINGS.DownloadEvents)
|
||||
{
|
||||
fileUrl = data.FileName.StartsWith("/") ? $"{DataUrl}{data.FileName}" : $"{DataUrl}/{data.FileName}";
|
||||
}
|
||||
dataString.Append($"{i},{fileUrl},{data.NotBeforeUnixTime},{data.NotAfterUnixTime},{data.Md5},{data.Index}");
|
||||
dataString.Append('\n');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user