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, Title = 1,
Artist = 2, Artist = 2,
MP3 = 4, MP3 = 4,
Instrumental = 5,
Vocals = 6,
BPM = 8, BPM = 8,
MedleyStartBeat = 16, MedleyStartBeat = 16,
MedleyEndBeat = 32 MedleyEndBeat = 32
@@ -97,6 +99,8 @@ namespace VocaluxeLib.Songs
public bool Relative; public bool Relative;
public string MP3FileName = String.Empty; public string MP3FileName = String.Empty;
public string InstrumentalFileName = String.Empty;
public string VocalsFileName = String.Empty;
public string CoverFileName = String.Empty; public string CoverFileName = String.Empty;
public readonly List<string> BackgroundFileNames = new List<string>(); public readonly List<string> BackgroundFileNames = new List<string>();
public string VideoFileName = String.Empty; public string VideoFileName = String.Empty;
@@ -230,6 +234,8 @@ namespace VocaluxeLib.Songs
Relative = song.Relative; Relative = song.Relative;
MP3FileName = song.MP3FileName; MP3FileName = song.MP3FileName;
InstrumentalFileName = song.InstrumentalFileName;
VocalsFileName = song.VocalsFileName;
CoverFileName = song.CoverFileName; CoverFileName = song.CoverFileName;
BackgroundFileNames = song.BackgroundFileNames; BackgroundFileNames = song.BackgroundFileNames;
VideoFileName = song.VideoFileName; VideoFileName = song.VideoFileName;
@@ -318,6 +324,16 @@ namespace VocaluxeLib.Songs
return Path.Combine(Folder, MP3FileName); return Path.Combine(Folder, MP3FileName);
} }
public string GetInstrumental()
{
return Path.Combine(Folder, InstrumentalFileName);
}
public string GetVocals()
{
return Path.Combine(Folder, VocalsFileName);
}
public string GetVideo() public string GetVideo()
{ {
return Path.Combine(Folder, VideoFileName); return Path.Combine(Folder, VideoFileName);
+25
View File
@@ -172,6 +172,7 @@ namespace VocaluxeLib.Songs
break; break;
case "SOURCE": case "SOURCE":
case "YOUTUBE": case "YOUTUBE":
case "PROVIDEDBY":
_Song.Source = value; _Song.Source = value;
break; break;
case "LENGTH": case "LENGTH":
@@ -190,6 +191,30 @@ namespace VocaluxeLib.Songs
return false; return false;
} }
break; 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": case "BPM":
if (CHelper.TryParse(value, out _Song.BPM)) if (CHelper.TryParse(value, out _Song.BPM))
{ {