You've already forked lazarus-ccr
More UTF8 bugs fixed based on more mp3 test.
On Ubuntu it works fine. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1779 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -5,7 +5,7 @@ object Main: TMain
|
|||||||
Width = 893
|
Width = 893
|
||||||
ActiveControl = Panel4
|
ActiveControl = Panel4
|
||||||
Caption = 'titel'
|
Caption = 'titel'
|
||||||
ClientHeight = 604
|
ClientHeight = 602
|
||||||
ClientWidth = 893
|
ClientWidth = 893
|
||||||
Icon.Data = {
|
Icon.Data = {
|
||||||
3E42000000000100010040400000010020002842000016000000280000004000
|
3E42000000000100010040400000010020002842000016000000280000004000
|
||||||
@ -548,7 +548,7 @@ object Main: TMain
|
|||||||
object StatusBar1: TStatusBar
|
object StatusBar1: TStatusBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 582
|
Top = 580
|
||||||
Width = 893
|
Width = 893
|
||||||
Panels = <
|
Panels = <
|
||||||
item
|
item
|
||||||
@ -562,7 +562,7 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object Splitter1: TSplitter
|
object Splitter1: TSplitter
|
||||||
Left = 288
|
Left = 288
|
||||||
Height = 582
|
Height = 580
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 8
|
Width = 8
|
||||||
AutoSnap = False
|
AutoSnap = False
|
||||||
@ -572,19 +572,19 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 296
|
Left = 296
|
||||||
Height = 582
|
Height = 580
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 597
|
Width = 597
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 582
|
ClientHeight = 580
|
||||||
ClientWidth = 597
|
ClientWidth = 597
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnClick = Panel1Click
|
OnClick = Panel1Click
|
||||||
OnResize = Panel1Resize
|
OnResize = Panel1Resize
|
||||||
object TitleTree: TListView
|
object TitleTree: TListView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 152
|
Height = 150
|
||||||
Top = 5
|
Top = 5
|
||||||
Width = 587
|
Width = 587
|
||||||
Align = alTop
|
Align = alTop
|
||||||
@ -604,22 +604,18 @@ object Main: TMain
|
|||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Title'
|
Caption = 'Title'
|
||||||
Width = 36
|
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Album'
|
Caption = 'Album'
|
||||||
Width = 49
|
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Track'
|
Caption = 'Track'
|
||||||
Width = 44
|
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Genre'
|
Caption = 'Genre'
|
||||||
Width = 47
|
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
@ -631,7 +627,7 @@ object Main: TMain
|
|||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Length'
|
Caption = 'Length'
|
||||||
MaxWidth = 60
|
MaxWidth = 60
|
||||||
Width = 51
|
Width = 57
|
||||||
end>
|
end>
|
||||||
PopupMenu = titlelistmenu
|
PopupMenu = titlelistmenu
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
@ -654,7 +650,7 @@ object Main: TMain
|
|||||||
Cursor = crVSplit
|
Cursor = crVSplit
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 10
|
Height = 10
|
||||||
Top = 157
|
Top = 155
|
||||||
Width = 597
|
Width = 597
|
||||||
Align = alTop
|
Align = alTop
|
||||||
ResizeAnchor = akTop
|
ResizeAnchor = akTop
|
||||||
@ -662,7 +658,7 @@ object Main: TMain
|
|||||||
object Panel3: TPanel
|
object Panel3: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 415
|
Height = 415
|
||||||
Top = 167
|
Top = 165
|
||||||
Width = 597
|
Width = 597
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
@ -847,7 +843,7 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object current_title_edit: TEdit
|
object current_title_edit: TEdit
|
||||||
Left = 12
|
Left = 12
|
||||||
Height = 25
|
Height = 21
|
||||||
Top = 109
|
Top = 109
|
||||||
Width = 200
|
Width = 200
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
@ -856,7 +852,7 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object current_title_edit1: TEdit
|
object current_title_edit1: TEdit
|
||||||
Left = 12
|
Left = 12
|
||||||
Height = 25
|
Height = 21
|
||||||
Top = 141
|
Top = 141
|
||||||
Width = 200
|
Width = 200
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
@ -865,9 +861,9 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object randomcheck: TCheckBox
|
object randomcheck: TCheckBox
|
||||||
Left = 135
|
Left = 135
|
||||||
Height = 21
|
Height = 19
|
||||||
Top = 257
|
Top = 257
|
||||||
Width = 71
|
Width = 62
|
||||||
Caption = 'Random'
|
Caption = 'Random'
|
||||||
OnChange = randomcheckChange
|
OnChange = randomcheckChange
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
@ -950,10 +946,10 @@ object Main: TMain
|
|||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object filetypebox: TComboBox
|
object filetypebox: TComboBox
|
||||||
Left = 360
|
Left = 360
|
||||||
Height = 25
|
Height = 21
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 90
|
Width = 90
|
||||||
ItemHeight = 17
|
ItemHeight = 13
|
||||||
ItemIndex = 0
|
ItemIndex = 0
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
'all types'
|
'all types'
|
||||||
@ -971,7 +967,7 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object searchstr: TEdit
|
object searchstr: TEdit
|
||||||
Left = 120
|
Left = 120
|
||||||
Height = 25
|
Height = 21
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 232
|
Width = 232
|
||||||
OnKeyUp = searchstrKeyUp
|
OnKeyUp = searchstrKeyUp
|
||||||
@ -1013,11 +1009,11 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object clear_list: TBitBtn
|
object clear_list: TBitBtn
|
||||||
AnchorSideBottom.Side = asrCenter
|
AnchorSideBottom.Side = asrCenter
|
||||||
Left = 504
|
Left = 499
|
||||||
Height = 30
|
Height = 30
|
||||||
Hint = 'Clear Playlist'
|
Hint = 'Clear Playlist'
|
||||||
Top = 7
|
Top = 7
|
||||||
Width = 79
|
Width = 84
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Clear'
|
Caption = 'Clear'
|
||||||
@ -1084,9 +1080,9 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object lblPath: TLabel
|
object lblPath: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 13
|
Height = 14
|
||||||
Top = 56
|
Top = 56
|
||||||
Width = 43
|
Width = 50
|
||||||
Caption = 'lblPath'
|
Caption = 'lblPath'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
@ -1094,19 +1090,19 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object Panel4: TPanel
|
object Panel4: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 582
|
Height = 580
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 288
|
Width = 288
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
BorderSpacing.InnerBorder = 30
|
BorderSpacing.InnerBorder = 30
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 582
|
ClientHeight = 580
|
||||||
ClientWidth = 288
|
ClientWidth = 288
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
OnClick = Panel4Click
|
OnClick = Panel4Click
|
||||||
object ArtistTree: TTreeView
|
object ArtistTree: TTreeView
|
||||||
Left = 26
|
Left = 26
|
||||||
Height = 572
|
Height = 570
|
||||||
Top = 5
|
Top = 5
|
||||||
Width = 259
|
Width = 259
|
||||||
Align = alClient
|
Align = alClient
|
||||||
@ -1147,9 +1143,9 @@ object Main: TMain
|
|||||||
OnClick = ArtistSrchFieldClick
|
OnClick = ArtistSrchFieldClick
|
||||||
object Label2: TLabel
|
object Label2: TLabel
|
||||||
Left = 77
|
Left = 77
|
||||||
Height = 13
|
Height = 14
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 37
|
Width = 43
|
||||||
Caption = 'Search'
|
Caption = 'Search'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
@ -1200,7 +1196,7 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object artistsearch: TEdit
|
object artistsearch: TEdit
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 25
|
Height = 21
|
||||||
Top = 32
|
Top = 32
|
||||||
Width = 110
|
Width = 110
|
||||||
OnKeyUp = ArtistTreeKeyUp
|
OnKeyUp = ArtistTreeKeyUp
|
||||||
@ -1210,7 +1206,7 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 577
|
Height = 575
|
||||||
Top = 5
|
Top = 5
|
||||||
Width = 26
|
Width = 26
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
|
@ -2263,9 +2263,9 @@ var
|
|||||||
begin
|
begin
|
||||||
DebugOutLn('** Loadfile **', 2);
|
DebugOutLn('** Loadfile **', 2);
|
||||||
Application.ProcessMessages;
|
Application.ProcessMessages;
|
||||||
{$IFDEF WINDOWS}
|
//Ubuntu need this {$IFDEF WINDOWS}
|
||||||
aPath := UTF8Decode(path);
|
aPath := UTF8Decode(path);
|
||||||
{$ENDIF}
|
// {$ENDIF}
|
||||||
if FileExists(aPath) then
|
if FileExists(aPath) then
|
||||||
begin
|
begin
|
||||||
z := MediaCollection.GetIndexByPath(path);
|
z := MediaCollection.GetIndexByPath(path);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<AutoIncrementBuild Value="True"/>
|
<AutoIncrementBuild Value="True"/>
|
||||||
<MinorVersionNr Value="3"/>
|
<MinorVersionNr Value="3"/>
|
||||||
<RevisionNr Value="5"/>
|
<RevisionNr Value="5"/>
|
||||||
<BuildNr Value="739"/>
|
<BuildNr Value="740"/>
|
||||||
<StringTable ProductVersion="0.3.5.737"/>
|
<StringTable ProductVersion="0.3.5.737"/>
|
||||||
</VersionInfo>
|
</VersionInfo>
|
||||||
<BuildModes Count="1">
|
<BuildModes Count="1">
|
||||||
|
@ -268,11 +268,11 @@ Begin
|
|||||||
If tagpos<>3 Then
|
If tagpos<>3 Then
|
||||||
Begin
|
Begin
|
||||||
p := @buf[4];
|
p := @buf[4];
|
||||||
ftitle := GetCString(P, 30);
|
ftitle := UTF8Encode(GetCString(P, 30));
|
||||||
fartist := GetCString(P, 30);
|
fartist := UTF8Encode(GetCString(P, 30));
|
||||||
falbum := GetCString(P, 30);
|
falbum := UTF8Encode(GetCString(P, 30));
|
||||||
fyear := GetCString(P, 4);
|
fyear := UTF8Encode(GetCString(P, 4));
|
||||||
fcomment := GetCString(P, 30);
|
fcomment := UTF8Encode(GetCString(P, 30));
|
||||||
// now p is pointing to genreid
|
// now p is pointing to genreid
|
||||||
fgenreid := ord(P^);
|
fgenreid := ord(P^);
|
||||||
if fgenreid>high(ID3Genre) then
|
if fgenreid>high(ID3Genre) then
|
||||||
@ -285,12 +285,12 @@ Begin
|
|||||||
ftrack := '';
|
ftrack := '';
|
||||||
End; // else writeln('no id3v1 tag');
|
End; // else writeln('no id3v1 tag');
|
||||||
except WriteLn(Filename+' -> exception while reading id3v1 tag... skipped!!'); end;
|
except WriteLn(Filename+' -> exception while reading id3v1 tag... skipped!!'); end;
|
||||||
{$IFNDEF WINDOWS}
|
(* {$IFNDEF WINDOWS}
|
||||||
If ((artistv2<>'')) And (CactusConfig.id3v2_prio Or (artist='')) Then Fartist := artistv2;
|
If ((artistv2<>'')) And (CactusConfig.id3v2_prio Or (artist='')) Then Fartist := artistv2;
|
||||||
If ((titlev2<>'')) And (CactusConfig.id3v2_prio Or (title='')) Then Ftitle := titlev2;
|
If ((titlev2<>'')) And (CactusConfig.id3v2_prio Or (title='')) Then Ftitle := titlev2;
|
||||||
If ((albumv2<>'')) And (CactusConfig.id3v2_prio Or (album='')) Then Falbum := albumv2;
|
If ((albumv2<>'')) And (CactusConfig.id3v2_prio Or (album='')) Then Falbum := albumv2;
|
||||||
If ((commentv2<>'')) And (CactusConfig.id3v2_prio Or (comment='')) Then Fcomment := commentv2;
|
If ((commentv2<>'')) And (CactusConfig.id3v2_prio Or (comment='')) Then Fcomment := commentv2;
|
||||||
{$ELSE}
|
{$ELSE} *)
|
||||||
if Length(Trim(fartist)) <> 0 then begin
|
if Length(Trim(fartist)) <> 0 then begin
|
||||||
If ((artistv2<>'')) And (CactusConfig.id3v2_prio Or (artist='')) Then Fartist := UTF8Encode(artistv2);
|
If ((artistv2<>'')) And (CactusConfig.id3v2_prio Or (artist='')) Then Fartist := UTF8Encode(artistv2);
|
||||||
end else Fartist := artistv2;
|
end else Fartist := artistv2;
|
||||||
@ -303,7 +303,7 @@ Begin
|
|||||||
if Length(Trim(Fcomment)) <> 0 then begin
|
if Length(Trim(Fcomment)) <> 0 then begin
|
||||||
If ((commentv2<>'')) And (CactusConfig.id3v2_prio Or (comment='')) Then Fcomment := UTF8Encode(commentv2);
|
If ((commentv2<>'')) And (CactusConfig.id3v2_prio Or (comment='')) Then Fcomment := UTF8Encode(commentv2);
|
||||||
end else Fcomment := commentv2;
|
end else Fcomment := commentv2;
|
||||||
{$ENDIF}
|
// {$ENDIF}
|
||||||
If ((yearv2<>'')) And (CactusConfig.id3v2_prio Or (year='')) Then Fyear := yearv2;
|
If ((yearv2<>'')) And (CactusConfig.id3v2_prio Or (year='')) Then Fyear := yearv2;
|
||||||
If ((trackv2<>'')) And (CactusConfig.id3v2_prio Or (track='')) Then ftrack := trackv2;
|
If ((trackv2<>'')) And (CactusConfig.id3v2_prio Or (track='')) Then ftrack := trackv2;
|
||||||
fileclose(mp3filehandle);
|
fileclose(mp3filehandle);
|
||||||
|
Reference in New Issue
Block a user