Skip to content

Commit

Permalink
sort by play count
Browse files Browse the repository at this point in the history
  • Loading branch information
Decimate1405 committed Mar 4, 2025
1 parent d001f3e commit f6e9325
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ C/C++ Structured Logc
a
_/home/decimat3/development/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txtC
A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  �����2� �����2q
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  �����2� �����2q
o
m/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/arm64-v8a/android_gradle_build.json  �����2� �����2c
m/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/arm64-v8a/android_gradle_build.json  �����2� �����2c
a
_/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/arm64-v8a/build.ninja  �����2�� �����2g
_/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/arm64-v8a/build.ninja  �����2�� �����2g
e
c/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/arm64-v8a/build.ninja.txt  �����2m
c/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/arm64-v8a/build.ninja.txt  �����2m
k
i/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/arm64-v8a/compile_commands.json  �����2w
i/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/arm64-v8a/compile_commands.json  �����2w
u
s/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/arm64-v8a/metadata_generation_command.txt  �����2� �����2j
s/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/arm64-v8a/metadata_generation_command.txt  �����2� �����2j
h
f/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/arm64-v8a/prefab_config.json  �����2( �����2
f/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/arm64-v8a/prefab_config.json  �����2( �����2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ C/C++ Structured Logc
a
_/home/decimat3/development/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txtC
A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  �����2� �����2s
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  �����2� �����2s
q
o/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/armeabi-v7a/android_gradle_build.json  �����2� 엝��2e
o/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/armeabi-v7a/android_gradle_build.json  �����2� 엝��2e
c
a/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/armeabi-v7a/build.ninja  �����2�� �����2i
a/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/armeabi-v7a/build.ninja  �����2�� �����2i
g
e/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/armeabi-v7a/build.ninja.txt  �����2o
e/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/armeabi-v7a/build.ninja.txt  �����2o
m
k/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/armeabi-v7a/compile_commands.json  �����2y
k/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/armeabi-v7a/compile_commands.json  �����2y
w
u/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/armeabi-v7a/metadata_generation_command.txt  �����2� 헝��2l
u/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/armeabi-v7a/metadata_generation_command.txt  �����2� 헝��2l
j
h/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/armeabi-v7a/prefab_config.json  �����2( 헝��2
h/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/armeabi-v7a/prefab_config.json  �����2( 헝��2
Expand Down
14 changes: 7 additions & 7 deletions android/app/.cxx/Debug/4dg66221/x86/configure_fingerprint.bin
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ C/C++ Structured Logc
a
_/home/decimat3/development/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txtC
A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  �����2� �����2k
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  �����2� �����2k
i
g/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86/android_gradle_build.json  �����2� �����2]
g/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86/android_gradle_build.json  �����2� �����2]
[
Y/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86/build.ninja  �����2�� �����2a
Y/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86/build.ninja  �����2�� �����2a
_
]/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86/build.ninja.txt  �����2g
]/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86/build.ninja.txt  �����2g
e
c/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86/compile_commands.json  �����2q
c/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86/compile_commands.json  �����2q
o
m/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86/metadata_generation_command.txt  �����2� �����2d
m/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86/metadata_generation_command.txt  �����2� �����2d
b
`/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86/prefab_config.json  �����2( �����2
`/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86/prefab_config.json  �����2( �����2
Expand Down
14 changes: 7 additions & 7 deletions android/app/.cxx/Debug/4dg66221/x86_64/configure_fingerprint.bin
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ C/C++ Structured Logc
a
_/home/decimat3/development/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txtC
A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  �����2� �����2n
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  �����2� �����2n
l
j/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86_64/android_gradle_build.json  �����2� �����2`
j/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86_64/android_gradle_build.json  �����2� �����2`
^
\/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86_64/build.ninja  �����2�� �����2d
\/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86_64/build.ninja  �����2�� �����2d
b
`/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86_64/build.ninja.txt  �����2j
`/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86_64/build.ninja.txt  �����2j
h
f/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86_64/compile_commands.json  �����2t
f/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86_64/compile_commands.json  �����2t
r
p/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86_64/metadata_generation_command.txt  �����2� �����2g
p/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86_64/metadata_generation_command.txt  �����2� �����2g
e
c/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86_64/prefab_config.json  �����2( �����2
c/home/decimat3/development/gitrepo/finamp/android/app/.cxx/Debug/4dg66221/x86_64/prefab_config.json  �����2( �����2
Expand Down
6 changes: 6 additions & 0 deletions lib/components/MusicScreen/music_screen_tab_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,12 @@ List<BaseItemDto> sortItems(
} else {
return a.premiereDate!.compareTo(b.premiereDate!);
}
case SortBy.playCount:
if (a.userData?.playCount == null || b.userData?.playCount == null) {
return 0;
} else {
return a.userData!.playCount.compareTo(b.userData!.playCount);
}
// SortBy.random is handled outside this switch as per-comparison logic does not produce a good shuffle
default:
throw UnimplementedError("Unimplemented offline sort mode $sortBy");
Expand Down
1 change: 1 addition & 0 deletions lib/models/jellyfin_models.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3459,6 +3459,7 @@ enum SortBy {
SortBy.dateCreated,
SortBy.premiereDate,
SortBy.random,
SortBy.playCount,
];

/// Human-readable version of the [SortBy]. For example, toString() on
Expand Down
40 changes: 0 additions & 40 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -311,22 +311,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.0"
connectivity_plus:
dependency: "direct main"
description:
name: connectivity_plus
sha256: "04bf81bb0b77de31557b58d052b24b3eee33f09a6e7a8c68a3e247c7df19ec27"
url: "https://pub.dev"
source: hosted
version: "6.1.3"
connectivity_plus_platform_interface:
dependency: transitive
description:
name: connectivity_plus_platform_interface
sha256: "42657c1715d48b167930d5f34d00222ac100475f73d10162ddf43e714932f204"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
console:
dependency: transitive
description:
Expand Down Expand Up @@ -1004,30 +988,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.0"
network_info_plus:
dependency: "direct main"
description:
name: network_info_plus
sha256: "08f4166bbb77da9e407edef6322a33f87b18c0ca46483fb25606cb3d2bfcdd2a"
url: "https://pub.dev"
source: hosted
version: "6.1.3"
network_info_plus_platform_interface:
dependency: transitive
description:
name: network_info_plus_platform_interface
sha256: "7e7496a8a9d8136859b8881affc613c4a21304afeb6c324bcefc4bd0aff6b94b"
url: "https://pub.dev"
source: hosted
version: "2.0.2"
nm:
dependency: transitive
description:
name: nm
sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254"
url: "https://pub.dev"
source: hosted
version: "0.5.0"
octo_image:
dependency: "direct main"
description:
Expand Down
2 changes: 0 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ dependencies:
battery_plus: ^6.2.0
focus_on_it: ^2.0.1
flutter_svg: ^2.0.10+1
connectivity_plus: ^6.1.3
network_info_plus: ^6.1.3

dev_dependencies:
flutter_test:
Expand Down
3 changes: 0 additions & 3 deletions windows/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "generated_plugin_registrant.h"

#include <battery_plus/battery_plus_windows_plugin.h>
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
#include <isar_flutter_libs/isar_flutter_libs_plugin.h>
#include <media_kit_libs_windows_audio/media_kit_libs_windows_audio_plugin_c_api.h>
#include <permission_handler_windows/permission_handler_windows_plugin.h>
Expand All @@ -19,8 +18,6 @@
void RegisterPlugins(flutter::PluginRegistry* registry) {
BatteryPlusWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("BatteryPlusWindowsPlugin"));
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
IsarFlutterLibsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("IsarFlutterLibsPlugin"));
MediaKitLibsWindowsAudioPluginCApiRegisterWithRegistrar(
Expand Down
1 change: 0 additions & 1 deletion windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

list(APPEND FLUTTER_PLUGIN_LIST
battery_plus
connectivity_plus
isar_flutter_libs
media_kit_libs_windows_audio
permission_handler_windows
Expand Down

0 comments on commit f6e9325

Please sign in to comment.