Skip to content

Commit

Permalink
chore: use youtube_explode from github
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Jan 12, 2025
1 parent 5930c34 commit 696875e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
8 changes: 6 additions & 2 deletions lib/provider/audio_player/audio_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ class AudioPlayerNotifier extends Notifier<AudioPlayerState> {

bool _compareTracks(Track a, Track b) {
if ((a is LocalTrack && b is! LocalTrack) ||
(a is! LocalTrack && b is LocalTrack)) return false;
(a is! LocalTrack && b is LocalTrack)) {
return false;
}

return a is LocalTrack && b is LocalTrack
? (a).path == (b).path
Expand Down Expand Up @@ -347,7 +349,9 @@ class AudioPlayerNotifier extends Notifier<AudioPlayerState> {
newIndex < 0 ||
oldIndex < 0 ||
newIndex > state.tracks.length - 1 ||
oldIndex > state.tracks.length - 1) return;
oldIndex > state.tracks.length - 1) {
return;
}

await audioPlayer.moveTrack(oldIndex, newIndex);
}
Expand Down
15 changes: 8 additions & 7 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -979,10 +979,10 @@ packages:
dependency: "direct main"
description:
name: flutter_undraw
sha256: "17fe2738231c502171f984c003f6e40979de1a2550ef2debdd29fec27ae006ea"
sha256: a38083350fac9e0d44ddde0e53a39f00730498ed4a110f967a38c6fb1a161755
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.2.1"
flutter_web_plugins:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -2696,11 +2696,12 @@ packages:
youtube_explode_dart:
dependency: "direct main"
description:
name: youtube_explode_dart
sha256: "51ca5b2c03bf56060143d4f87df90ec3227592d7ae8a8003532533ae019d4291"
url: "https://pub.dev"
source: hosted
version: "2.3.6"
path: "."
ref: e519db65ad0b0a40b12f69285932f9db509da3cf
resolved-ref: e519db65ad0b0a40b12f69285932f9db509da3cf
url: "https://github.com/Hexer10/youtube_explode_dart.git"
source: git
version: "2.3.7"
sdks:
dart: ">=3.6.0 <4.0.0"
flutter: ">=3.27.0"
7 changes: 5 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ dependencies:
flutter_riverpod: ^2.5.1
flutter_secure_storage: ^9.0.0
flutter_sharing_intent: ^1.1.0
flutter_undraw: ^0.2.0
flutter_undraw: ^0.2.1
form_builder_validators: ^11.1.1
form_validator: ^2.1.1
freezed_annotation: ^2.4.1
Expand Down Expand Up @@ -134,7 +134,10 @@ dependencies:
wikipedia_api: ^0.1.0
win32_registry: ^1.1.5
window_manager: ^0.4.3
youtube_explode_dart: ^2.3.5
youtube_explode_dart:
git:
url: https://github.com/Hexer10/youtube_explode_dart.git
ref: e519db65ad0b0a40b12f69285932f9db509da3cf

dev_dependencies:
build_runner: ^2.4.13
Expand Down

0 comments on commit 696875e

Please sign in to comment.