Skip to content

Commit

Permalink
chore: only remove native event loop for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Jun 2, 2023
1 parent 1abcad1 commit f7ca3a6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 45 deletions.
1 change: 1 addition & 0 deletions .github/workflows/spotube-release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ jobs:
- name: Generate Secrets
run: |
flutter pub get
flutter pub remove media_kit_native_event_loop
dart run build_runner build --delete-conflicting-outputs --enable-experiment=records,patterns
- name: Build Macos App
Expand Down
24 changes: 0 additions & 24 deletions lib/services/audio_player/loop_mode.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import 'package:audio_service/audio_service.dart';
import 'package:media_kit/media_kit.dart';
// import 'package:just_audio/just_audio.dart';
import 'package:mpris_service/mpris_service.dart';

/// An unified loop mode for both [LoopMode] and [PlaylistMode]
enum PlaybackLoopMode {
Expand Down Expand Up @@ -53,28 +51,6 @@ enum PlaybackLoopMode {
}
}

static PlaybackLoopMode fromMPRISLoopStatus(MPRISLoopStatus status) {
switch (status) {
case MPRISLoopStatus.none:
return PlaybackLoopMode.none;
case MPRISLoopStatus.track:
return PlaybackLoopMode.one;
case MPRISLoopStatus.playlist:
return PlaybackLoopMode.all;
}
}

MPRISLoopStatus toMPRISLoopStatus() {
switch (this) {
case PlaybackLoopMode.all:
return MPRISLoopStatus.playlist;
case PlaybackLoopMode.one:
return MPRISLoopStatus.track;
case PlaybackLoopMode.none:
return MPRISLoopStatus.none;
}
}

static PlaybackLoopMode fromAudioServiceRepeatMode(
AudioServiceRepeatMode mode) {
switch (mode) {
Expand Down
1 change: 1 addition & 0 deletions linux/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
media_kit_native_event_loop
metadata_god
)

Expand Down
27 changes: 9 additions & 18 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.3"
base_x:
dependency: transitive
description:
name: base_x
sha256: "3f1043679659f1759c651f900da6f24f0a8062c28daa6f9625e8d580002e187b"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -419,7 +411,7 @@ packages:
source: hosted
version: "1.1.0"
dbus:
dependency: transitive
dependency: "direct main"
description:
name: dbus
sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263"
Expand Down Expand Up @@ -1102,6 +1094,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.3"
media_kit_native_event_loop:
dependency: "direct main"
description:
name: media_kit_native_event_loop
sha256: "521125e534603c3f603b93283db3938f557f33ecc383fbd62edd4beb3bf73747"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
meta:
dependency: transitive
description:
Expand All @@ -1126,15 +1126,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.4"
mpris_service:
dependency: "direct main"
description:
path: "."
ref: HEAD
resolved-ref: "3a4a72140087d3df130271c9213e61fa413d5740"
url: "https://github.com/alexmercerind/mpris_service"
source: git
version: "1.0.0"
mutex:
dependency: transitive
description:
Expand Down
5 changes: 2 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ dependencies:
media_kit_libs_windows_audio: ^1.0.3
metadata_god: ^0.4.1
mime: ^1.0.2
mpris_service:
git:
url: https://github.com/alexmercerind/mpris_service
package_info_plus: ^3.0.2
palette_generator: ^0.3.3
path: ^1.8.0
Expand Down Expand Up @@ -103,6 +100,8 @@ dependencies:
ref: eaade37d0938d31dbfa35bb5152caca4e284bda6
supabase_flutter: ^1.9.1
device_preview: ^1.1.0
media_kit_native_event_loop: ^1.0.4
dbus: ^0.7.8

dev_dependencies:
build_runner: ^2.3.2
Expand Down
1 change: 1 addition & 0 deletions windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
media_kit_native_event_loop
metadata_god
smtc_windows
)
Expand Down

0 comments on commit f7ca3a6

Please sign in to comment.