aboutsummaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/UFiles.pas1
-rw-r--r--src/base/USong.pas10
2 files changed, 10 insertions, 1 deletions
diff --git a/src/base/UFiles.pas b/src/base/UFiles.pas
index 2820a08c..5a258e3e 100644
--- a/src/base/UFiles.pas
+++ b/src/base/UFiles.pas
@@ -139,6 +139,7 @@ begin
if Song.Edition <> 'Unknown' then SongFile.WriteLine('#EDITION:' + EncodeToken(Song.Edition));
if Song.Genre <> 'Unknown' then SongFile.WriteLine('#GENRE:' + EncodeToken(Song.Genre));
if Song.Language <> 'Unknown' then SongFile.WriteLine('#LANGUAGE:' + EncodeToken(Song.Language));
+ if Song.Year <> 0 then SongFile.WriteLine('#YEAR:' + IntToStr(Song.Year));
SongFile.WriteLine('#MP3:' + EncodeToken(Song.Mp3.ToUTF8));
if Song.Cover.IsSet then SongFile.WriteLine('#COVER:' + EncodeToken(Song.Cover.ToUTF8));
diff --git a/src/base/USong.pas b/src/base/USong.pas
index d76718d2..33e8d8df 100644
--- a/src/base/USong.pas
+++ b/src/base/USong.pas
@@ -119,6 +119,7 @@ type
Genre: UTF8String;
Edition: UTF8String;
Language: UTF8String;
+ Year: Integer;
Title: UTF8String;
Artist: UTF8String;
@@ -1034,6 +1035,12 @@ begin
DecodeStringUTF8(Value, Language, Encoding)
end
+ //Language Sorting
+ else if (Identifier = 'YEAR') then
+ begin
+ TryStrtoInt(Value, self.Year)
+ end
+
// Song Start
else if (Identifier = 'START') then
begin
@@ -1256,7 +1263,8 @@ begin
//Sortings:
Genre := 'Unknown';
Edition := 'Unknown';
- Language := 'Unknown'; //Language Patch
+ Language := 'Unknown';
+ Year := 0;
// set to default encoding
Encoding := DEFAULT_ENCODING;