Skip to content

Commit acf71fe

Browse files
Merge pull request #212 from GhostenEditor/releases/v2.2.0
closes #178, closes #209 closes #177
2 parents 7944f96 + dc0780e commit acf71fe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+3147
-2025
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
- uses: subosito/flutter-action@v1
2020
with:
21-
flutter-version: '3.32.1'
21+
flutter-version: '3.32.8'
2222

2323
- run: flutter pub get
2424

@@ -50,11 +50,19 @@ jobs:
5050
run-id: ${{ secrets.API_RUN_ID }}
5151
repository: ${{ secrets.API_REPOSITORY }}
5252

53+
- name: Download Libraries
54+
uses: actions/download-artifact@v4
55+
with:
56+
github-token: ${{ secrets.TOKEN }}
57+
run-id: ${{ secrets.MPV_RUN_ID }}
58+
repository: ${{ secrets.MPV_REPOSITORY }}
59+
5360
- name: Move Libraries
5461
run: |
5562
mkdir android/app/libs
5663
mv media3-extension/* android/app/libs
5764
mv api/* android/app/libs
65+
mv mpv/* android/app/libs
5866
5967
- name: Extract version from pubspec.yaml
6068
run: |
@@ -78,7 +86,6 @@ jobs:
7886
--build-number=${{ env.BUILD_NUMBER }} \
7987
--dart-define=BUILD_DATE=$(date "+%F") \
8088
--dart-define=BUILD_VERSION=${{ env.VERSION }} \
81-
--dart-define=DEFAULT_IPTV_URL=${{ vars.DEFAULT_IPTV_URL }} \
8289
--flavor=mobile
8390
8491
- name: Build TV apk
@@ -91,7 +98,6 @@ jobs:
9198
--build-number=${{ env.BUILD_NUMBER }} \
9299
--dart-define=BUILD_DATE=$(date "+%F") \
93100
--dart-define=BUILD_VERSION=${{ env.VERSION }} \
94-
--dart-define=DEFAULT_IPTV_URL=${{ vars.DEFAULT_IPTV_URL }} \
95101
--flavor=tv
96102
97103
- name: Rename Android APK

android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
1111
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
1212
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
13+
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" android:minSdkVersion="30"/>
1314
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" android:minSdkVersion="33"/>
1415
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" android:minSdkVersion="33"/>
1516

android/build.gradle

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ allprojects {
88
// FIX flutter plugin install_plugin for Flutter 3.24
99
subprojects {
1010
afterEvaluate { project ->
11-
if (project.group == "com.example.installplugin" || project.group == "io.flutter.plugins.webview_cookie_manager") {
11+
if (project.group == "com.example.installplugin") {
1212
project.android {
1313
compileSdkVersion = 35
1414
namespace = project.group
1515
compileOptions {
16-
sourceCompatibility = JavaVersion.VERSION_17
17-
targetCompatibility = JavaVersion.VERSION_17
16+
sourceCompatibility = JavaVersion.VERSION_11
17+
targetCompatibility = JavaVersion.VERSION_11
18+
}
19+
kotlinOptions {
20+
jvmTarget = JavaVersion.VERSION_11
1821
}
1922
}
2023
}

lib/components/player_i18n_adaptor.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class PlayerI18nAdaptor extends StatelessWidget {
2121
tagUnknown: AppLocalizations.of(context)!.tagUnknown,
2222
willSkipEnding: AppLocalizations.of(context)!.willSkipEnding,
2323
playerEnableDecoderFallback: AppLocalizations.of(context)!.playerEnableDecoderFallback,
24+
playerShowLiteProgressbar: AppLocalizations.of(context)!.playerShowLiteProgressbar,
2425
extensionRendererMode: AppLocalizations.of(context)!.audioDecoder,
2526
extensionRendererModeLabel: AppLocalizations.of(context)!.audioDecoderLabel,
2627
playerShowThumbnails: AppLocalizations.of(context)!.playerShowThumbnails,

lib/l10n/app_en.arb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,10 @@
165165
"playerFastForwardSpeed": "Speed",
166166
"playerOpenFileWithParallelThreads": "Open File With Parallel Threads",
167167
"playerParallelsCount": "Parallels Count",
168+
"playerShowLiteProgressbar": "Show Playback Progress",
168169
"playerShowThumbnails": "Show Thumbnails",
169170
"playerSliceSize": "Slice Size",
171+
"playerType": "{playerType, select, media3{Media 3} mpv{MPV} other{Unknown}}",
170172
"playerUseHardwareCodec": "Use Hardware Codec",
171173
"playerVideoClarity": "Video Clarity",
172174
"queryType": "{queryType, select, genre{Genre} studio{Studio} keyword{Keyword} actor{Actor} other{Unknown}}",
@@ -216,6 +218,7 @@
216218
"settingsItemNfoEnabled": "NFO Enabled",
217219
"settingsItemOthers": "Others Settings",
218220
"settingsItemPlayerHistory": "Player History",
221+
"settingsItemPlayerKernel": "Player Kernel",
219222
"settingsItemPlayerSettings": "Player Settings",
220223
"settingsItemProxySettings": "Proxy Settings",
221224
"settingsItemScraperBehavior": "Scraper Behavior",

lib/l10n/app_localizations.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,6 +1088,12 @@ abstract class AppLocalizations {
10881088
/// **'Parallels Count'**
10891089
String get playerParallelsCount;
10901090

1091+
/// No description provided for @playerShowLiteProgressbar.
1092+
///
1093+
/// In en, this message translates to:
1094+
/// **'Show Playback Progress'**
1095+
String get playerShowLiteProgressbar;
1096+
10911097
/// No description provided for @playerShowThumbnails.
10921098
///
10931099
/// In en, this message translates to:
@@ -1100,6 +1106,12 @@ abstract class AppLocalizations {
11001106
/// **'Slice Size'**
11011107
String get playerSliceSize;
11021108

1109+
/// No description provided for @playerType.
1110+
///
1111+
/// In en, this message translates to:
1112+
/// **'{playerType, select, media3{Media 3} mpv{MPV} other{Unknown}}'**
1113+
String playerType(String playerType);
1114+
11031115
/// No description provided for @playerUseHardwareCodec.
11041116
///
11051117
/// In en, this message translates to:
@@ -1394,6 +1406,12 @@ abstract class AppLocalizations {
13941406
/// **'Player History'**
13951407
String get settingsItemPlayerHistory;
13961408

1409+
/// No description provided for @settingsItemPlayerKernel.
1410+
///
1411+
/// In en, this message translates to:
1412+
/// **'Player Kernel'**
1413+
String get settingsItemPlayerKernel;
1414+
13971415
/// No description provided for @settingsItemPlayerSettings.
13981416
///
13991417
/// In en, this message translates to:

lib/l10n/app_localizations_en.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,12 +631,21 @@ class AppLocalizationsEn extends AppLocalizations {
631631
@override
632632
String get playerParallelsCount => 'Parallels Count';
633633

634+
@override
635+
String get playerShowLiteProgressbar => 'Show Playback Progress';
636+
634637
@override
635638
String get playerShowThumbnails => 'Show Thumbnails';
636639

637640
@override
638641
String get playerSliceSize => 'Slice Size';
639642

643+
@override
644+
String playerType(String playerType) {
645+
String _temp0 = intl.Intl.selectLogic(playerType, {'media3': 'Media 3', 'mpv': 'MPV', 'other': 'Unknown'});
646+
return '$_temp0';
647+
}
648+
640649
@override
641650
String get playerUseHardwareCodec => 'Use Hardware Codec';
642651

@@ -838,6 +847,9 @@ class AppLocalizationsEn extends AppLocalizations {
838847
@override
839848
String get settingsItemPlayerHistory => 'Player History';
840849

850+
@override
851+
String get settingsItemPlayerKernel => 'Player Kernel';
852+
841853
@override
842854
String get settingsItemPlayerSettings => 'Player Settings';
843855

lib/l10n/app_localizations_zh.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,12 +619,21 @@ class AppLocalizationsZh extends AppLocalizations {
619619
@override
620620
String get playerParallelsCount => '线程数';
621621

622+
@override
623+
String get playerShowLiteProgressbar => '显示播放进度';
624+
622625
@override
623626
String get playerShowThumbnails => '显示缩略图';
624627

625628
@override
626629
String get playerSliceSize => '分片大小';
627630

631+
@override
632+
String playerType(String playerType) {
633+
String _temp0 = intl.Intl.selectLogic(playerType, {'media3': 'Media 3', 'mpv': 'MPV', 'other': '未知'});
634+
return '$_temp0';
635+
}
636+
628637
@override
629638
String get playerUseHardwareCodec => '使用硬解码';
630639

@@ -825,6 +834,9 @@ class AppLocalizationsZh extends AppLocalizations {
825834
@override
826835
String get settingsItemPlayerHistory => '播放历史';
827836

837+
@override
838+
String get settingsItemPlayerKernel => '播放器内核';
839+
828840
@override
829841
String get settingsItemPlayerSettings => '播放设置';
830842

lib/l10n/app_zh.arb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,10 @@
166166
"playerFastForwardSpeed": "快进速度",
167167
"playerOpenFileWithParallelThreads": "使用多线程打开文件",
168168
"playerParallelsCount": "线程数",
169+
"playerShowLiteProgressbar": "显示播放进度",
169170
"playerShowThumbnails": "显示缩略图",
170171
"playerSliceSize": "分片大小",
172+
"playerType": "{playerType, select, media3{Media 3} mpv{MPV} other{未知}}",
171173
"playerUseHardwareCodec": "使用硬解码",
172174
"playerVideoClarity": "视频清晰度",
173175
"queryType": "{queryType, select, genre{类型} studio{播出平台} keyword{关键词} actor{演职人员} other{未知}}",
@@ -217,6 +219,7 @@
217219
"settingsItemNfoEnabled": "NFO 启用",
218220
"settingsItemOthers": "其他设置",
219221
"settingsItemPlayerHistory": "播放历史",
222+
"settingsItemPlayerKernel": "播放器内核",
220223
"settingsItemPlayerSettings": "播放设置",
221224
"settingsItemProxySettings": "代理设置",
222225
"settingsItemScraperBehavior": "刮削行为",

lib/pages/player/player_controls_full.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ class _PlayerControlsFullState<T> extends State<PlayerControlsFull<T>> with Play
7373
_isShowLockButton.value = show;
7474
});
7575
_controlsStream.add(ControlsStreamStatus.show);
76+
_controller.status.addListener(() {
77+
switch (_controller.status.value) {
78+
case PlayerStatus.playing:
79+
if (_isShowControls.value) _controlsStream.add(ControlsStreamStatus.show);
80+
case PlayerStatus.paused:
81+
case PlayerStatus.ended:
82+
case PlayerStatus.error:
83+
case PlayerStatus.idle:
84+
_controlsStream.add(ControlsStreamStatus.showInfinite);
85+
case PlayerStatus.buffering:
86+
}
87+
});
7688
setPreferredOrientations(true);
7789
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
7890
final autoForceLandscape = context.read<UserConfig>().autoForceLandscape;

0 commit comments

Comments
 (0)