测试apk改名

This commit is contained in:
rang 2025-12-06 09:57:55 +08:00
parent 0e4c835346
commit 58941e81dd
6 changed files with 28 additions and 28 deletions

View file

@ -104,7 +104,7 @@ jobs:
APP_NAME=$(grep '^name:' pubspec.yaml | sed 's/name: //') APP_NAME=$(grep '^name:' pubspec.yaml | sed 's/name: //')
APP_VERSION=$(grep '^version:' pubspec.yaml | sed 's/version: //') APP_VERSION=$(grep '^version:' pubspec.yaml | sed 's/version: //')
mv build/app/outputs/flutter-apk/{app-release,$APP_NAME-$APP_VERSION-app-universal}.aab mv build/app/outputs/bundle/release/{app-release,$APP_NAME-$APP_VERSION-app-universal}.aab
- name: Upload Android APK Artifact - name: Upload Android APK Artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4

View file

@ -73,6 +73,8 @@ class AbsAudioHandler extends BaseAudioHandler with QueueHandler, SeekHandler {
required String token, required String token,
Duration? initialPosition, Duration? initialPosition,
List<Uri>? downloadedUris, List<Uri>? downloadedUris,
required double volume,
required double speed,
}) async { }) async {
final appSettings = loadOrCreateAppSettings(); final appSettings = loadOrCreateAppSettings();
// if (book == null) { // if (book == null) {
@ -118,7 +120,7 @@ class AbsAudioHandler extends BaseAudioHandler with QueueHandler, SeekHandler {
'$baseUrl/api/items/${book.libraryItemId}/cover?token=$token', '$baseUrl/api/items/${book.libraryItemId}/cover?token=$token',
), ),
); );
addQueueItem(item); mediaItem.add(item);
await _player await _player
.setAudioSources( .setAudioSources(
audioSources, audioSources,
@ -130,8 +132,12 @@ class AbsAudioHandler extends BaseAudioHandler with QueueHandler, SeekHandler {
_logger.shout('Error in setting audio source: $error'); _logger.shout('Error in setting audio source: $error');
return null; return null;
}); });
await player.seek(initialPositionInTrack, index: initialIndex);
// _player.seek(initialPositionInTrack, index: initialIndex); // _player.seek(initialPositionInTrack, index: initialIndex);
setVolume(volume);
setSpeed(speed);
await play(); await play();
// //
// if (initialPosition != null) { // if (initialPosition != null) {
// await seekInBook(initialPosition); // await seekInBook(initialPosition);

View file

@ -6,7 +6,7 @@ part of 'audiobook_player.dart';
// RiverpodGenerator // RiverpodGenerator
// ************************************************************************** // **************************************************************************
String _$audioHandlerInitHash() => r'13b9d56c8dfde3a40736432ea069c899ef35ae75'; String _$audioHandlerInitHash() => r'f4907b614d5698c1c8fe8e999edd5fde46bc29f2';
/// See also [audioHandlerInit]. /// See also [audioHandlerInit].
@ProviderFor(audioHandlerInit) @ProviderFor(audioHandlerInit)

View file

@ -43,29 +43,21 @@ class CurrentBook extends _$CurrentBook {
var configurePlayerForEveryBook = var configurePlayerForEveryBook =
appPlayerSettings.configurePlayerForEveryBook; appPlayerSettings.configurePlayerForEveryBook;
await Future.wait([ audioService.setSourceAudiobook(
audioService.setSourceAudiobook( state!,
state!, baseUrl: api.baseUrl,
baseUrl: api.baseUrl, token: api.token!,
token: api.token!, initialPosition: currentTime,
initialPosition: currentTime, downloadedUris: downloadedUris,
downloadedUris: downloadedUris, volume: configurePlayerForEveryBook
), ? bookPlayerSettings.preferredDefaultVolume ??
// set the volume appPlayerSettings.preferredDefaultVolume
audioService.setVolume( : appPlayerSettings.preferredDefaultVolume,
configurePlayerForEveryBook speed: configurePlayerForEveryBook
? bookPlayerSettings.preferredDefaultVolume ?? ? bookPlayerSettings.preferredDefaultSpeed ??
appPlayerSettings.preferredDefaultVolume appPlayerSettings.preferredDefaultSpeed
: appPlayerSettings.preferredDefaultVolume, : appPlayerSettings.preferredDefaultSpeed,
), );
// set the speed
audioService.setSpeed(
configurePlayerForEveryBook
? bookPlayerSettings.preferredDefaultSpeed ??
appPlayerSettings.preferredDefaultSpeed
: appPlayerSettings.preferredDefaultSpeed,
),
]);
} }
} }

View file

@ -24,7 +24,7 @@ final currentChaptersProvider =
@Deprecated('Will be removed in 3.0. Use Ref instead') @Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element // ignore: unused_element
typedef CurrentChaptersRef = AutoDisposeProviderRef<List<core.BookChapter>>; typedef CurrentChaptersRef = AutoDisposeProviderRef<List<core.BookChapter>>;
String _$currentBookHash() => r'8dd534821b2b02a0259c6e6bde58012b880225c5'; String _$currentBookHash() => r'5143d08375c2c58918e82f8d368998bb38d7b790';
/// See also [CurrentBook]. /// See also [CurrentBook].
@ProviderFor(CurrentBook) @ProviderFor(CurrentBook)

View file

@ -296,7 +296,9 @@ class _BookOnShelfPlayButton extends HookConsumerWidget {
await ref.watch(libraryItemProvider(libraryItemId).future); await ref.watch(libraryItemProvider(libraryItemId).future);
ref.read(currentBookProvider.notifier).update( ref.read(currentBookProvider.notifier).update(
book.media.asBookExpanded, userProgress?.currentTime); book.media.asBookExpanded,
userProgress?.currentTime,
);
}, },
icon: Hero( icon: Hero(
tag: HeroTagPrefixes.libraryItemPlayButton + libraryItemId, tag: HeroTagPrefixes.libraryItemPlayButton + libraryItemId,