aboutsummaryrefslogtreecommitdiffstats
path: root/src/base/UCatCovers.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-04-21 23:58:40 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-04-21 23:58:40 +0000
commitdc3c42586733e84bc5d92c037f837f5a83e96bd9 (patch)
tree435ba2f797d5d2589a92b619c05bd5d713f12fab /src/base/UCatCovers.pas
parent7a9910634301c97ef9b785913ce4d72af8bfcfbc (diff)
downloadusdx-dc3c42586733e84bc5d92c037f837f5a83e96bd9.tar.gz
usdx-dc3c42586733e84bc5d92c037f837f5a83e96bd9.tar.xz
usdx-dc3c42586733e84bc5d92c037f837f5a83e96bd9.zip
- cleanup
- made TSortingType an enum git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2271 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/base/UCatCovers.pas')
-rw-r--r--src/base/UCatCovers.pas7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/base/UCatCovers.pas b/src/base/UCatCovers.pas
index d33bbbe1..433763d8 100644
--- a/src/base/UCatCovers.pas
+++ b/src/base/UCatCovers.pas
@@ -92,6 +92,7 @@ var
Ini: TMemIniFile;
List: TStringlist;
I, J: Integer;
+ SortType: TSortingType;
Filename: IPath;
Name, TmpName: UTF8String;
CatCover: IPath;
@@ -131,12 +132,12 @@ begin
Filename := CoversPath.Append(FileInfo.Name);
Name := FileInfo.Name.SetExtension('').ToUTF8;
- for I := 0 to high(ISorting) do
+ for SortType := Low(TSortingType) to High(TSortingType) do
begin
TmpName := Name;
- if (I = sTitle) and (UTF8Pos('Title', TmpName) <> 0) then
+ if (SortType = sTitle) and (UTF8Pos('Title', TmpName) <> 0) then
UTF8Delete(TmpName, UTF8Pos('Title', TmpName), 5)
- else if (I = sArtist) and (UTF8Pos('Artist', TmpName) <> 0) then
+ else if (SortType = sArtist) and (UTF8Pos('Artist', TmpName) <> 0) then
UTF8Delete(TmpName, UTF8Pos('Artist', TmpName), 6);
if not CoverExists(I, TmpName) then