Preparations for Song Format 1.1.0 (#734)

* Add missing Song Format 1.1.0 Tags

* Add Instrumental & Vocals

* Add Instrumental & Vocals
This commit is contained in:
Rap-Voca authored and GitHub committed 2024-11-24 07:14:23 +01:00
1 parent bdadbfcbd8
commit 8dde27426c
2 files changed
+41

No files matched your search

+16
View File
@@ -44,6 +44,8 @@ namespace VocaluxeLib.Songs
Title = 1,
Artist = 2,
MP3 = 4,
Instrumental = 5,
Vocals = 6,
BPM = 8,
MedleyStartBeat = 16,
MedleyEndBeat = 32
@@ -97,6 +99,8 @@ namespace VocaluxeLib.Songs
public bool Relative;
public string MP3FileName = String.Empty;
public string InstrumentalFileName = String.Empty;
public string VocalsFileName = String.Empty;
public string CoverFileName = String.Empty;
public readonly List<string> BackgroundFileNames = new List<string>();
public string VideoFileName = String.Empty;
@@ -230,6 +234,8 @@ namespace VocaluxeLib.Songs
Relative = song.Relative;
MP3FileName = song.MP3FileName;
InstrumentalFileName = song.InstrumentalFileName;
VocalsFileName = song.VocalsFileName;
CoverFileName = song.CoverFileName;
BackgroundFileNames = song.BackgroundFileNames;
VideoFileName = song.VideoFileName;
@@ -318,6 +324,16 @@ namespace VocaluxeLib.Songs
return Path.Combine(Folder, MP3FileName);
}
public string GetInstrumental()
{
return Path.Combine(Folder, InstrumentalFileName);
}
public string GetVocals()
{
return Path.Combine(Folder, VocalsFileName);
}
public string GetVideo()
{
return Path.Combine(Folder, VideoFileName);
+25
View File
@@ -172,6 +172,7 @@ namespace VocaluxeLib.Songs
break;
case "SOURCE":
case "YOUTUBE":
case "PROVIDEDBY":
_Song.Source = value;
break;
case "LENGTH":
@@ -190,6 +191,30 @@ namespace VocaluxeLib.Songs
return false;
}
break;
case "INSTRUMENTAL":
if (File.Exists(Path.Combine(_Song.Folder, value)))
{
_Song.InstrumentalFileName = value;
headerFlags |= EHeaderFlags.Instrumental;
}
else
{
CLog.CSongLog.Error("[{SongFileName}] Can't find instrumental audio file: {AudioFile}", CLog.Params(_Song.FileName, Path.Combine(_Song.Folder, value)));
return false;
}
break;
case "VOCALS":
if (File.Exists(Path.Combine(_Song.Folder, value)))
{
_Song.VocalsFileName = value;
headerFlags |= EHeaderFlags.Vocals;
}
else
{
CLog.CSongLog.Error("[{SongFileName}] Can't find vocal audio file: {AudioFile}", CLog.Params(_Song.FileName, Path.Combine(_Song.Folder, value)));
return false;
}
break;
case "BPM":
if (CHelper.TryParse(value, out _Song.BPM))
{