mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 15:02:42 +01:00
Compare commits
9 Commits
v2.0.0-alp
...
889be2ff2c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
889be2ff2c | ||
|
|
52b51954aa | ||
|
|
1c76293559 | ||
|
|
250d6793a2 | ||
|
|
121af2bca3 | ||
|
|
e410dcb2eb | ||
|
|
63ff9772e5 | ||
|
|
1ae29c5ade | ||
|
|
fedd6a71bb |
@@ -22,6 +22,8 @@
|
||||
"resourcesSortByTitle",
|
||||
"resourcesSortByUpdated",
|
||||
"settingsAboutActionsSupport",
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog",
|
||||
"settingsNetworkOptionsOfflineMode",
|
||||
"settingsNetworkOptionsOfflineModeOff",
|
||||
"settingsNetworkOptionsOfflineModeOn",
|
||||
@@ -53,6 +55,8 @@
|
||||
"resourcesSortByTitle",
|
||||
"resourcesSortByUpdated",
|
||||
"settingsAboutActionsSupport",
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog",
|
||||
"settingsNetworkOptionsOfflineMode",
|
||||
"settingsNetworkOptionsOfflineModeOff",
|
||||
"settingsNetworkOptionsOfflineModeOn",
|
||||
@@ -62,32 +66,12 @@
|
||||
],
|
||||
|
||||
"cs": [
|
||||
"actionsCancel",
|
||||
"actionsDelete",
|
||||
"actionsDownload",
|
||||
"actionsDownloadCancel",
|
||||
"actionsDownloadDelete",
|
||||
"actionsOk",
|
||||
"controlsShuffle",
|
||||
"resourcesAlbumCount",
|
||||
"resourcesArtistCount",
|
||||
"resourcesFilterAlbum",
|
||||
"resourcesFilterArtist",
|
||||
"resourcesFilterOwner",
|
||||
"resourcesFilterYear",
|
||||
"resourcesPlaylistCount",
|
||||
"resourcesSongCount",
|
||||
"resourcesSongListDeleteAllContent",
|
||||
"resourcesSongListDeleteAllTitle",
|
||||
"resourcesSortByAlbum",
|
||||
"resourcesSortByAlbumCount",
|
||||
"resourcesSortByTitle",
|
||||
"resourcesSortByUpdated",
|
||||
"settingsAboutActionsLicenses",
|
||||
"settingsAboutActionsProjectHomepage",
|
||||
"settingsAboutActionsSupport",
|
||||
"settingsAboutName",
|
||||
"settingsAboutVersion",
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog",
|
||||
"settingsMusicName",
|
||||
"settingsMusicOptionsScrobbleDescriptionOff",
|
||||
"settingsMusicOptionsScrobbleDescriptionOn",
|
||||
@@ -96,12 +80,7 @@
|
||||
"settingsNetworkOptionsMinBufferTitle",
|
||||
"settingsNetworkOptionsOfflineMode",
|
||||
"settingsNetworkOptionsOfflineModeOff",
|
||||
"settingsNetworkOptionsOfflineModeOn",
|
||||
"settingsNetworkOptionsStreamFormat",
|
||||
"settingsNetworkOptionsStreamFormatServerDefault",
|
||||
"settingsResetActionsClearImageCache",
|
||||
"settingsResetName",
|
||||
"settingsServersFieldsName"
|
||||
"settingsNetworkOptionsOfflineModeOn"
|
||||
],
|
||||
|
||||
"da": [
|
||||
@@ -133,6 +112,8 @@
|
||||
"resourcesSortByTitle",
|
||||
"resourcesSortByUpdated",
|
||||
"settingsAboutActionsSupport",
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog",
|
||||
"settingsMusicOptionsScrobbleDescriptionOff",
|
||||
"settingsNetworkOptionsOfflineMode",
|
||||
"settingsNetworkOptionsOfflineModeOff",
|
||||
@@ -163,6 +144,8 @@
|
||||
"resourcesSortByTitle",
|
||||
"resourcesSortByUpdated",
|
||||
"settingsAboutActionsSupport",
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog",
|
||||
"settingsNetworkOptionsOfflineMode",
|
||||
"settingsNetworkOptionsOfflineModeOff",
|
||||
"settingsNetworkOptionsOfflineModeOn",
|
||||
@@ -187,6 +170,8 @@
|
||||
"resourcesSortByTitle",
|
||||
"resourcesSortByUpdated",
|
||||
"settingsAboutActionsSupport",
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog",
|
||||
"settingsNetworkOptionsOfflineMode",
|
||||
"settingsNetworkOptionsOfflineModeOff",
|
||||
"settingsNetworkOptionsOfflineModeOn",
|
||||
@@ -218,6 +203,8 @@
|
||||
"resourcesSortByTitle",
|
||||
"resourcesSortByUpdated",
|
||||
"settingsAboutActionsSupport",
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog",
|
||||
"settingsNetworkOptionsOfflineMode",
|
||||
"settingsNetworkOptionsOfflineModeOff",
|
||||
"settingsNetworkOptionsOfflineModeOn",
|
||||
@@ -226,6 +213,11 @@
|
||||
"settingsServersFieldsName"
|
||||
],
|
||||
|
||||
"gl": [
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog"
|
||||
],
|
||||
|
||||
"it": [
|
||||
"actionsCancel",
|
||||
"actionsDelete",
|
||||
@@ -249,6 +241,8 @@
|
||||
"resourcesSortByTitle",
|
||||
"resourcesSortByUpdated",
|
||||
"settingsAboutActionsSupport",
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog",
|
||||
"settingsNetworkOptionsOfflineMode",
|
||||
"settingsNetworkOptionsOfflineModeOff",
|
||||
"settingsNetworkOptionsOfflineModeOn",
|
||||
@@ -300,6 +294,8 @@
|
||||
"settingsAboutActionsLicenses",
|
||||
"settingsAboutActionsSupport",
|
||||
"settingsAboutName",
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog",
|
||||
"settingsAboutVersion",
|
||||
"settingsMusicOptionsScrobbleDescriptionOff",
|
||||
"settingsMusicOptionsScrobbleDescriptionOn",
|
||||
@@ -356,6 +352,8 @@
|
||||
"resourcesSortByTitle",
|
||||
"resourcesSortByUpdated",
|
||||
"settingsAboutActionsSupport",
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog",
|
||||
"settingsNetworkOptionsOfflineMode",
|
||||
"settingsNetworkOptionsOfflineModeOff",
|
||||
"settingsNetworkOptionsOfflineModeOn",
|
||||
@@ -387,6 +385,8 @@
|
||||
"resourcesSortByTitle",
|
||||
"resourcesSortByUpdated",
|
||||
"settingsAboutActionsSupport",
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog",
|
||||
"settingsNetworkOptionsOfflineMode",
|
||||
"settingsNetworkOptionsOfflineModeOff",
|
||||
"settingsNetworkOptionsOfflineModeOn",
|
||||
@@ -418,6 +418,8 @@
|
||||
"resourcesSortByTitle",
|
||||
"resourcesSortByUpdated",
|
||||
"settingsAboutActionsSupport",
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog",
|
||||
"settingsNetworkOptionsOfflineMode",
|
||||
"settingsNetworkOptionsOfflineModeOff",
|
||||
"settingsNetworkOptionsOfflineModeOn",
|
||||
@@ -427,32 +429,17 @@
|
||||
],
|
||||
|
||||
"pt": [
|
||||
"actionsCancel",
|
||||
"actionsDelete",
|
||||
"actionsDownload",
|
||||
"actionsDownloadCancel",
|
||||
"actionsDownloadDelete",
|
||||
"actionsOk",
|
||||
"controlsShuffle",
|
||||
"resourcesAlbumCount",
|
||||
"resourcesArtistCount",
|
||||
"resourcesFilterAlbum",
|
||||
"resourcesFilterArtist",
|
||||
"resourcesFilterOwner",
|
||||
"resourcesFilterYear",
|
||||
"resourcesPlaylistCount",
|
||||
"resourcesSongCount",
|
||||
"resourcesSongListDeleteAllContent",
|
||||
"resourcesSongListDeleteAllTitle",
|
||||
"resourcesSortByAlbum",
|
||||
"resourcesSortByAlbumCount",
|
||||
"resourcesSortByTitle",
|
||||
"resourcesSortByUpdated",
|
||||
"settingsAboutActionsSupport",
|
||||
"settingsNetworkOptionsOfflineMode",
|
||||
"settingsNetworkOptionsOfflineModeOff",
|
||||
"settingsNetworkOptionsOfflineModeOn",
|
||||
"settingsNetworkOptionsStreamFormat",
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog",
|
||||
"settingsNetworkOptionsStreamFormatServerDefault",
|
||||
"settingsServersFieldsName"
|
||||
],
|
||||
@@ -480,6 +467,8 @@
|
||||
"resourcesSortByTitle",
|
||||
"resourcesSortByUpdated",
|
||||
"settingsAboutActionsSupport",
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog",
|
||||
"settingsNetworkOptionsOfflineMode",
|
||||
"settingsNetworkOptionsOfflineModeOff",
|
||||
"settingsNetworkOptionsOfflineModeOn",
|
||||
@@ -511,6 +500,8 @@
|
||||
"resourcesSortByTitle",
|
||||
"resourcesSortByUpdated",
|
||||
"settingsAboutActionsSupport",
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog",
|
||||
"settingsNetworkOptionsOfflineMode",
|
||||
"settingsNetworkOptionsOfflineModeOff",
|
||||
"settingsNetworkOptionsOfflineModeOn",
|
||||
@@ -542,6 +533,8 @@
|
||||
"resourcesSortByTitle",
|
||||
"resourcesSortByUpdated",
|
||||
"settingsAboutActionsSupport",
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog",
|
||||
"settingsNetworkOptionsOfflineMode",
|
||||
"settingsNetworkOptionsOfflineModeOff",
|
||||
"settingsNetworkOptionsOfflineModeOn",
|
||||
@@ -556,6 +549,8 @@
|
||||
"resourcesArtistCount",
|
||||
"resourcesPlaylistCount",
|
||||
"resourcesSongCount",
|
||||
"settingsAboutShareLogs",
|
||||
"settingsAboutChooseLog",
|
||||
"settingsNetworkOptionsOfflineMode",
|
||||
"settingsNetworkOptionsOfflineModeOff",
|
||||
"settingsNetworkOptionsOfflineModeOn",
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../../log.dart';
|
||||
import '../../models/support.dart';
|
||||
import '../../services/settings_service.dart';
|
||||
import '../../state/init.dart';
|
||||
@@ -162,6 +167,54 @@ class _About extends HookConsumerWidget {
|
||||
mode: LaunchMode.externalApplication,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const _ShareLogsButton(),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _ShareLogsButton extends StatelessWidget {
|
||||
const _ShareLogsButton();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l = AppLocalizations.of(context);
|
||||
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
OutlinedButton.icon(
|
||||
icon: const Icon(Icons.share),
|
||||
label: Text(l.settingsAboutShareLogs),
|
||||
onPressed: () async {
|
||||
final files = await logFiles();
|
||||
if (files.isEmpty) return;
|
||||
|
||||
// ignore: use_build_context_synchronously
|
||||
final value = await showDialog<String>(
|
||||
context: context,
|
||||
builder: (context) => MultipleChoiceDialog<String>(
|
||||
title: l.settingsAboutChooseLog,
|
||||
current: files.first.path,
|
||||
options: files
|
||||
.map((e) => MultiChoiceOption.string(
|
||||
title: p.basename(e.path),
|
||||
option: e.path,
|
||||
))
|
||||
.toIList(),
|
||||
),
|
||||
);
|
||||
|
||||
if (value == null) return;
|
||||
Share.shareXFiles(
|
||||
[XFile(value, mimeType: 'text/plain')],
|
||||
subject: 'Logs from subtracks: ${String.fromCharCodes(
|
||||
List.generate(8, (_) => Random().nextInt(26) + 65),
|
||||
)}',
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
|
||||
import '../../database/database.dart';
|
||||
import '../../log.dart';
|
||||
import '../../models/settings.dart';
|
||||
import '../../services/settings_service.dart';
|
||||
import '../items.dart';
|
||||
@@ -44,7 +45,7 @@ class SourcePage extends HookConsumerWidget {
|
||||
autofillHints: const [AutofillHints.url],
|
||||
required: true,
|
||||
validator: (value, label) {
|
||||
if (Uri.tryParse(value!) == null) {
|
||||
if (!value!.contains(RegExp(r'https?:\/\/'))) {
|
||||
return '$label must be a valid URL';
|
||||
}
|
||||
return null;
|
||||
@@ -64,7 +65,7 @@ class SourcePage extends HookConsumerWidget {
|
||||
required: true,
|
||||
);
|
||||
|
||||
final forcePlaintextPassword = useState(!(source?.useTokenAuth ?? false));
|
||||
final forcePlaintextPassword = useState(!(source?.useTokenAuth ?? true));
|
||||
final forcePlaintextSwitch = SwitchListTile(
|
||||
value: forcePlaintextPassword.value,
|
||||
title: Text(l.settingsServersOptionsForcePlaintextPasswordTitle),
|
||||
@@ -161,8 +162,9 @@ class SourcePage extends HookConsumerWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
} catch (err) {
|
||||
} catch (e, st) {
|
||||
// TOOD: toast the error or whatever
|
||||
log.severe('Saving source', e, st);
|
||||
error = true;
|
||||
} finally {
|
||||
isSaving.value = false;
|
||||
|
||||
@@ -9,11 +9,13 @@ import 'package:path/path.dart' as p;
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
import '../log.dart';
|
||||
import '../models/music.dart';
|
||||
import '../models/query.dart';
|
||||
import '../models/settings.dart';
|
||||
import '../models/support.dart';
|
||||
import 'converters.dart';
|
||||
import 'error_logging_database.dart';
|
||||
|
||||
part 'database.g.dart';
|
||||
|
||||
@@ -435,7 +437,11 @@ LazyDatabase _openConnection() {
|
||||
final dbFolder = await getApplicationDocumentsDirectory();
|
||||
final file = File(p.join(dbFolder.path, 'subtracks.sqlite'));
|
||||
// return NativeDatabase.createInBackground(file, logStatements: true);
|
||||
return NativeDatabase.createInBackground(file);
|
||||
|
||||
return ErrorLoggingDatabase(
|
||||
NativeDatabase.createInBackground(file),
|
||||
(e, s) => log.severe('SQL error', e, s),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
94
lib/database/error_logging_database.dart
Normal file
94
lib/database/error_logging_database.dart
Normal file
@@ -0,0 +1,94 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:drift/isolate.dart';
|
||||
|
||||
/// https://github.com/simolus3/drift/issues/2326#issuecomment-1445138730
|
||||
class ErrorLoggingDatabase implements QueryExecutor {
|
||||
final QueryExecutor inner;
|
||||
final void Function(Object, StackTrace) onError;
|
||||
|
||||
ErrorLoggingDatabase(this.inner, this.onError);
|
||||
|
||||
Future<T> _handleErrors<T>(Future<T> Function() body) {
|
||||
return Future.sync(body)
|
||||
.onError<DriftWrappedException>((error, stackTrace) {
|
||||
onError(error, error.trace ?? stackTrace);
|
||||
throw error;
|
||||
}).onError<DriftRemoteException>((error, stackTrace) {
|
||||
onError(error, error.remoteStackTrace ?? stackTrace);
|
||||
throw error;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
TransactionExecutor beginTransaction() {
|
||||
return _ErrorLoggingTransactionExecutor(inner.beginTransaction(), onError);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> close() {
|
||||
return _handleErrors(inner.close);
|
||||
}
|
||||
|
||||
@override
|
||||
SqlDialect get dialect => inner.dialect;
|
||||
|
||||
@override
|
||||
Future<bool> ensureOpen(QueryExecutorUser user) {
|
||||
return _handleErrors(() => inner.ensureOpen(user));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> runBatched(BatchedStatements statements) {
|
||||
return _handleErrors(() => inner.runBatched(statements));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> runCustom(String statement, [List<Object?>? args]) {
|
||||
return _handleErrors(() => inner.runCustom(statement, args));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<int> runDelete(String statement, List<Object?> args) {
|
||||
return _handleErrors(() => inner.runDelete(statement, args));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<int> runInsert(String statement, List<Object?> args) {
|
||||
return _handleErrors(() => inner.runInsert(statement, args));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<Map<String, Object?>>> runSelect(
|
||||
String statement, List<Object?> args) {
|
||||
return _handleErrors(() => inner.runSelect(statement, args));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<int> runUpdate(String statement, List<Object?> args) {
|
||||
return _handleErrors(() => inner.runUpdate(statement, args));
|
||||
}
|
||||
}
|
||||
|
||||
class _ErrorLoggingTransactionExecutor extends ErrorLoggingDatabase
|
||||
implements TransactionExecutor {
|
||||
final TransactionExecutor transaction;
|
||||
|
||||
_ErrorLoggingTransactionExecutor(
|
||||
this.transaction, void Function(Object, StackTrace) onError)
|
||||
: super(transaction, onError);
|
||||
|
||||
@override
|
||||
Future<void> rollback() {
|
||||
return _handleErrors(transaction.rollback);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> send() {
|
||||
return _handleErrors(transaction.send);
|
||||
}
|
||||
|
||||
@override
|
||||
bool get supportsNestedTransactions => transaction.supportsNestedTransactions;
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:http/http.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
import '../log.dart';
|
||||
|
||||
part 'client.g.dart';
|
||||
|
||||
const Map<String, String> subtracksHeaders = {
|
||||
@@ -14,11 +15,26 @@ class SubtracksHttpClient extends BaseClient {
|
||||
@override
|
||||
Future<StreamedResponse> send(BaseRequest request) {
|
||||
request.headers.addAll(subtracksHeaders);
|
||||
if (kDebugMode) print('${request.method} ${request.url}');
|
||||
log.info('${request.method} ${_redactUri(request.url)}');
|
||||
return request.send();
|
||||
}
|
||||
}
|
||||
|
||||
String _redactUri(Uri uri) {
|
||||
var redacted = uri.toString();
|
||||
redacted = _redactParam(redacted, 'u');
|
||||
redacted = _redactParam(redacted, 'p');
|
||||
redacted = _redactParam(redacted, 's');
|
||||
redacted = _redactParam(redacted, 't');
|
||||
|
||||
return redacted.toString();
|
||||
}
|
||||
|
||||
RegExp _queryReplace(String key) => RegExp('$key=([^&|\\n|\\t\\s]+)');
|
||||
|
||||
String _redactParam(String url, String key) =>
|
||||
url.replaceFirst(_queryReplace(key), '$key=REDACTED');
|
||||
|
||||
@Riverpod(keepAlive: true)
|
||||
BaseClient httpClient(HttpClientRef ref) {
|
||||
return SubtracksHttpClient();
|
||||
|
||||
@@ -1,166 +1,226 @@
|
||||
{
|
||||
"actionsStar": "Ohodnotit",
|
||||
"@actionsStar": {},
|
||||
"actionsUnstar": "Zrušit hodnocení",
|
||||
"@actionsUnstar": {},
|
||||
"messagesNothingHere": "Zde nic není…",
|
||||
"@messagesNothingHere": {},
|
||||
"navigationTabsHome": "Domů",
|
||||
"@navigationTabsHome": {},
|
||||
"navigationTabsLibrary": "Knihovna",
|
||||
"@navigationTabsLibrary": {},
|
||||
"navigationTabsSearch": "Hledat",
|
||||
"@navigationTabsSearch": {},
|
||||
"navigationTabsSettings": "Nastavení",
|
||||
"@navigationTabsSettings": {},
|
||||
"resourcesAlbumActionsPlay": "Přehrát album",
|
||||
"@resourcesAlbumActionsPlay": {},
|
||||
"resourcesAlbumActionsView": "Zobrazit album",
|
||||
"@resourcesAlbumActionsView": {},
|
||||
"resourcesAlbumListsSort": "Seřadit alba",
|
||||
"@resourcesAlbumListsSort": {},
|
||||
"resourcesAlbumName": "{count,plural, =1{Album} few{Alba} many{Alba} other{Alba}}",
|
||||
"@resourcesAlbumName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesArtistActionsView": "Zobrazit umělce",
|
||||
"@resourcesArtistActionsView": {},
|
||||
"resourcesArtistListsSort": "Seřadit umělce",
|
||||
"@resourcesArtistListsSort": {},
|
||||
"resourcesArtistName": "{count,plural, =1{Umělec} few{Umělci} many{Umělci} other{Umělci}}",
|
||||
"@resourcesArtistName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesFilterGenre": "Podle žánru",
|
||||
"@resourcesFilterGenre": {},
|
||||
"resourcesFilterStarred": "Ohodnocené",
|
||||
"@resourcesFilterStarred": {},
|
||||
"resourcesPlaylistActionsPlay": "Přehrát seznam skladeb",
|
||||
"@resourcesPlaylistActionsPlay": {},
|
||||
"resourcesPlaylistName": "{count,plural, =1{Seznam skladeb} few{Seznamy skladeb} many{Seznamy skladeb} other{Seznamy skladeb}}",
|
||||
"@resourcesPlaylistName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesQueueName": "{count,plural, =1{Fronta} few{Fronty} many{Fronty} other{Fronty}}",
|
||||
"@resourcesQueueName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesSongListsArtistTopSongs": "Top skladby",
|
||||
"@resourcesSongListsArtistTopSongs": {},
|
||||
"resourcesSongName": "{count,plural, =1{Skladba} few{Skladby} many{Skladby} other{Skladby}}",
|
||||
"@resourcesSongName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesSortByAdded": "Nedávno přidané",
|
||||
"@resourcesSortByAdded": {},
|
||||
"resourcesSortByArtist": "Podle umělce",
|
||||
"@resourcesSortByArtist": {},
|
||||
"resourcesSortByFrequentlyPlayed": "Často přehrávané",
|
||||
"@resourcesSortByFrequentlyPlayed": {},
|
||||
"resourcesSortByName": "Podle názvu",
|
||||
"@resourcesSortByName": {},
|
||||
"resourcesSortByRandom": "Náhodně",
|
||||
"@resourcesSortByRandom": {},
|
||||
"resourcesSortByRecentlyPlayed": "Často přehrávané",
|
||||
"@resourcesSortByRecentlyPlayed": {},
|
||||
"resourcesSortByYear": "Podle roku",
|
||||
"@resourcesSortByYear": {},
|
||||
"searchHeaderTitle": "Hledat: {query}",
|
||||
"@searchHeaderTitle": {
|
||||
"placeholders": {
|
||||
"query": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"searchInputPlaceholder": "Hledat",
|
||||
"@searchInputPlaceholder": {},
|
||||
"searchMoreResults": "Více…",
|
||||
"@searchMoreResults": {},
|
||||
"searchNowPlayingContext": "Výsledky hledání",
|
||||
"@searchNowPlayingContext": {},
|
||||
"settingsNetworkName": "Síť",
|
||||
"@settingsNetworkName": {},
|
||||
"settingsNetworkOptionsMaxBitrateMobileTitle": "Maximální datový tok (mobil)",
|
||||
"@settingsNetworkOptionsMaxBitrateMobileTitle": {},
|
||||
"settingsNetworkOptionsMaxBitrateWifiTitle": "Maximální datový tok (Wi-Fi)",
|
||||
"@settingsNetworkOptionsMaxBitrateWifiTitle": {},
|
||||
"settingsNetworkValuesKbps": "{value}kbps",
|
||||
"@settingsNetworkValuesKbps": {
|
||||
"placeholders": {
|
||||
"value": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsNetworkValuesSeconds": "{value} sekund",
|
||||
"@settingsNetworkValuesSeconds": {
|
||||
"placeholders": {
|
||||
"value": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsNetworkValuesUnlimitedKbps": "Neomezeno",
|
||||
"@settingsNetworkValuesUnlimitedKbps": {},
|
||||
"settingsServersActionsAdd": "Přidat server",
|
||||
"@settingsServersActionsAdd": {},
|
||||
"settingsServersActionsDelete": "Odstranit",
|
||||
"@settingsServersActionsDelete": {},
|
||||
"settingsServersActionsEdit": "Upravit server",
|
||||
"@settingsServersActionsEdit": {},
|
||||
"settingsServersActionsSave": "Uložit",
|
||||
"@settingsServersActionsSave": {},
|
||||
"settingsServersActionsTestConnection": "Otestovat spojení",
|
||||
"@settingsServersActionsTestConnection": {},
|
||||
"settingsServersFieldsAddress": "Adresa",
|
||||
"@settingsServersFieldsAddress": {},
|
||||
"settingsServersFieldsPassword": "Heslo",
|
||||
"@settingsServersFieldsPassword": {},
|
||||
"settingsServersFieldsUsername": "Uživ. jméno",
|
||||
"@settingsServersFieldsUsername": {},
|
||||
"settingsServersMessagesConnectionFailed": "Připojení k {address} selhalo, zkontrolujte nastavení nebo server",
|
||||
"@settingsServersMessagesConnectionFailed": {
|
||||
"placeholders": {
|
||||
"address": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsServersMessagesConnectionOk": "Připojení k {address} je OK!",
|
||||
"@settingsServersMessagesConnectionOk": {
|
||||
"placeholders": {
|
||||
"address": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsServersName": "Servery",
|
||||
"@settingsServersName": {},
|
||||
"settingsServersOptionsForcePlaintextPasswordDescriptionOff": "Posílat heslo jako token + salt",
|
||||
"@settingsServersOptionsForcePlaintextPasswordDescriptionOff": {},
|
||||
"settingsServersOptionsForcePlaintextPasswordDescriptionOn": "Posílat heslo v prostém textu (zastaralé, ujistěte se, že je vaše připojení zabezpečené!)",
|
||||
"@settingsServersOptionsForcePlaintextPasswordDescriptionOn": {},
|
||||
"settingsServersOptionsForcePlaintextPasswordTitle": "Vynutit heslo ve formátu prostého textu",
|
||||
"@settingsServersOptionsForcePlaintextPasswordTitle": {}
|
||||
}
|
||||
"actionsStar": "Ohodnotit",
|
||||
"@actionsStar": {},
|
||||
"actionsUnstar": "Zrušit hodnocení",
|
||||
"@actionsUnstar": {},
|
||||
"messagesNothingHere": "Zde nic není…",
|
||||
"@messagesNothingHere": {},
|
||||
"navigationTabsHome": "Domů",
|
||||
"@navigationTabsHome": {},
|
||||
"navigationTabsLibrary": "Knihovna",
|
||||
"@navigationTabsLibrary": {},
|
||||
"navigationTabsSearch": "Hledat",
|
||||
"@navigationTabsSearch": {},
|
||||
"navigationTabsSettings": "Nastavení",
|
||||
"@navigationTabsSettings": {},
|
||||
"resourcesAlbumActionsPlay": "Přehrát album",
|
||||
"@resourcesAlbumActionsPlay": {},
|
||||
"resourcesAlbumActionsView": "Zobrazit album",
|
||||
"@resourcesAlbumActionsView": {},
|
||||
"resourcesAlbumListsSort": "Seřadit alba",
|
||||
"@resourcesAlbumListsSort": {},
|
||||
"resourcesAlbumName": "{count,plural, =1{Album} few{Alba} many{Alba} other{Alba}}",
|
||||
"@resourcesAlbumName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesArtistActionsView": "Zobrazit umělce",
|
||||
"@resourcesArtistActionsView": {},
|
||||
"resourcesArtistListsSort": "Seřadit umělce",
|
||||
"@resourcesArtistListsSort": {},
|
||||
"resourcesArtistName": "{count,plural, =1{Umělec} few{Umělci} many{Umělci} other{Umělci}}",
|
||||
"@resourcesArtistName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesFilterGenre": "Podle žánru",
|
||||
"@resourcesFilterGenre": {},
|
||||
"resourcesFilterStarred": "Ohodnocené",
|
||||
"@resourcesFilterStarred": {},
|
||||
"resourcesPlaylistActionsPlay": "Přehrát seznam skladeb",
|
||||
"@resourcesPlaylistActionsPlay": {},
|
||||
"resourcesPlaylistName": "{count,plural, =1{Seznam skladeb} few{Seznamy skladeb} many{Seznamy skladeb} other{Seznamy skladeb}}",
|
||||
"@resourcesPlaylistName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesQueueName": "{count,plural, =1{Fronta} few{Fronty} many{Fronty} other{Fronty}}",
|
||||
"@resourcesQueueName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesSongListsArtistTopSongs": "Top skladby",
|
||||
"@resourcesSongListsArtistTopSongs": {},
|
||||
"resourcesSongName": "{count,plural, =1{Skladba} few{Skladby} many{Skladby} other{Skladby}}",
|
||||
"@resourcesSongName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesSortByAdded": "Nedávno přidané",
|
||||
"@resourcesSortByAdded": {},
|
||||
"resourcesSortByArtist": "Umělce",
|
||||
"@resourcesSortByArtist": {},
|
||||
"resourcesSortByFrequentlyPlayed": "Často přehrávané",
|
||||
"@resourcesSortByFrequentlyPlayed": {},
|
||||
"resourcesSortByName": "Názvu",
|
||||
"@resourcesSortByName": {},
|
||||
"resourcesSortByRandom": "Náhodně",
|
||||
"@resourcesSortByRandom": {},
|
||||
"resourcesSortByRecentlyPlayed": "Často přehrávané",
|
||||
"@resourcesSortByRecentlyPlayed": {},
|
||||
"resourcesSortByYear": "Roku",
|
||||
"@resourcesSortByYear": {},
|
||||
"searchHeaderTitle": "Hledat: {query}",
|
||||
"@searchHeaderTitle": {
|
||||
"placeholders": {
|
||||
"query": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"searchInputPlaceholder": "Hledat",
|
||||
"@searchInputPlaceholder": {},
|
||||
"searchMoreResults": "Více…",
|
||||
"@searchMoreResults": {},
|
||||
"searchNowPlayingContext": "Výsledky hledání",
|
||||
"@searchNowPlayingContext": {},
|
||||
"settingsNetworkName": "Síť",
|
||||
"@settingsNetworkName": {},
|
||||
"settingsNetworkOptionsMaxBitrateMobileTitle": "Maximální datový tok (mobil)",
|
||||
"@settingsNetworkOptionsMaxBitrateMobileTitle": {},
|
||||
"settingsNetworkOptionsMaxBitrateWifiTitle": "Maximální datový tok (Wi-Fi)",
|
||||
"@settingsNetworkOptionsMaxBitrateWifiTitle": {},
|
||||
"settingsNetworkValuesKbps": "{value}kbps",
|
||||
"@settingsNetworkValuesKbps": {
|
||||
"placeholders": {
|
||||
"value": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsNetworkValuesSeconds": "{value} sekund",
|
||||
"@settingsNetworkValuesSeconds": {
|
||||
"placeholders": {
|
||||
"value": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsNetworkValuesUnlimitedKbps": "Neomezeno",
|
||||
"@settingsNetworkValuesUnlimitedKbps": {},
|
||||
"settingsServersActionsAdd": "Přidat server",
|
||||
"@settingsServersActionsAdd": {},
|
||||
"settingsServersActionsDelete": "Odstranit",
|
||||
"@settingsServersActionsDelete": {},
|
||||
"settingsServersActionsEdit": "Upravit server",
|
||||
"@settingsServersActionsEdit": {},
|
||||
"settingsServersActionsSave": "Uložit",
|
||||
"@settingsServersActionsSave": {},
|
||||
"settingsServersActionsTestConnection": "Otestovat spojení",
|
||||
"@settingsServersActionsTestConnection": {},
|
||||
"settingsServersFieldsAddress": "Adresa",
|
||||
"@settingsServersFieldsAddress": {},
|
||||
"settingsServersFieldsPassword": "Heslo",
|
||||
"@settingsServersFieldsPassword": {},
|
||||
"settingsServersFieldsUsername": "Uživ. jméno",
|
||||
"@settingsServersFieldsUsername": {},
|
||||
"settingsServersMessagesConnectionFailed": "Připojení k {address} selhalo, zkontrolujte nastavení nebo server",
|
||||
"@settingsServersMessagesConnectionFailed": {
|
||||
"placeholders": {
|
||||
"address": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsServersMessagesConnectionOk": "Připojení k {address} je OK!",
|
||||
"@settingsServersMessagesConnectionOk": {
|
||||
"placeholders": {
|
||||
"address": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsServersName": "Servery",
|
||||
"@settingsServersName": {},
|
||||
"settingsServersOptionsForcePlaintextPasswordDescriptionOff": "Posílat heslo jako token + salt",
|
||||
"@settingsServersOptionsForcePlaintextPasswordDescriptionOff": {},
|
||||
"settingsServersOptionsForcePlaintextPasswordDescriptionOn": "Posílat heslo v prostém textu (zastaralé, ujistěte se, že je vaše připojení zabezpečené!)",
|
||||
"@settingsServersOptionsForcePlaintextPasswordDescriptionOn": {},
|
||||
"settingsServersOptionsForcePlaintextPasswordTitle": "Vynutit heslo ve formátu prostého textu",
|
||||
"@settingsServersOptionsForcePlaintextPasswordTitle": {},
|
||||
"actionsDownloadDelete": "Smazat stažené",
|
||||
"@actionsDownloadDelete": {},
|
||||
"actionsOk": "OK",
|
||||
"@actionsOk": {},
|
||||
"actionsCancel": "Zrušit",
|
||||
"@actionsCancel": {},
|
||||
"actionsDownload": "Stáhnout",
|
||||
"@actionsDownload": {},
|
||||
"controlsShuffle": "Náhodně",
|
||||
"@controlsShuffle": {},
|
||||
"resourcesFilterAlbum": "Album",
|
||||
"@resourcesFilterAlbum": {},
|
||||
"resourcesFilterArtist": "Umělec",
|
||||
"@resourcesFilterArtist": {},
|
||||
"resourcesFilterYear": "Rok",
|
||||
"@resourcesFilterYear": {},
|
||||
"resourcesFilterOwner": "Majitele",
|
||||
"@resourcesFilterOwner": {},
|
||||
"resourcesSongListDeleteAllTitle": "Smazat stažené?",
|
||||
"@resourcesSongListDeleteAllTitle": {},
|
||||
"resourcesSongListDeleteAllContent": "Toto odstraní všechny stažené soubory s hudbou.",
|
||||
"@resourcesSongListDeleteAllContent": {},
|
||||
"resourcesSortByUpdated": "Naposledy upravené",
|
||||
"@resourcesSortByUpdated": {},
|
||||
"resourcesSortByAlbum": "Alba",
|
||||
"@resourcesSortByAlbum": {},
|
||||
"resourcesSortByAlbumCount": "Počtu alb",
|
||||
"@resourcesSortByAlbumCount": {},
|
||||
"resourcesSortByTitle": "Názvu",
|
||||
"@resourcesSortByTitle": {},
|
||||
"settingsAboutActionsLicenses": "Licence",
|
||||
"@settingsAboutActionsLicenses": {},
|
||||
"settingsAboutActionsProjectHomepage": "Stránka projektu",
|
||||
"@settingsAboutActionsProjectHomepage": {},
|
||||
"settingsAboutActionsSupport": "Podpořit vývojáře 💜",
|
||||
"@settingsAboutActionsSupport": {},
|
||||
"settingsAboutVersion": "verze {version}",
|
||||
"@settingsAboutVersion": {
|
||||
"placeholders": {
|
||||
"version": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsNetworkOptionsStreamFormat": "Preferovaný formát pro streamování",
|
||||
"@settingsNetworkOptionsStreamFormat": {},
|
||||
"settingsNetworkOptionsStreamFormatServerDefault": "Použít nastavení serveru",
|
||||
"@settingsNetworkOptionsStreamFormatServerDefault": {},
|
||||
"settingsResetActionsClearImageCache": "Smazat mezipaměť obrázků",
|
||||
"@settingsResetActionsClearImageCache": {},
|
||||
"settingsResetName": "Resetovat",
|
||||
"@settingsResetName": {},
|
||||
"settingsServersFieldsName": "Jméno",
|
||||
"@settingsServersFieldsName": {},
|
||||
"settingsAboutName": "O aplikaci",
|
||||
"@settingsAboutName": {},
|
||||
"actionsDownloadCancel": "Zrušit stahování",
|
||||
"@actionsDownloadCancel": {},
|
||||
"actionsDelete": "Smazat",
|
||||
"@actionsDelete": {}
|
||||
}
|
||||
|
||||
@@ -173,6 +173,10 @@
|
||||
"@settingsAboutActionsSupport": {},
|
||||
"settingsAboutName": "About",
|
||||
"@settingsAboutName": {},
|
||||
"settingsAboutShareLogs": "Share logs",
|
||||
"@settingsAboutShareLogs": {},
|
||||
"settingsAboutChooseLog": "Choose a log file",
|
||||
"@settingsAboutChooseLog": {},
|
||||
"settingsAboutVersion": "version {version}",
|
||||
"@settingsAboutVersion": {
|
||||
"placeholders": {
|
||||
|
||||
@@ -1,196 +1,230 @@
|
||||
{
|
||||
"actionsStar": "Favorito",
|
||||
"@actionsStar": {},
|
||||
"actionsUnstar": "Remover favorito",
|
||||
"@actionsUnstar": {},
|
||||
"messagesNothingHere": "Não existe nada…",
|
||||
"@messagesNothingHere": {},
|
||||
"navigationTabsHome": "Início",
|
||||
"@navigationTabsHome": {},
|
||||
"navigationTabsLibrary": "Biblioteca",
|
||||
"@navigationTabsLibrary": {},
|
||||
"navigationTabsSearch": "Procurar",
|
||||
"@navigationTabsSearch": {},
|
||||
"navigationTabsSettings": "Definições",
|
||||
"@navigationTabsSettings": {},
|
||||
"resourcesAlbumActionsPlay": "Tocar Álbum",
|
||||
"@resourcesAlbumActionsPlay": {},
|
||||
"resourcesAlbumActionsView": "Ver Álbum",
|
||||
"@resourcesAlbumActionsView": {},
|
||||
"resourcesAlbumListsSort": "Ordenar Álbuns",
|
||||
"@resourcesAlbumListsSort": {},
|
||||
"resourcesAlbumName": "{count,plural, =1{Álbum} other{Álbuns}}",
|
||||
"@resourcesAlbumName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesArtistActionsView": "Ver Artista",
|
||||
"@resourcesArtistActionsView": {},
|
||||
"resourcesArtistListsSort": "Ordenar Artistas",
|
||||
"@resourcesArtistListsSort": {},
|
||||
"resourcesArtistName": "{count,plural, =1{Artista} other{Artistas}}",
|
||||
"@resourcesArtistName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesFilterGenre": "Por Género",
|
||||
"@resourcesFilterGenre": {},
|
||||
"resourcesFilterStarred": "Favoritos",
|
||||
"@resourcesFilterStarred": {},
|
||||
"resourcesPlaylistActionsPlay": "Tocar Playlist",
|
||||
"@resourcesPlaylistActionsPlay": {},
|
||||
"resourcesPlaylistName": "{count,plural, =1{Lista} other{Listas}}",
|
||||
"@resourcesPlaylistName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesQueueName": "{count,plural, =1{Fila} other{Filas}}",
|
||||
"@resourcesQueueName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesSongListsArtistTopSongs": "Top Músicas",
|
||||
"@resourcesSongListsArtistTopSongs": {},
|
||||
"resourcesSongName": "{count,plural, =1{Música} other{Músicas}}",
|
||||
"@resourcesSongName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesSortByAdded": "Adicionado recentemente",
|
||||
"@resourcesSortByAdded": {},
|
||||
"resourcesSortByArtist": "Por Artista",
|
||||
"@resourcesSortByArtist": {},
|
||||
"resourcesSortByFrequentlyPlayed": "Mais Tocado",
|
||||
"@resourcesSortByFrequentlyPlayed": {},
|
||||
"resourcesSortByName": "Por Nome",
|
||||
"@resourcesSortByName": {},
|
||||
"resourcesSortByRandom": "Aleatório",
|
||||
"@resourcesSortByRandom": {},
|
||||
"resourcesSortByRecentlyPlayed": "Ouviu recentemente",
|
||||
"@resourcesSortByRecentlyPlayed": {},
|
||||
"resourcesSortByYear": "Por Ano",
|
||||
"@resourcesSortByYear": {},
|
||||
"searchHeaderTitle": "Procurar: {query}",
|
||||
"@searchHeaderTitle": {
|
||||
"placeholders": {
|
||||
"query": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"searchInputPlaceholder": "Procurar",
|
||||
"@searchInputPlaceholder": {},
|
||||
"searchMoreResults": "Mais…",
|
||||
"@searchMoreResults": {},
|
||||
"searchNowPlayingContext": "Resultados da Pesquisa",
|
||||
"@searchNowPlayingContext": {},
|
||||
"settingsAboutActionsLicenses": "Licenças",
|
||||
"@settingsAboutActionsLicenses": {},
|
||||
"settingsAboutActionsProjectHomepage": "Página do Projeto",
|
||||
"@settingsAboutActionsProjectHomepage": {},
|
||||
"settingsAboutName": "Acerca",
|
||||
"@settingsAboutName": {},
|
||||
"settingsAboutVersion": "versão {version}",
|
||||
"@settingsAboutVersion": {
|
||||
"placeholders": {
|
||||
"version": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsMusicName": "Música",
|
||||
"@settingsMusicName": {},
|
||||
"settingsMusicOptionsScrobbleDescriptionOff": "Não enviar histórico de reproduções por scrobble",
|
||||
"@settingsMusicOptionsScrobbleDescriptionOff": {},
|
||||
"settingsMusicOptionsScrobbleDescriptionOn": "Enviar histórico de reproduções por scrobble",
|
||||
"@settingsMusicOptionsScrobbleDescriptionOn": {},
|
||||
"settingsMusicOptionsScrobbleTitle": "Enviar reproduções por scrobble",
|
||||
"@settingsMusicOptionsScrobbleTitle": {},
|
||||
"settingsNetworkName": "Rede",
|
||||
"@settingsNetworkName": {},
|
||||
"settingsNetworkOptionsMaxBitrateMobileTitle": "Bitrate Máximo (móvel)",
|
||||
"@settingsNetworkOptionsMaxBitrateMobileTitle": {},
|
||||
"settingsNetworkOptionsMaxBitrateWifiTitle": "Bitrate Máximo (Wi-Fi)",
|
||||
"@settingsNetworkOptionsMaxBitrateWifiTitle": {},
|
||||
"settingsNetworkOptionsMaxBufferTitle": "Tempo de buffer máximo",
|
||||
"@settingsNetworkOptionsMaxBufferTitle": {},
|
||||
"settingsNetworkOptionsMinBufferTitle": "Tempo de buffer mínimo",
|
||||
"@settingsNetworkOptionsMinBufferTitle": {},
|
||||
"settingsNetworkValuesKbps": "{value}kbps",
|
||||
"@settingsNetworkValuesKbps": {
|
||||
"placeholders": {
|
||||
"value": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsNetworkValuesSeconds": "{value} segundos",
|
||||
"@settingsNetworkValuesSeconds": {
|
||||
"placeholders": {
|
||||
"value": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsNetworkValuesUnlimitedKbps": "Ilimitado",
|
||||
"@settingsNetworkValuesUnlimitedKbps": {},
|
||||
"settingsResetActionsClearImageCache": "Limpar cache de Imagens",
|
||||
"@settingsResetActionsClearImageCache": {},
|
||||
"settingsResetName": "Redefinir",
|
||||
"@settingsResetName": {},
|
||||
"settingsServersActionsAdd": "Adicionar Servidor",
|
||||
"@settingsServersActionsAdd": {},
|
||||
"settingsServersActionsDelete": "Apagar",
|
||||
"@settingsServersActionsDelete": {},
|
||||
"settingsServersActionsEdit": "Editar Servidor",
|
||||
"@settingsServersActionsEdit": {},
|
||||
"settingsServersActionsSave": "Guardar",
|
||||
"@settingsServersActionsSave": {},
|
||||
"settingsServersActionsTestConnection": "Testar Ligação",
|
||||
"@settingsServersActionsTestConnection": {},
|
||||
"settingsServersFieldsAddress": "Endereço",
|
||||
"@settingsServersFieldsAddress": {},
|
||||
"settingsServersFieldsPassword": "Senha",
|
||||
"@settingsServersFieldsPassword": {},
|
||||
"settingsServersFieldsUsername": "Nome de utilizador",
|
||||
"@settingsServersFieldsUsername": {},
|
||||
"settingsServersMessagesConnectionFailed": "Ligação a {address} falhou, verifique definições ou servidor",
|
||||
"@settingsServersMessagesConnectionFailed": {
|
||||
"placeholders": {
|
||||
"address": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsServersMessagesConnectionOk": "Ligação a {address} OK!",
|
||||
"@settingsServersMessagesConnectionOk": {
|
||||
"placeholders": {
|
||||
"address": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsServersName": "Servidores",
|
||||
"@settingsServersName": {},
|
||||
"settingsServersOptionsForcePlaintextPasswordDescriptionOff": "Enviar senha como token + sal",
|
||||
"@settingsServersOptionsForcePlaintextPasswordDescriptionOff": {},
|
||||
"settingsServersOptionsForcePlaintextPasswordDescriptionOn": "Enviar senha em texto simples (antigo, certifique-se que a sua ligação é segura!)",
|
||||
"@settingsServersOptionsForcePlaintextPasswordDescriptionOn": {},
|
||||
"settingsServersOptionsForcePlaintextPasswordTitle": "Forçar password em texto simples",
|
||||
"@settingsServersOptionsForcePlaintextPasswordTitle": {}
|
||||
}
|
||||
"actionsStar": "Favorito",
|
||||
"@actionsStar": {},
|
||||
"actionsUnstar": "Remover favorito",
|
||||
"@actionsUnstar": {},
|
||||
"messagesNothingHere": "Não existe nada…",
|
||||
"@messagesNothingHere": {},
|
||||
"navigationTabsHome": "Início",
|
||||
"@navigationTabsHome": {},
|
||||
"navigationTabsLibrary": "Biblioteca",
|
||||
"@navigationTabsLibrary": {},
|
||||
"navigationTabsSearch": "Procurar",
|
||||
"@navigationTabsSearch": {},
|
||||
"navigationTabsSettings": "Definições",
|
||||
"@navigationTabsSettings": {},
|
||||
"resourcesAlbumActionsPlay": "Tocar Álbum",
|
||||
"@resourcesAlbumActionsPlay": {},
|
||||
"resourcesAlbumActionsView": "Ver Álbum",
|
||||
"@resourcesAlbumActionsView": {},
|
||||
"resourcesAlbumListsSort": "Ordenar Álbuns",
|
||||
"@resourcesAlbumListsSort": {},
|
||||
"resourcesAlbumName": "{count,plural, =1{Álbum} other{Álbuns}}",
|
||||
"@resourcesAlbumName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesArtistActionsView": "Ver Artista",
|
||||
"@resourcesArtistActionsView": {},
|
||||
"resourcesArtistListsSort": "Ordenar Artistas",
|
||||
"@resourcesArtistListsSort": {},
|
||||
"resourcesArtistName": "{count,plural, =1{Artista} other{Artistas}}",
|
||||
"@resourcesArtistName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesFilterGenre": "Por Género",
|
||||
"@resourcesFilterGenre": {},
|
||||
"resourcesFilterStarred": "Favoritos",
|
||||
"@resourcesFilterStarred": {},
|
||||
"resourcesPlaylistActionsPlay": "Tocar Playlist",
|
||||
"@resourcesPlaylistActionsPlay": {},
|
||||
"resourcesPlaylistName": "{count,plural, =1{Lista} other{Listas}}",
|
||||
"@resourcesPlaylistName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesQueueName": "{count,plural, =1{Fila} other{Filas}}",
|
||||
"@resourcesQueueName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesSongListsArtistTopSongs": "Top Músicas",
|
||||
"@resourcesSongListsArtistTopSongs": {},
|
||||
"resourcesSongName": "{count,plural, =1{Música} other{Músicas}}",
|
||||
"@resourcesSongName": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourcesSortByAdded": "Adicionado recentemente",
|
||||
"@resourcesSortByAdded": {},
|
||||
"resourcesSortByArtist": "Por Artista",
|
||||
"@resourcesSortByArtist": {},
|
||||
"resourcesSortByFrequentlyPlayed": "Mais Tocado",
|
||||
"@resourcesSortByFrequentlyPlayed": {},
|
||||
"resourcesSortByName": "Por Nome",
|
||||
"@resourcesSortByName": {},
|
||||
"resourcesSortByRandom": "Aleatório",
|
||||
"@resourcesSortByRandom": {},
|
||||
"resourcesSortByRecentlyPlayed": "Ouviu recentemente",
|
||||
"@resourcesSortByRecentlyPlayed": {},
|
||||
"resourcesSortByYear": "Por Ano",
|
||||
"@resourcesSortByYear": {},
|
||||
"searchHeaderTitle": "Procurar: {query}",
|
||||
"@searchHeaderTitle": {
|
||||
"placeholders": {
|
||||
"query": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"searchInputPlaceholder": "Procurar",
|
||||
"@searchInputPlaceholder": {},
|
||||
"searchMoreResults": "Mais…",
|
||||
"@searchMoreResults": {},
|
||||
"searchNowPlayingContext": "Resultados da Pesquisa",
|
||||
"@searchNowPlayingContext": {},
|
||||
"settingsAboutActionsLicenses": "Licenças",
|
||||
"@settingsAboutActionsLicenses": {},
|
||||
"settingsAboutActionsProjectHomepage": "Página do Projeto",
|
||||
"@settingsAboutActionsProjectHomepage": {},
|
||||
"settingsAboutName": "Acerca",
|
||||
"@settingsAboutName": {},
|
||||
"settingsAboutVersion": "versão {version}",
|
||||
"@settingsAboutVersion": {
|
||||
"placeholders": {
|
||||
"version": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsMusicName": "Música",
|
||||
"@settingsMusicName": {},
|
||||
"settingsMusicOptionsScrobbleDescriptionOff": "Não enviar histórico de reproduções por scrobble",
|
||||
"@settingsMusicOptionsScrobbleDescriptionOff": {},
|
||||
"settingsMusicOptionsScrobbleDescriptionOn": "Enviar histórico de reproduções por scrobble",
|
||||
"@settingsMusicOptionsScrobbleDescriptionOn": {},
|
||||
"settingsMusicOptionsScrobbleTitle": "Enviar reproduções por scrobble",
|
||||
"@settingsMusicOptionsScrobbleTitle": {},
|
||||
"settingsNetworkName": "Rede",
|
||||
"@settingsNetworkName": {},
|
||||
"settingsNetworkOptionsMaxBitrateMobileTitle": "Bitrate Máximo (móvel)",
|
||||
"@settingsNetworkOptionsMaxBitrateMobileTitle": {},
|
||||
"settingsNetworkOptionsMaxBitrateWifiTitle": "Bitrate Máximo (Wi-Fi)",
|
||||
"@settingsNetworkOptionsMaxBitrateWifiTitle": {},
|
||||
"settingsNetworkOptionsMaxBufferTitle": "Tempo de buffer máximo",
|
||||
"@settingsNetworkOptionsMaxBufferTitle": {},
|
||||
"settingsNetworkOptionsMinBufferTitle": "Tempo de buffer mínimo",
|
||||
"@settingsNetworkOptionsMinBufferTitle": {},
|
||||
"settingsNetworkValuesKbps": "{value}kbps",
|
||||
"@settingsNetworkValuesKbps": {
|
||||
"placeholders": {
|
||||
"value": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsNetworkValuesSeconds": "{value} segundos",
|
||||
"@settingsNetworkValuesSeconds": {
|
||||
"placeholders": {
|
||||
"value": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsNetworkValuesUnlimitedKbps": "Ilimitado",
|
||||
"@settingsNetworkValuesUnlimitedKbps": {},
|
||||
"settingsResetActionsClearImageCache": "Limpar cache de Imagens",
|
||||
"@settingsResetActionsClearImageCache": {},
|
||||
"settingsResetName": "Redefinir",
|
||||
"@settingsResetName": {},
|
||||
"settingsServersActionsAdd": "Adicionar Servidor",
|
||||
"@settingsServersActionsAdd": {},
|
||||
"settingsServersActionsDelete": "Apagar",
|
||||
"@settingsServersActionsDelete": {},
|
||||
"settingsServersActionsEdit": "Editar Servidor",
|
||||
"@settingsServersActionsEdit": {},
|
||||
"settingsServersActionsSave": "Guardar",
|
||||
"@settingsServersActionsSave": {},
|
||||
"settingsServersActionsTestConnection": "Testar Ligação",
|
||||
"@settingsServersActionsTestConnection": {},
|
||||
"settingsServersFieldsAddress": "Endereço",
|
||||
"@settingsServersFieldsAddress": {},
|
||||
"settingsServersFieldsPassword": "Senha",
|
||||
"@settingsServersFieldsPassword": {},
|
||||
"settingsServersFieldsUsername": "Nome de utilizador",
|
||||
"@settingsServersFieldsUsername": {},
|
||||
"settingsServersMessagesConnectionFailed": "Ligação a {address} falhou, verifique definições ou servidor",
|
||||
"@settingsServersMessagesConnectionFailed": {
|
||||
"placeholders": {
|
||||
"address": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsServersMessagesConnectionOk": "Ligação a {address} OK!",
|
||||
"@settingsServersMessagesConnectionOk": {
|
||||
"placeholders": {
|
||||
"address": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settingsServersName": "Servidores",
|
||||
"@settingsServersName": {},
|
||||
"settingsServersOptionsForcePlaintextPasswordDescriptionOff": "Enviar senha como token + sal",
|
||||
"@settingsServersOptionsForcePlaintextPasswordDescriptionOff": {},
|
||||
"settingsServersOptionsForcePlaintextPasswordDescriptionOn": "Enviar senha em texto simples (antigo, certifique-se que a sua ligação é segura!)",
|
||||
"@settingsServersOptionsForcePlaintextPasswordDescriptionOn": {},
|
||||
"settingsServersOptionsForcePlaintextPasswordTitle": "Forçar password em texto simples",
|
||||
"@settingsServersOptionsForcePlaintextPasswordTitle": {},
|
||||
"actionsCancel": "Cancelar",
|
||||
"@actionsCancel": {},
|
||||
"actionsDelete": "Apagar",
|
||||
"@actionsDelete": {},
|
||||
"actionsDownload": "Descarregar",
|
||||
"@actionsDownload": {},
|
||||
"actionsDownloadCancel": "Cancelar descarga",
|
||||
"@actionsDownloadCancel": {},
|
||||
"actionsDownloadDelete": "Apagar descarga",
|
||||
"@actionsDownloadDelete": {},
|
||||
"resourcesFilterAlbum": "Álbum",
|
||||
"@resourcesFilterAlbum": {},
|
||||
"resourcesFilterArtist": "Artista",
|
||||
"@resourcesFilterArtist": {},
|
||||
"resourcesFilterYear": "Ano",
|
||||
"@resourcesFilterYear": {},
|
||||
"resourcesSortByAlbum": "Álbum",
|
||||
"@resourcesSortByAlbum": {},
|
||||
"settingsAboutActionsSupport": "Apoie o programador 💜",
|
||||
"@settingsAboutActionsSupport": {},
|
||||
"settingsNetworkOptionsOfflineMode": "Modo offline",
|
||||
"@settingsNetworkOptionsOfflineMode": {},
|
||||
"settingsNetworkOptionsOfflineModeOff": "Usar a internet para sincronizar música.",
|
||||
"@settingsNetworkOptionsOfflineModeOff": {},
|
||||
"settingsNetworkOptionsOfflineModeOn": "Não usar a internet para sincronizar ou tocar música.",
|
||||
"@settingsNetworkOptionsOfflineModeOn": {},
|
||||
"settingsNetworkOptionsStreamFormat": "Formato preferido de streaming",
|
||||
"@settingsNetworkOptionsStreamFormat": {},
|
||||
"resourcesSortByTitle": "Título",
|
||||
"@resourcesSortByTitle": {},
|
||||
"actionsOk": "OK",
|
||||
"@actionsOk": {},
|
||||
"controlsShuffle": "Aleatório",
|
||||
"@controlsShuffle": {}
|
||||
}
|
||||
|
||||
169
lib/log.dart
Normal file
169
lib/log.dart
Normal file
@@ -0,0 +1,169 @@
|
||||
// import 'dart:convert';
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
class AnsiColor {
|
||||
/// ANSI Control Sequence Introducer, signals the terminal for new settings.
|
||||
static const ansiEsc = '\x1B[';
|
||||
|
||||
/// Reset all colors and options for current SGRs to terminal defaults.
|
||||
static const ansiDefault = '${ansiEsc}0m';
|
||||
|
||||
final int? fg;
|
||||
final int? bg;
|
||||
final bool color;
|
||||
|
||||
AnsiColor.none()
|
||||
: fg = null,
|
||||
bg = null,
|
||||
color = false;
|
||||
|
||||
AnsiColor.fg(this.fg)
|
||||
: bg = null,
|
||||
color = true;
|
||||
|
||||
AnsiColor.bg(this.bg)
|
||||
: fg = null,
|
||||
color = true;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
if (fg != null) {
|
||||
return '${ansiEsc}38;5;${fg}m';
|
||||
} else if (bg != null) {
|
||||
return '${ansiEsc}48;5;${bg}m';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
String call(String msg) {
|
||||
if (color) {
|
||||
// ignore: unnecessary_brace_in_string_interps
|
||||
return '${this}$msg$ansiDefault';
|
||||
} else {
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
|
||||
AnsiColor toFg() => AnsiColor.fg(bg);
|
||||
|
||||
AnsiColor toBg() => AnsiColor.bg(fg);
|
||||
|
||||
/// Defaults the terminal's foreground color without altering the background.
|
||||
String get resetForeground => color ? '${ansiEsc}39m' : '';
|
||||
|
||||
/// Defaults the terminal's background color without altering the foreground.
|
||||
String get resetBackground => color ? '${ansiEsc}49m' : '';
|
||||
|
||||
static int grey(double level) => 232 + (level.clamp(0.0, 1.0) * 23).round();
|
||||
}
|
||||
|
||||
final levelColors = {
|
||||
Level.FINEST: AnsiColor.fg(AnsiColor.grey(0.5)),
|
||||
Level.FINER: AnsiColor.fg(AnsiColor.grey(0.5)),
|
||||
Level.FINE: AnsiColor.fg(AnsiColor.grey(0.5)),
|
||||
Level.CONFIG: AnsiColor.fg(81),
|
||||
Level.INFO: AnsiColor.fg(12),
|
||||
Level.WARNING: AnsiColor.fg(208),
|
||||
Level.SEVERE: AnsiColor.fg(196),
|
||||
Level.SHOUT: AnsiColor.fg(199),
|
||||
};
|
||||
|
||||
class LogData {
|
||||
final String? message;
|
||||
final Object? data;
|
||||
|
||||
const LogData(this.message, this.data);
|
||||
}
|
||||
|
||||
String _format(
|
||||
LogRecord event, {
|
||||
bool color = false,
|
||||
bool time = true,
|
||||
bool level = true,
|
||||
}) {
|
||||
var message = '';
|
||||
if (time) message += '${event.time.toIso8601String()} ';
|
||||
if (level) message += '${event.level.name} ';
|
||||
|
||||
final object = event.object;
|
||||
if (object is LogData) {
|
||||
message += '${object.message}';
|
||||
message += '\n${object.data}';
|
||||
} else if (object != null) {
|
||||
message += 'Object';
|
||||
message += '\n$object';
|
||||
} else {
|
||||
message += event.message;
|
||||
}
|
||||
|
||||
if (event.error != null) {
|
||||
message += '\n${event.error}';
|
||||
}
|
||||
if (event.stackTrace != null) {
|
||||
message += '\n${event.stackTrace}';
|
||||
}
|
||||
|
||||
return color
|
||||
? message.split('\n').map((e) => levelColors[event.level]!(e)).join('\n')
|
||||
: message;
|
||||
}
|
||||
|
||||
Future<void> _printFile(String event, String dir) async {
|
||||
final now = DateTime.now();
|
||||
final file = File(p.join(dir, '${now.year}-${now.month}-${now.day}.txt'));
|
||||
|
||||
if (!event.endsWith('\n')) {
|
||||
event += '\n';
|
||||
}
|
||||
|
||||
await file.writeAsString(event, mode: FileMode.writeOnlyAppend, flush: true);
|
||||
}
|
||||
|
||||
Future<Directory> logDirectory() async {
|
||||
return Directory(
|
||||
p.join((await getApplicationDocumentsDirectory()).path, 'logs'),
|
||||
);
|
||||
}
|
||||
|
||||
Future<List<File>> logFiles() async {
|
||||
final dir = await logDirectory();
|
||||
return dir.listSync().whereType<File>().toList()
|
||||
..sort(
|
||||
(a, b) => b.statSync().modified.compareTo(a.statSync().modified),
|
||||
);
|
||||
}
|
||||
|
||||
final log = Logger('default');
|
||||
|
||||
Future<void> initLogging() async {
|
||||
final dir = (await logDirectory())..create();
|
||||
|
||||
final files = await logFiles();
|
||||
if (files.length > 7) {
|
||||
for (var file in files.slice(7)) {
|
||||
await file.delete();
|
||||
}
|
||||
}
|
||||
|
||||
Logger.root.level = kDebugMode ? Level.ALL : Level.INFO;
|
||||
Logger.root.onRecord.asyncMap((event) async {
|
||||
if (kDebugMode) {
|
||||
print(_format(event, color: true, time: false, level: false));
|
||||
} else {
|
||||
await _printFile(
|
||||
_format(event, color: false, time: true, level: true),
|
||||
dir.path,
|
||||
);
|
||||
}
|
||||
}).listen((_) {}, cancelOnError: false);
|
||||
|
||||
log.info('start');
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import 'package:stack_trace/stack_trace.dart' as stack_trace;
|
||||
import 'package:worker_manager/worker_manager.dart';
|
||||
|
||||
import 'app/app.dart';
|
||||
import 'log.dart';
|
||||
|
||||
void main() async {
|
||||
// TOOD: probably remove before live
|
||||
@@ -18,5 +19,8 @@ void main() async {
|
||||
await Executor().warmUp();
|
||||
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
await initLogging();
|
||||
|
||||
runApp(const ProviderScope(child: MyApp()));
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import 'dart:math';
|
||||
import 'package:audio_service/audio_service.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:drift/drift.dart' show Value;
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:just_audio/just_audio.dart';
|
||||
import 'package:pool/pool.dart';
|
||||
@@ -14,6 +13,7 @@ import 'package:synchronized/synchronized.dart';
|
||||
|
||||
import '../cache/image_cache.dart';
|
||||
import '../database/database.dart';
|
||||
import '../log.dart';
|
||||
import '../models/music.dart';
|
||||
import '../models/query.dart';
|
||||
import '../models/support.dart';
|
||||
@@ -95,32 +95,36 @@ class AudioControl extends BaseAudioHandler with QueueHandler, SeekHandler {
|
||||
int get _sourceId => _ref.read(sourceIdProvider);
|
||||
|
||||
AudioControl(this._player, this._ref) {
|
||||
_player.playbackEventStream.listen((PlaybackEvent event) {
|
||||
final playing = _player.playing;
|
||||
playbackState.add(playbackState.value.copyWith(
|
||||
controls: [
|
||||
MediaControl.skipToPrevious,
|
||||
if (playing) MediaControl.pause else MediaControl.play,
|
||||
MediaControl.stop,
|
||||
MediaControl.skipToNext,
|
||||
],
|
||||
systemActions: const {
|
||||
MediaAction.seek,
|
||||
},
|
||||
androidCompactActionIndices: const [0, 1, 3],
|
||||
processingState: const {
|
||||
ProcessingState.idle: AudioProcessingState.idle,
|
||||
ProcessingState.loading: AudioProcessingState.loading,
|
||||
ProcessingState.buffering: AudioProcessingState.buffering,
|
||||
ProcessingState.ready: AudioProcessingState.ready,
|
||||
ProcessingState.completed: AudioProcessingState.completed,
|
||||
}[_player.processingState]!,
|
||||
playing: playing,
|
||||
updatePosition: _player.position,
|
||||
bufferedPosition: _player.bufferedPosition,
|
||||
queueIndex: event.currentIndex,
|
||||
));
|
||||
});
|
||||
_player.playbackEventStream.listen(
|
||||
(PlaybackEvent event) {
|
||||
final playing = _player.playing;
|
||||
playbackState.add(playbackState.value.copyWith(
|
||||
controls: [
|
||||
MediaControl.skipToPrevious,
|
||||
if (playing) MediaControl.pause else MediaControl.play,
|
||||
MediaControl.stop,
|
||||
MediaControl.skipToNext,
|
||||
],
|
||||
systemActions: const {
|
||||
MediaAction.seek,
|
||||
},
|
||||
androidCompactActionIndices: const [0, 1, 3],
|
||||
processingState: const {
|
||||
ProcessingState.idle: AudioProcessingState.idle,
|
||||
ProcessingState.loading: AudioProcessingState.loading,
|
||||
ProcessingState.buffering: AudioProcessingState.buffering,
|
||||
ProcessingState.ready: AudioProcessingState.ready,
|
||||
ProcessingState.completed: AudioProcessingState.completed,
|
||||
}[_player.processingState]!,
|
||||
playing: playing,
|
||||
updatePosition: _player.position,
|
||||
bufferedPosition: _player.bufferedPosition,
|
||||
queueIndex: event.currentIndex,
|
||||
));
|
||||
},
|
||||
onError: (e, st) => log.warning('Audio playback error', e, st),
|
||||
cancelOnError: false,
|
||||
);
|
||||
|
||||
shuffleIndicies.listen((value) {
|
||||
playbackState.add(playbackState.value.copyWith(
|
||||
@@ -137,7 +141,7 @@ class AudioControl extends BaseAudioHandler with QueueHandler, SeekHandler {
|
||||
_player.processingStateStream.listen((event) async {
|
||||
if (event == ProcessingState.completed) {
|
||||
if (_audioSource.length > 0) {
|
||||
yell('completed');
|
||||
log.fine('completed');
|
||||
await stop();
|
||||
await seek(Duration.zero);
|
||||
}
|
||||
@@ -386,7 +390,7 @@ class AudioControl extends BaseAudioHandler with QueueHandler, SeekHandler {
|
||||
mediaItem.add(slice.current!.mediaItem);
|
||||
queue.add(list.map((e) => e.mediaItem).toList());
|
||||
|
||||
yell('addAll');
|
||||
log.fine('addAll');
|
||||
await _audioSource.addAll(list.map((e) => e.audioSource).toList());
|
||||
await _player.seek(Duration.zero, index: list.indexOf(slice.current!));
|
||||
}
|
||||
@@ -410,7 +414,7 @@ class AudioControl extends BaseAudioHandler with QueueHandler, SeekHandler {
|
||||
final sourceNeedsPrev = sourceIndex == 0;
|
||||
|
||||
if (sourceNeedsNext && slice.next != null) {
|
||||
yell('add');
|
||||
log.fine('add');
|
||||
await _audioSource.add(slice.next!.audioSource);
|
||||
}
|
||||
if (sourceNeedsPrev && slice.prev != null) {
|
||||
@@ -497,7 +501,7 @@ class AudioControl extends BaseAudioHandler with QueueHandler, SeekHandler {
|
||||
}
|
||||
|
||||
Future<void> _insertFirstAudioSource(AudioSource source) {
|
||||
yell('insert');
|
||||
log.fine('insert');
|
||||
final wait = _audioSource.insert(0, source);
|
||||
_currentIndexIgnore.add(1);
|
||||
return wait;
|
||||
@@ -505,20 +509,20 @@ class AudioControl extends BaseAudioHandler with QueueHandler, SeekHandler {
|
||||
|
||||
Future<void> _pruneAudioSources(int keepIndex) async {
|
||||
if (keepIndex > 0) {
|
||||
yell('removeRange 0');
|
||||
log.fine('removeRange 0');
|
||||
final wait = _audioSource.removeRange(0, keepIndex);
|
||||
_currentIndexIgnore.add(0);
|
||||
await wait;
|
||||
}
|
||||
if (_audioSource.length > 1) {
|
||||
yell('removeRange 1');
|
||||
log.fine('removeRange 1');
|
||||
await _audioSource.removeRange(1, _audioSource.length);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _clearAudioSource([bool clearMetadata = false]) async {
|
||||
// await _player.stop();
|
||||
yell('_clearAudioSource');
|
||||
log.fine('_clearAudioSource');
|
||||
await _audioSource.clear();
|
||||
|
||||
if (clearMetadata) {
|
||||
@@ -697,11 +701,3 @@ class AudioControl extends BaseAudioHandler with QueueHandler, SeekHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void yell(String msg) {
|
||||
if (kDebugMode) {
|
||||
print('=================================================================<');
|
||||
print(msg);
|
||||
print('=================================================================>');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:crypto/crypto.dart';
|
||||
import 'package:http/http.dart';
|
||||
import 'package:xml/xml.dart';
|
||||
|
||||
import '../../log.dart';
|
||||
import '../../models/settings.dart';
|
||||
import 'xml.dart';
|
||||
|
||||
@@ -89,7 +90,9 @@ class SubsonicClient {
|
||||
final subsonicResponse =
|
||||
SubsonicResponse(XmlDocument.parse(utf8.decode(res.bodyBytes)));
|
||||
if (subsonicResponse.status == Status.failed) {
|
||||
throw SubsonicException(subsonicResponse.xml);
|
||||
final error = SubsonicException(subsonicResponse.xml);
|
||||
log.severe('Subsonic error', error);
|
||||
throw error;
|
||||
}
|
||||
|
||||
return subsonicResponse;
|
||||
|
||||
34
pubspec.lock
34
pubspec.lock
@@ -290,6 +290,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.6.3"
|
||||
cross_file:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: cross_file
|
||||
sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.3+4"
|
||||
crypto:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -679,7 +687,7 @@ packages:
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
logging:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: logging
|
||||
sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d"
|
||||
@@ -834,10 +842,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_windows
|
||||
sha256: f53720498d5a543f9607db4b0e997c4b5438884de25b0f73098cc2671a51b130
|
||||
sha256: d3f80b32e83ec208ac95253e0cd4d298e104fbc63cb29c5c69edaed43b0c69d6
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.5"
|
||||
version: "2.1.6"
|
||||
pedantic:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -950,6 +958,22 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.27.7"
|
||||
share_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: share_plus
|
||||
sha256: "322a1ec9d9fe07e2e2252c098ce93d12dbd06133cc4c00ffe6a4ef505c295c17"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.0"
|
||||
share_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: share_plus_platform_interface
|
||||
sha256: "0c6e61471bd71b04a138b8b588fa388e66d8b005e6f2deda63371c5c505a0981"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.1"
|
||||
shelf:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1319,10 +1343,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
sha256: a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4
|
||||
sha256: "5a751eddf9db89b3e5f9d50c20ab8612296e4e8db69009788d6c8b060a84191c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.4"
|
||||
version: "4.1.4"
|
||||
worker_manager:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
@@ -57,6 +57,8 @@ dependencies:
|
||||
connectivity_plus: ^3.0.4
|
||||
package_info_plus: ^3.1.1
|
||||
url_launcher: ^6.1.10
|
||||
logging: ^1.1.1
|
||||
share_plus: ^7.0.0
|
||||
|
||||
# https://github.com/dart-lang/intl/issues/522#issuecomment-1469961807
|
||||
dependency_overrides:
|
||||
|
||||
Reference in New Issue
Block a user