diff options
author | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-11-17 15:37:08 +0000 |
---|---|---|
committer | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-11-17 15:37:08 +0000 |
commit | 61eaa45ee2bf7fc1d91faae3d10f3e093e3bc42c (patch) | |
tree | ac53abd709b1bfd4d1d236377f7e12637dc68dc6 /src | |
parent | ec75bc2b03e707c479f3605ffc1a8d9fe38c165b (diff) | |
download | usdx-61eaa45ee2bf7fc1d91faae3d10f3e093e3bc42c.tar.gz usdx-61eaa45ee2bf7fc1d91faae3d10f3e093e3bc42c.tar.xz usdx-61eaa45ee2bf7fc1d91faae3d10f3e093e3bc42c.zip |
load and save year tag
sorting by year still missing
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1944 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src')
-rw-r--r-- | src/base/UFiles.pas | 1 | ||||
-rw-r--r-- | src/base/USong.pas | 10 |
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; |