You've already forked lazarus-ccr
compile with 2.5.1 and lazarus trunk,
reading unicode tags and filenames, show/hide app window with single click tray icon, create album cover if not exists, several fixes when there is just one song in collection, artist tree icons, handling of track numbers in n[/m] format, show path of current file (in playlist and title list), log output was corrupt due the use of crt unit, etc. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1761 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -296,7 +296,7 @@ Begin
|
|||||||
End;
|
End;
|
||||||
Until FindNext(mp3search)<>0;
|
Until FindNext(mp3search)<>0;
|
||||||
Findclose(mp3search);
|
Findclose(mp3search);
|
||||||
BubbleSort(files);
|
BubbleSort(TStrings(files));
|
||||||
for i := 1 to files.Count do
|
for i := 1 to files.Count do
|
||||||
lstRemove.Items.Add(files[i-1]);
|
lstRemove.Items.Add(files[i-1]);
|
||||||
|
|
||||||
@ -315,7 +315,7 @@ Begin
|
|||||||
end;
|
end;
|
||||||
Until FindNext(dirsearch)<>0;
|
Until FindNext(dirsearch)<>0;
|
||||||
Findclose(dirsearch);
|
Findclose(dirsearch);
|
||||||
BubbleSort(folders);
|
BubbleSort(TStrings(folders));
|
||||||
for i := 1 to folders.Count do
|
for i := 1 to folders.Count do
|
||||||
lstRemove.Items.Add(folders[i-1]);
|
lstRemove.Items.Add(folders[i-1]);
|
||||||
End;
|
End;
|
||||||
|
@ -22,7 +22,7 @@ Unit config;
|
|||||||
Interface
|
Interface
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
Classes, SysUtils, xmlcfg, gettext, playerclass;
|
Classes, SysUtils, xmlcfg, gettext, debug, playerclass;
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
{ TConfigObject }
|
{ TConfigObject }
|
||||||
@ -67,6 +67,9 @@ Type
|
|||||||
|
|
||||||
Function ReadConfig: boolean;
|
Function ReadConfig: boolean;
|
||||||
Function FlushConfig: boolean;
|
Function FlushConfig: boolean;
|
||||||
|
function CheckCoverPath: boolean;
|
||||||
|
function GetCoverPath(AFileName: string): string;
|
||||||
|
function GetCoverDir: string;
|
||||||
Procedure Clear;
|
Procedure Clear;
|
||||||
Private
|
Private
|
||||||
FConfigPath: string;
|
FConfigPath: string;
|
||||||
@ -244,6 +247,31 @@ Begin
|
|||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
function TConfigObject.CheckCoverPath: boolean;
|
||||||
|
var
|
||||||
|
aPath: string;
|
||||||
|
begin
|
||||||
|
aPath := GetCoverDir;
|
||||||
|
result := DirectoryExists(aPath);
|
||||||
|
if not result then begin
|
||||||
|
result := ForceDirectories(aPath);
|
||||||
|
if not result then
|
||||||
|
DebugOutLn('WARNING: unable to force covercache directory', 1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TConfigObject.GetCoverPath(AFileName: string): string;
|
||||||
|
begin
|
||||||
|
result := GetCoverDir;
|
||||||
|
if AFilename<>'' then
|
||||||
|
result := result + DirectorySeparator + AFilename;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TConfigObject.GetCoverDir: string;
|
||||||
|
begin
|
||||||
|
result := IncludeTrailingPathDelimiter(CactusConfig.ConfigPrefix) + 'covercache';
|
||||||
|
end;
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
Procedure TConfigObject.Clear;
|
Procedure TConfigObject.Clear;
|
||||||
|
@ -12,7 +12,7 @@ object dirwin: Tdirwin
|
|||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
Position = poMainFormCenter
|
Position = poMainFormCenter
|
||||||
ShowInTaskBar = stNever
|
ShowInTaskBar = stNever
|
||||||
LCLVersion = '0.9.29'
|
LCLVersion = '0.9.31'
|
||||||
object add: TButton
|
object add: TButton
|
||||||
Left = 383
|
Left = 383
|
||||||
Height = 25
|
Height = 25
|
||||||
@ -75,11 +75,9 @@ object dirwin: Tdirwin
|
|||||||
Width = 364
|
Width = 364
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
OnClick = dirlistviewClick
|
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
end
|
end
|
||||||
object SelectDirectoryDialog1: TSelectDirectoryDialog
|
object SelectDirectoryDialog1: TSelectDirectoryDialog
|
||||||
Title = 'Select Directory'
|
|
||||||
FilterIndex = 0
|
FilterIndex = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ Das ist eine automatisch erzeugte Lazarus-Ressourcendatei }
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
LazarusResources.Add('Tdirwin','FORMDATA',[
|
LazarusResources.Add('Tdirwin','FORMDATA',[
|
||||||
'TPF0'#7'Tdirwin'#6'dirwin'#4'Left'#3'^'#1#6'Height'#3#19#1#3'Top'#3'#'#1#5'W'
|
'TPF0'#7'Tdirwin'#6'dirwin'#4'Left'#3'^'#1#6'Height'#3#19#1#3'Top'#3'#'#1#5'W'
|
||||||
@ -6,7 +6,7 @@ LazarusResources.Add('Tdirwin','FORMDATA',[
|
|||||||
+#10'biMinimize'#0#7'Caption'#6#11'Directories'#12'ClientHeight'#3#19#1#11'Cl'
|
+#10'biMinimize'#0#7'Caption'#6#11'Directories'#12'ClientHeight'#3#19#1#11'Cl'
|
||||||
+'ientWidth'#3#215#1#9'FormStyle'#7#11'fsStayOnTop'#8'OnCreate'#7#10'FormCrea'
|
+'ientWidth'#3#215#1#9'FormStyle'#7#11'fsStayOnTop'#8'OnCreate'#7#10'FormCrea'
|
||||||
+'te'#8'Position'#7#16'poMainFormCenter'#13'ShowInTaskBar'#7#7'stNever'#10'LC'
|
+'te'#8'Position'#7#16'poMainFormCenter'#13'ShowInTaskBar'#7#7'stNever'#10'LC'
|
||||||
+'LVersion'#6#6'0.9.29'#0#7'TButton'#3'add'#4'Left'#3#127#1#6'Height'#2#25#3
|
+'LVersion'#6#6'0.9.31'#0#7'TButton'#3'add'#4'Left'#3#127#1#6'Height'#2#25#3
|
||||||
+'Top'#2#16#5'Width'#2'L'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacin'
|
+'Top'#2#16#5'Width'#2'L'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacin'
|
||||||
+'g.InnerBorder'#2#4#7'Caption'#6#3'Add'#7'OnClick'#7#8'addClick'#8'TabOrder'
|
+'g.InnerBorder'#2#4#7'Caption'#6#3'Add'#7'OnClick'#7#8'addClick'#8'TabOrder'
|
||||||
+#2#0#0#0#7'TButton'#9'removebut'#4'Left'#3#128#1#6'Height'#2#25#3'Top'#2'0'#5
|
+#2#0#0#0#7'TButton'#9'removebut'#4'Left'#3#128#1#6'Height'#2#25#3'Top'#2'0'#5
|
||||||
@ -23,7 +23,6 @@ LazarusResources.Add('Tdirwin','FORMDATA',[
|
|||||||
+#4#7'Caption'#6#4'Back'#7'OnClick'#7#12'Button1Click'#8'TabOrder'#2#4#0#0#8
|
+#4#7'Caption'#6#4'Back'#7'OnClick'#7#12'Button1Click'#8'TabOrder'#2#4#0#0#8
|
||||||
+'TListBox'#11'dirlistview'#4'Left'#2#8#6'Height'#3#0#1#3'Top'#2#8#5'Width'#3
|
+'TListBox'#11'dirlistview'#4'Left'#2#8#6'Height'#3#0#1#3'Top'#2#8#5'Width'#3
|
||||||
+'l'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#10'ItemHeigh'
|
+'l'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#10'ItemHeigh'
|
||||||
+'t'#2#0#7'OnClick'#7#16'dirlistviewClick'#8'TabOrder'#2#5#0#0#22'TSelectDire'
|
+'t'#2#0#8'TabOrder'#2#5#0#0#22'TSelectDirectoryDialog'#22'SelectDirectoryDia'
|
||||||
+'ctoryDialog'#22'SelectDirectoryDialog1'#5'Title'#6#16'Select Directory'#11
|
+'log1'#11'FilterIndex'#2#0#0#0#0
|
||||||
+'FilterIndex'#2#0#0#0#0
|
|
||||||
]);
|
]);
|
||||||
|
@ -39,8 +39,6 @@ Type
|
|||||||
rescanall: TButton;
|
rescanall: TButton;
|
||||||
SelectDirectoryDialog1: TSelectDirectoryDialog;
|
SelectDirectoryDialog1: TSelectDirectoryDialog;
|
||||||
Procedure Button1Click(Sender: TObject);
|
Procedure Button1Click(Sender: TObject);
|
||||||
Procedure Button3Click(Sender: TObject);
|
|
||||||
Procedure dirlistviewClick(Sender: TObject);
|
|
||||||
Procedure FormCreate(Sender: TObject);
|
Procedure FormCreate(Sender: TObject);
|
||||||
Procedure addClick(Sender: TObject);
|
Procedure addClick(Sender: TObject);
|
||||||
Procedure removeClick(Sender: TObject);
|
Procedure removeClick(Sender: TObject);
|
||||||
@ -100,7 +98,7 @@ Begin
|
|||||||
MediaCollection.add_directory(SelectDirectoryDialog1.FileName);
|
MediaCollection.add_directory(SelectDirectoryDialog1.FileName);
|
||||||
dirlistview.Items.Add(SelectDirectoryDialog1.FileName);
|
dirlistview.Items.Add(SelectDirectoryDialog1.FileName);
|
||||||
|
|
||||||
If MediaCollection.ItemCount>1 Then
|
If MediaCollection.ItemCount>0 Then
|
||||||
Begin
|
Begin
|
||||||
Main.ArtistTree.Selected := Nil;
|
Main.ArtistTree.Selected := Nil;
|
||||||
main.update_artist_view;
|
main.update_artist_view;
|
||||||
@ -149,14 +147,13 @@ Var rescandir: string;
|
|||||||
i, n: integer;
|
i, n: integer;
|
||||||
Begin
|
Begin
|
||||||
Main.clear_listClick(nil);
|
Main.clear_listClick(nil);
|
||||||
|
|
||||||
For n:= 0 To dirlistview.Items.Count-1 Do
|
For n:= 0 To dirlistview.Items.Count-1 Do
|
||||||
Begin
|
Begin
|
||||||
If dirlistview.Selected[n] Then
|
If dirlistview.Selected[n] Then
|
||||||
Begin
|
Begin
|
||||||
rescandir := dirlistview.Items[n];
|
rescandir := ExcludeTrailingPathDelimiter(dirlistview.Items[n]);
|
||||||
dirlistview.show;
|
dirlistview.show;
|
||||||
If rescandir[length(rescandir)]=DirectorySeparator Then delete(rescandir,length(rescandir)
|
|
||||||
, 1);
|
|
||||||
i := 0;
|
i := 0;
|
||||||
Repeat
|
Repeat
|
||||||
Begin
|
Begin
|
||||||
@ -175,9 +172,10 @@ Begin
|
|||||||
update_title_view;
|
update_title_view;
|
||||||
Application.ProcessMessages;
|
Application.ProcessMessages;
|
||||||
MediaCollection.add_directory(rescandir);
|
MediaCollection.add_directory(rescandir);
|
||||||
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
If MediaCollection.ItemCount>1 Then
|
If MediaCollection.ItemCount>0 Then
|
||||||
Begin
|
Begin
|
||||||
Main.ArtistTree.Selected := Nil;
|
Main.ArtistTree.Selected := Nil;
|
||||||
main.update_artist_view;
|
main.update_artist_view;
|
||||||
@ -208,16 +206,6 @@ End;
|
|||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
Procedure Tdirwin.Button3Click(Sender: TObject);
|
|
||||||
Begin
|
|
||||||
|
|
||||||
End;
|
|
||||||
|
|
||||||
Procedure Tdirwin.dirlistviewClick(Sender: TObject);
|
|
||||||
Begin
|
|
||||||
|
|
||||||
End;
|
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@ -17,7 +17,7 @@ object EditID3: TEditID3
|
|||||||
OnHide = FormHide
|
OnHide = FormHide
|
||||||
Position = poMainFormCenter
|
Position = poMainFormCenter
|
||||||
ShowInTaskBar = stNever
|
ShowInTaskBar = stNever
|
||||||
LCLVersion = '0.9.29'
|
LCLVersion = '0.9.31'
|
||||||
object metacontrol: TPageControl
|
object metacontrol: TPageControl
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 402
|
Height = 402
|
||||||
@ -27,16 +27,14 @@ object EditID3: TEditID3
|
|||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
TabIndex = 0
|
TabIndex = 0
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnChange = metacontrolChange
|
|
||||||
OnPageChanged = metacontrolChange
|
|
||||||
object metatab: TTabSheet
|
object metatab: TTabSheet
|
||||||
Caption = 'Meta-Info'
|
Caption = 'Meta-Info'
|
||||||
ClientHeight = 371
|
ClientHeight = 371
|
||||||
ClientWidth = 405
|
ClientWidth = 405
|
||||||
object lblYear: TLabel
|
object lblYear: TLabel
|
||||||
Left = 118
|
Left = 22
|
||||||
Height = 14
|
Height = 14
|
||||||
Top = 214
|
Top = 256
|
||||||
Width = 26
|
Width = 26
|
||||||
Caption = 'Year'
|
Caption = 'Year'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -51,9 +49,9 @@ object EditID3: TEditID3
|
|||||||
end
|
end
|
||||||
object AlbumCoverImg: TImage
|
object AlbumCoverImg: TImage
|
||||||
Left = 232
|
Left = 232
|
||||||
Height = 146
|
Height = 151
|
||||||
Top = 214
|
Top = 214
|
||||||
Width = 162
|
Width = 160
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Proportional = True
|
Proportional = True
|
||||||
@ -92,17 +90,17 @@ object EditID3: TEditID3
|
|||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object lblGenre: TLabel
|
object lblGenre: TLabel
|
||||||
Left = 22
|
Left = 20
|
||||||
Height = 14
|
Height = 14
|
||||||
Top = 252
|
Top = 296
|
||||||
Width = 36
|
Width = 36
|
||||||
Caption = 'Genre'
|
Caption = 'Genre'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object lblComment: TLabel
|
object lblComment: TLabel
|
||||||
Left = 21
|
Left = 22
|
||||||
Height = 14
|
Height = 14
|
||||||
Top = 282
|
Top = 328
|
||||||
Width = 56
|
Width = 56
|
||||||
Caption = 'Comment'
|
Caption = 'Comment'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -114,13 +112,13 @@ object EditID3: TEditID3
|
|||||||
Width = 241
|
Width = 241
|
||||||
Caption = 'Tag to name'
|
Caption = 'Tag to name'
|
||||||
ClientHeight = 38
|
ClientHeight = 38
|
||||||
ClientWidth = 237
|
ClientWidth = 233
|
||||||
TabOrder = 10
|
TabOrder = 10
|
||||||
object btnOptions: TButton
|
object btnOptions: TButton
|
||||||
Left = 125
|
Left = 125
|
||||||
Height = 23
|
Height = 23
|
||||||
Hint = '( %a/%a - %b - %n - %t )'
|
Hint = '( %a/%a - %b - %n - %t )'
|
||||||
Top = 11
|
Top = 8
|
||||||
Width = 105
|
Width = 105
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
@ -133,7 +131,7 @@ object EditID3: TEditID3
|
|||||||
object Button1: TButton
|
object Button1: TButton
|
||||||
Left = 15
|
Left = 15
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 11
|
Top = 8
|
||||||
Width = 105
|
Width = 105
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
@ -146,70 +144,70 @@ object EditID3: TEditID3
|
|||||||
end
|
end
|
||||||
object artistedit1: TEdit
|
object artistedit1: TEdit
|
||||||
Left = 66
|
Left = 66
|
||||||
Height = 23
|
Height = 21
|
||||||
Top = 114
|
Top = 114
|
||||||
Width = 328
|
Width = 326
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
OnChange = activateEMode
|
OnChange = activateEMode
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object titleedit1: TEdit
|
object titleedit1: TEdit
|
||||||
Left = 67
|
Left = 66
|
||||||
Height = 23
|
Height = 21
|
||||||
Top = 146
|
Top = 146
|
||||||
Width = 327
|
Width = 326
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
OnChange = activateEMode
|
OnChange = activateEMode
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object albumedit1: TEdit
|
object albumedit1: TEdit
|
||||||
Left = 67
|
Left = 66
|
||||||
Height = 23
|
Height = 21
|
||||||
Top = 178
|
Top = 178
|
||||||
Width = 328
|
Width = 326
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
OnChange = activateEMode
|
OnChange = activateEMode
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
object yearEdit1: TEdit
|
object yearEdit1: TEdit
|
||||||
Left = 153
|
Left = 152
|
||||||
Height = 23
|
Height = 21
|
||||||
Top = 210
|
Top = 256
|
||||||
Width = 64
|
Width = 64
|
||||||
MaxLength = 4
|
MaxLength = 4
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
end
|
end
|
||||||
object commentedit1: TEdit
|
object commentedit1: TEdit
|
||||||
Left = 22
|
Left = 21
|
||||||
Height = 23
|
Height = 21
|
||||||
Top = 298
|
Top = 336
|
||||||
Width = 194
|
Width = 194
|
||||||
OnChange = activateEMode
|
OnChange = activateEMode
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
end
|
end
|
||||||
object pathedit1: TEdit
|
object pathedit1: TEdit
|
||||||
Left = 15
|
Left = 15
|
||||||
Height = 23
|
Height = 21
|
||||||
Top = 82
|
Top = 82
|
||||||
Width = 380
|
Width = 378
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
OnChange = activateEMode
|
OnChange = activateEMode
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object trackedit1: TEdit
|
object trackedit1: TEdit
|
||||||
Left = 66
|
Left = 66
|
||||||
Height = 23
|
Height = 21
|
||||||
Top = 210
|
Top = 210
|
||||||
Width = 35
|
Width = 60
|
||||||
MaxLength = 4
|
MaxLength = 4
|
||||||
OnChange = activateEMode
|
OnChange = activateEMode
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object guessname1: TButton
|
object guessname1: TButton
|
||||||
Left = 278
|
Left = 278
|
||||||
Height = 25
|
Height = 27
|
||||||
Top = 31
|
Top = 31
|
||||||
Width = 98
|
Width = 100
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
Caption = 'Tag from name'
|
Caption = 'Tag from name'
|
||||||
@ -217,9 +215,9 @@ object EditID3: TEditID3
|
|||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
end
|
end
|
||||||
object cmbYear: TComboBox
|
object cmbYear: TComboBox
|
||||||
Left = 151
|
Left = 153
|
||||||
Height = 27
|
Height = 29
|
||||||
Top = 210
|
Top = 252
|
||||||
Width = 64
|
Width = 64
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
MaxLength = 4
|
MaxLength = 4
|
||||||
@ -230,9 +228,9 @@ object EditID3: TEditID3
|
|||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
object cmbComment: TComboBox
|
object cmbComment: TComboBox
|
||||||
Left = 19
|
Left = 20
|
||||||
Height = 27
|
Height = 29
|
||||||
Top = 298
|
Top = 332
|
||||||
Width = 196
|
Width = 196
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
OnChange = activateEMode
|
OnChange = activateEMode
|
||||||
@ -243,8 +241,8 @@ object EditID3: TEditID3
|
|||||||
end
|
end
|
||||||
object GenreBox: TComboBox
|
object GenreBox: TComboBox
|
||||||
Left = 67
|
Left = 67
|
||||||
Height = 27
|
Height = 29
|
||||||
Top = 244
|
Top = 288
|
||||||
Width = 150
|
Width = 150
|
||||||
AutoComplete = True
|
AutoComplete = True
|
||||||
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
|
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
|
||||||
@ -260,7 +258,7 @@ object EditID3: TEditID3
|
|||||||
ClientWidth = 405
|
ClientWidth = 405
|
||||||
object mtype: TLabel
|
object mtype: TLabel
|
||||||
Left = 40
|
Left = 40
|
||||||
Height = 20
|
Height = 14
|
||||||
Top = 34
|
Top = 34
|
||||||
Width = 62
|
Width = 62
|
||||||
Caption = 'Mediatype:'
|
Caption = 'Mediatype:'
|
||||||
@ -268,7 +266,7 @@ object EditID3: TEditID3
|
|||||||
end
|
end
|
||||||
object bitrate: TLabel
|
object bitrate: TLabel
|
||||||
Left = 40
|
Left = 40
|
||||||
Height = 20
|
Height = 14
|
||||||
Top = 114
|
Top = 114
|
||||||
Width = 81
|
Width = 81
|
||||||
Caption = 'Bitrate: 0kbps'
|
Caption = 'Bitrate: 0kbps'
|
||||||
@ -276,7 +274,7 @@ object EditID3: TEditID3
|
|||||||
end
|
end
|
||||||
object fsize: TLabel
|
object fsize: TLabel
|
||||||
Left = 40
|
Left = 40
|
||||||
Height = 20
|
Height = 14
|
||||||
Top = 94
|
Top = 94
|
||||||
Width = 77
|
Width = 77
|
||||||
Caption = 'Filesize: 0 MB'
|
Caption = 'Filesize: 0 MB'
|
||||||
@ -284,7 +282,7 @@ object EditID3: TEditID3
|
|||||||
end
|
end
|
||||||
object srate: TLabel
|
object srate: TLabel
|
||||||
Left = 40
|
Left = 40
|
||||||
Height = 20
|
Height = 14
|
||||||
Top = 134
|
Top = 134
|
||||||
Width = 71
|
Width = 71
|
||||||
Caption = 'Samplerate:'
|
Caption = 'Samplerate:'
|
||||||
@ -292,7 +290,7 @@ object EditID3: TEditID3
|
|||||||
end
|
end
|
||||||
object plength: TLabel
|
object plength: TLabel
|
||||||
Left = 40
|
Left = 40
|
||||||
Height = 20
|
Height = 14
|
||||||
Top = 58
|
Top = 58
|
||||||
Width = 43
|
Width = 43
|
||||||
Caption = 'Length:'
|
Caption = 'Length:'
|
||||||
@ -300,7 +298,7 @@ object EditID3: TEditID3
|
|||||||
end
|
end
|
||||||
object idlabel: TLabel
|
object idlabel: TLabel
|
||||||
Left = 41
|
Left = 41
|
||||||
Height = 20
|
Height = 14
|
||||||
Top = 178
|
Top = 178
|
||||||
Width = 37
|
Width = 37
|
||||||
Caption = 'Fileid: '
|
Caption = 'Fileid: '
|
||||||
@ -308,7 +306,7 @@ object EditID3: TEditID3
|
|||||||
end
|
end
|
||||||
object indexlabel: TLabel
|
object indexlabel: TLabel
|
||||||
Left = 40
|
Left = 40
|
||||||
Height = 20
|
Height = 14
|
||||||
Top = 194
|
Top = 194
|
||||||
Width = 53
|
Width = 53
|
||||||
Caption = 'FileIndex:'
|
Caption = 'FileIndex:'
|
||||||
|
@ -1,107 +0,0 @@
|
|||||||
{ This is an automatically generated lazarus resource file }
|
|
||||||
|
|
||||||
LazarusResources.Add('TEditID3','FORMDATA',[
|
|
||||||
'TPF0'#8'TEditID3'#7'EditID3'#4'Left'#3#127#1#6'Height'#3#198#1#3'Top'#3#2#1#5
|
|
||||||
+'Width'#3#176#1#18'HorzScrollBar.Page'#3#139#1#19'HorzScrollBar.Range'#3#127
|
|
||||||
+#1#18'VertScrollBar.Page'#3#185#1#19'VertScrollBar.Range'#3#153#1#13'ActiveC'
|
|
||||||
+'ontrol'#7#11'metacontrol'#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#12'Edi'
|
|
||||||
+'t ID3 Tag'#12'ClientHeight'#3#198#1#11'ClientWidth'#3#176#1#7'OnClose'#7#12
|
|
||||||
+'EditID3Close'#8'OnCreate'#7#10'FormCreate'#6'OnHide'#7#8'FormHide'#8'Positi'
|
|
||||||
+'on'#7#16'poMainFormCenter'#13'ShowInTaskBar'#7#7'stNever'#10'LCLVersion'#6#6
|
|
||||||
+'0.9.29'#0#12'TPageControl'#11'metacontrol'#4'Left'#2#8#6'Height'#3#146#1#3
|
|
||||||
+'Top'#2#8#5'Width'#3#155#1#10'ActivePage'#7#7'metatab'#7'Anchors'#11#5'akTop'
|
|
||||||
+#6'akLeft'#7'akRight'#8'akBottom'#0#8'TabIndex'#2#0#8'TabOrder'#2#0#8'OnChan'
|
|
||||||
+'ge'#7#17'metacontrolChange'#13'OnPageChanged'#7#17'metacontrolChange'#0#9'T'
|
|
||||||
+'TabSheet'#7'metatab'#7'Caption'#6#9'Meta-Info'#12'ClientHeight'#3's'#1#11'C'
|
|
||||||
+'lientWidth'#3#149#1#0#6'TLabel'#7'lblYear'#4'Left'#2'v'#6'Height'#2#14#3'To'
|
|
||||||
+'p'#3#214#0#5'Width'#2#26#7'Caption'#6#4'Year'#11'ParentColor'#8#0#0#6'TLabe'
|
|
||||||
+'l'#7'lblPath'#4'Left'#2#15#6'Height'#2#14#3'Top'#2'B'#5'Width'#2'>'#7'Capti'
|
|
||||||
+'on'#6#12'Path to file'#11'ParentColor'#8#0#0#6'TImage'#13'AlbumCoverImg'#4
|
|
||||||
+'Left'#3#232#0#6'Height'#3#146#0#3'Top'#3#214#0#5'Width'#3#162#0#7'Anchors'
|
|
||||||
+#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#8'AutoSize'#9#12'Proportiona'
|
|
||||||
+'l'#9#7'Stretch'#9#0#0#6'TLabel'#9'lblArtist'#4'Left'#2#22#6'Height'#2#14#3
|
|
||||||
+'Top'#2'v'#5'Width'#2#31#7'Caption'#6#6'Artist'#11'ParentColor'#8#0#0#6'TLab'
|
|
||||||
+'el'#8'lblTitle'#4'Left'#2#22#6'Height'#2#14#3'Top'#3#150#0#5'Width'#2#25#7
|
|
||||||
+'Caption'#6#5'Title'#11'ParentColor'#8#0#0#6'TLabel'#8'lblAlbum'#4'Left'#2#22
|
|
||||||
+#6'Height'#2#14#3'Top'#3#182#0#5'Width'#2'$'#7'Caption'#6#5'Album'#11'Parent'
|
|
||||||
+'Color'#8#0#0#6'TLabel'#8'lblTrack'#4'Left'#2#22#6'Height'#2#14#3'Top'#3#214
|
|
||||||
+#0#5'Width'#2#30#7'Caption'#6#5'Track'#11'ParentColor'#8#0#0#6'TLabel'#8'lbl'
|
|
||||||
+'Genre'#4'Left'#2#22#6'Height'#2#14#3'Top'#3#252#0#5'Width'#2'$'#7'Caption'#6
|
|
||||||
+#5'Genre'#11'ParentColor'#8#0#0#6'TLabel'#10'lblComment'#4'Left'#2#21#6'Heig'
|
|
||||||
+'ht'#2#14#3'Top'#3#26#1#5'Width'#2'8'#7'Caption'#6#7'Comment'#11'ParentColor'
|
|
||||||
+#8#0#0#9'TGroupBox'#9'GroupBox1'#4'Left'#2#15#6'Height'#2'5'#3'Top'#2#7#5'Wi'
|
|
||||||
+'dth'#3#241#0#7'Caption'#6#11'Tag to name'#12'ClientHeight'#2'&'#11'ClientWi'
|
|
||||||
+'dth'#3#237#0#8'TabOrder'#2#10#0#7'TButton'#10'btnOptions'#4'Left'#2'}'#6'He'
|
|
||||||
+'ight'#2#23#4'Hint'#6#24'( %a/%a - %b - %n - %t )'#3'Top'#2#11#5'Width'#2'i'
|
|
||||||
+#7'Anchors'#11#6'akLeft'#8'akBottom'#0#20'BorderSpacing.Around'#2#4#7'Captio'
|
|
||||||
+'n'#6#7'Options'#7'OnClick'#7#15'btnOptionsClick'#14'ParentShowHint'#8#8'Sho'
|
|
||||||
+'wHint'#9#8'TabOrder'#2#0#0#0#7'TButton'#7'Button1'#4'Left'#2#15#6'Height'#2
|
|
||||||
+#23#3'Top'#2#11#5'Width'#2'i'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#20'Borde'
|
|
||||||
+'rSpacing.Around'#2#4#7'Caption'#6#9'Apply now'#7'OnClick'#7#12'Button1Click'
|
|
||||||
+#14'ParentShowHint'#8#8'ShowHint'#9#8'TabOrder'#2#1#0#0#0#5'TEdit'#11'artist'
|
|
||||||
+'edit1'#4'Left'#2'B'#6'Height'#2#23#3'Top'#2'r'#5'Width'#3'H'#1#7'Anchors'#11
|
|
||||||
+#5'akTop'#6'akLeft'#7'akRight'#0#8'OnChange'#7#13'activateEMode'#8'TabOrder'
|
|
||||||
+#2#1#0#0#5'TEdit'#10'titleedit1'#4'Left'#2'C'#6'Height'#2#23#3'Top'#3#146#0#5
|
|
||||||
+'Width'#3'G'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'OnChange'#7#13
|
|
||||||
+'activateEMode'#8'TabOrder'#2#2#0#0#5'TEdit'#10'albumedit1'#4'Left'#2'C'#6'H'
|
|
||||||
+'eight'#2#23#3'Top'#3#178#0#5'Width'#3'H'#1#7'Anchors'#11#5'akTop'#6'akLeft'
|
|
||||||
+#7'akRight'#0#8'OnChange'#7#13'activateEMode'#8'TabOrder'#2#3#0#0#5'TEdit'#9
|
|
||||||
+'yearEdit1'#4'Left'#3#153#0#6'Height'#2#23#3'Top'#3#210#0#5'Width'#2'@'#9'Ma'
|
|
||||||
+'xLength'#2#4#8'TabOrder'#2#5#0#0#5'TEdit'#12'commentedit1'#4'Left'#2#22#6'H'
|
|
||||||
+'eight'#2#23#3'Top'#3'*'#1#5'Width'#3#194#0#8'OnChange'#7#13'activateEMode'#8
|
|
||||||
+'TabOrder'#2#6#0#0#5'TEdit'#9'pathedit1'#4'Left'#2#15#6'Height'#2#23#3'Top'#2
|
|
||||||
+'R'#5'Width'#3'|'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'OnChange'
|
|
||||||
+#7#13'activateEMode'#8'TabOrder'#2#0#0#0#5'TEdit'#10'trackedit1'#4'Left'#2'B'
|
|
||||||
+#6'Height'#2#23#3'Top'#3#210#0#5'Width'#2'#'#9'MaxLength'#2#4#8'OnChange'#7
|
|
||||||
+#13'activateEMode'#8'TabOrder'#2#4#0#0#7'TButton'#10'guessname1'#4'Left'#3#22
|
|
||||||
+#1#6'Height'#2#25#3'Top'#2#31#5'Width'#2'b'#8'AutoSize'#9#20'BorderSpacing.A'
|
|
||||||
+'round'#2#4#7'Caption'#6#13'Tag from name'#7'OnClick'#7#14'guessnameClick'#8
|
|
||||||
+'TabOrder'#2#7#0#0#9'TComboBox'#7'cmbYear'#4'Left'#3#151#0#6'Height'#2#27#3
|
|
||||||
+'Top'#3#210#0#5'Width'#2'@'#10'ItemHeight'#2#0#9'MaxLength'#2#4#8'OnChange'#7
|
|
||||||
+#13'cmbYearChange'#6'Sorted'#9#8'TabOrder'#2#8#4'Text'#6#4'cmbY'#7'Visible'#8
|
|
||||||
+#0#0#9'TComboBox'#10'cmbComment'#4'Left'#2#19#6'Height'#2#27#3'Top'#3'*'#1#5
|
|
||||||
+'Width'#3#196#0#10'ItemHeight'#2#0#8'OnChange'#7#13'activateEMode'#6'Sorted'
|
|
||||||
+#9#8'TabOrder'#2#9#4'Text'#6#10'cmbComment'#7'Visible'#8#0#0#9'TComboBox'#8
|
|
||||||
+'GenreBox'#4'Left'#2'C'#6'Height'#2#27#3'Top'#3#244#0#5'Width'#3#150#0#12'Au'
|
|
||||||
+'toComplete'#9#16'AutoCompleteText'#11#12'cbactEnabled'#22'cbactEndOfLineCom'
|
|
||||||
+'plete'#20'cbactSearchAscending'#0#10'ItemHeight'#2#0#8'OnChange'#7#13'activ'
|
|
||||||
,'ateEMode'#6'Sorted'#9#8'TabOrder'#2#11#0#0#0#9'TTabSheet'#8'fileinfo'#7'Cap'
|
|
||||||
+'tion'#6#9'File-Info'#12'ClientHeight'#3's'#1#11'ClientWidth'#3#149#1#0#6'TL'
|
|
||||||
+'abel'#5'mtype'#4'Left'#2'('#6'Height'#2#20#3'Top'#2'"'#5'Width'#2'>'#7'Capt'
|
|
||||||
+'ion'#6#10'Mediatype:'#11'ParentColor'#8#0#0#6'TLabel'#7'bitrate'#4'Left'#2
|
|
||||||
+'('#6'Height'#2#20#3'Top'#2'r'#5'Width'#2'Q'#7'Caption'#6#14'Bitrate: 0kbps'
|
|
||||||
+#11'ParentColor'#8#0#0#6'TLabel'#5'fsize'#4'Left'#2'('#6'Height'#2#20#3'Top'
|
|
||||||
+#2'^'#5'Width'#2'M'#7'Caption'#6#14'Filesize: 0 MB'#11'ParentColor'#8#0#0#6
|
|
||||||
+'TLabel'#5'srate'#4'Left'#2'('#6'Height'#2#20#3'Top'#3#134#0#5'Width'#2'G'#7
|
|
||||||
+'Caption'#6#11'Samplerate:'#11'ParentColor'#8#0#0#6'TLabel'#7'plength'#4'Lef'
|
|
||||||
+'t'#2'('#6'Height'#2#20#3'Top'#2':'#5'Width'#2'+'#7'Caption'#6#7'Length:'#11
|
|
||||||
+'ParentColor'#8#0#0#6'TLabel'#7'idlabel'#4'Left'#2')'#6'Height'#2#20#3'Top'#3
|
|
||||||
+#178#0#5'Width'#2'%'#7'Caption'#6#8'Fileid: '#11'ParentColor'#8#0#0#6'TLabel'
|
|
||||||
+#10'indexlabel'#4'Left'#2'('#6'Height'#2#20#3'Top'#3#194#0#5'Width'#2'5'#7'C'
|
|
||||||
+'aption'#6#10'FileIndex:'#11'ParentColor'#8#0#0#6'TImage'#8'Filelogo'#4'Left'
|
|
||||||
+#3#230#0#6'Height'#2'd'#3'Top'#2'"'#5'Width'#2'd'#0#0#0#9'TTabSheet'#9'Strea'
|
|
||||||
+'mTab'#7'Caption'#6#11'Stream-Info'#12'ClientHeight'#3's'#1#11'ClientWidth'#3
|
|
||||||
+#149#1#0#6'TLabel'#6'Label1'#4'Left'#2#26#6'Height'#2#14#3'Top'#2#15#5'Width'
|
|
||||||
+#2'"'#7'Caption'#6#4'Name'#5'Color'#7#12'clBackground'#11'ParentColor'#8#11
|
|
||||||
+'Transparent'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#26#6'Height'#2#14#3'Top'#2
|
|
||||||
+'O'#5'Width'#2'D'#7'Caption'#6#10'Stream URL'#5'Color'#7#12'clBackground'#11
|
|
||||||
+'ParentColor'#8#11'Transparent'#8#0#0#6'TLabel'#6'Label3'#4'Left'#2#26#6'Hei'
|
|
||||||
+'ght'#2#14#3'Top'#3#143#0#5'Width'#2'A'#7'Caption'#6#11'Description'#5'Color'
|
|
||||||
+#7#12'clBackground'#11'ParentColor'#8#11'Transparent'#8#0#0#5'TEdit'#8'NameE'
|
|
||||||
+'dit'#4'Left'#2'.'#6'Height'#2#23#3'Top'#2'!'#5'Width'#3'('#1#8'TabOrder'#2#0
|
|
||||||
+#0#0#5'TEdit'#7'URLEdit'#4'Left'#2'.'#6'Height'#2#23#3'Top'#2'a'#5'Width'#3
|
|
||||||
+'('#1#8'TabOrder'#2#1#0#0#5'TMemo'#8'DescEdit'#4'Left'#2'.'#6'Height'#2'B'#3
|
|
||||||
+'Top'#3#167#0#5'Width'#3'('#1#8'TabOrder'#2#2#0#0#0#0#7'TButton'#10'cancelbu'
|
|
||||||
+'t1'#4'Left'#3#24#1#6'Height'#2#25#3'Top'#3#162#1#5'Width'#2'K'#7'Anchors'#11
|
|
||||||
+#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#6'Cancel'#9#7'Cap'
|
|
||||||
+'tion'#6#7'&Cancel'#7'OnClick'#7#14'cancelbutClick'#8'TabOrder'#2#1#0#0#7'TB'
|
|
||||||
+'utton'#8'savebut1'#4'Left'#3#176#0#6'Height'#2#25#3'Top'#3#162#1#5'Width'#2
|
|
||||||
+'K'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#7
|
|
||||||
+'Caption'#6#5'&Save'#7'Default'#9#7'OnClick'#7#12'savebutClick'#8'TabOrder'#2
|
|
||||||
+#2#0#0#7'TButton'#8'btnReset'#4'Left'#2' '#6'Height'#2#25#3'Top'#3#162#1#5'W'
|
|
||||||
+'idth'#2'K'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBord'
|
|
||||||
+'er'#2#4#7'Caption'#6#6'&Reset'#7'OnClick'#7#13'btnResetClick'#8'TabOrder'#2
|
|
||||||
+#3#0#0#6'TTimer'#16'PicDownloadTimer'#7'Enabled'#8#8'Interval'#2'd'#7'OnTime'
|
|
||||||
+'r'#7#21'PicDownloadTimerTimer'#12'OnStartTimer'#7#26'PicDownloadTimerStartT'
|
|
||||||
+'imer'#4'left'#3'X'#1#0#0#0
|
|
||||||
]);
|
|
||||||
|
@ -21,7 +21,7 @@ This Software is published under the GPL
|
|||||||
Interface
|
Interface
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, FileUtil,
|
||||||
{ExtCtrls,} Buttons, ComCtrls, lcltype, mediacol, ExtCtrls, skin, last_fm, streamcol,
|
{ExtCtrls,} Buttons, ComCtrls, lcltype, mediacol, ExtCtrls, skin, last_fm, streamcol,
|
||||||
settings, debug, mp3file;
|
settings, debug, mp3file;
|
||||||
|
|
||||||
@ -110,14 +110,12 @@ Type
|
|||||||
titleedit1: TEdit;
|
titleedit1: TEdit;
|
||||||
yearEdit2: TEdit;
|
yearEdit2: TEdit;
|
||||||
yearEdit3: TEdit;
|
yearEdit3: TEdit;
|
||||||
procedure ac(Sender: TObject);
|
|
||||||
procedure btnOptionsClick(Sender: TObject);
|
procedure btnOptionsClick(Sender: TObject);
|
||||||
Procedure Button1Click(Sender: TObject);
|
Procedure Button1Click(Sender: TObject);
|
||||||
Procedure btnResetClick(Sender: TObject);
|
Procedure btnResetClick(Sender: TObject);
|
||||||
Procedure EditID3Close(Sender: TObject; Var CloseAction: TCloseAction);
|
Procedure EditID3Close(Sender: TObject; Var CloseAction: TCloseAction);
|
||||||
Procedure FormCreate(Sender: TObject);
|
Procedure FormCreate(Sender: TObject);
|
||||||
Procedure FormHide(Sender: TObject);
|
Procedure FormHide(Sender: TObject);
|
||||||
procedure metacontrolChange(Sender: TObject);
|
|
||||||
Procedure PicDownloadTimerStartTimer(Sender: TObject);
|
Procedure PicDownloadTimerStartTimer(Sender: TObject);
|
||||||
Procedure PicDownloadTimerTimer(Sender: TObject);
|
Procedure PicDownloadTimerTimer(Sender: TObject);
|
||||||
Procedure cancelbutClick(Sender: TObject);
|
Procedure cancelbutClick(Sender: TObject);
|
||||||
@ -145,6 +143,8 @@ Type
|
|||||||
ptrControls: array Of array Of ^TControl;
|
ptrControls: array Of array Of ^TControl;
|
||||||
// ..
|
// ..
|
||||||
Procedure show_tags();
|
Procedure show_tags();
|
||||||
|
function GetCoverPath: boolean;
|
||||||
|
function GetTrack: string;
|
||||||
Public
|
Public
|
||||||
{ public declarations }
|
{ public declarations }
|
||||||
fileid: integer;
|
fileid: integer;
|
||||||
@ -157,6 +157,8 @@ Var
|
|||||||
|
|
||||||
Implementation
|
Implementation
|
||||||
|
|
||||||
|
{$R *.lfm}
|
||||||
|
|
||||||
Uses mainform, config, functions;
|
Uses mainform, config, functions;
|
||||||
{ TEditID3 }
|
{ TEditID3 }
|
||||||
|
|
||||||
@ -245,13 +247,13 @@ Begin
|
|||||||
MedFileObj.album := albumedit1.text;
|
MedFileObj.album := albumedit1.text;
|
||||||
MedFileObj.year := yearedit1.text;
|
MedFileObj.year := yearedit1.text;
|
||||||
MedFileObj.comment := commentedit1.text;
|
MedFileObj.comment := commentedit1.text;
|
||||||
MedFileObj.track := trackedit1.text;
|
MedFileObj.track := GetTrack;
|
||||||
if GenreBox.ItemIndex>=0 then MedFileObj.GenreID:= GenreIDtoCBIndex[0, GenreBox.ItemIndex];
|
if GenreBox.ItemIndex>=0 then MedFileObj.GenreID:= GenreIDtoCBIndex[0, GenreBox.ItemIndex];
|
||||||
|
|
||||||
MedFileObj.write_tag;
|
MedFileObj.write_tag;
|
||||||
|
|
||||||
RenameFile(MedFileObj.path, editid3win.pathedit1.text);
|
RenameFile(MedFileObj.path, UTF8ToSys(editid3win.pathedit1.text));
|
||||||
MedFileObj.path := editid3win.pathedit1.text;
|
MedFileObj.path := UTF8ToSys(editid3win.pathedit1.text);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
@ -390,11 +392,6 @@ Begin
|
|||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
procedure TEditID3.metacontrolChange(Sender: TObject);
|
|
||||||
begin
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
Procedure TEditID3.PicDownloadTimerStartTimer(Sender: TObject);
|
Procedure TEditID3.PicDownloadTimerStartTimer(Sender: TObject);
|
||||||
@ -611,7 +608,7 @@ Begin
|
|||||||
// title(-mode) specific actions
|
// title(-mode) specific actions
|
||||||
Else
|
Else
|
||||||
Begin
|
Begin
|
||||||
pathedit1.text := MedFileObj.path;
|
pathedit1.text := SysToUTF8(MedFileObj.path);
|
||||||
//TODO: scroll TEdit to end of path
|
//TODO: scroll TEdit to end of path
|
||||||
titleedit1.text := MedFileObj.title;
|
titleedit1.text := MedFileObj.title;
|
||||||
albumedit1.text := MedFileObj.album;
|
albumedit1.text := MedFileObj.album;
|
||||||
@ -625,6 +622,37 @@ Begin
|
|||||||
bEModeActive := false;
|
bEModeActive := false;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
function TEditID3.GetCoverPath: boolean;
|
||||||
|
begin
|
||||||
|
MedFileObj.CoverPath := CactusConfig.GetCoverPath(MedFileObj.GetCoverFile);
|
||||||
|
result := FileExists(MedFileObj.CoverPath);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TEditID3.GetTrack: string;
|
||||||
|
var
|
||||||
|
A,B: Integer;
|
||||||
|
AStr,BStr: string;
|
||||||
|
begin
|
||||||
|
// track must conform to n[/m]
|
||||||
|
AStr := Trim(trackedit1.text);
|
||||||
|
A := pos('/', AStr);
|
||||||
|
if A>0 then begin
|
||||||
|
BStr := Trim(Copy(AStr, A+1, Length(AStr)));
|
||||||
|
AStr := Trim(Copy(AStr, 1, A-1));
|
||||||
|
B := StrToIntDef(BStr, -1);
|
||||||
|
end else
|
||||||
|
B := -1;
|
||||||
|
A := StrToIntDef(AStr, -1);
|
||||||
|
|
||||||
|
if A<0 then
|
||||||
|
result := ''
|
||||||
|
else
|
||||||
|
if B<0 then
|
||||||
|
result := AStr
|
||||||
|
else
|
||||||
|
result := AStr + '/' + BStr;
|
||||||
|
end;
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
Procedure TEditID3.display_window(MedFile: TMediaFileClass; intMode: Integer);
|
Procedure TEditID3.display_window(MedFile: TMediaFileClass; intMode: Integer);
|
||||||
@ -673,13 +701,10 @@ Begin
|
|||||||
Then
|
Then
|
||||||
Begin
|
Begin
|
||||||
DebugOutLn('########AlbumCover', 5);
|
DebugOutLn('########AlbumCover', 5);
|
||||||
If MedFileObj.album<>''
|
If (MedFileObj.album<>'') and CactusConfig.CheckCoverPath
|
||||||
Then
|
Then
|
||||||
Begin
|
Begin
|
||||||
MedFileObj.CoverPath := CactusConfig.ConfigPrefix+DirectorySeparator+'covercache'+
|
if GetCoverPath then
|
||||||
DirectorySeparator+MedFileObj.artist+'_'+MedFileObj.album+
|
|
||||||
'.jpeg';
|
|
||||||
If FileExists(MedFileObj.CoverPath) Then
|
|
||||||
Begin
|
Begin
|
||||||
Try
|
Try
|
||||||
AlbumCoverImg.Picture.LoadFromFile(MedFileObj.CoverPath);
|
AlbumCoverImg.Picture.LoadFromFile(MedFileObj.CoverPath);
|
||||||
@ -738,18 +763,16 @@ Begin
|
|||||||
|
|
||||||
writeln('########AlbumCover');
|
writeln('########AlbumCover');
|
||||||
// DEBUG-INFO
|
// DEBUG-INFO
|
||||||
If MedFileObj.album<>''
|
If (MedFileObj.album<>'') and CactusConfig.CheckCoverPath
|
||||||
Then
|
Then
|
||||||
Begin
|
Begin
|
||||||
MedFileObj.CoverPath := CactusConfig.ConfigPrefix+DirectorySeparator+'covercache'+
|
if GetCoverPath
|
||||||
DirectorySeparator+MedFileObj.artist+'_'+MedFileObj.album+'.jpeg';
|
|
||||||
If FileExists(MedFileObj.CoverPath)
|
|
||||||
Then
|
Then
|
||||||
Begin
|
Begin
|
||||||
Try
|
Try
|
||||||
AlbumCoverImg.Picture.LoadFromFile(MedFileObj.CoverPath);
|
AlbumCoverImg.Picture.LoadFromFile(MedFileObj.CoverPath);
|
||||||
Except
|
Except
|
||||||
writeln('EXCEPTION');
|
writeln('EXCEPTION loading cover');
|
||||||
End;
|
End;
|
||||||
End
|
End
|
||||||
Else
|
Else
|
||||||
@ -859,8 +882,7 @@ Begin
|
|||||||
else // title-mode
|
else // title-mode
|
||||||
begin
|
begin
|
||||||
MedFileObj.PathNameFromTag(CactusConfig.strTagToNameFormatString);
|
MedFileObj.PathNameFromTag(CactusConfig.strTagToNameFormatString);
|
||||||
EditID3win.pathedit1.text := MedFileObj.Path;
|
EditID3win.pathedit1.text := SysToUTF8(MedFileObj.Path);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -878,11 +900,6 @@ begin
|
|||||||
Enabled := true;
|
Enabled := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TEditID3.ac(Sender: TObject);
|
|
||||||
begin
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
Procedure TEditID3.btnResetClick(Sender: TObject);
|
Procedure TEditID3.btnResetClick(Sender: TObject);
|
||||||
@ -891,24 +908,24 @@ Begin
|
|||||||
End;
|
End;
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
// TODO: check ....
|
||||||
Procedure TEditID3.guessnameClick(Sender: TObject);
|
Procedure TEditID3.guessnameClick(Sender: TObject);
|
||||||
|
|
||||||
Var z: integer;
|
Var z: integer;
|
||||||
tmps: string;
|
tmps: string;
|
||||||
Begin
|
Begin
|
||||||
tmps := extractfilename(pathedit1.Text);
|
tmps := extractfilename(UTF8ToSys(pathedit1.Text));
|
||||||
If ((tmps[1]<#60) And (tmps[2]<#60) And (tmps[4]=#45)) Then
|
If ((tmps[1]<#60) And (tmps[2]<#60) And (tmps[4]=#45)) Then
|
||||||
Begin
|
Begin
|
||||||
trackedit1.text := copy(tmps,1,2);
|
trackedit1.text := SysToUTF8(copy(tmps,1,2));
|
||||||
delete(tmps, 1, 5);
|
delete(tmps, 1, 5);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
z := pos(' - ', tmps)+3;
|
z := pos(' - ', tmps)+3;
|
||||||
If z<>3 Then
|
If z<>3 Then
|
||||||
Begin
|
Begin
|
||||||
titleedit1.text := TrimRight(copy(tmps,z,length(tmps)-z-3));
|
titleedit1.text := SysToUTF8(TrimRight(copy(tmps,z,length(tmps)-z-3)));
|
||||||
artistedit1.text := TrimRight(copy(tmps,1,z-3));
|
artistedit1.text := SysToUTF8(TrimRight(copy(tmps,1,z-3)));
|
||||||
End
|
End
|
||||||
Else
|
Else
|
||||||
Begin
|
Begin
|
||||||
@ -920,7 +937,4 @@ End;
|
|||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
initialization
|
|
||||||
{$I editid3.lrs}
|
|
||||||
|
|
||||||
End.
|
End.
|
||||||
|
@ -18,7 +18,7 @@ Unit functions;
|
|||||||
Interface
|
Interface
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
Classes, SysUtils, crt, math, config;
|
Classes, SysUtils, math, config;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -144,7 +144,10 @@ Begin
|
|||||||
node:=node.NextSibling
|
node:=node.NextSibling
|
||||||
else done:= true;
|
else done:= true;
|
||||||
end;
|
end;
|
||||||
FAlbumInfo.CoverURL:=node.FirstChild.NodeValue;
|
if node.FirstChild<>nil then
|
||||||
|
FAlbumInfo.CoverURL:=node.FirstChild.NodeValue
|
||||||
|
else
|
||||||
|
FAlbumInfo.CoverURL:='';
|
||||||
// FAlbumInfo.CoverURL:=StringReplace(FAlbumInfo.CoverURL, #10, '', [rfReplaceAll]);
|
// FAlbumInfo.CoverURL:=StringReplace(FAlbumInfo.CoverURL, #10, '', [rfReplaceAll]);
|
||||||
// FAlbumInfo.CoverURL:=StringReplace(FAlbumInfo.CoverURL, #13, '', [rfReplaceAll]);
|
// FAlbumInfo.CoverURL:=StringReplace(FAlbumInfo.CoverURL, #13, '', [rfReplaceAll]);
|
||||||
// TODO: Clean up linebreaks in strings retrieved from XML files
|
// TODO: Clean up linebreaks in strings retrieved from XML files
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
object Main: TMain
|
object Main: TMain
|
||||||
Left = 261
|
Left = 39
|
||||||
Height = 720
|
Height = 624
|
||||||
Top = 124
|
Top = 0
|
||||||
Width = 893
|
Width = 893
|
||||||
ActiveControl = Panel4
|
ActiveControl = Panel4
|
||||||
Caption = 'titel'
|
Caption = 'titel'
|
||||||
ClientHeight = 701
|
ClientHeight = 601
|
||||||
ClientWidth = 893
|
ClientWidth = 893
|
||||||
Icon.Data = {
|
Icon.Data = {
|
||||||
3E42000000000100010040400000010020002842000016000000280000004000
|
3E42000000000100010040400000010020002842000016000000280000004000
|
||||||
@ -543,14 +543,13 @@ object Main: TMain
|
|||||||
Menu = Mainmenu1
|
Menu = Mainmenu1
|
||||||
OnClose = MainClose
|
OnClose = MainClose
|
||||||
OnCreate = MainCreate
|
OnCreate = MainCreate
|
||||||
OnResize = FormResize
|
|
||||||
Position = poDefault
|
|
||||||
ShowInTaskBar = stAlways
|
ShowInTaskBar = stAlways
|
||||||
LCLVersion = '0.9.29'
|
LCLVersion = '0.9.31'
|
||||||
|
WindowState = wsMaximized
|
||||||
object StatusBar1: TStatusBar
|
object StatusBar1: TStatusBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 18
|
Height = 17
|
||||||
Top = 683
|
Top = 584
|
||||||
Width = 893
|
Width = 893
|
||||||
Panels = <
|
Panels = <
|
||||||
item
|
item
|
||||||
@ -564,31 +563,29 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object Splitter1: TSplitter
|
object Splitter1: TSplitter
|
||||||
Left = 288
|
Left = 288
|
||||||
Height = 683
|
Height = 584
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 8
|
Width = 8
|
||||||
Align = alRight
|
|
||||||
AutoSnap = False
|
AutoSnap = False
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
OnMoved = Splitter1Moved
|
OnMoved = Splitter1Moved
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
ResizeAnchor = akRight
|
|
||||||
end
|
end
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 296
|
Left = 296
|
||||||
Height = 683
|
Height = 584
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 597
|
Width = 597
|
||||||
Align = alRight
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 683
|
ClientHeight = 584
|
||||||
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 = 237
|
Height = 154
|
||||||
Top = 5
|
Top = 5
|
||||||
Width = 587
|
Width = 587
|
||||||
Align = alTop
|
Align = alTop
|
||||||
@ -618,8 +615,7 @@ object Main: TMain
|
|||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Track'
|
Caption = 'Track'
|
||||||
MaxWidth = 30
|
Width = 39
|
||||||
Width = 30
|
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
@ -636,9 +632,8 @@ object Main: TMain
|
|||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Length'
|
Caption = 'Length'
|
||||||
MaxWidth = 60
|
MaxWidth = 60
|
||||||
Width = 357
|
Width = 349
|
||||||
end>
|
end>
|
||||||
ItemIndex = -1
|
|
||||||
PopupMenu = titlelistmenu
|
PopupMenu = titlelistmenu
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
RowSelect = True
|
RowSelect = True
|
||||||
@ -660,19 +655,19 @@ object Main: TMain
|
|||||||
Cursor = crVSplit
|
Cursor = crVSplit
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 10
|
Height = 10
|
||||||
Top = 242
|
Top = 159
|
||||||
Width = 597
|
Width = 597
|
||||||
Align = alTop
|
Align = alTop
|
||||||
ResizeAnchor = akTop
|
ResizeAnchor = akTop
|
||||||
end
|
end
|
||||||
object Panel3: TPanel
|
object Panel3: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 431
|
Height = 415
|
||||||
Top = 252
|
Top = 169
|
||||||
Width = 597
|
Width = 597
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 431
|
ClientHeight = 415
|
||||||
ClientWidth = 597
|
ClientWidth = 597
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object PlayerControlsPanel: TPanel
|
object PlayerControlsPanel: TPanel
|
||||||
@ -696,7 +691,6 @@ object Main: TMain
|
|||||||
Hint = 'Mute'
|
Hint = 'Mute'
|
||||||
Top = 208
|
Top = 208
|
||||||
Width = 30
|
Width = 30
|
||||||
Color = clBtnFace
|
|
||||||
Flat = True
|
Flat = True
|
||||||
Glyph.Data = {
|
Glyph.Data = {
|
||||||
36040000424D3604000000000000360000002800000010000000100000000100
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
@ -810,7 +804,6 @@ object Main: TMain
|
|||||||
Hint = 'Track info'
|
Hint = 'Track info'
|
||||||
Top = 173
|
Top = 173
|
||||||
Width = 30
|
Width = 30
|
||||||
Color = clBtnFace
|
|
||||||
Flat = True
|
Flat = True
|
||||||
Glyph.Data = {
|
Glyph.Data = {
|
||||||
36040000424D3604000000000000360000002800000010000000100000000100
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
@ -854,7 +847,7 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object current_title_edit: TEdit
|
object current_title_edit: TEdit
|
||||||
Left = 12
|
Left = 12
|
||||||
Height = 24
|
Height = 21
|
||||||
Top = 102
|
Top = 102
|
||||||
Width = 200
|
Width = 200
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
@ -863,7 +856,7 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object current_title_edit1: TEdit
|
object current_title_edit1: TEdit
|
||||||
Left = 12
|
Left = 12
|
||||||
Height = 24
|
Height = 21
|
||||||
Top = 134
|
Top = 134
|
||||||
Width = 200
|
Width = 200
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
@ -872,9 +865,9 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object randomcheck: TCheckBox
|
object randomcheck: TCheckBox
|
||||||
Left = 135
|
Left = 135
|
||||||
Height = 23
|
Height = 21
|
||||||
Top = 250
|
Top = 250
|
||||||
Width = 73
|
Width = 69
|
||||||
Caption = 'Random'
|
Caption = 'Random'
|
||||||
OnChange = randomcheckChange
|
OnChange = randomcheckChange
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
@ -917,7 +910,7 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object Playlist: TListView
|
object Playlist: TListView
|
||||||
Left = 237
|
Left = 237
|
||||||
Height = 349
|
Height = 333
|
||||||
Top = 75
|
Top = 75
|
||||||
Width = 348
|
Width = 348
|
||||||
Align = alCustom
|
Align = alCustom
|
||||||
@ -927,9 +920,8 @@ object Main: TMain
|
|||||||
item
|
item
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Playlist'
|
Caption = 'Playlist'
|
||||||
Width = 328
|
Width = 329
|
||||||
end>
|
end>
|
||||||
ItemIndex = -1
|
|
||||||
PopupMenu = playlistmenu
|
PopupMenu = playlistmenu
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
RowSelect = True
|
RowSelect = True
|
||||||
@ -948,9 +940,9 @@ object Main: TMain
|
|||||||
OnStartDrag = PlaylistStartDrag
|
OnStartDrag = PlaylistStartDrag
|
||||||
end
|
end
|
||||||
object Panel2: TPanel
|
object Panel2: TPanel
|
||||||
Left = 4
|
Left = 0
|
||||||
Height = 50
|
Height = 50
|
||||||
Top = 11
|
Top = 2
|
||||||
Width = 464
|
Width = 464
|
||||||
ClientHeight = 50
|
ClientHeight = 50
|
||||||
ClientWidth = 464
|
ClientWidth = 464
|
||||||
@ -958,7 +950,7 @@ object Main: TMain
|
|||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object filetypebox: TComboBox
|
object filetypebox: TComboBox
|
||||||
Left = 360
|
Left = 360
|
||||||
Height = 24
|
Height = 29
|
||||||
Top = 14
|
Top = 14
|
||||||
Width = 90
|
Width = 90
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
@ -979,7 +971,7 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object searchstr: TEdit
|
object searchstr: TEdit
|
||||||
Left = 120
|
Left = 120
|
||||||
Height = 24
|
Height = 21
|
||||||
Top = 14
|
Top = 14
|
||||||
Width = 232
|
Width = 232
|
||||||
OnKeyUp = searchstrKeyUp
|
OnKeyUp = searchstrKeyUp
|
||||||
@ -1021,11 +1013,11 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object clear_list: TBitBtn
|
object clear_list: TBitBtn
|
||||||
AnchorSideBottom.Side = asrCenter
|
AnchorSideBottom.Side = asrCenter
|
||||||
Left = 514
|
Left = 517
|
||||||
Height = 34
|
Height = 34
|
||||||
Hint = 'Clear Playlist'
|
Hint = 'Clear Playlist'
|
||||||
Top = 33
|
Top = 6
|
||||||
Width = 70
|
Width = 67
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Clear'
|
Caption = 'Clear'
|
||||||
@ -1090,23 +1082,31 @@ object Main: TMain
|
|||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
|
object lblPath: TLabel
|
||||||
|
Left = 8
|
||||||
|
Height = 14
|
||||||
|
Top = 56
|
||||||
|
Width = 39
|
||||||
|
Caption = 'lblPath'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Panel4: TPanel
|
object Panel4: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 683
|
Height = 584
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 288
|
Width = 288
|
||||||
Align = alClient
|
Align = alLeft
|
||||||
BorderSpacing.InnerBorder = 30
|
BorderSpacing.InnerBorder = 30
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 683
|
ClientHeight = 584
|
||||||
ClientWidth = 288
|
ClientWidth = 288
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
OnClick = Panel4Click
|
OnClick = Panel4Click
|
||||||
object ArtistTree: TTreeView
|
object ArtistTree: TTreeView
|
||||||
Left = 26
|
Left = 26
|
||||||
Height = 673
|
Height = 574
|
||||||
Top = 5
|
Top = 5
|
||||||
Width = 259
|
Width = 259
|
||||||
Align = alClient
|
Align = alClient
|
||||||
@ -1158,7 +1158,6 @@ object Main: TMain
|
|||||||
Height = 22
|
Height = 22
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 23
|
Width = 23
|
||||||
Color = clBtnFace
|
|
||||||
Flat = True
|
Flat = True
|
||||||
Glyph.Data = {
|
Glyph.Data = {
|
||||||
36040000424D3604000000000000360000002800000010000000100000000100
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
@ -1201,7 +1200,7 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object artistsearch: TEdit
|
object artistsearch: TEdit
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 24
|
Height = 21
|
||||||
Top = 32
|
Top = 32
|
||||||
Width = 110
|
Width = 110
|
||||||
OnKeyUp = ArtistTreeKeyUp
|
OnKeyUp = ArtistTreeKeyUp
|
||||||
@ -1211,7 +1210,7 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 678
|
Height = 579
|
||||||
Top = 5
|
Top = 5
|
||||||
Width = 26
|
Width = 26
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
@ -1232,24 +1231,24 @@ object Main: TMain
|
|||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Library'
|
Caption = 'Library'
|
||||||
ImageIndex = 0
|
ImageIndex = 0
|
||||||
Style = tbsCheck
|
|
||||||
OnClick = LibModeBtnClick
|
OnClick = LibModeBtnClick
|
||||||
|
Style = tbsCheck
|
||||||
end
|
end
|
||||||
object NetModeBtn: TToolButton
|
object NetModeBtn: TToolButton
|
||||||
Left = 1
|
Left = 1
|
||||||
Top = 150
|
Top = 154
|
||||||
Caption = 'NetModeBtn'
|
Caption = 'NetModeBtn'
|
||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
Style = tbsCheck
|
|
||||||
OnClick = NetModeBtnClick
|
OnClick = NetModeBtnClick
|
||||||
|
Style = tbsCheck
|
||||||
end
|
end
|
||||||
object DeviceModeBtn: TToolButton
|
object DeviceModeBtn: TToolButton
|
||||||
Left = 1
|
Left = 1
|
||||||
Top = 300
|
Top = 308
|
||||||
Caption = 'DeviceModeBtn'
|
Caption = 'DeviceModeBtn'
|
||||||
ImageIndex = 2
|
ImageIndex = 2
|
||||||
Style = tbsCheck
|
|
||||||
OnClick = DeviceModeBtnClick
|
OnClick = DeviceModeBtnClick
|
||||||
|
Style = tbsCheck
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1580,6 +1579,42 @@ object Main: TMain
|
|||||||
Caption = 'Mobile Player'
|
Caption = 'Mobile Player'
|
||||||
object MIDeviceInfo: TMenuItem
|
object MIDeviceInfo: TMenuItem
|
||||||
Caption = 'Device Info'
|
Caption = 'Device Info'
|
||||||
|
Bitmap.Data = {
|
||||||
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
|
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00000000100000001A0000001A0000001A0000001A0000001A0000
|
||||||
|
0019000000120000000A00000002FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF0000000020683B02879B5702F29A5702E561370285000000330000
|
||||||
|
0031000000230000001300000004FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF002D1C0500AE680FF2E19A38FFDF9837FFB67117FF844F0D6C2D1C
|
||||||
|
0500000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00CB812400CB8124E7E8A745FFFAC25DFFEDB14EFFCB8124DBCB81
|
||||||
|
24007C5321000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00E0943300E4973540E79937CAE79937FCE79937FFE79937FCEA9B
|
||||||
|
3900F8A64100FFA94300804E1A00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00E0943300E7993700EE9E3B00EE9E3B00F3A13E00FCA843FFFCA8
|
||||||
|
4300FCA843FFFFA94320FF9B3400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00E0943300E7993700EE9E3B00F39F3B00FFA43D00FFA43DFFFFA5
|
||||||
|
3E00FFA84200FFA43DFFFF9B3420FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00E0943300E7993700F2993500FF8F2800FF8F2800FF8F28FFFF8F
|
||||||
|
2800FF973100FF922B0CFF8F28F4FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00EC862300EF892500F97B1500F97B1500F97B1500F97B15FFF97B
|
||||||
|
1500F9831D00F97B1524EE7B15F1FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00F77C1600F77C1600F77C1600F77C1600F77C1600F77C16FFF883
|
||||||
|
1D00F8872107E27A14C9F77C16A2FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FA952F00FA952F00FA952F00FA952F00FA952F00FA952FFFFB9D
|
||||||
|
370EE48620C6FA952FE9F887211AFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FEB14B00FEB14B00FEB14B00FEB14B00FEB14B00FEB14BFFE594
|
||||||
|
2ED9FEB14BF4FEAE4835FDAB4500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFBB5500FFBB5500FFBB5500FFBB5500FFBB5500FFBB55FFFFBB
|
||||||
|
55FDFFBB554EFEB14B00FDAB4500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFBB5500FFBB5500FFBB5500FFBB5500FFBB5500FFBB55FFFFBB
|
||||||
|
5584FFBB5500FEB14B00FDAB4500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFBB5500FFBB5500FFBB5500FFBB5500FFBB5500FFBB55FFFFBB
|
||||||
|
5513FFBB5500FFBB5500FFBB5500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
|
||||||
|
}
|
||||||
ImageIndex = 8
|
ImageIndex = 8
|
||||||
OnClick = MIDeviceInfoClick
|
OnClick = MIDeviceInfoClick
|
||||||
end
|
end
|
||||||
@ -1855,7 +1890,6 @@ object Main: TMain
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Selectdirectorydialog1: TSelectDirectoryDialog
|
object Selectdirectorydialog1: TSelectDirectoryDialog
|
||||||
Title = 'Select Directory'
|
|
||||||
FilterIndex = 0
|
FilterIndex = 0
|
||||||
top = 304
|
top = 304
|
||||||
end
|
end
|
||||||
@ -2067,16 +2101,14 @@ object Main: TMain
|
|||||||
top = 232
|
top = 232
|
||||||
end
|
end
|
||||||
object SaveDialog1: TSaveDialog
|
object SaveDialog1: TSaveDialog
|
||||||
Title = 'Save file as'
|
|
||||||
FilterIndex = 0
|
FilterIndex = 0
|
||||||
top = 560
|
top = 560
|
||||||
end
|
end
|
||||||
object ImageList1: TImageList
|
object ImageList1: TImageList
|
||||||
DrawingStyle = dsFocus
|
|
||||||
ShareImages = True
|
ShareImages = True
|
||||||
top = 344
|
top = 344
|
||||||
Bitmap = {
|
Bitmap = {
|
||||||
4C69060000001000000010000000E01D450000000000400E6E00000000000000
|
4C69090000001000000010000000E01D450000000000400E6E00000000000000
|
||||||
0000000000000000000000000000858A8800858A88007B7F7E00161717000000
|
0000000000000000000000000000858A8800858A88007B7F7E00161717000000
|
||||||
00000000000000000000000000000000000082868400E9EBEA00FEFEFE00FFFF
|
00000000000000000000000000000000000082868400E9EBEA00FEFEFE00FFFF
|
||||||
FF00FFFFFF00FFFFFF00B2B2B2FFC2C2C200FFFFFF00BABABA00939594002F31
|
FF00FFFFFF00FFFFFF00B2B2B2FFC2C2C200FFFFFF00BABABA00939594002F31
|
||||||
@ -2268,13 +2300,108 @@ object Main: TMain
|
|||||||
000000000000A16C38FFA15C38FF785838FF785C38FF00000000000000000000
|
000000000000A16C38FFA15C38FF785838FF785C38FF00000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000
|
00000000000000000000000000000000000001010D0001011A0001011A000101
|
||||||
|
1A0001011A0A01011B6201011B9E01011B9E01011B6201011A0A01011A000101
|
||||||
|
1A0001011A0001010D000000000001011A0001011A0001011A0001011A000101
|
||||||
|
1A0001011A672C2C42CE676779F6626273F625253BCE01011A6701011A000101
|
||||||
|
1A0001011A0001011A0001011A00010118000101180001011800010118000101
|
||||||
|
1800010118B3464658F9565667FF4E4E5FFF3A3A4CF9010118B3010118000101
|
||||||
|
1800010118000101180001011800012657000126570001265700012657000127
|
||||||
|
5800000016D480A6CAFF99CCF6FF99CCF6FF80A6CAFF000016D4012758000126
|
||||||
|
5700012657000126570001265700024C9800024C9800024C9800024C9800024D
|
||||||
|
99810E0E20EFA1D4FAFF98CBF5FF98CBF5FFA1D4FAFF0E0E20EF024D9981024C
|
||||||
|
9800024C9800024C9800024C9800024C9700024C9700024C9700024C9700024C
|
||||||
|
9783073E7AC498CBF5FF91C4F1FF91C4F1FF98CBF5FF073E7AC4024C9783024C
|
||||||
|
9700024C9700024C9700024C9700024B9400024B9400024B9400024B9400024B
|
||||||
|
9400024A929E7FB4E4F688BBEAFF88BBEAFF7FB4E4F6024A929E024B9400024B
|
||||||
|
9400024B9400024B9400024B9400008FCF000093D3000188CA00015FA5000148
|
||||||
|
8F0001488F463574B1D480B3E3FF80B3E3FF3574B1D401488F4601488F00015F
|
||||||
|
A5000188CA000093D300008FCF00008FCF000093D300009CDC0000A2E20000A8
|
||||||
|
E80000AAEA19014385C64A7DB0FF4A7DB0FF014385C600AAEA1900A8E80000A2
|
||||||
|
E200009CDC000093D300008FCF00008FCF000093D300009CDC0000A2E20000A7
|
||||||
|
E74B00A8E8B32170A2E67BAEE0FF7BAEE0FF216FA2E600A8E8B300A7E74B00A2
|
||||||
|
E200009CDC000093D300008FCF00008FCF000093D300009CDC31009FDF97009F
|
||||||
|
DFC655D9F1FF35ACD1FF8DC0EDFF8DC0EDFF34ABD1FF54D9F1FF009FDFC6009F
|
||||||
|
DF97009CDC310093D300008FCF00008FCF000091D1530A9BD8CC23B1E3E44BD1
|
||||||
|
F1FF54D9F1FF28B6DBFFAAAAAAFFAAAAAAFF27B5DBFF54D8F1FF4BD1F1FF24B1
|
||||||
|
E3E40A9BD8CC0091D153008FCF000085C5000085C5BA36BDECFA3BC3EFFF41C9
|
||||||
|
EEFF54D9F1FF28B0D5FFFCFCFCFFFCFCFCFF27B0D5FF54D8F1FF41C9EEFF3BC3
|
||||||
|
EFFF37BDECFA0085C5BA0085C50000000000006AAACC37BEEFFF3AC2EEFF41C9
|
||||||
|
EEFF54D9F1FF28AACFFFE8E8E8FDE8E8E8FD27AACFFF54D8F1FF41C9EEFF3AC2
|
||||||
|
EEFF37BFEFFF006AAACC000000000000000000396385005696CC005D9DCC0067
|
||||||
|
A7CC0071B1CC007ABACC2F2F2F652F2F2F650079B9CC0070B0CC0067A7CC005E
|
||||||
|
9ECC005797CC0039638500000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00040404680404048B0404048B000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
00000000000000000000000000000404048D959595FF777777FFD6D6D6FFD6D6
|
||||||
|
D6FFD4D4D4FFCBCBCBFFC2C2C2FFBFBFBFFFBEBEBEFFC1C1C1FFC9C9C9FFD4D4
|
||||||
|
D4FFD6D6D6FFD6D6D6FF000000000404048F8F8F8FFF757575FFD3D3D3FFD0D0
|
||||||
|
D0FFC1C1C1FFCAC1CEFFD8CEDBFFDDDDDDFFE1E3DFFFDEE0DDFFCCCCCBFFBBBB
|
||||||
|
BBFFCECECEFFD3D3D3FF00000000040404918D8D8DFF737373FFCECECEFFBDBD
|
||||||
|
BDFFCEBCDDFFDDBEECFFDDCAE3FFDDDADDFFE1E3DFFFE7EAE6FFEEEEEDFFD8D8
|
||||||
|
D8FFB5B5B5FFCDCDCDFF00000000030303948A8A8AFF707070FFC1C1C1FFB8CA
|
||||||
|
D2FFC7D4FBFFD8BBF2FFDBBEE8FFDBD4DDFFE0E2DEFFEAEBE8FFF0F0F0FFF1F0
|
||||||
|
F0FFC6C5C5FFBBBBBBFF0000000003030397868686FF6C6C6CFFB5B5B5FFBBE1
|
||||||
|
E5FFB7EFF9FFB7DBF9FFDAC9F1FFF8F5F9FFF7F8F7FFE0E1E0FFD5D3D5FFD7D1
|
||||||
|
D4FFCBC4C7FF969696FF000000000303039A838383FF696969FFAEAEAEFFCED4
|
||||||
|
D4FFB9C8C9FFA4C5C9FFECF5F7FF9D9D9DFF9D9D9DFFF6F5F6FFD2C7CCFFD1C4
|
||||||
|
CAFFCDC0C6FF797979FF000000000303039D7F7F7FFF656565FF9C9C9CFFC0BC
|
||||||
|
BBFFC1BCBCFFC2BEBDFFEFEFEEFFAFAFAFFFAFAFAFFFE5F1EBFFB5C1BBFFC4BF
|
||||||
|
C2FFC4BDC1FF7A7A7AFF00000000030303A07C7C7CFF626262FF878787FFBDB9
|
||||||
|
B8FFCEC9C8FFD3CFCEFFE1E0E0FFEDEDEDFFEAE8EBFFBBBCD9FF4BDE9FFF57E4
|
||||||
|
9BFF7FC6A0FF7F7F7FFF00000000020202A4787878FF5E5E5EFF8E8E8EFFA3A1
|
||||||
|
A1FFD8D6D6FFDDDCDCFFDDDDDDFFD2D5D0FFC4C2C4FFC29ED7FFB59ADCFF64CE
|
||||||
|
B3FF61A785FF8C8C8CFF00000000020202A8757575FF5B5B5BFF959595FF8787
|
||||||
|
87FFBBBBBBFFE1E1E1FFDCDDDBFFD1D4CFFFC7C8C6FFC5B0D0FFC699E2FFA28E
|
||||||
|
B9FF7F7F7FFF9B9B9BFF00000000020202AD737373FF595959FF969696FF9494
|
||||||
|
94FF868686FFA6A7A6FFCACCC9FFCFD2CDFFC7C9C6FFBAAFBDFF998CA1FF8080
|
||||||
|
80FF979797FF9C9C9CFF0101018B010101BA757575FF575757FF969696FF9797
|
||||||
|
97FF969696FF8D8D8DFF858585FF808080FF7F7F7FFF828282FF8B8B8BFF9898
|
||||||
|
98FF9B9B9BFF9B9B9BFF0101019901010197010101C6010101C6010101A50101
|
||||||
|
01A5010101A5010101A5010101A5010101A5010101A5010101A5010101A50101
|
||||||
|
01A5010101A5010101A50101017E000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFBB5500FFBB
|
||||||
|
5500FFBB5500FFBB5500FFBB5500FFBB55FFFFBB5513FFBB5500FFBB5500FFBB
|
||||||
|
5500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFBB5500FFBB
|
||||||
|
5500FFBB5500FFBB5500FFBB5500FFBB55FFFFBB5584FFBB5500FEB14B00FDAB
|
||||||
|
4500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFBB5500FFBB
|
||||||
|
5500FFBB5500FFBB5500FFBB5500FFBB55FFFFBB55FDFFBB554EFEB14B00FDAB
|
||||||
|
4500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FEB14B00FEB1
|
||||||
|
4B00FEB14B00FEB14B00FEB14B00FEB14BFFE5942ED9FEB14BF4FEAE4835FDAB
|
||||||
|
4500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FA952F00FA95
|
||||||
|
2F00FA952F00FA952F00FA952F00FA952FFFFB9D370EE48620C6FA952FE9F887
|
||||||
|
211AFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00F77C1600F77C
|
||||||
|
1600F77C1600F77C1600F77C1600F77C16FFF8831D00F8872107E27A14C9F77C
|
||||||
|
16A2FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00EC862300EF89
|
||||||
|
2500F97B1500F97B1500F97B1500F97B15FFF97B1500F9831D00F97B1524EE7B
|
||||||
|
15F1FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E0943300E799
|
||||||
|
3700F2993500FF8F2800FF8F2800FF8F28FFFF8F2800FF973100FF922B0CFF8F
|
||||||
|
28F4FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E0943300E799
|
||||||
|
3700EE9E3B00F39F3B00FFA43D00FFA43DFFFFA53E00FFA84200FFA43DFFFF9B
|
||||||
|
3420FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E0943300E799
|
||||||
|
3700EE9E3B00EE9E3B00F3A13E00FCA843FFFCA84300FCA843FFFFA94320FF9B
|
||||||
|
3400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E0943300E497
|
||||||
|
3540E79937CAE79937FCE79937FFE79937FCEA9B3900F8A64100FFA94300804E
|
||||||
|
1A00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00CB812400CB81
|
||||||
|
24E7E8A745FFFAC25DFFEDB14EFFCB8124DBCB8124007C532100000000000000
|
||||||
|
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF002D1C0500AE68
|
||||||
|
0FF2E19A38FFDF9837FFB67117FF844F0D6C2D1C050000000000000000000000
|
||||||
|
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000020683B
|
||||||
|
02879B5702F29A5702E561370285000000330000003100000023000000130000
|
||||||
|
0004FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000100000
|
||||||
|
001A0000001A0000001A0000001A0000001A00000019000000120000000A0000
|
||||||
|
0002FFFFFF00FFFFFF00FFFFFF00
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
object checkmobile: TTimer
|
object checkmobile: TTimer
|
||||||
Enabled = False
|
Enabled = False
|
||||||
OnTimer = checkmobileTimer
|
OnTimer = checkmobileTimer
|
||||||
OnStartTimer = checkmobileStartTimer
|
|
||||||
top = 264
|
top = 264
|
||||||
end
|
end
|
||||||
object SimpleIPCServer1: TSimpleIPCServer
|
object SimpleIPCServer1: TSimpleIPCServer
|
||||||
@ -3503,7 +3630,7 @@ object Main: TMain
|
|||||||
0000
|
0000
|
||||||
}
|
}
|
||||||
Visible = True
|
Visible = True
|
||||||
OnDblClick = TrayIconDblClick
|
OnClick = TrayIconClick
|
||||||
left = 368
|
left = 368
|
||||||
top = 368
|
top = 368
|
||||||
end
|
end
|
||||||
@ -4658,4 +4785,9 @@ object Main: TMain
|
|||||||
OnClick = itemTrayExitClick
|
OnClick = itemTrayExitClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object ApplicationProperties1: TApplicationProperties
|
||||||
|
OnMinimize = ApplicationProperties1Minimize
|
||||||
|
left = 564
|
||||||
|
top = 220
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -34,7 +34,7 @@ Uses
|
|||||||
|
|
||||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Buttons,
|
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Buttons,
|
||||||
ExtCtrls, ComCtrls, StdCtrls, Menus,{$ifdef fmod} fmodplayer,{$endif}
|
ExtCtrls, ComCtrls, StdCtrls, Menus,{$ifdef fmod} fmodplayer,{$endif}
|
||||||
ActnList, mediacol, dos, SimpleIPC, functions, EditBtn, last_fm, debug, config,
|
ActnList, FileUtil, mediacol, dos, SimpleIPC, functions, EditBtn, last_fm, debug, config,
|
||||||
playlist, playerclass, mplayer, mp3file, Messages, LMessages, cj_interfaces;
|
playlist, playerclass, mplayer, mp3file, Messages, LMessages, cj_interfaces;
|
||||||
|
|
||||||
resourcestring
|
resourcestring
|
||||||
@ -87,9 +87,12 @@ rsTrack = 'Track';
|
|||||||
|
|
||||||
Type
|
Type
|
||||||
|
|
||||||
|
TCactusFlags = (cfTrayIconPressed, cfProgHide);
|
||||||
|
|
||||||
{ TMain }
|
{ TMain }
|
||||||
|
|
||||||
TMain = Class(TForm)
|
TMain = Class(TForm)
|
||||||
|
ApplicationProperties1: TApplicationProperties;
|
||||||
ArtistTree: TTreeView;
|
ArtistTree: TTreeView;
|
||||||
artistsearch: TEdit;
|
artistsearch: TEdit;
|
||||||
Button1: TButton;
|
Button1: TButton;
|
||||||
@ -104,6 +107,7 @@ Type
|
|||||||
ImageListHot: TImageList;
|
ImageListHot: TImageList;
|
||||||
ImageListDis: TImageList;
|
ImageListDis: TImageList;
|
||||||
itemPlugins: TMenuItem;
|
itemPlugins: TMenuItem;
|
||||||
|
lblPath: TLabel;
|
||||||
Mainmenu1: TMainMenu;
|
Mainmenu1: TMainMenu;
|
||||||
MenuItem12: TMenuItem;
|
MenuItem12: TMenuItem;
|
||||||
Menuitem21: TMenuItem;
|
Menuitem21: TMenuItem;
|
||||||
@ -249,6 +253,7 @@ Type
|
|||||||
Trackinfo: TSpeedButton;
|
Trackinfo: TSpeedButton;
|
||||||
TrayIcon: TTrayIcon;
|
TrayIcon: TTrayIcon;
|
||||||
Volumebar: TProgressBar;
|
Volumebar: TProgressBar;
|
||||||
|
procedure ApplicationProperties1Minimize(Sender: TObject);
|
||||||
Procedure ArtistTreeClick(Sender: TObject);
|
Procedure ArtistTreeClick(Sender: TObject);
|
||||||
Procedure ArtistTreeDblClick(Sender: TObject);
|
Procedure ArtistTreeDblClick(Sender: TObject);
|
||||||
Procedure ArtistTreeEndDrag(Sender, Target: TObject; X, Y: Integer);
|
Procedure ArtistTreeEndDrag(Sender, Target: TObject; X, Y: Integer);
|
||||||
@ -260,14 +265,12 @@ Type
|
|||||||
Procedure ArtistTreeStartDrag(Sender: TObject; Var DragObject: TDragObject);
|
Procedure ArtistTreeStartDrag(Sender: TObject; Var DragObject: TDragObject);
|
||||||
Procedure Button1Click(Sender: TObject);
|
Procedure Button1Click(Sender: TObject);
|
||||||
procedure Button2Click(Sender: TObject);
|
procedure Button2Click(Sender: TObject);
|
||||||
procedure checkmobileStartTimer(Sender: TObject);
|
|
||||||
Procedure CoverImageMouseUp(Sender: TObject; Button: TMouseButton;
|
Procedure CoverImageMouseUp(Sender: TObject; Button: TMouseButton;
|
||||||
Shift: TShiftState; X, Y: Integer);
|
Shift: TShiftState; X, Y: Integer);
|
||||||
Procedure DeviceModeBtnClick(Sender: TObject);
|
Procedure DeviceModeBtnClick(Sender: TObject);
|
||||||
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
||||||
Procedure FormMouseDown(Sender: TOBject; Button: TMouseButton;
|
Procedure FormMouseDown(Sender: TOBject; Button: TMouseButton;
|
||||||
Shift: TShiftState; X, Y: Integer);
|
Shift: TShiftState; X, Y: Integer);
|
||||||
Procedure FormResize(Sender: TObject);
|
|
||||||
procedure itemTrayExitClick(Sender: TObject);
|
procedure itemTrayExitClick(Sender: TObject);
|
||||||
procedure itemTrayPlayClick(Sender: TObject);
|
procedure itemTrayPlayClick(Sender: TObject);
|
||||||
Procedure LibModeBtnClick(Sender: TObject);
|
Procedure LibModeBtnClick(Sender: TObject);
|
||||||
@ -301,7 +304,6 @@ Type
|
|||||||
procedure pnlPlaytimeClick(Sender: TObject);
|
procedure pnlPlaytimeClick(Sender: TObject);
|
||||||
procedure PopupMenuTrayPopup(Sender: TObject);
|
procedure PopupMenuTrayPopup(Sender: TObject);
|
||||||
procedure randomcheckChange(Sender: TObject);
|
procedure randomcheckChange(Sender: TObject);
|
||||||
procedure scan(Sender: TObject);
|
|
||||||
Procedure SearchPanelClick(Sender: TObject);
|
Procedure SearchPanelClick(Sender: TObject);
|
||||||
Procedure PlayerControlsPanelClick(Sender: TObject);
|
Procedure PlayerControlsPanelClick(Sender: TObject);
|
||||||
Procedure PauseButtonImgClick(Sender: TObject);
|
Procedure PauseButtonImgClick(Sender: TObject);
|
||||||
@ -323,7 +325,6 @@ Type
|
|||||||
Procedure MenuItem11Click(Sender: TObject);
|
Procedure MenuItem11Click(Sender: TObject);
|
||||||
Procedure MenuItem14Click(Sender: TObject);
|
Procedure MenuItem14Click(Sender: TObject);
|
||||||
Procedure MenuItem16Click(Sender: TObject);
|
Procedure MenuItem16Click(Sender: TObject);
|
||||||
Procedure MenuItem19Click(Sender: TObject);
|
|
||||||
Procedure MenuItem20Click(Sender: TObject);
|
Procedure MenuItem20Click(Sender: TObject);
|
||||||
Procedure MenuItem26Click(Sender: TObject);
|
Procedure MenuItem26Click(Sender: TObject);
|
||||||
Procedure MenuItem27Click(Sender: TObject);
|
Procedure MenuItem27Click(Sender: TObject);
|
||||||
@ -343,6 +344,7 @@ Type
|
|||||||
Shift: TShiftState; X, Y: Integer);
|
Shift: TShiftState; X, Y: Integer);
|
||||||
Procedure SettingsItemClick(Sender: TObject);
|
Procedure SettingsItemClick(Sender: TObject);
|
||||||
Procedure SimpleIPCServer1Message(Sender: TObject);
|
Procedure SimpleIPCServer1Message(Sender: TObject);
|
||||||
|
procedure skinmenuClick(Sender: TObject);
|
||||||
Procedure SpeedButton1Click(Sender: TObject);
|
Procedure SpeedButton1Click(Sender: TObject);
|
||||||
|
|
||||||
Procedure Splitter1Moved(Sender: TObject);
|
Procedure Splitter1Moved(Sender: TObject);
|
||||||
@ -350,8 +352,6 @@ Type
|
|||||||
Procedure SrchArtItemClick(Sender: TObject);
|
Procedure SrchArtItemClick(Sender: TObject);
|
||||||
Procedure SrchFileItemClick(Sender: TObject);
|
Procedure SrchFileItemClick(Sender: TObject);
|
||||||
Procedure SrchTitleItemClick(Sender: TObject);
|
Procedure SrchTitleItemClick(Sender: TObject);
|
||||||
Procedure srch_buttonKeyUp(Sender: TObject; Var Key: Word;
|
|
||||||
Shift: TShiftState);
|
|
||||||
Procedure StopButtonImgClick(Sender: TObject);
|
Procedure StopButtonImgClick(Sender: TObject);
|
||||||
Procedure StopButtonImgMouseDown(Sender: TOBject; Button: TMouseButton;
|
Procedure StopButtonImgMouseDown(Sender: TOBject; Button: TMouseButton;
|
||||||
Shift: TShiftState; X, Y: Integer);
|
Shift: TShiftState; X, Y: Integer);
|
||||||
@ -404,7 +404,6 @@ Type
|
|||||||
Procedure MenuItem33Click(Sender: TObject);
|
Procedure MenuItem33Click(Sender: TObject);
|
||||||
Procedure rm_artist_playeritemClick(Sender: TObject);
|
Procedure rm_artist_playeritemClick(Sender: TObject);
|
||||||
Procedure searchstrClick(Sender: TObject);
|
Procedure searchstrClick(Sender: TObject);
|
||||||
Procedure skinmenuClick(Sender: TObject);
|
|
||||||
Procedure syncplayeritem(Sender: TObject);
|
Procedure syncplayeritem(Sender: TObject);
|
||||||
Procedure MenuItem3Click(Sender: TObject);
|
Procedure MenuItem3Click(Sender: TObject);
|
||||||
Procedure MenuItem22aClick(Sender: TObject);
|
Procedure MenuItem22aClick(Sender: TObject);
|
||||||
@ -431,7 +430,7 @@ Type
|
|||||||
Shift: TShiftState; X, Y: Integer);
|
Shift: TShiftState; X, Y: Integer);
|
||||||
Procedure trackbarMouseUp(Sender: TOBject; Button: TMouseButton;
|
Procedure trackbarMouseUp(Sender: TOBject; Button: TMouseButton;
|
||||||
Shift: TShiftState; X, Y: Integer);
|
Shift: TShiftState; X, Y: Integer);
|
||||||
procedure TrayIconDblClick(Sender: TObject);
|
procedure TrayIconClick(Sender: TObject);
|
||||||
Procedure undoSyncItemClick(Sender: TObject);
|
Procedure undoSyncItemClick(Sender: TObject);
|
||||||
|
|
||||||
Procedure loadskin(Sender: TObject);
|
Procedure loadskin(Sender: TObject);
|
||||||
@ -452,10 +451,12 @@ Type
|
|||||||
bPnlPlaytimeNegated: boolean;
|
bPnlPlaytimeNegated: boolean;
|
||||||
oldWindowState :TWindowState;
|
oldWindowState :TWindowState;
|
||||||
fromTrayDBLClick :Boolean;
|
fromTrayDBLClick :Boolean;
|
||||||
|
FFlags: set of TCactusFlags;
|
||||||
Procedure MoveNode(TargetNode, SourceNode : TTreeNode);
|
Procedure MoveNode(TargetNode, SourceNode : TTreeNode);
|
||||||
Procedure ApplicationIdle(Sender: TObject; Var Done: Boolean);
|
Procedure ApplicationIdle(Sender: TObject; Var Done: Boolean);
|
||||||
Procedure update_player_display;
|
Procedure update_player_display;
|
||||||
Function LoadFile(path: String): boolean;
|
Function LoadFile(path: String): boolean;
|
||||||
|
procedure MinimizeMe(Data: Ptrint);
|
||||||
|
|
||||||
Public
|
Public
|
||||||
player_connected, playermode: boolean;
|
player_connected, playermode: boolean;
|
||||||
@ -478,7 +479,6 @@ Type
|
|||||||
Procedure update_artist_view;
|
Procedure update_artist_view;
|
||||||
|
|
||||||
{ public declarations }
|
{ public declarations }
|
||||||
procedure WMSize(var Message: TLMSize); message LM_Size;
|
|
||||||
|
|
||||||
//Test Plugins....cut in future
|
//Test Plugins....cut in future
|
||||||
procedure SayHello(Sender :TCJ_MenuItem);
|
procedure SayHello(Sender :TCJ_MenuItem);
|
||||||
@ -554,6 +554,8 @@ Implementation
|
|||||||
Uses editid3, status, settings, player, directories, skin, cdrip, translations, bigcoverimg,
|
Uses editid3, status, settings, player, directories, skin, cdrip, translations, bigcoverimg,
|
||||||
streamcol, addradio, CleanLibrary, global_vars, cj_pluginslist, cj_interfaces_impl, LCLType;
|
streamcol, addradio, CleanLibrary, global_vars, cj_pluginslist, cj_interfaces_impl, LCLType;
|
||||||
|
|
||||||
|
{$R *.lfm}
|
||||||
|
|
||||||
{$i cactus_const.inc}
|
{$i cactus_const.inc}
|
||||||
|
|
||||||
Var sizediff: int64;
|
Var sizediff: int64;
|
||||||
@ -1182,7 +1184,7 @@ Begin
|
|||||||
|
|
||||||
If MediaCollection.items[i].title<>'' Then ListItem.SubItems.Add(MediaCollection.items
|
If MediaCollection.items[i].title<>'' Then ListItem.SubItems.Add(MediaCollection.items
|
||||||
[i].Artist)
|
[i].Artist)
|
||||||
Else ListItem.SubItems.Add(extractfilename(MediaCollection.items[i].path));
|
Else ListItem.SubItems.Add(SysToUTF8(extractfilename(MediaCollection.items[i].path)));
|
||||||
ListItem.SubItems.Add (MediaCollection.items[i].title);
|
ListItem.SubItems.Add (MediaCollection.items[i].title);
|
||||||
ListItem.SubItems.Add (MediaCollection.items[i].album);
|
ListItem.SubItems.Add (MediaCollection.items[i].album);
|
||||||
ListItem.SubItems.Add (MediaCollection.items[i].Track);
|
ListItem.SubItems.Add (MediaCollection.items[i].Track);
|
||||||
@ -1227,11 +1229,6 @@ Begin
|
|||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
procedure TMain.checkmobileStartTimer(Sender: TObject);
|
|
||||||
begin
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
Procedure TMain.CoverImageMouseUp(Sender: TObject; Button: TMouseButton;
|
Procedure TMain.CoverImageMouseUp(Sender: TObject; Button: TMouseButton;
|
||||||
@ -1313,44 +1310,6 @@ End;
|
|||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
Procedure TMain.FormResize(Sender: TObject);
|
|
||||||
Begin
|
|
||||||
Panel4.Width := oldSplitterWidth;
|
|
||||||
Panel1.Width := Width-oldSplitterWidth-8;
|
|
||||||
End;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TMain.WMSize(var Message: TLMSize);
|
|
||||||
begin
|
|
||||||
if not (csDesigning in ComponentState) then
|
|
||||||
begin
|
|
||||||
case (Message.SizeType and not SIZE_SourceIsInterface) of
|
|
||||||
SIZEICONIC:begin
|
|
||||||
if not(fromTrayDBLClick) then
|
|
||||||
begin
|
|
||||||
Visible :=False;
|
|
||||||
oldWindowState :=Self.WindowState;
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
fromTrayDBLClick :=False;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
inherited WMSize(Message);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TMain.TrayIconDblClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if not(Self.Visible) then
|
|
||||||
begin
|
|
||||||
//Avoid handling on OnWindowStateChange
|
|
||||||
Self.fromTrayDBLClick :=True;
|
|
||||||
// Self.WindowState:=oldWindowState;
|
|
||||||
Self.Visible:=True;
|
|
||||||
Self.BringToFront;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TMain.itemTrayExitClick(Sender: TObject);
|
procedure TMain.itemTrayExitClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
@ -1682,11 +1641,6 @@ begin
|
|||||||
PlayerObj.Playlist.reset_random;
|
PlayerObj.Playlist.reset_random;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMain.scan(Sender: TObject);
|
|
||||||
begin
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
Procedure TMain.SearchPanelClick(Sender: TObject);
|
Procedure TMain.SearchPanelClick(Sender: TObject);
|
||||||
@ -1792,7 +1746,7 @@ Begin
|
|||||||
DebugOutLn('ERROR saving playlist', 2);
|
DebugOutLn('ERROR saving playlist', 2);
|
||||||
end else if PlayerObj.Playlist.Count=0 then DeleteFile(CactusConfig.ConfigPrefix+'lib'+DirectorySeparator+'last.m3u');
|
end else if PlayerObj.Playlist.Count=0 then DeleteFile(CactusConfig.ConfigPrefix+'lib'+DirectorySeparator+'last.m3u');
|
||||||
|
|
||||||
If (MediaCollection.ItemCount>1) Then
|
If (MediaCollection.ItemCount>0) Then
|
||||||
Begin
|
Begin
|
||||||
MediaCollection.SaveToFile(CactusConfig.ConfigPrefix+'lib'+DirectorySeparator+'last.mlb');
|
MediaCollection.SaveToFile(CactusConfig.ConfigPrefix+'lib'+DirectorySeparator+'last.mlb');
|
||||||
CactusConfig.LastLib := MediaCollection.savepath;
|
CactusConfig.LastLib := MediaCollection.savepath;
|
||||||
@ -2223,6 +2177,12 @@ Begin
|
|||||||
Application.ProcessMessages;
|
Application.ProcessMessages;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
procedure TMain.MinimizeMe(Data: Ptrint);
|
||||||
|
begin
|
||||||
|
Include(FFlags, cfProgHide);
|
||||||
|
Hide;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
@ -2315,8 +2275,8 @@ Begin
|
|||||||
With artnode Do
|
With artnode Do
|
||||||
Begin
|
Begin
|
||||||
MakeVisible;
|
MakeVisible;
|
||||||
ImageIndex := MediaCollection.Items[i].Action;
|
ImageIndex := 6; //MediaCollection.Items[i].Action;
|
||||||
SelectedIndex := MediaCollection.Items[i].Action;
|
SelectedIndex := 6; //MediaCollection.Items[i].Action;
|
||||||
Data := MediaCollection.items[i];
|
Data := MediaCollection.items[i];
|
||||||
Expanded:=false;
|
Expanded:=false;
|
||||||
End;
|
End;
|
||||||
@ -2328,8 +2288,8 @@ Begin
|
|||||||
Begin
|
Begin
|
||||||
MakeVisible;
|
MakeVisible;
|
||||||
MedFileObj:=TMediaFileClass(AlbumList.Objects[z]);
|
MedFileObj:=TMediaFileClass(AlbumList.Objects[z]);
|
||||||
ImageIndex := MedFileObj.Action;
|
ImageIndex := 7;//MedFileObj.Action;
|
||||||
SelectedIndex := MedFileObj.Action;
|
SelectedIndex := 7;//MedFileObj.Action;
|
||||||
Data := AlbumList.Objects[z];
|
Data := AlbumList.Objects[z];
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
@ -2502,11 +2462,6 @@ Begin
|
|||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
procedure TMain.MenuItem19Click(Sender: TObject);
|
|
||||||
begin
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
Procedure TMain.MenuItem20Click(Sender: TObject);
|
Procedure TMain.MenuItem20Click(Sender: TObject);
|
||||||
@ -2874,6 +2829,11 @@ Begin
|
|||||||
Writeln('IPC end');
|
Writeln('IPC end');
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
procedure TMain.skinmenuClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
// JRA
|
||||||
|
end;
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
Procedure TMain.SpeedButton1Click(Sender: TObject);
|
Procedure TMain.SpeedButton1Click(Sender: TObject);
|
||||||
@ -2910,12 +2870,6 @@ Begin
|
|||||||
SrchTitleItem.Checked := Not SrchTitleItem.Checked;
|
SrchTitleItem.Checked := Not SrchTitleItem.Checked;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure TMain.srch_buttonKeyUp(Sender: TObject; Var Key: Word;
|
|
||||||
Shift: TShiftState);
|
|
||||||
Begin
|
|
||||||
|
|
||||||
End;
|
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
Procedure TMain.StopButtonImgClick(Sender: TObject);
|
Procedure TMain.StopButtonImgClick(Sender: TObject);
|
||||||
@ -3079,6 +3033,7 @@ Procedure TMain.TitleTreeSelectItem(Sender: TObject; Item: TListItem;
|
|||||||
Begin
|
Begin
|
||||||
// reanable the popupmenu in case ist was disabled in TMain.TitleTreeMouseDown
|
// reanable the popupmenu in case ist was disabled in TMain.TitleTreeMouseDown
|
||||||
TitleTree.PopupMenu.AutoPopup := true;
|
TitleTree.PopupMenu.AutoPopup := true;
|
||||||
|
lblPath.Caption:=TMediaFileClass(Item.data).Path;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
@ -3227,7 +3182,7 @@ End;
|
|||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
Procedure TMain.MenuItem10Click(Sender: TObject);
|
procedure TMain.Menuitem10Click(Sender: TObject);
|
||||||
|
|
||||||
Var MedFileObj: TMediaFileClass;
|
Var MedFileObj: TMediaFileClass;
|
||||||
Begin
|
Begin
|
||||||
@ -3621,6 +3576,9 @@ Procedure TMain.playlistSelectItem(Sender: TObject; Item: TListItem;
|
|||||||
Begin
|
Begin
|
||||||
// reanable the popupmenu in case ist was disabled in TMain.playlistMouseDown
|
// reanable the popupmenu in case ist was disabled in TMain.playlistMouseDown
|
||||||
playlist.PopupMenu.AutoPopup := true;
|
playlist.PopupMenu.AutoPopup := true;
|
||||||
|
if (Item.Data<>nil) then begin
|
||||||
|
lblPath.Caption := TMediaFileClass(Item.data).Path;
|
||||||
|
end;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
@ -3646,8 +3604,7 @@ Begin
|
|||||||
MedFileObj := TMediaFileClass(playlist.Items[PlayerObj.CurrentTrack].Data);
|
MedFileObj := TMediaFileClass(playlist.Items[PlayerObj.CurrentTrack].Data);
|
||||||
If (MedFileObj.album<>'') Then
|
If (MedFileObj.album<>'') Then
|
||||||
Begin
|
Begin
|
||||||
MedFileObj.CoverPath := CactusConfig.ConfigPrefix+DirectorySeparator+'covercache'+
|
MedFileObj.CoverPath := CactusConfig.GetCoverPath(MedFileObj.GetCoverFile);
|
||||||
DirectorySeparator+MedFileObj.Artist+'_'+MedFileObj.album+'.jpeg';
|
|
||||||
If (FileExists(MedFileObj.CoverPath)=false) Then
|
If (FileExists(MedFileObj.CoverPath)=false) Then
|
||||||
Begin
|
Begin
|
||||||
CoverImage.Picture.Clear;
|
CoverImage.Picture.Clear;
|
||||||
@ -3717,6 +3674,11 @@ Begin
|
|||||||
// if ArtistTree.Selected<>nil then update_title_view;
|
// if ArtistTree.Selected<>nil then update_title_view;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
procedure TMain.ApplicationProperties1Minimize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Application.QueueAsyncCall(@MinimizeMe, 0);
|
||||||
|
end;
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
Procedure TMain.ArtistTreeKeyUp(Sender: TObject; Var Key: Word;
|
Procedure TMain.ArtistTreeKeyUp(Sender: TObject; Var Key: Word;
|
||||||
@ -3948,11 +3910,6 @@ End;
|
|||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
Procedure TMain.skinmenuClick(Sender: TObject);
|
|
||||||
Begin
|
|
||||||
|
|
||||||
End;
|
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
Procedure TMain.syncplayeritem(Sender: TObject);
|
Procedure TMain.syncplayeritem(Sender: TObject);
|
||||||
@ -4171,6 +4128,16 @@ Begin
|
|||||||
If PlayerObj.playing Then playtimer.enabled := true;
|
If PlayerObj.playing Then playtimer.enabled := true;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
procedure TMain.TrayIconClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if not Visible then begin
|
||||||
|
Show;
|
||||||
|
BringToFront;
|
||||||
|
end else begin
|
||||||
|
Hide;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
Procedure TMain.undoSyncItemClick(Sender: TObject);
|
Procedure TMain.undoSyncItemClick(Sender: TObject);
|
||||||
@ -4430,7 +4397,7 @@ Begin
|
|||||||
curalbum := lowercase(MedFileObj.album);
|
curalbum := lowercase(MedFileObj.album);
|
||||||
DebugOut(curartist, 2);
|
DebugOut(curartist, 2);
|
||||||
|
|
||||||
i := MedColObj.getTracks(MedFileObj.Artist, MedFileObj.index);
|
i := MedColObj.getTracks(MedFileObj.Artist, 0{MedFileObj.index});
|
||||||
|
|
||||||
Repeat
|
Repeat
|
||||||
Begin
|
Begin
|
||||||
@ -4445,13 +4412,13 @@ Begin
|
|||||||
|
|
||||||
If MedColObj.items[i].title<>'' Then
|
If MedColObj.items[i].title<>'' Then
|
||||||
ListItem.SubItems.Add((MedColObj.items[i].Artist))
|
ListItem.SubItems.Add((MedColObj.items[i].Artist))
|
||||||
Else ListItem.SubItems.Add(extractfilename(MedColObj.items[i].path));
|
Else ListItem.SubItems.Add(SysToUTF8(extractfilename(MedColObj.items[i].path)));
|
||||||
|
|
||||||
ListItem.SubItems.Add((MedColObj.items[i].title));
|
ListItem.SubItems.Add((MedColObj.items[i].title));
|
||||||
ListItem.SubItems.Add((MedColObj.items[i].album));
|
ListItem.SubItems.Add((MedColObj.items[i].album));
|
||||||
ListItem.SubItems.Add(MedColObj.items[i].track);
|
ListItem.SubItems.Add(MedColObj.items[i].track);
|
||||||
ListItem.SubItems.Add(ID3Genre[MedColObj.items[i].GenreID]);
|
ListItem.SubItems.Add(ID3Genre[MedColObj.items[i].GenreID]);
|
||||||
ListItem.SubItems.Add(ExtractFileName(MedColObj.items[i].Path));
|
ListItem.SubItems.Add(SysToUTF8(ExtractFileName(MedColObj.items[i].Path)));
|
||||||
ListItem.SubItems.Add(MedColObj.items[i].playtime);
|
ListItem.SubItems.Add(MedColObj.items[i].playtime);
|
||||||
|
|
||||||
End;
|
End;
|
||||||
@ -4606,7 +4573,4 @@ begin
|
|||||||
CJ_Interface.GetSignals.Signal(1, 24, 50, msgHandled);
|
CJ_Interface.GetSignals.Signal(1, 24, 50, msgHandled);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
|
||||||
{$I mainform.lrs}
|
|
||||||
|
|
||||||
End.
|
End.
|
||||||
|
@ -20,7 +20,7 @@ Interface
|
|||||||
Uses
|
Uses
|
||||||
Classes, SysUtils,
|
Classes, SysUtils,
|
||||||
//Tagreader:
|
//Tagreader:
|
||||||
WMAfile, OggVorbis, FLACfile, mp3file, debug, lconvencoding, guesstag;
|
WMAfile, OggVorbis, FLACfile, mp3file, debug, LCLProc, lconvencoding, guesstag;
|
||||||
|
|
||||||
Type
|
Type
|
||||||
// PMediaCollectionClass = ^TMediaCollectionClass;
|
// PMediaCollectionClass = ^TMediaCollectionClass;
|
||||||
@ -40,6 +40,7 @@ Type
|
|||||||
FStreamUrl: string;
|
FStreamUrl: string;
|
||||||
FMediaType: TMediaType;
|
FMediaType: TMediaType;
|
||||||
|
|
||||||
|
function StrToUTF8(s:string): string;
|
||||||
Procedure read_tag_ogg;
|
Procedure read_tag_ogg;
|
||||||
Procedure read_tag_flac;
|
Procedure read_tag_flac;
|
||||||
Procedure read_tag_wma;
|
Procedure read_tag_wma;
|
||||||
@ -59,7 +60,8 @@ Type
|
|||||||
Collection: TMediaCollectionClass;
|
Collection: TMediaCollectionClass;
|
||||||
Comment: ansistring;
|
Comment: ansistring;
|
||||||
GenreID: Byte;
|
GenreID: Byte;
|
||||||
Year, Track: string[4];
|
Year: string[4];
|
||||||
|
Track: string[10]; // ####/####
|
||||||
Filetype: string[5];
|
Filetype: string[5];
|
||||||
Size: int64;
|
Size: int64;
|
||||||
ID, Bitrate, Samplerate, Playlength, Action: longint;
|
ID, Bitrate, Samplerate, Playlength, Action: longint;
|
||||||
@ -77,6 +79,7 @@ Type
|
|||||||
Function FullPathNameFromTag_dryrun(var strFormat: string): string;
|
Function FullPathNameFromTag_dryrun(var strFormat: string): string;
|
||||||
Function move2path(strFilePath: string): Boolean;
|
Function move2path(strFilePath: string): Boolean;
|
||||||
Function LibraryPath(): string;
|
Function LibraryPath(): string;
|
||||||
|
function GetCoverFile: string;
|
||||||
|
|
||||||
property Artist: string read FArtist write SetArtist;
|
property Artist: string read FArtist write SetArtist;
|
||||||
property Album: string read FAlbum write SetAlbum;
|
property Album: string read FAlbum write SetAlbum;
|
||||||
@ -272,10 +275,18 @@ Begin
|
|||||||
savepath := path;
|
savepath := path;
|
||||||
sortState := FSorted;
|
sortState := FSorted;
|
||||||
linecount:=0;
|
linecount:=0;
|
||||||
Try
|
|
||||||
system.assign(lfile,path);
|
|
||||||
reset(lfile);
|
|
||||||
|
|
||||||
|
system.assign(lfile,path);
|
||||||
|
{$i-}
|
||||||
|
reset(lfile);
|
||||||
|
{$i+}
|
||||||
|
if IoResult<>0 then begin
|
||||||
|
result := false;
|
||||||
|
writeln('unable to open file ', path);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
readln(lfile, tmps);
|
readln(lfile, tmps);
|
||||||
readln(lfile, tmps);
|
readln(lfile, tmps);
|
||||||
|
|
||||||
@ -343,6 +354,7 @@ Begin
|
|||||||
writeln('library sucessfully loaded');
|
writeln('library sucessfully loaded');
|
||||||
result := true;
|
result := true;
|
||||||
Except
|
Except
|
||||||
|
close(lfile);
|
||||||
fsorted := sortState;
|
fsorted := sortState;
|
||||||
writeln('lib seems corupted');
|
writeln('lib seems corupted');
|
||||||
write('exception at entry ');
|
write('exception at entry ');
|
||||||
@ -812,6 +824,26 @@ Begin
|
|||||||
result := i;
|
result := i;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
function TMediaFileClass.StrToUTF8(s: string): string;
|
||||||
|
var
|
||||||
|
w: Word;
|
||||||
|
begin
|
||||||
|
if length(s)>2 then begin
|
||||||
|
W := PWord(@S[1])^;
|
||||||
|
if (W=$FFFE) or (W=$FEFF) then begin
|
||||||
|
s := copy(s, 3, length(s)-2);
|
||||||
|
if (W=$FFFE) then
|
||||||
|
result := UCS2BEToUTF8(s)
|
||||||
|
else
|
||||||
|
result := UCS2LEToUTF8(s);
|
||||||
|
exit;
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
if FindInvalidUTF8Character(pchar(s), Length(s), false)>=0 then
|
||||||
|
result := ISO_8859_1ToUTF8(s)
|
||||||
|
else
|
||||||
|
result := S;
|
||||||
|
end;
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
{ TMediaFileClass }
|
{ TMediaFileClass }
|
||||||
@ -943,14 +975,14 @@ Begin
|
|||||||
begin
|
begin
|
||||||
// writeln(path);
|
// writeln(path);
|
||||||
MP3File.ReadTag(Path);
|
MP3File.ReadTag(Path);
|
||||||
artist := ISO_8859_1ToUTF8(MP3File.Artist);
|
artist := StrToUTF8(MP3File.Artist);
|
||||||
title := ISO_8859_1ToUTF8(MP3File.Title);
|
title := StrToUTF8(MP3File.Title);
|
||||||
album := ISO_8859_1ToUTF8(MP3File.Album);
|
album := StrToUTF8(MP3File.Album);
|
||||||
Bitrate := MP3File.BitRate;
|
Bitrate := MP3File.BitRate;
|
||||||
Year := MP3File.Year;
|
Year := StrToUTF8(MP3File.Year);
|
||||||
Samplerate := MP3File.SampleRate;
|
Samplerate := MP3File.SampleRate;
|
||||||
Comment := ISO_8859_1ToUTF8(MP3File.Comment);
|
Comment := StrToUTF8(MP3File.Comment);
|
||||||
Track := (MP3File.Track);
|
Track := StrToUTF8(MP3File.Track);
|
||||||
Playlength := round(MP3File.Playlength);
|
Playlength := round(MP3File.Playlength);
|
||||||
Playtime := SecondsToFmtStr(Playlength);
|
Playtime := SecondsToFmtStr(Playlength);
|
||||||
GenreID := (MP3File.GenreID);
|
GenreID := (MP3File.GenreID);
|
||||||
@ -1304,5 +1336,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TMediaFileClass.GetCoverFile: string;
|
||||||
|
begin
|
||||||
|
result := Artist+'_'+album+'.jpeg'
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
End.
|
End.
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
<MainUnit Value="0"/>
|
<MainUnit Value="0"/>
|
||||||
<Title Value="cactus"/>
|
<Title Value="cactus"/>
|
||||||
<UseXPManifest Value="True"/>
|
<UseXPManifest Value="True"/>
|
||||||
|
<Icon Value="0"/>
|
||||||
</General>
|
</General>
|
||||||
<VersionInfo>
|
<VersionInfo>
|
||||||
<AutoIncrementBuild Value="True"/>
|
<AutoIncrementBuild Value="True"/>
|
||||||
@ -17,9 +18,6 @@
|
|||||||
<RevisionNr Value="5"/>
|
<RevisionNr Value="5"/>
|
||||||
<BuildNr Value="737"/>
|
<BuildNr Value="737"/>
|
||||||
</VersionInfo>
|
</VersionInfo>
|
||||||
<MacroValues Count="1">
|
|
||||||
<Macro1 Name="LCLWidgetType" Value="gtk2"/>
|
|
||||||
</MacroValues>
|
|
||||||
<BuildModes Count="1">
|
<BuildModes Count="1">
|
||||||
<Item1 Name="default" Default="True"/>
|
<Item1 Name="default" Default="True"/>
|
||||||
</BuildModes>
|
</BuildModes>
|
||||||
@ -35,21 +33,25 @@
|
|||||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||||
</local>
|
</local>
|
||||||
</RunParams>
|
</RunParams>
|
||||||
<RequiredPackages Count="4">
|
<RequiredPackages Count="5">
|
||||||
<Item1>
|
<Item1>
|
||||||
<PackageName Value="lnetbase"/>
|
<PackageName Value="LCLBase"/>
|
||||||
|
<MinVersion Valid="True"/>
|
||||||
</Item1>
|
</Item1>
|
||||||
<Item2>
|
<Item2>
|
||||||
<PackageName Value="laz_synapse"/>
|
<PackageName Value="lnetbase"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
<Item3>
|
<Item3>
|
||||||
<PackageName Value="LCL"/>
|
<PackageName Value="synapse"/>
|
||||||
<MinVersion Major="1" Valid="True"/>
|
|
||||||
</Item3>
|
</Item3>
|
||||||
<Item4>
|
<Item4>
|
||||||
<PackageName Value="FCL"/>
|
<PackageName Value="LCL"/>
|
||||||
<MinVersion Major="1" Valid="True"/>
|
<MinVersion Major="1" Valid="True"/>
|
||||||
</Item4>
|
</Item4>
|
||||||
|
<Item5>
|
||||||
|
<PackageName Value="FCL"/>
|
||||||
|
<MinVersion Major="1" Valid="True"/>
|
||||||
|
</Item5>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="32">
|
<Units Count="32">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
@ -240,7 +242,6 @@
|
|||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<OtherUnitFiles Value="fmodintf;tagreader;plugin/sdk;plugin/impl"/>
|
<OtherUnitFiles Value="fmodintf;tagreader;plugin/sdk;plugin/impl"/>
|
||||||
<UnitOutputDirectory Value="../source/obj"/>
|
<UnitOutputDirectory Value="../source/obj"/>
|
||||||
<SrcPath Value="/home/daseeb/devel/units/synapse/source/lib/"/>
|
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Parsing>
|
<Parsing>
|
||||||
<SyntaxOptions>
|
<SyntaxOptions>
|
||||||
@ -265,6 +266,9 @@
|
|||||||
<ShowHintsForUnusedUnitsInMainSrc Value="True"/>
|
<ShowHintsForUnusedUnitsInMainSrc Value="True"/>
|
||||||
</Verbosity>
|
</Verbosity>
|
||||||
<WriteFPCLogo Value="False"/>
|
<WriteFPCLogo Value="False"/>
|
||||||
|
<CompilerMessages>
|
||||||
|
<UseMsgFile Value="True"/>
|
||||||
|
</CompilerMessages>
|
||||||
<CustomOptions Value="-dCactusDebug"/>
|
<CustomOptions Value="-dCactusDebug"/>
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
</Other>
|
</Other>
|
||||||
|
@ -23,10 +23,12 @@ uses
|
|||||||
{$ifdef linux}
|
{$ifdef linux}
|
||||||
cthreads,
|
cthreads,
|
||||||
{$endif}
|
{$endif}
|
||||||
global_vars, Interfaces, SysUtils, Forms, status, settings, player, graphics,
|
global_vars,
|
||||||
editid3, directories, skin, cdrip, mediacol, BigCoverImg, mainform, cddb,
|
Interfaces,SysUtils,
|
||||||
debug, config, addradio, streamcol, playerclass, CleanLibrary, laz_synapse,
|
Forms, status, settings, player, graphics, editid3, directories, skin,
|
||||||
lnetbase, guesstag;
|
cdrip, mediacol, BigCoverImg, mainform, cddb,
|
||||||
|
debug, config, {imagesforlazarus,} addradio, streamcol,
|
||||||
|
playerclass, CleanLibrary, lnetbase, synapse{, plugininterfaces}, guesstag;
|
||||||
|
|
||||||
var
|
var
|
||||||
invalid_param, skip_config: boolean;
|
invalid_param, skip_config: boolean;
|
||||||
@ -35,9 +37,7 @@ var
|
|||||||
|
|
||||||
{$i cactus_const.inc}
|
{$i cactus_const.inc}
|
||||||
|
|
||||||
{$IFDEF WINDOWS}{$R mp3proj.rc}{$ENDIF}
|
{$R *.res}
|
||||||
|
|
||||||
{$R mp3proj.res}
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Application.Title:='cactus';
|
Application.Title:='cactus';
|
||||||
|
BIN
applications/cactusjukebox/source/mp3proj.res
Normal file
BIN
applications/cactusjukebox/source/mp3proj.res
Normal file
Binary file not shown.
@ -111,7 +111,10 @@ begin
|
|||||||
AStringList:=TStringList.Create;
|
AStringList:=TStringList.Create;
|
||||||
try
|
try
|
||||||
if GetMPlayerPlaying then AStringList.LoadFromStream(MPlayerProcess.Output);
|
if GetMPlayerPlaying then AStringList.LoadFromStream(MPlayerProcess.Output);
|
||||||
Result:=AStringList.Strings[0];
|
if AStringList.Count>0 then
|
||||||
|
Result:=AStringList.Strings[0]
|
||||||
|
else
|
||||||
|
Result := '';
|
||||||
// writeln(Result);
|
// writeln(Result);
|
||||||
except
|
except
|
||||||
writeln('EXCEPTION reading mplayer output');result:='';
|
writeln('EXCEPTION reading mplayer output');result:='';
|
||||||
|
@ -45,6 +45,7 @@ TMP3File = class
|
|||||||
FGenreID: byte;
|
FGenreID: byte;
|
||||||
FFileName: string;
|
FFileName: string;
|
||||||
procedure ReadHeader;
|
procedure ReadHeader;
|
||||||
|
function GetId3V1Track: Integer;
|
||||||
public
|
public
|
||||||
constructor create;
|
constructor create;
|
||||||
function ReadTag(Filename: string):boolean;
|
function ReadTag(Filename: string):boolean;
|
||||||
@ -138,6 +139,20 @@ begin
|
|||||||
Else writeln(FFileName+' -> no valid mpeg header found');
|
Else writeln(FFileName+' -> no valid mpeg header found');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TMP3File.GetId3V1Track: Integer;
|
||||||
|
begin
|
||||||
|
result := pos('/', FTrack);
|
||||||
|
if result>0 then
|
||||||
|
result := StrToIntDef(Copy(FTrack, 1, result-1), 0)
|
||||||
|
else
|
||||||
|
result := StrToIntDef(FTrack, 0);
|
||||||
|
if result>255 then
|
||||||
|
result := 255
|
||||||
|
else
|
||||||
|
if result<0 then
|
||||||
|
result := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TMP3File.create;
|
constructor TMP3File.create;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
@ -154,6 +169,17 @@ Var i, z, tagpos: integer;
|
|||||||
artistv2, albumv2, titlev2, commentv2, yearv2, trackv2: string;
|
artistv2, albumv2, titlev2, commentv2, yearv2, trackv2: string;
|
||||||
bufstr: string;
|
bufstr: string;
|
||||||
mp3filehandle: longint;
|
mp3filehandle: longint;
|
||||||
|
iso: boolean;
|
||||||
|
|
||||||
|
function GetID3TagStr: string;
|
||||||
|
begin
|
||||||
|
result := copy(bufstr,i+11,buf[i+7]-1);
|
||||||
|
iso := bufstr[i+10]=#0;
|
||||||
|
if bufstr[i+10] in [#0,#3] then
|
||||||
|
// string is ISO-8859-1 or UTF-8 (2.4) encoded, can be trimmed
|
||||||
|
result := TrimRight(result);
|
||||||
|
end;
|
||||||
|
|
||||||
Begin
|
Begin
|
||||||
FFileName:=Filename;
|
FFileName:=Filename;
|
||||||
ReadHeader;
|
ReadHeader;
|
||||||
@ -165,7 +191,7 @@ Begin
|
|||||||
fileread(mp3filehandle,buf,high(buf));
|
fileread(mp3filehandle,buf,high(buf));
|
||||||
bufstr := '';
|
bufstr := '';
|
||||||
For i:= 1 To high(buf) Do
|
For i:= 1 To high(buf) Do
|
||||||
If (buf[i]<>0) and (buf[i]<>10) Then bufstr := bufstr+char(buf[i])
|
If {(buf[i]<>0) and }(buf[i]<>10) Then bufstr := bufstr+char(buf[i])
|
||||||
Else bufstr := bufstr+' ';
|
Else bufstr := bufstr+' ';
|
||||||
// filter #10 and 0, replace by ' '
|
// filter #10 and 0, replace by ' '
|
||||||
{id3v2}
|
{id3v2}
|
||||||
@ -177,39 +203,40 @@ Begin
|
|||||||
If pos('ID3',bufstr)<> 0 Then
|
If pos('ID3',bufstr)<> 0 Then
|
||||||
Begin
|
Begin
|
||||||
i := pos('TPE1',bufstr);
|
i := pos('TPE1',bufstr);
|
||||||
If i<> 0 Then artistv2 := copy(bufstr,i+11,buf[i+7]-1);
|
If i<> 0 Then artistv2 := GetID3TagStr;
|
||||||
i := pos('TP1',bufstr);
|
i := pos('TP1',bufstr);
|
||||||
If i<> 0 Then artistv2 := copy(bufstr,i+7,buf[i+5]-1);
|
If i<> 0 Then artistv2 := copy(bufstr,i+7,buf[i+5]-1);
|
||||||
|
|
||||||
i := pos('TIT2',bufstr);
|
i := pos('TIT2',bufstr);
|
||||||
If i<> 0 Then titlev2 := copy(bufstr,i+11,buf[i+7]-1);
|
If i<> 0 Then titlev2 := GetID3TagStr;
|
||||||
|
|
||||||
i := pos('TT2',bufstr);
|
i := pos('TT2',bufstr);
|
||||||
If i<> 0 Then titlev2 := copy(bufstr,i+7,buf[i+5]-1);
|
If i<> 0 Then titlev2 := copy(bufstr,i+7,buf[i+5]-1);
|
||||||
|
|
||||||
i := pos('TRCK',bufstr);
|
i := pos('TRCK',bufstr);
|
||||||
If i<> 0 Then trackv2 := copy(bufstr,i+11,buf[i+7]-1);
|
If i<> 0 Then
|
||||||
|
trackv2 := GetID3TagStr;
|
||||||
i := pos('TRK',bufstr);
|
i := pos('TRK',bufstr);
|
||||||
If i<> 0 Then trackv2 := copy(bufstr,i+7,buf[i+5]-1);
|
If i<> 0 Then begin
|
||||||
|
trackv2 := copy(bufstr,i+7,buf[i+5]-1);
|
||||||
If length(trackv2)>3 Then trackv2 := '';
|
If length(trackv2)>3 Then
|
||||||
|
trackv2 := '';
|
||||||
|
end;
|
||||||
|
|
||||||
i := pos('TAL',bufstr);
|
i := pos('TAL',bufstr);
|
||||||
If i<> 0 Then albumv2 := copy(bufstr,i+7,buf[i+5]-1);
|
If i<> 0 Then albumv2 := copy(bufstr,i+7,buf[i+5]-1);
|
||||||
i := pos('TALB',bufstr);
|
i := pos('TALB',bufstr);
|
||||||
If i<> 0 Then albumv2 := copy(bufstr,i+11,buf[i+7]-1);
|
If i<> 0 Then albumv2 := GetID3TagStr;
|
||||||
|
|
||||||
i := pos('TYE',bufstr);
|
i := pos('TYE',bufstr);
|
||||||
If i<> 0 Then yearv2 := copy(bufstr,i+7,buf[i+5]-1);
|
If i<> 0 Then yearv2 := copy(bufstr,i+7,buf[i+5]-1);
|
||||||
|
|
||||||
i := pos('TYER',bufstr);
|
i := pos('TYER',bufstr);
|
||||||
If i<> 0 Then yearv2 := copy(bufstr,i+11,buf[i+7]-1);
|
If i<> 0 Then begin
|
||||||
artistv2 := (artistv2);
|
yearv2 := GetID3TagStr;
|
||||||
titlev2 := (titlev2);
|
If iso and (length(yearv2)>5) Then
|
||||||
albumv2 := (albumv2);
|
yearv2 := '';
|
||||||
yearv2 := (yearv2);
|
end;
|
||||||
trackv2 := (trackv2);
|
|
||||||
If length(yearv2)>5 Then yearv2 := '';
|
|
||||||
End;
|
End;
|
||||||
except WriteLn(Filename+' -> exception while reading id3v2 tag... skipped!!'); end;
|
except WriteLn(Filename+' -> exception while reading id3v2 tag... skipped!!'); end;
|
||||||
{id3v1}
|
{id3v1}
|
||||||
@ -230,42 +257,29 @@ Begin
|
|||||||
tagpos := pos('TAG',bufstr)+3;
|
tagpos := pos('TAG',bufstr)+3;
|
||||||
If tagpos<>3 Then
|
If tagpos<>3 Then
|
||||||
Begin
|
Begin
|
||||||
ftitle := (copy(bufstr,tagpos,30));
|
ftitle := TrimRight(copy(bufstr,tagpos,30));
|
||||||
fartist := (copy(bufstr,tagpos+30,30));
|
fartist := TrimRight(copy(bufstr,tagpos+30,30));
|
||||||
falbum := (copy(bufstr,tagpos+60,30));
|
falbum := TrimRight(copy(bufstr,tagpos+60,30));
|
||||||
fyear := copy(bufstr,tagpos+90,4);
|
fyear := TrimRight(copy(bufstr,tagpos+90,4));
|
||||||
|
|
||||||
FGenreID := buf[tagpos+124];
|
FGenreID := buf[tagpos+124];
|
||||||
if FGenreID>high(ID3Genre) then FGenreID:=0;
|
if FGenreID>high(ID3Genre) then FGenreID:=0;
|
||||||
If buf[125]<>0 Then {check for id3v1.1}
|
If buf[125]<>0 Then {check for id3v1.1}
|
||||||
fcomment := (copy(bufstr,tagpos+94,30))
|
fcomment := TrimRight(copy(bufstr,tagpos+94,30))
|
||||||
Else
|
Else
|
||||||
Begin
|
Begin
|
||||||
fcomment := (copy(bufstr,tagpos+94,28));
|
fcomment := TrimRight(copy(bufstr,tagpos+94,28));
|
||||||
If (buf[tagpos+123])<>0 Then ftrack := IntToStr(buf[tagpos+123])
|
If (buf[tagpos+123])<>0 Then ftrack := IntToStr(buf[tagpos+123])
|
||||||
Else ftrack := '';
|
Else ftrack := '';
|
||||||
End;
|
End;
|
||||||
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;
|
||||||
If ((artistv2<>'')) And (CactusConfig.id3v2_prio Or (artist='')) Then Fartist := TrimRight(
|
If ((artistv2<>'')) And (CactusConfig.id3v2_prio Or (artist='')) Then Fartist := artistv2;
|
||||||
artistv2);
|
If ((titlev2<>'')) And (CactusConfig.id3v2_prio Or (title='')) Then Ftitle := titlev2;
|
||||||
If ((titlev2<>'')) And (CactusConfig.id3v2_prio Or (title='')) Then Ftitle := TrimRight(
|
If ((albumv2<>'')) And (CactusConfig.id3v2_prio Or (album='')) Then Falbum := albumv2;
|
||||||
titlev2);
|
If ((commentv2<>'')) And (CactusConfig.id3v2_prio Or (comment='')) Then Fcomment := commentv2;
|
||||||
If ((albumv2<>'')) And (CactusConfig.id3v2_prio Or (album='')) Then Falbum := TrimRight(
|
If ((yearv2<>'')) And (CactusConfig.id3v2_prio Or (year='')) Then Fyear := yearv2;
|
||||||
albumv2);
|
If ((trackv2<>'')) And (CactusConfig.id3v2_prio Or (track='')) Then ftrack := trackv2;
|
||||||
If ((commentv2<>'')) And (CactusConfig.id3v2_prio Or (comment='')) Then Fcomment := TrimRight
|
|
||||||
(
|
|
||||||
commentv2
|
|
||||||
);
|
|
||||||
If ((yearv2<>'')) And (CactusConfig.id3v2_prio Or (year='')) Then Fyear := TrimRight(yearv2);
|
|
||||||
If ((trackv2<>'')) And (CactusConfig.id3v2_prio Or (track='')) Then ftrack := TrimRight(
|
|
||||||
trackv2);
|
|
||||||
|
|
||||||
Fartist := TrimRight(Fartist);
|
|
||||||
Ftitle := TrimRight(Ftitle);
|
|
||||||
Falbum := TrimRight(FAlbum);
|
|
||||||
Fcomment := TrimRight(FComment);
|
|
||||||
Fyear := TrimRight(FYear);
|
|
||||||
fileclose(mp3filehandle);
|
fileclose(mp3filehandle);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -277,7 +291,7 @@ Var
|
|||||||
bufstr, tmptag, tmps: string;
|
bufstr, tmptag, tmps: string;
|
||||||
i, z: integer;
|
i, z: integer;
|
||||||
id3v1str: string[31];
|
id3v1str: string[31];
|
||||||
mp3filehandle: longint;
|
mp3filehandle: THandle;
|
||||||
Begin
|
Begin
|
||||||
{id3v2}
|
{id3v2}
|
||||||
mp3filehandle := fileopen(Filename,fmOpenRead);
|
mp3filehandle := fileopen(Filename,fmOpenRead);
|
||||||
@ -473,7 +487,7 @@ Begin
|
|||||||
If length(track)>0 Then
|
If length(track)>0 Then
|
||||||
Begin
|
Begin
|
||||||
buf[126] := 0;
|
buf[126] := 0;
|
||||||
buf[127] := StrToInt(track);
|
buf[127] := GetId3V1Track;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
mp3filehandle := fileopen(Filename,fmOpenWrite);
|
mp3filehandle := fileopen(Filename,fmOpenWrite);
|
||||||
|
Reference in New Issue
Block a user