Skip to content

Commit 8e7b1e8

Browse files
committed
Version 1.11
- Updated dependencies - Removed docs form (online documentation) - Removed unnecessary assets - Removed main ui visualisations - Performance improvements - Singlepanel UI - Better thread management - Settings page status no longer needed during runtime (all settings are stored in variabiles or read from the ini file when needed) - Better cloud song functionality - Download next track when using cloud song for seamless playback - Made update checking less frequent - Login is now a panel - New Ini Settings manager - Removed slow server artwork (very unnecesarry, I don't know why I even included it in the first place) - New about page - Made UI a bit slimmer - Fixed broken IniFiles (Delphi's fault) by replacing them with MemIniFiles - Migrated app data location - New API updater class - Faster loading (a bit) - Removed animated Gifs (they were slow & non-smooth) - New play button for Artists, Albums and Playlists! - StayOnTop for mini player is no longer considered expermental
1 parent fbc6314 commit 8e7b1e8

31 files changed

+30584
-212820
lines changed

BroadcastAPI.pas

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ TSession = record
253253

254254
// User
255255
function LoginUser: boolean;
256-
procedure LogOff;
256+
function LogOffUser: boolean;
257257

258258
function IsAuthenthicated: boolean;
259259

@@ -486,10 +486,12 @@ TSession = record
486486
OnUpdateType: TDataTypeUpdate;
487487

488488
// Artwork Store
489-
ArtworkStore: boolean = true;
489+
ArtworkStore: boolean=true;
490490
MediaStoreLocation: string;
491491

492492
// Server Login Output
493+
USER_STATUS_LOGGEDIN:boolean=false;
494+
493495
TOKEN: string;
494496
USER_ID: integer;
495497
APPLICATION_ID: string = '1078';
@@ -582,6 +584,7 @@ function LoginUser: boolean;
582584
SResult.AnaliseFrom(JSONValue);
583585

584586
Result := SResult.Success;
587+
USER_STATUS_LOGGEDIN:=SResult.Success;
585588

586589
// Success
587590
if SResult.Success then
@@ -597,19 +600,20 @@ function LoginUser: boolean;
597600
begin
598601
//raise Exception.Create(SResult.ServerMessage);
599602
end;
600-
601603
finally
602604
JSONValue.Free;
603605
end;
604606
end;
605607

606-
procedure LogOff;
608+
function LogOffUser: boolean;
607609
var
608610
Request: string;
609611
SResult: ResultType;
610612

611613
JSONValue: TJSONValue;
612614
begin
615+
USER_STATUS_LOGGEDIN := false;
616+
613617
// Prepare request string
614618
Request := Format(REQUEST_LOGOFF, [USER_ID, TOKEN]);
615619

@@ -618,7 +622,7 @@ procedure LogOff;
618622
try
619623
SResult.AnaliseFrom(JSONValue);
620624

621-
ReturnToLogin;
625+
Result := SResult.Success;
622626
finally
623627
JSONValue.Free;
624628
end;
@@ -1853,7 +1857,7 @@ function ResultType.Success: boolean;
18531857

18541858
procedure ResultType.TerminateSession;
18551859
begin
1856-
LogOff;
1860+
LogOffUser;
18571861
ReturnToLogin;
18581862

18591863
// Terminate Parent Function

Dependencies/.include-windows-runtime-dependencies

Whitespace-only changes.

Dependencies/Cod.ArrayHelpers.pas

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
{***********************************************************}
22
{ Codruts Variabile Helpers }
33
{ }
4-
{ version 1.0 }
5-
{ ALPHA }
4+
{ version 1.1 }
65
{ }
76
{ https://www.codrutsoft.com/ }
8-
{ Copyright 2024 Codrut Software }
7+
{ Copyright 2025 Codrut Software }
98
{ This unit is licensed for usage under a MIT license }
109
{ }
1110
{***********************************************************}
@@ -96,8 +95,11 @@ TArrayUtils<T> = class
9695
class procedure Delete(const Index: integer; var Values: TArray<T>);
9796
/// <summary> Delete element by type T from array. </summary>
9897
class procedure DeleteValue(const Value: T; var Values: TArray<T>);
98+
/// <summary> Delete the last element of the array and return It's value. </summary>
99+
class function Pop(var Values: TArray<T>): T;
100+
/// <summary> Delete the first element of the array and return It's value. </summary>
101+
class function Shift(var Values: TArray<T>): T;
99102
/// <summary> Set length to specifieed value. </summary>
100-
///
101103
class procedure SetLength(const Length: integer; var Values: TArray<T>);
102104
/// <summary> Get array length. </summary>
103105
class function Count(const Values: TArray<T>) : integer;
@@ -420,13 +422,19 @@ class procedure TArrayUtils<T>.Move(var Values: TArray<T>; const Source,
420422
Values[Destination] := OriginalItem;
421423
end;
422424

425+
class function TArrayUtils<T>.Pop(var Values: TArray<T>): T;
426+
begin
427+
Result := Values[High(Values)];
428+
System.SetLength(Values, High(Values));
429+
end;
430+
423431
class procedure TArrayUtils<T>.DoQuickSort(var Values: TArray<T>;
424432
const Callback: TArrayDualCallback; Left, Right: Integer);
425433
var
426434
Lower, Upper: Integer;
427435
Pivot, Temp: T;
428436
begin
429-
if Right - Left = 0 then
437+
if (Right - Left = 0) or (Right = -1) or (Left = -1) then
430438
Exit;
431439

432440
Lower := Left;
@@ -466,6 +474,12 @@ class procedure TArrayUtils<T>.SetLength(const Length: integer;
466474
System.SetLength(Values, Length);
467475
end;
468476

477+
class function TArrayUtils<T>.Shift(var Values: TArray<T>): T;
478+
begin
479+
Result := Values[0];
480+
Self.Delete(0, Values);
481+
end;
482+
469483
class procedure TArrayUtils<T>.Shuffle(var Values: TArray<T>);
470484
begin
471485
if Length(Values) > 1 then

Dependencies/Cod.ColorUtils.pas

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
{***********************************************************}
2-
{ Codruts Color Utilities }
2+
{ Codruts System Utilities }
33
{ }
4-
{ version 0.2 }
5-
{ ALPHA }
4+
{ version 1.0 }
65
{ }
76
{ }
8-
{ }
9-
{ }
10-
{ }
11-
{ -- WORK IN PROGRESS -- }
7+
{ Developed by Petculescu Codrut }
8+
{ Copyright (c) 2025 Codrut Software. }
129
{***********************************************************}
1310

1411
unit Cod.ColorUtils;

0 commit comments

Comments
 (0)