From 7285eb4959c0a480c8be721d5fa42031018133e3 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Thu, 29 Aug 2024 15:02:49 +0800 Subject: [PATCH] :sparkles: Connect with spotify --- lib/main.dart | 28 +- lib/providers/auth.dart | 140 ++ lib/providers/palette.dart | 2 - lib/providers/spotify.dart | 48 +- lib/router.dart | 11 + lib/screens/auth/desktop_login.dart | 52 + lib/screens/auth/login.dart | 13 + lib/screens/auth/mobile_login.dart | 67 + lib/screens/settings.dart | 85 +- .../audio_services/windows_audio_service.dart | 10 +- lib/services/database/database.g.dart | 1487 ++++++----------- pubspec.lock | 80 +- pubspec.yaml | 23 +- 13 files changed, 1004 insertions(+), 1042 deletions(-) create mode 100644 lib/providers/auth.dart create mode 100644 lib/screens/auth/desktop_login.dart create mode 100644 lib/screens/auth/login.dart create mode 100644 lib/screens/auth/mobile_login.dart diff --git a/lib/main.dart b/lib/main.dart index 5748747..437388d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,8 +1,11 @@ +import 'package:desktop_webview_window/desktop_webview_window.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:media_kit/media_kit.dart'; +import 'package:rhythm_box/platform.dart'; import 'package:rhythm_box/providers/audio_player.dart'; import 'package:rhythm_box/providers/audio_player_stream.dart'; +import 'package:rhythm_box/providers/auth.dart'; import 'package:rhythm_box/providers/database.dart'; import 'package:rhythm_box/providers/history.dart'; import 'package:rhythm_box/providers/palette.dart'; @@ -11,6 +14,8 @@ import 'package:rhythm_box/providers/skip_segments.dart'; import 'package:rhythm_box/providers/spotify.dart'; import 'package:rhythm_box/providers/user_preferences.dart'; import 'package:rhythm_box/router.dart'; +import 'package:rhythm_box/services/kv_store/encrypted_kv_store.dart'; +import 'package:rhythm_box/services/kv_store/kv_store.dart'; import 'package:rhythm_box/services/lyrics/provider.dart'; import 'package:rhythm_box/services/server/active_sourced_track.dart'; import 'package:rhythm_box/services/server/routes/playback.dart'; @@ -18,9 +23,29 @@ import 'package:rhythm_box/services/server/server.dart'; import 'package:rhythm_box/services/server/sourced_track.dart'; import 'package:rhythm_box/translations.dart'; import 'package:rhythm_box/widgets/tracks/querying_track_info.dart'; +import 'package:smtc_windows/smtc_windows.dart'; +import 'package:window_manager/window_manager.dart'; + +Future main(List rawArgs) async { + if (rawArgs.contains('web_view_title_bar')) { + WidgetsFlutterBinding.ensureInitialized(); + if (runWebViewTitleBarWidget(rawArgs)) { + return; + } + } -void main() { MediaKit.ensureInitialized(); + WidgetsFlutterBinding.ensureInitialized(); + + if (PlatformInfo.isDesktop) { + await windowManager.setPreventClose(true); + } + if (PlatformInfo.isWindows) { + await SMTCWindows.initialize(); + } + + await KVStoreService.initialize(); + await EncryptedKvStoreService.initialize(); runApp(const MyApp()); } @@ -62,6 +87,7 @@ class MyApp extends StatelessWidget { Get.lazyPut(() => SyncedLyricsProvider()); Get.put(DatabaseProvider()); + Get.put(AuthenticationProvider()); Get.put(AudioPlayerProvider()); Get.put(ActiveSourcedTrackProvider()); diff --git a/lib/providers/auth.dart b/lib/providers/auth.dart new file mode 100644 index 0000000..7090895 --- /dev/null +++ b/lib/providers/auth.dart @@ -0,0 +1,140 @@ +import 'dart:async'; +import 'dart:io'; + +import 'package:dio/io.dart'; +import 'package:drift/drift.dart'; +import 'package:get/get.dart' hide Value; +import 'package:dio/dio.dart'; +import 'package:rhythm_box/providers/database.dart'; +import 'package:rhythm_box/services/database/database.dart'; + +extension ExpirationAuthenticationTableData on AuthenticationTableData { + bool get isExpired => DateTime.now().isAfter(expiration); + + String? getCookie(String key) => cookie.value + .split('; ') + .firstWhereOrNull((c) => c.trim().startsWith('$key=')) + ?.trim() + .split('=') + .last + .replaceAll(';', ''); +} + +class AuthenticationProvider extends GetxController { + static final Dio dio = () { + final dio = Dio(); + + (dio.httpClientAdapter as IOHttpClientAdapter) + .createHttpClient = () => HttpClient() + ..badCertificateCallback = (X509Certificate cert, String host, int port) { + return host.endsWith('spotify.com') && port == 443; + }; + + return dio; + }(); + + var auth = Rxn(); + Timer? refreshTimer; + + @override + void onInit() { + super.onInit(); + loadAuthenticationData(); + } + + Future loadAuthenticationData() async { + final database = Get.find().database; + final data = await (database.select(database.authenticationTable) + ..where((s) => s.id.equals(0))) + .getSingleOrNull(); + + auth.value = data; + _setRefreshTimer(); + } + + void _setRefreshTimer() { + refreshTimer?.cancel(); + if (auth.value != null && auth.value!.isExpired) { + refreshCredentials(); + } + refreshTimer = Timer( + auth.value!.expiration.difference(DateTime.now()), + () => refreshCredentials(), + ); + } + + Future refreshCredentials() async { + final database = Get.find().database; + final refreshedCredentials = + await credentialsFromCookie(auth.value!.cookie.value); + + await database + .update(database.authenticationTable) + .replace(refreshedCredentials); + loadAuthenticationData(); // Reload data after refreshing + } + + Future login(String cookie) async { + final database = Get.find().database; + final refreshedCredentials = await credentialsFromCookie(cookie); + + await database + .into(database.authenticationTable) + .insert(refreshedCredentials, mode: InsertMode.replace); + loadAuthenticationData(); // Reload data after login + } + + Future credentialsFromCookie( + String cookie) async { + try { + final spDc = cookie + .split('; ') + .firstWhereOrNull((c) => c.trim().startsWith('sp_dc=')) + ?.trim(); + final res = await dio.getUri( + Uri.parse( + 'https://open.spotify.com/get_access_token?reason=transport&productType=web_player'), + options: Options( + headers: { + 'Cookie': spDc ?? '', + 'User-Agent': + 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36', + }, + validateStatus: (status) => true, + ), + ); + final body = res.data; + + if ((res.statusCode ?? 500) >= 400) { + throw Exception( + "Failed to get access token: ${body['error'] ?? res.statusMessage}"); + } + + return AuthenticationTableCompanion.insert( + id: const Value(0), + cookie: DecryptedText("${res.headers["set-cookie"]?.join(";")}; $spDc"), + accessToken: DecryptedText(body['accessToken']), + expiration: DateTime.fromMillisecondsSinceEpoch( + body['accessTokenExpirationTimestampMs']), + ); + } catch (e) { + // Handle error + rethrow; + } + } + + Future logout() async { + auth.value = null; + final database = Get.find().database; + await (database.delete(database.authenticationTable) + ..where((s) => s.id.equals(0))) + .go(); + // Additional cleanup if necessary + } + + @override + void onClose() { + refreshTimer?.cancel(); + super.onClose(); + } +} diff --git a/lib/providers/palette.dart b/lib/providers/palette.dart index b4e18d8..c10d7c7 100644 --- a/lib/providers/palette.dart +++ b/lib/providers/palette.dart @@ -7,8 +7,6 @@ class PaletteProvider extends GetxController { void updatePalette(PaletteGenerator? newPalette) { palette.value = newPalette; - print('call update!'); - print(newPalette); if (newPalette != null) { Get.changeTheme( ThemeData.from( diff --git a/lib/providers/spotify.dart b/lib/providers/spotify.dart index 6ad6f52..e4a5482 100644 --- a/lib/providers/spotify.dart +++ b/lib/providers/spotify.dart @@ -1,17 +1,59 @@ +import 'dart:async'; +import 'dart:developer'; + import 'package:get/get.dart'; +import 'package:rhythm_box/providers/auth.dart'; import 'package:spotify/spotify.dart'; class SpotifyProvider extends GetxController { - late final SpotifyApi api; + late SpotifyApi api; + + List? _subscriptions; @override void onInit() { - api = SpotifyApi( + final AuthenticationProvider authenticate = Get.find(); + if (authenticate.auth.value == null) { + api = _initApiWithClientCredentials(); + } else { + api = _initApiWithUserCredentials(); + } + _subscriptions = [ + authenticate.auth.listen((value) { + if (value == null) { + api = _initApiWithClientCredentials(); + } else { + api = _initApiWithUserCredentials(); + } + }), + ]; + super.onInit(); + } + + SpotifyApi _initApiWithClientCredentials() { + log('[SpotifyApi] Using client credentials...'); + return SpotifyApi( SpotifyApiCredentials( 'f73d4bff91d64d89be9930036f553534', '5cbec0b928d247cd891d06195f07b8c9', ), ); - super.onInit(); + } + + SpotifyApi _initApiWithUserCredentials() { + log('[SpotifyApi] Using user credentials...'); + final AuthenticationProvider authenticate = Get.find(); + return SpotifyApi.withAccessToken( + authenticate.auth.value!.accessToken.value); + } + + @override + void dispose() { + if (_subscriptions != null) { + for (final subscription in _subscriptions!) { + subscription.cancel(); + } + } + super.dispose(); } } diff --git a/lib/router.dart b/lib/router.dart index fe25c24..a3a7eda 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -1,6 +1,7 @@ import 'package:animations/animations.dart'; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; +import 'package:rhythm_box/screens/auth/mobile_login.dart'; import 'package:rhythm_box/screens/explore.dart'; import 'package:rhythm_box/screens/player/lyrics.dart'; import 'package:rhythm_box/screens/player/view.dart'; @@ -62,4 +63,14 @@ final router = GoRouter(routes: [ ), ], ), + ShellRoute( + builder: (context, state, child) => child, + routes: [ + GoRoute( + path: '/auth/mobile-login', + name: 'authMobileLogin', + builder: (context, state) => const MobileLogin(), + ), + ], + ), ]); diff --git a/lib/screens/auth/desktop_login.dart b/lib/screens/auth/desktop_login.dart new file mode 100644 index 0000000..b4fa64f --- /dev/null +++ b/lib/screens/auth/desktop_login.dart @@ -0,0 +1,52 @@ +import 'dart:io'; + +import 'package:desktop_webview_window/desktop_webview_window.dart'; +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:go_router/go_router.dart'; +import 'package:path/path.dart'; +import 'package:path_provider/path_provider.dart'; +import 'package:rhythm_box/platform.dart'; +import 'package:rhythm_box/providers/auth.dart'; + +Future desktopLogin(BuildContext context) async { + final exp = RegExp(r'https:\/\/accounts.spotify.com\/.+\/status'); + final applicationSupportDir = await getApplicationSupportDirectory(); + final userDataFolder = + Directory(join(applicationSupportDir.path, 'webview_window_Webview2')); + + if (!await userDataFolder.exists()) { + await userDataFolder.create(); + } + + final webview = await WebviewWindow.create( + configuration: CreateConfiguration( + title: 'Spotify Login', + titleBarTopPadding: PlatformInfo.isMacOS ? 20 : 0, + windowHeight: 720, + windowWidth: 1280, + userDataFolderWindows: userDataFolder.path, + ), + ); + webview + ..setBrightness(Theme.of(context).colorScheme.brightness) + ..launch('https://accounts.spotify.com/') + ..setOnUrlRequestCallback((url) { + if (exp.hasMatch(url)) { + webview.getAllCookies().then((cookies) async { + final cookieHeader = + "sp_dc=${cookies.firstWhere((element) => element.name.contains("sp_dc")).value.replaceAll("\u0000", "")}"; + + final AuthenticationProvider authenticate = Get.find(); + await authenticate.login(cookieHeader); + + webview.close(); + if (context.mounted) { + GoRouter.of(context).go('/'); + } + }); + } + + return true; + }); +} diff --git a/lib/screens/auth/login.dart b/lib/screens/auth/login.dart new file mode 100644 index 0000000..65d4b48 --- /dev/null +++ b/lib/screens/auth/login.dart @@ -0,0 +1,13 @@ +import 'package:flutter/widgets.dart'; +import 'package:go_router/go_router.dart'; +import 'package:rhythm_box/platform.dart'; +import 'package:rhythm_box/screens/auth/desktop_login.dart'; + +Future universalLogin(BuildContext context) async { + if (PlatformInfo.isMobile) { + GoRouter.of(context).pushNamed('authMobileLogin'); + return; + } + + return await desktopLogin(context); +} diff --git a/lib/screens/auth/mobile_login.dart b/lib/screens/auth/mobile_login.dart new file mode 100644 index 0000000..877e0b9 --- /dev/null +++ b/lib/screens/auth/mobile_login.dart @@ -0,0 +1,67 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_inappwebview/flutter_inappwebview.dart'; +import 'package:get/get.dart'; +import 'package:go_router/go_router.dart'; +import 'package:rhythm_box/platform.dart'; +import 'package:rhythm_box/providers/auth.dart'; + +class MobileLogin extends StatelessWidget { + const MobileLogin({super.key}); + + @override + Widget build(BuildContext context) { + final AuthenticationProvider authenticate = Get.find(); + + if (PlatformInfo.isDesktop) { + const Scaffold( + body: Center( + child: Text('This feature is not available on desktop'), + ), + ); + } + + return Scaffold( + appBar: AppBar( + title: const Text('Connect with Spotify'), + ), + body: SafeArea( + child: InAppWebView( + initialSettings: InAppWebViewSettings( + userAgent: + 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36', + ), + initialUrlRequest: URLRequest( + url: WebUri('https://accounts.spotify.com/'), + ), + onPermissionRequest: (controller, permissionRequest) async { + return PermissionResponse( + resources: permissionRequest.resources, + action: PermissionResponseAction.GRANT, + ); + }, + onLoadStop: (controller, action) async { + if (action == null) return; + String url = action.toString(); + if (url.endsWith('/')) { + url = url.substring(0, url.length - 1); + } + + final exp = RegExp(r'https:\/\/accounts.spotify.com\/.+\/status'); + + if (exp.hasMatch(url)) { + final cookies = + await CookieManager.instance().getCookies(url: action); + final cookieHeader = + "sp_dc=${cookies.firstWhere((element) => element.name == "sp_dc").value}"; + + await authenticate.login(cookieHeader); + if (context.mounted) { + GoRouter.of(context).pop(); + } + } + }, + ), + ), + ); + } +} diff --git a/lib/screens/settings.dart b/lib/screens/settings.dart index 24229d0..26ffdfa 100644 --- a/lib/screens/settings.dart +++ b/lib/screens/settings.dart @@ -1,4 +1,9 @@ import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:rhythm_box/providers/auth.dart'; +import 'package:rhythm_box/providers/spotify.dart'; +import 'package:rhythm_box/screens/auth/login.dart'; +import 'package:rhythm_box/widgets/auto_cache_image.dart'; class SettingsScreen extends StatefulWidget { const SettingsScreen({super.key}); @@ -8,6 +13,11 @@ class SettingsScreen extends StatefulWidget { } class _SettingsScreenState extends State { + late final SpotifyProvider _spotify = Get.find(); + late final AuthenticationProvider _authenticate = Get.find(); + + bool _isLoggingIn = false; + @override Widget build(BuildContext context) { return Material( @@ -15,14 +25,73 @@ class _SettingsScreenState extends State { child: SafeArea( child: Column( children: [ - ListTile( - contentPadding: const EdgeInsets.symmetric(horizontal: 24), - leading: const Icon(Icons.login), - title: const Text('Connect with Spotify'), - subtitle: const Text('To explore your own library and more'), - trailing: const Icon(Icons.chevron_right), - onTap: () {}, - ), + Obx(() { + if (_authenticate.auth.value == null) { + return ListTile( + contentPadding: const EdgeInsets.symmetric(horizontal: 24), + leading: const Icon(Icons.login), + title: const Text('Connect with Spotify'), + subtitle: const Text('To explore your own library and more'), + trailing: const Icon(Icons.chevron_right), + enabled: !_isLoggingIn, + onTap: () async { + setState(() => _isLoggingIn = true); + await universalLogin(context); + setState(() => _isLoggingIn = false); + }, + ); + } + + return FutureBuilder( + future: _spotify.api.me.get(), + builder: (context, snapshot) { + print(snapshot.data); + print(snapshot.error); + if (!snapshot.hasData) { + return const ListTile( + contentPadding: + const EdgeInsets.symmetric(horizontal: 24), + leading: SizedBox( + width: 20, + height: 20, + child: CircularProgressIndicator( + strokeWidth: 3, + ), + ), + title: Text('Loading...'), + ); + } + + return ListTile( + leading: (snapshot.data!.images?.isNotEmpty ?? false) + ? CircleAvatar( + backgroundImage: AutoCacheImage.provider( + snapshot.data!.images!.firstOrNull!.url!, + ), + ) + : const Icon(Icons.account_circle), + title: Text(snapshot.data!.displayName!), + subtitle: const Text('Connected with your Spotify'), + ); + }, + ); + }), + Obx(() { + if (_authenticate.auth.value == null) { + return const SizedBox(); + } + + return ListTile( + contentPadding: const EdgeInsets.symmetric(horizontal: 24), + leading: const Icon(Icons.logout), + title: const Text('Log out'), + subtitle: const Text('Disconnect with this Spotify account'), + trailing: const Icon(Icons.chevron_right), + onTap: () async { + _authenticate.logout(); + }, + ); + }), ], ), ), diff --git a/lib/services/audio_services/windows_audio_service.dart b/lib/services/audio_services/windows_audio_service.dart index d5795c2..cf499ca 100755 --- a/lib/services/audio_services/windows_audio_service.dart +++ b/lib/services/audio_services/windows_audio_service.dart @@ -15,7 +15,7 @@ class WindowsAudioService { final subscriptions = []; WindowsAudioService() : smtc = SMTCWindows(enabled: false) { - smtc.setPlaybackStatus(PlaybackStatus.Stopped); + smtc.setPlaybackStatus(PlaybackStatus.stopped); final buttonStream = smtc.buttonPressStream.listen((event) { switch (event) { case PressedButton.play: @@ -42,16 +42,16 @@ class WindowsAudioService { audioPlayer.playerStateStream.listen((state) async { switch (state) { case AudioPlaybackState.playing: - await smtc.setPlaybackStatus(PlaybackStatus.Playing); + await smtc.setPlaybackStatus(PlaybackStatus.playing); break; case AudioPlaybackState.paused: - await smtc.setPlaybackStatus(PlaybackStatus.Paused); + await smtc.setPlaybackStatus(PlaybackStatus.paused); break; case AudioPlaybackState.stopped: - await smtc.setPlaybackStatus(PlaybackStatus.Stopped); + await smtc.setPlaybackStatus(PlaybackStatus.stopped); break; case AudioPlaybackState.completed: - await smtc.setPlaybackStatus(PlaybackStatus.Changing); + await smtc.setPlaybackStatus(PlaybackStatus.changing); break; default: break; diff --git a/lib/services/database/database.g.dart b/lib/services/database/database.g.dart index a61f9ac..6f76ca8 100644 --- a/lib/services/database/database.g.dart +++ b/lib/services/database/database.g.dart @@ -3879,6 +3879,50 @@ typedef $$AuthenticationTableTableUpdateCompanionBuilder Value expiration, }); +class $$AuthenticationTableTableTableManager extends RootTableManager< + _$AppDatabase, + $AuthenticationTableTable, + AuthenticationTableData, + $$AuthenticationTableTableFilterComposer, + $$AuthenticationTableTableOrderingComposer, + $$AuthenticationTableTableCreateCompanionBuilder, + $$AuthenticationTableTableUpdateCompanionBuilder> { + $$AuthenticationTableTableTableManager( + _$AppDatabase db, $AuthenticationTableTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: $$AuthenticationTableTableFilterComposer( + ComposerState(db, table)), + orderingComposer: $$AuthenticationTableTableOrderingComposer( + ComposerState(db, table)), + updateCompanionCallback: ({ + Value id = const Value.absent(), + Value cookie = const Value.absent(), + Value accessToken = const Value.absent(), + Value expiration = const Value.absent(), + }) => + AuthenticationTableCompanion( + id: id, + cookie: cookie, + accessToken: accessToken, + expiration: expiration, + ), + createCompanionCallback: ({ + Value id = const Value.absent(), + required DecryptedText cookie, + required DecryptedText accessToken, + required DateTime expiration, + }) => + AuthenticationTableCompanion.insert( + id: id, + cookie: cookie, + accessToken: accessToken, + expiration: expiration, + ), + )); +} + class $$AuthenticationTableTableFilterComposer extends FilterComposer<_$AppDatabase, $AuthenticationTableTable> { $$AuthenticationTableTableFilterComposer(super.$state); @@ -3931,76 +3975,6 @@ class $$AuthenticationTableTableOrderingComposer ColumnOrderings(column, joinBuilders: joinBuilders)); } -class $$AuthenticationTableTableTableManager extends RootTableManager< - _$AppDatabase, - $AuthenticationTableTable, - AuthenticationTableData, - $$AuthenticationTableTableFilterComposer, - $$AuthenticationTableTableOrderingComposer, - $$AuthenticationTableTableCreateCompanionBuilder, - $$AuthenticationTableTableUpdateCompanionBuilder, - ( - AuthenticationTableData, - BaseReferences<_$AppDatabase, $AuthenticationTableTable, - AuthenticationTableData> - ), - AuthenticationTableData, - PrefetchHooks Function()> { - $$AuthenticationTableTableTableManager( - _$AppDatabase db, $AuthenticationTableTable table) - : super(TableManagerState( - db: db, - table: table, - filteringComposer: $$AuthenticationTableTableFilterComposer( - ComposerState(db, table)), - orderingComposer: $$AuthenticationTableTableOrderingComposer( - ComposerState(db, table)), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value cookie = const Value.absent(), - Value accessToken = const Value.absent(), - Value expiration = const Value.absent(), - }) => - AuthenticationTableCompanion( - id: id, - cookie: cookie, - accessToken: accessToken, - expiration: expiration, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - required DecryptedText cookie, - required DecryptedText accessToken, - required DateTime expiration, - }) => - AuthenticationTableCompanion.insert( - id: id, - cookie: cookie, - accessToken: accessToken, - expiration: expiration, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - )); -} - -typedef $$AuthenticationTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $AuthenticationTableTable, - AuthenticationTableData, - $$AuthenticationTableTableFilterComposer, - $$AuthenticationTableTableOrderingComposer, - $$AuthenticationTableTableCreateCompanionBuilder, - $$AuthenticationTableTableUpdateCompanionBuilder, - ( - AuthenticationTableData, - BaseReferences<_$AppDatabase, $AuthenticationTableTable, - AuthenticationTableData> - ), - AuthenticationTableData, - PrefetchHooks Function()>; typedef $$PreferencesTableTableCreateCompanionBuilder = PreferencesTableCompanion Function({ Value id, @@ -4058,6 +4032,134 @@ typedef $$PreferencesTableTableUpdateCompanionBuilder Value enableConnect, }); +class $$PreferencesTableTableTableManager extends RootTableManager< + _$AppDatabase, + $PreferencesTableTable, + PreferencesTableData, + $$PreferencesTableTableFilterComposer, + $$PreferencesTableTableOrderingComposer, + $$PreferencesTableTableCreateCompanionBuilder, + $$PreferencesTableTableUpdateCompanionBuilder> { + $$PreferencesTableTableTableManager( + _$AppDatabase db, $PreferencesTableTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$PreferencesTableTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$PreferencesTableTableOrderingComposer(ComposerState(db, table)), + updateCompanionCallback: ({ + Value id = const Value.absent(), + Value audioQuality = const Value.absent(), + Value albumColorSync = const Value.absent(), + Value amoledDarkTheme = const Value.absent(), + Value checkUpdate = const Value.absent(), + Value normalizeAudio = const Value.absent(), + Value showSystemTrayIcon = const Value.absent(), + Value systemTitleBar = const Value.absent(), + Value skipNonMusic = const Value.absent(), + Value closeBehavior = const Value.absent(), + Value accentColorScheme = const Value.absent(), + Value layoutMode = const Value.absent(), + Value locale = const Value.absent(), + Value market = const Value.absent(), + Value searchMode = const Value.absent(), + Value downloadLocation = const Value.absent(), + Value> localLibraryLocation = const Value.absent(), + Value pipedInstance = const Value.absent(), + Value themeMode = const Value.absent(), + Value audioSource = const Value.absent(), + Value streamMusicCodec = const Value.absent(), + Value downloadMusicCodec = const Value.absent(), + Value discordPresence = const Value.absent(), + Value endlessPlayback = const Value.absent(), + Value enableConnect = const Value.absent(), + }) => + PreferencesTableCompanion( + id: id, + audioQuality: audioQuality, + albumColorSync: albumColorSync, + amoledDarkTheme: amoledDarkTheme, + checkUpdate: checkUpdate, + normalizeAudio: normalizeAudio, + showSystemTrayIcon: showSystemTrayIcon, + systemTitleBar: systemTitleBar, + skipNonMusic: skipNonMusic, + closeBehavior: closeBehavior, + accentColorScheme: accentColorScheme, + layoutMode: layoutMode, + locale: locale, + market: market, + searchMode: searchMode, + downloadLocation: downloadLocation, + localLibraryLocation: localLibraryLocation, + pipedInstance: pipedInstance, + themeMode: themeMode, + audioSource: audioSource, + streamMusicCodec: streamMusicCodec, + downloadMusicCodec: downloadMusicCodec, + discordPresence: discordPresence, + endlessPlayback: endlessPlayback, + enableConnect: enableConnect, + ), + createCompanionCallback: ({ + Value id = const Value.absent(), + Value audioQuality = const Value.absent(), + Value albumColorSync = const Value.absent(), + Value amoledDarkTheme = const Value.absent(), + Value checkUpdate = const Value.absent(), + Value normalizeAudio = const Value.absent(), + Value showSystemTrayIcon = const Value.absent(), + Value systemTitleBar = const Value.absent(), + Value skipNonMusic = const Value.absent(), + Value closeBehavior = const Value.absent(), + Value accentColorScheme = const Value.absent(), + Value layoutMode = const Value.absent(), + Value locale = const Value.absent(), + Value market = const Value.absent(), + Value searchMode = const Value.absent(), + Value downloadLocation = const Value.absent(), + Value> localLibraryLocation = const Value.absent(), + Value pipedInstance = const Value.absent(), + Value themeMode = const Value.absent(), + Value audioSource = const Value.absent(), + Value streamMusicCodec = const Value.absent(), + Value downloadMusicCodec = const Value.absent(), + Value discordPresence = const Value.absent(), + Value endlessPlayback = const Value.absent(), + Value enableConnect = const Value.absent(), + }) => + PreferencesTableCompanion.insert( + id: id, + audioQuality: audioQuality, + albumColorSync: albumColorSync, + amoledDarkTheme: amoledDarkTheme, + checkUpdate: checkUpdate, + normalizeAudio: normalizeAudio, + showSystemTrayIcon: showSystemTrayIcon, + systemTitleBar: systemTitleBar, + skipNonMusic: skipNonMusic, + closeBehavior: closeBehavior, + accentColorScheme: accentColorScheme, + layoutMode: layoutMode, + locale: locale, + market: market, + searchMode: searchMode, + downloadLocation: downloadLocation, + localLibraryLocation: localLibraryLocation, + pipedInstance: pipedInstance, + themeMode: themeMode, + audioSource: audioSource, + streamMusicCodec: streamMusicCodec, + downloadMusicCodec: downloadMusicCodec, + discordPresence: discordPresence, + endlessPlayback: endlessPlayback, + enableConnect: enableConnect, + ), + )); +} + class $$PreferencesTableTableFilterComposer extends FilterComposer<_$AppDatabase, $PreferencesTableTable> { $$PreferencesTableTableFilterComposer(super.$state); @@ -4340,160 +4442,6 @@ class $$PreferencesTableTableOrderingComposer ColumnOrderings(column, joinBuilders: joinBuilders)); } -class $$PreferencesTableTableTableManager extends RootTableManager< - _$AppDatabase, - $PreferencesTableTable, - PreferencesTableData, - $$PreferencesTableTableFilterComposer, - $$PreferencesTableTableOrderingComposer, - $$PreferencesTableTableCreateCompanionBuilder, - $$PreferencesTableTableUpdateCompanionBuilder, - ( - PreferencesTableData, - BaseReferences<_$AppDatabase, $PreferencesTableTable, - PreferencesTableData> - ), - PreferencesTableData, - PrefetchHooks Function()> { - $$PreferencesTableTableTableManager( - _$AppDatabase db, $PreferencesTableTable table) - : super(TableManagerState( - db: db, - table: table, - filteringComposer: - $$PreferencesTableTableFilterComposer(ComposerState(db, table)), - orderingComposer: - $$PreferencesTableTableOrderingComposer(ComposerState(db, table)), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value audioQuality = const Value.absent(), - Value albumColorSync = const Value.absent(), - Value amoledDarkTheme = const Value.absent(), - Value checkUpdate = const Value.absent(), - Value normalizeAudio = const Value.absent(), - Value showSystemTrayIcon = const Value.absent(), - Value systemTitleBar = const Value.absent(), - Value skipNonMusic = const Value.absent(), - Value closeBehavior = const Value.absent(), - Value accentColorScheme = const Value.absent(), - Value layoutMode = const Value.absent(), - Value locale = const Value.absent(), - Value market = const Value.absent(), - Value searchMode = const Value.absent(), - Value downloadLocation = const Value.absent(), - Value> localLibraryLocation = const Value.absent(), - Value pipedInstance = const Value.absent(), - Value themeMode = const Value.absent(), - Value audioSource = const Value.absent(), - Value streamMusicCodec = const Value.absent(), - Value downloadMusicCodec = const Value.absent(), - Value discordPresence = const Value.absent(), - Value endlessPlayback = const Value.absent(), - Value enableConnect = const Value.absent(), - }) => - PreferencesTableCompanion( - id: id, - audioQuality: audioQuality, - albumColorSync: albumColorSync, - amoledDarkTheme: amoledDarkTheme, - checkUpdate: checkUpdate, - normalizeAudio: normalizeAudio, - showSystemTrayIcon: showSystemTrayIcon, - systemTitleBar: systemTitleBar, - skipNonMusic: skipNonMusic, - closeBehavior: closeBehavior, - accentColorScheme: accentColorScheme, - layoutMode: layoutMode, - locale: locale, - market: market, - searchMode: searchMode, - downloadLocation: downloadLocation, - localLibraryLocation: localLibraryLocation, - pipedInstance: pipedInstance, - themeMode: themeMode, - audioSource: audioSource, - streamMusicCodec: streamMusicCodec, - downloadMusicCodec: downloadMusicCodec, - discordPresence: discordPresence, - endlessPlayback: endlessPlayback, - enableConnect: enableConnect, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - Value audioQuality = const Value.absent(), - Value albumColorSync = const Value.absent(), - Value amoledDarkTheme = const Value.absent(), - Value checkUpdate = const Value.absent(), - Value normalizeAudio = const Value.absent(), - Value showSystemTrayIcon = const Value.absent(), - Value systemTitleBar = const Value.absent(), - Value skipNonMusic = const Value.absent(), - Value closeBehavior = const Value.absent(), - Value accentColorScheme = const Value.absent(), - Value layoutMode = const Value.absent(), - Value locale = const Value.absent(), - Value market = const Value.absent(), - Value searchMode = const Value.absent(), - Value downloadLocation = const Value.absent(), - Value> localLibraryLocation = const Value.absent(), - Value pipedInstance = const Value.absent(), - Value themeMode = const Value.absent(), - Value audioSource = const Value.absent(), - Value streamMusicCodec = const Value.absent(), - Value downloadMusicCodec = const Value.absent(), - Value discordPresence = const Value.absent(), - Value endlessPlayback = const Value.absent(), - Value enableConnect = const Value.absent(), - }) => - PreferencesTableCompanion.insert( - id: id, - audioQuality: audioQuality, - albumColorSync: albumColorSync, - amoledDarkTheme: amoledDarkTheme, - checkUpdate: checkUpdate, - normalizeAudio: normalizeAudio, - showSystemTrayIcon: showSystemTrayIcon, - systemTitleBar: systemTitleBar, - skipNonMusic: skipNonMusic, - closeBehavior: closeBehavior, - accentColorScheme: accentColorScheme, - layoutMode: layoutMode, - locale: locale, - market: market, - searchMode: searchMode, - downloadLocation: downloadLocation, - localLibraryLocation: localLibraryLocation, - pipedInstance: pipedInstance, - themeMode: themeMode, - audioSource: audioSource, - streamMusicCodec: streamMusicCodec, - downloadMusicCodec: downloadMusicCodec, - discordPresence: discordPresence, - endlessPlayback: endlessPlayback, - enableConnect: enableConnect, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - )); -} - -typedef $$PreferencesTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $PreferencesTableTable, - PreferencesTableData, - $$PreferencesTableTableFilterComposer, - $$PreferencesTableTableOrderingComposer, - $$PreferencesTableTableCreateCompanionBuilder, - $$PreferencesTableTableUpdateCompanionBuilder, - ( - PreferencesTableData, - BaseReferences<_$AppDatabase, $PreferencesTableTable, - PreferencesTableData> - ), - PreferencesTableData, - PrefetchHooks Function()>; typedef $$ScrobblerTableTableCreateCompanionBuilder = ScrobblerTableCompanion Function({ Value id, @@ -4509,6 +4457,50 @@ typedef $$ScrobblerTableTableUpdateCompanionBuilder = ScrobblerTableCompanion Value passwordHash, }); +class $$ScrobblerTableTableTableManager extends RootTableManager< + _$AppDatabase, + $ScrobblerTableTable, + ScrobblerTableData, + $$ScrobblerTableTableFilterComposer, + $$ScrobblerTableTableOrderingComposer, + $$ScrobblerTableTableCreateCompanionBuilder, + $$ScrobblerTableTableUpdateCompanionBuilder> { + $$ScrobblerTableTableTableManager( + _$AppDatabase db, $ScrobblerTableTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$ScrobblerTableTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$ScrobblerTableTableOrderingComposer(ComposerState(db, table)), + updateCompanionCallback: ({ + Value id = const Value.absent(), + Value createdAt = const Value.absent(), + Value username = const Value.absent(), + Value passwordHash = const Value.absent(), + }) => + ScrobblerTableCompanion( + id: id, + createdAt: createdAt, + username: username, + passwordHash: passwordHash, + ), + createCompanionCallback: ({ + Value id = const Value.absent(), + Value createdAt = const Value.absent(), + required String username, + required DecryptedText passwordHash, + }) => + ScrobblerTableCompanion.insert( + id: id, + createdAt: createdAt, + username: username, + passwordHash: passwordHash, + ), + )); +} + class $$ScrobblerTableTableFilterComposer extends FilterComposer<_$AppDatabase, $ScrobblerTableTable> { $$ScrobblerTableTableFilterComposer(super.$state); @@ -4559,74 +4551,6 @@ class $$ScrobblerTableTableOrderingComposer ColumnOrderings(column, joinBuilders: joinBuilders)); } -class $$ScrobblerTableTableTableManager extends RootTableManager< - _$AppDatabase, - $ScrobblerTableTable, - ScrobblerTableData, - $$ScrobblerTableTableFilterComposer, - $$ScrobblerTableTableOrderingComposer, - $$ScrobblerTableTableCreateCompanionBuilder, - $$ScrobblerTableTableUpdateCompanionBuilder, - ( - ScrobblerTableData, - BaseReferences<_$AppDatabase, $ScrobblerTableTable, ScrobblerTableData> - ), - ScrobblerTableData, - PrefetchHooks Function()> { - $$ScrobblerTableTableTableManager( - _$AppDatabase db, $ScrobblerTableTable table) - : super(TableManagerState( - db: db, - table: table, - filteringComposer: - $$ScrobblerTableTableFilterComposer(ComposerState(db, table)), - orderingComposer: - $$ScrobblerTableTableOrderingComposer(ComposerState(db, table)), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value createdAt = const Value.absent(), - Value username = const Value.absent(), - Value passwordHash = const Value.absent(), - }) => - ScrobblerTableCompanion( - id: id, - createdAt: createdAt, - username: username, - passwordHash: passwordHash, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - Value createdAt = const Value.absent(), - required String username, - required DecryptedText passwordHash, - }) => - ScrobblerTableCompanion.insert( - id: id, - createdAt: createdAt, - username: username, - passwordHash: passwordHash, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - )); -} - -typedef $$ScrobblerTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $ScrobblerTableTable, - ScrobblerTableData, - $$ScrobblerTableTableFilterComposer, - $$ScrobblerTableTableOrderingComposer, - $$ScrobblerTableTableCreateCompanionBuilder, - $$ScrobblerTableTableUpdateCompanionBuilder, - ( - ScrobblerTableData, - BaseReferences<_$AppDatabase, $ScrobblerTableTable, ScrobblerTableData> - ), - ScrobblerTableData, - PrefetchHooks Function()>; typedef $$SkipSegmentTableTableCreateCompanionBuilder = SkipSegmentTableCompanion Function({ Value id, @@ -4644,6 +4568,54 @@ typedef $$SkipSegmentTableTableUpdateCompanionBuilder Value createdAt, }); +class $$SkipSegmentTableTableTableManager extends RootTableManager< + _$AppDatabase, + $SkipSegmentTableTable, + SkipSegmentTableData, + $$SkipSegmentTableTableFilterComposer, + $$SkipSegmentTableTableOrderingComposer, + $$SkipSegmentTableTableCreateCompanionBuilder, + $$SkipSegmentTableTableUpdateCompanionBuilder> { + $$SkipSegmentTableTableTableManager( + _$AppDatabase db, $SkipSegmentTableTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$SkipSegmentTableTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$SkipSegmentTableTableOrderingComposer(ComposerState(db, table)), + updateCompanionCallback: ({ + Value id = const Value.absent(), + Value start = const Value.absent(), + Value end = const Value.absent(), + Value trackId = const Value.absent(), + Value createdAt = const Value.absent(), + }) => + SkipSegmentTableCompanion( + id: id, + start: start, + end: end, + trackId: trackId, + createdAt: createdAt, + ), + createCompanionCallback: ({ + Value id = const Value.absent(), + required int start, + required int end, + required String trackId, + Value createdAt = const Value.absent(), + }) => + SkipSegmentTableCompanion.insert( + id: id, + start: start, + end: end, + trackId: trackId, + createdAt: createdAt, + ), + )); +} + class $$SkipSegmentTableTableFilterComposer extends FilterComposer<_$AppDatabase, $SkipSegmentTableTable> { $$SkipSegmentTableTableFilterComposer(super.$state); @@ -4702,80 +4674,6 @@ class $$SkipSegmentTableTableOrderingComposer ColumnOrderings(column, joinBuilders: joinBuilders)); } -class $$SkipSegmentTableTableTableManager extends RootTableManager< - _$AppDatabase, - $SkipSegmentTableTable, - SkipSegmentTableData, - $$SkipSegmentTableTableFilterComposer, - $$SkipSegmentTableTableOrderingComposer, - $$SkipSegmentTableTableCreateCompanionBuilder, - $$SkipSegmentTableTableUpdateCompanionBuilder, - ( - SkipSegmentTableData, - BaseReferences<_$AppDatabase, $SkipSegmentTableTable, - SkipSegmentTableData> - ), - SkipSegmentTableData, - PrefetchHooks Function()> { - $$SkipSegmentTableTableTableManager( - _$AppDatabase db, $SkipSegmentTableTable table) - : super(TableManagerState( - db: db, - table: table, - filteringComposer: - $$SkipSegmentTableTableFilterComposer(ComposerState(db, table)), - orderingComposer: - $$SkipSegmentTableTableOrderingComposer(ComposerState(db, table)), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value start = const Value.absent(), - Value end = const Value.absent(), - Value trackId = const Value.absent(), - Value createdAt = const Value.absent(), - }) => - SkipSegmentTableCompanion( - id: id, - start: start, - end: end, - trackId: trackId, - createdAt: createdAt, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - required int start, - required int end, - required String trackId, - Value createdAt = const Value.absent(), - }) => - SkipSegmentTableCompanion.insert( - id: id, - start: start, - end: end, - trackId: trackId, - createdAt: createdAt, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - )); -} - -typedef $$SkipSegmentTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $SkipSegmentTableTable, - SkipSegmentTableData, - $$SkipSegmentTableTableFilterComposer, - $$SkipSegmentTableTableOrderingComposer, - $$SkipSegmentTableTableCreateCompanionBuilder, - $$SkipSegmentTableTableUpdateCompanionBuilder, - ( - SkipSegmentTableData, - BaseReferences<_$AppDatabase, $SkipSegmentTableTable, - SkipSegmentTableData> - ), - SkipSegmentTableData, - PrefetchHooks Function()>; typedef $$SourceMatchTableTableCreateCompanionBuilder = SourceMatchTableCompanion Function({ Value id, @@ -4793,6 +4691,54 @@ typedef $$SourceMatchTableTableUpdateCompanionBuilder Value createdAt, }); +class $$SourceMatchTableTableTableManager extends RootTableManager< + _$AppDatabase, + $SourceMatchTableTable, + SourceMatchTableData, + $$SourceMatchTableTableFilterComposer, + $$SourceMatchTableTableOrderingComposer, + $$SourceMatchTableTableCreateCompanionBuilder, + $$SourceMatchTableTableUpdateCompanionBuilder> { + $$SourceMatchTableTableTableManager( + _$AppDatabase db, $SourceMatchTableTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$SourceMatchTableTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$SourceMatchTableTableOrderingComposer(ComposerState(db, table)), + updateCompanionCallback: ({ + Value id = const Value.absent(), + Value trackId = const Value.absent(), + Value sourceId = const Value.absent(), + Value sourceType = const Value.absent(), + Value createdAt = const Value.absent(), + }) => + SourceMatchTableCompanion( + id: id, + trackId: trackId, + sourceId: sourceId, + sourceType: sourceType, + createdAt: createdAt, + ), + createCompanionCallback: ({ + Value id = const Value.absent(), + required String trackId, + required String sourceId, + Value sourceType = const Value.absent(), + Value createdAt = const Value.absent(), + }) => + SourceMatchTableCompanion.insert( + id: id, + trackId: trackId, + sourceId: sourceId, + sourceType: sourceType, + createdAt: createdAt, + ), + )); +} + class $$SourceMatchTableTableFilterComposer extends FilterComposer<_$AppDatabase, $SourceMatchTableTable> { $$SourceMatchTableTableFilterComposer(super.$state); @@ -4853,80 +4799,6 @@ class $$SourceMatchTableTableOrderingComposer ColumnOrderings(column, joinBuilders: joinBuilders)); } -class $$SourceMatchTableTableTableManager extends RootTableManager< - _$AppDatabase, - $SourceMatchTableTable, - SourceMatchTableData, - $$SourceMatchTableTableFilterComposer, - $$SourceMatchTableTableOrderingComposer, - $$SourceMatchTableTableCreateCompanionBuilder, - $$SourceMatchTableTableUpdateCompanionBuilder, - ( - SourceMatchTableData, - BaseReferences<_$AppDatabase, $SourceMatchTableTable, - SourceMatchTableData> - ), - SourceMatchTableData, - PrefetchHooks Function()> { - $$SourceMatchTableTableTableManager( - _$AppDatabase db, $SourceMatchTableTable table) - : super(TableManagerState( - db: db, - table: table, - filteringComposer: - $$SourceMatchTableTableFilterComposer(ComposerState(db, table)), - orderingComposer: - $$SourceMatchTableTableOrderingComposer(ComposerState(db, table)), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value trackId = const Value.absent(), - Value sourceId = const Value.absent(), - Value sourceType = const Value.absent(), - Value createdAt = const Value.absent(), - }) => - SourceMatchTableCompanion( - id: id, - trackId: trackId, - sourceId: sourceId, - sourceType: sourceType, - createdAt: createdAt, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - required String trackId, - required String sourceId, - Value sourceType = const Value.absent(), - Value createdAt = const Value.absent(), - }) => - SourceMatchTableCompanion.insert( - id: id, - trackId: trackId, - sourceId: sourceId, - sourceType: sourceType, - createdAt: createdAt, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - )); -} - -typedef $$SourceMatchTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $SourceMatchTableTable, - SourceMatchTableData, - $$SourceMatchTableTableFilterComposer, - $$SourceMatchTableTableOrderingComposer, - $$SourceMatchTableTableCreateCompanionBuilder, - $$SourceMatchTableTableUpdateCompanionBuilder, - ( - SourceMatchTableData, - BaseReferences<_$AppDatabase, $SourceMatchTableTable, - SourceMatchTableData> - ), - SourceMatchTableData, - PrefetchHooks Function()>; typedef $$HistoryTableTableCreateCompanionBuilder = HistoryTableCompanion Function({ Value id, @@ -4944,6 +4816,53 @@ typedef $$HistoryTableTableUpdateCompanionBuilder = HistoryTableCompanion Value> data, }); +class $$HistoryTableTableTableManager extends RootTableManager< + _$AppDatabase, + $HistoryTableTable, + HistoryTableData, + $$HistoryTableTableFilterComposer, + $$HistoryTableTableOrderingComposer, + $$HistoryTableTableCreateCompanionBuilder, + $$HistoryTableTableUpdateCompanionBuilder> { + $$HistoryTableTableTableManager(_$AppDatabase db, $HistoryTableTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$HistoryTableTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$HistoryTableTableOrderingComposer(ComposerState(db, table)), + updateCompanionCallback: ({ + Value id = const Value.absent(), + Value createdAt = const Value.absent(), + Value type = const Value.absent(), + Value itemId = const Value.absent(), + Value> data = const Value.absent(), + }) => + HistoryTableCompanion( + id: id, + createdAt: createdAt, + type: type, + itemId: itemId, + data: data, + ), + createCompanionCallback: ({ + Value id = const Value.absent(), + Value createdAt = const Value.absent(), + required HistoryEntryType type, + required String itemId, + required Map data, + }) => + HistoryTableCompanion.insert( + id: id, + createdAt: createdAt, + type: type, + itemId: itemId, + data: data, + ), + )); +} + class $$HistoryTableTableFilterComposer extends FilterComposer<_$AppDatabase, $HistoryTableTable> { $$HistoryTableTableFilterComposer(super.$state); @@ -5007,77 +4926,6 @@ class $$HistoryTableTableOrderingComposer ColumnOrderings(column, joinBuilders: joinBuilders)); } -class $$HistoryTableTableTableManager extends RootTableManager< - _$AppDatabase, - $HistoryTableTable, - HistoryTableData, - $$HistoryTableTableFilterComposer, - $$HistoryTableTableOrderingComposer, - $$HistoryTableTableCreateCompanionBuilder, - $$HistoryTableTableUpdateCompanionBuilder, - ( - HistoryTableData, - BaseReferences<_$AppDatabase, $HistoryTableTable, HistoryTableData> - ), - HistoryTableData, - PrefetchHooks Function()> { - $$HistoryTableTableTableManager(_$AppDatabase db, $HistoryTableTable table) - : super(TableManagerState( - db: db, - table: table, - filteringComposer: - $$HistoryTableTableFilterComposer(ComposerState(db, table)), - orderingComposer: - $$HistoryTableTableOrderingComposer(ComposerState(db, table)), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value createdAt = const Value.absent(), - Value type = const Value.absent(), - Value itemId = const Value.absent(), - Value> data = const Value.absent(), - }) => - HistoryTableCompanion( - id: id, - createdAt: createdAt, - type: type, - itemId: itemId, - data: data, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - Value createdAt = const Value.absent(), - required HistoryEntryType type, - required String itemId, - required Map data, - }) => - HistoryTableCompanion.insert( - id: id, - createdAt: createdAt, - type: type, - itemId: itemId, - data: data, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - )); -} - -typedef $$HistoryTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $HistoryTableTable, - HistoryTableData, - $$HistoryTableTableFilterComposer, - $$HistoryTableTableOrderingComposer, - $$HistoryTableTableCreateCompanionBuilder, - $$HistoryTableTableUpdateCompanionBuilder, - ( - HistoryTableData, - BaseReferences<_$AppDatabase, $HistoryTableTable, HistoryTableData> - ), - HistoryTableData, - PrefetchHooks Function()>; typedef $$LyricsTableTableCreateCompanionBuilder = LyricsTableCompanion Function({ Value id, @@ -5091,6 +4939,45 @@ typedef $$LyricsTableTableUpdateCompanionBuilder = LyricsTableCompanion Value data, }); +class $$LyricsTableTableTableManager extends RootTableManager< + _$AppDatabase, + $LyricsTableTable, + LyricsTableData, + $$LyricsTableTableFilterComposer, + $$LyricsTableTableOrderingComposer, + $$LyricsTableTableCreateCompanionBuilder, + $$LyricsTableTableUpdateCompanionBuilder> { + $$LyricsTableTableTableManager(_$AppDatabase db, $LyricsTableTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$LyricsTableTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$LyricsTableTableOrderingComposer(ComposerState(db, table)), + updateCompanionCallback: ({ + Value id = const Value.absent(), + Value trackId = const Value.absent(), + Value data = const Value.absent(), + }) => + LyricsTableCompanion( + id: id, + trackId: trackId, + data: data, + ), + createCompanionCallback: ({ + Value id = const Value.absent(), + required String trackId, + required SubtitleSimple data, + }) => + LyricsTableCompanion.insert( + id: id, + trackId: trackId, + data: data, + ), + )); +} + class $$LyricsTableTableFilterComposer extends FilterComposer<_$AppDatabase, $LyricsTableTable> { $$LyricsTableTableFilterComposer(super.$state); @@ -5131,69 +5018,6 @@ class $$LyricsTableTableOrderingComposer ColumnOrderings(column, joinBuilders: joinBuilders)); } -class $$LyricsTableTableTableManager extends RootTableManager< - _$AppDatabase, - $LyricsTableTable, - LyricsTableData, - $$LyricsTableTableFilterComposer, - $$LyricsTableTableOrderingComposer, - $$LyricsTableTableCreateCompanionBuilder, - $$LyricsTableTableUpdateCompanionBuilder, - ( - LyricsTableData, - BaseReferences<_$AppDatabase, $LyricsTableTable, LyricsTableData> - ), - LyricsTableData, - PrefetchHooks Function()> { - $$LyricsTableTableTableManager(_$AppDatabase db, $LyricsTableTable table) - : super(TableManagerState( - db: db, - table: table, - filteringComposer: - $$LyricsTableTableFilterComposer(ComposerState(db, table)), - orderingComposer: - $$LyricsTableTableOrderingComposer(ComposerState(db, table)), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value trackId = const Value.absent(), - Value data = const Value.absent(), - }) => - LyricsTableCompanion( - id: id, - trackId: trackId, - data: data, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - required String trackId, - required SubtitleSimple data, - }) => - LyricsTableCompanion.insert( - id: id, - trackId: trackId, - data: data, - ), - withReferenceMapper: (p0) => p0 - .map((e) => (e.readTable(table), BaseReferences(db, table, e))) - .toList(), - prefetchHooksCallback: null, - )); -} - -typedef $$LyricsTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $LyricsTableTable, - LyricsTableData, - $$LyricsTableTableFilterComposer, - $$LyricsTableTableOrderingComposer, - $$LyricsTableTableCreateCompanionBuilder, - $$LyricsTableTableUpdateCompanionBuilder, - ( - LyricsTableData, - BaseReferences<_$AppDatabase, $LyricsTableTable, LyricsTableData> - ), - LyricsTableData, - PrefetchHooks Function()>; typedef $$AudioPlayerStateTableTableCreateCompanionBuilder = AudioPlayerStateTableCompanion Function({ Value id, @@ -5211,25 +5035,52 @@ typedef $$AudioPlayerStateTableTableUpdateCompanionBuilder Value> collections, }); -final class $$AudioPlayerStateTableTableReferences extends BaseReferences< - _$AppDatabase, $AudioPlayerStateTableTable, AudioPlayerStateTableData> { - $$AudioPlayerStateTableTableReferences( - super.$_db, super.$_table, super.$_typedResult); - - static MultiTypedResultKey<$PlaylistTableTable, List> - _playlistTableRefsTable(_$AppDatabase db) => - MultiTypedResultKey.fromTable(db.playlistTable, - aliasName: $_aliasNameGenerator(db.audioPlayerStateTable.id, - db.playlistTable.audioPlayerStateId)); - - $$PlaylistTableTableProcessedTableManager get playlistTableRefs { - final manager = $$PlaylistTableTableTableManager($_db, $_db.playlistTable) - .filter((f) => f.audioPlayerStateId.id($_item.id)); - - final cache = $_typedResult.readTableOrNull(_playlistTableRefsTable($_db)); - return ProcessedTableManager( - manager.$state.copyWith(prefetchedData: cache)); - } +class $$AudioPlayerStateTableTableTableManager extends RootTableManager< + _$AppDatabase, + $AudioPlayerStateTableTable, + AudioPlayerStateTableData, + $$AudioPlayerStateTableTableFilterComposer, + $$AudioPlayerStateTableTableOrderingComposer, + $$AudioPlayerStateTableTableCreateCompanionBuilder, + $$AudioPlayerStateTableTableUpdateCompanionBuilder> { + $$AudioPlayerStateTableTableTableManager( + _$AppDatabase db, $AudioPlayerStateTableTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: $$AudioPlayerStateTableTableFilterComposer( + ComposerState(db, table)), + orderingComposer: $$AudioPlayerStateTableTableOrderingComposer( + ComposerState(db, table)), + updateCompanionCallback: ({ + Value id = const Value.absent(), + Value playing = const Value.absent(), + Value loopMode = const Value.absent(), + Value shuffled = const Value.absent(), + Value> collections = const Value.absent(), + }) => + AudioPlayerStateTableCompanion( + id: id, + playing: playing, + loopMode: loopMode, + shuffled: shuffled, + collections: collections, + ), + createCompanionCallback: ({ + Value id = const Value.absent(), + required bool playing, + required PlaylistMode loopMode, + required bool shuffled, + required List collections, + }) => + AudioPlayerStateTableCompanion.insert( + id: id, + playing: playing, + loopMode: loopMode, + shuffled: shuffled, + collections: collections, + ), + )); } class $$AudioPlayerStateTableTableFilterComposer @@ -5307,101 +5158,6 @@ class $$AudioPlayerStateTableTableOrderingComposer ColumnOrderings(column, joinBuilders: joinBuilders)); } -class $$AudioPlayerStateTableTableTableManager extends RootTableManager< - _$AppDatabase, - $AudioPlayerStateTableTable, - AudioPlayerStateTableData, - $$AudioPlayerStateTableTableFilterComposer, - $$AudioPlayerStateTableTableOrderingComposer, - $$AudioPlayerStateTableTableCreateCompanionBuilder, - $$AudioPlayerStateTableTableUpdateCompanionBuilder, - (AudioPlayerStateTableData, $$AudioPlayerStateTableTableReferences), - AudioPlayerStateTableData, - PrefetchHooks Function({bool playlistTableRefs})> { - $$AudioPlayerStateTableTableTableManager( - _$AppDatabase db, $AudioPlayerStateTableTable table) - : super(TableManagerState( - db: db, - table: table, - filteringComposer: $$AudioPlayerStateTableTableFilterComposer( - ComposerState(db, table)), - orderingComposer: $$AudioPlayerStateTableTableOrderingComposer( - ComposerState(db, table)), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value playing = const Value.absent(), - Value loopMode = const Value.absent(), - Value shuffled = const Value.absent(), - Value> collections = const Value.absent(), - }) => - AudioPlayerStateTableCompanion( - id: id, - playing: playing, - loopMode: loopMode, - shuffled: shuffled, - collections: collections, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - required bool playing, - required PlaylistMode loopMode, - required bool shuffled, - required List collections, - }) => - AudioPlayerStateTableCompanion.insert( - id: id, - playing: playing, - loopMode: loopMode, - shuffled: shuffled, - collections: collections, - ), - withReferenceMapper: (p0) => p0 - .map((e) => ( - e.readTable(table), - $$AudioPlayerStateTableTableReferences(db, table, e) - )) - .toList(), - prefetchHooksCallback: ({playlistTableRefs = false}) { - return PrefetchHooks( - db: db, - explicitlyWatchedTables: [ - if (playlistTableRefs) db.playlistTable - ], - addJoins: null, - getPrefetchedDataCallback: (items) async { - return [ - if (playlistTableRefs) - await $_getPrefetchedData( - currentTable: table, - referencedTable: $$AudioPlayerStateTableTableReferences - ._playlistTableRefsTable(db), - managerFromTypedResult: (p0) => - $$AudioPlayerStateTableTableReferences( - db, table, p0) - .playlistTableRefs, - referencedItemsForCurrentItem: - (item, referencedItems) => referencedItems - .where((e) => e.audioPlayerStateId == item.id), - typedResults: items) - ]; - }, - ); - }, - )); -} - -typedef $$AudioPlayerStateTableTableProcessedTableManager - = ProcessedTableManager< - _$AppDatabase, - $AudioPlayerStateTableTable, - AudioPlayerStateTableData, - $$AudioPlayerStateTableTableFilterComposer, - $$AudioPlayerStateTableTableOrderingComposer, - $$AudioPlayerStateTableTableCreateCompanionBuilder, - $$AudioPlayerStateTableTableUpdateCompanionBuilder, - (AudioPlayerStateTableData, $$AudioPlayerStateTableTableReferences), - AudioPlayerStateTableData, - PrefetchHooks Function({bool playlistTableRefs})>; typedef $$PlaylistTableTableCreateCompanionBuilder = PlaylistTableCompanion Function({ Value id, @@ -5415,44 +5171,43 @@ typedef $$PlaylistTableTableUpdateCompanionBuilder = PlaylistTableCompanion Value index, }); -final class $$PlaylistTableTableReferences extends BaseReferences<_$AppDatabase, - $PlaylistTableTable, PlaylistTableData> { - $$PlaylistTableTableReferences( - super.$_db, super.$_table, super.$_typedResult); - - static $AudioPlayerStateTableTable _audioPlayerStateIdTable( - _$AppDatabase db) => - db.audioPlayerStateTable.createAlias($_aliasNameGenerator( - db.playlistTable.audioPlayerStateId, db.audioPlayerStateTable.id)); - - $$AudioPlayerStateTableTableProcessedTableManager? get audioPlayerStateId { - if ($_item.audioPlayerStateId == null) return null; - final manager = $$AudioPlayerStateTableTableTableManager( - $_db, $_db.audioPlayerStateTable) - .filter((f) => f.id($_item.audioPlayerStateId!)); - final item = $_typedResult.readTableOrNull(_audioPlayerStateIdTable($_db)); - if (item == null) return manager; - return ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item])); - } - - static MultiTypedResultKey<$PlaylistMediaTableTable, - List> _playlistMediaTableRefsTable( - _$AppDatabase db) => - MultiTypedResultKey.fromTable(db.playlistMediaTable, - aliasName: $_aliasNameGenerator( - db.playlistTable.id, db.playlistMediaTable.playlistId)); - - $$PlaylistMediaTableTableProcessedTableManager get playlistMediaTableRefs { - final manager = - $$PlaylistMediaTableTableTableManager($_db, $_db.playlistMediaTable) - .filter((f) => f.playlistId.id($_item.id)); - - final cache = - $_typedResult.readTableOrNull(_playlistMediaTableRefsTable($_db)); - return ProcessedTableManager( - manager.$state.copyWith(prefetchedData: cache)); - } +class $$PlaylistTableTableTableManager extends RootTableManager< + _$AppDatabase, + $PlaylistTableTable, + PlaylistTableData, + $$PlaylistTableTableFilterComposer, + $$PlaylistTableTableOrderingComposer, + $$PlaylistTableTableCreateCompanionBuilder, + $$PlaylistTableTableUpdateCompanionBuilder> { + $$PlaylistTableTableTableManager(_$AppDatabase db, $PlaylistTableTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$PlaylistTableTableFilterComposer(ComposerState(db, table)), + orderingComposer: + $$PlaylistTableTableOrderingComposer(ComposerState(db, table)), + updateCompanionCallback: ({ + Value id = const Value.absent(), + Value audioPlayerStateId = const Value.absent(), + Value index = const Value.absent(), + }) => + PlaylistTableCompanion( + id: id, + audioPlayerStateId: audioPlayerStateId, + index: index, + ), + createCompanionCallback: ({ + Value id = const Value.absent(), + required int audioPlayerStateId, + required int index, + }) => + PlaylistTableCompanion.insert( + id: id, + audioPlayerStateId: audioPlayerStateId, + index: index, + ), + )); } class $$PlaylistTableTableFilterComposer @@ -5532,118 +5287,6 @@ class $$PlaylistTableTableOrderingComposer } } -class $$PlaylistTableTableTableManager extends RootTableManager< - _$AppDatabase, - $PlaylistTableTable, - PlaylistTableData, - $$PlaylistTableTableFilterComposer, - $$PlaylistTableTableOrderingComposer, - $$PlaylistTableTableCreateCompanionBuilder, - $$PlaylistTableTableUpdateCompanionBuilder, - (PlaylistTableData, $$PlaylistTableTableReferences), - PlaylistTableData, - PrefetchHooks Function( - {bool audioPlayerStateId, bool playlistMediaTableRefs})> { - $$PlaylistTableTableTableManager(_$AppDatabase db, $PlaylistTableTable table) - : super(TableManagerState( - db: db, - table: table, - filteringComposer: - $$PlaylistTableTableFilterComposer(ComposerState(db, table)), - orderingComposer: - $$PlaylistTableTableOrderingComposer(ComposerState(db, table)), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value audioPlayerStateId = const Value.absent(), - Value index = const Value.absent(), - }) => - PlaylistTableCompanion( - id: id, - audioPlayerStateId: audioPlayerStateId, - index: index, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - required int audioPlayerStateId, - required int index, - }) => - PlaylistTableCompanion.insert( - id: id, - audioPlayerStateId: audioPlayerStateId, - index: index, - ), - withReferenceMapper: (p0) => p0 - .map((e) => ( - e.readTable(table), - $$PlaylistTableTableReferences(db, table, e) - )) - .toList(), - prefetchHooksCallback: ( - {audioPlayerStateId = false, playlistMediaTableRefs = false}) { - return PrefetchHooks( - db: db, - explicitlyWatchedTables: [ - if (playlistMediaTableRefs) db.playlistMediaTable - ], - addJoins: < - T extends TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic>>(state) { - if (audioPlayerStateId) { - state = state.withJoin( - currentTable: table, - currentColumn: table.audioPlayerStateId, - referencedTable: $$PlaylistTableTableReferences - ._audioPlayerStateIdTable(db), - referencedColumn: $$PlaylistTableTableReferences - ._audioPlayerStateIdTable(db) - .id, - ) as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return [ - if (playlistMediaTableRefs) - await $_getPrefetchedData( - currentTable: table, - referencedTable: $$PlaylistTableTableReferences - ._playlistMediaTableRefsTable(db), - managerFromTypedResult: (p0) => - $$PlaylistTableTableReferences(db, table, p0) - .playlistMediaTableRefs, - referencedItemsForCurrentItem: - (item, referencedItems) => referencedItems - .where((e) => e.playlistId == item.id), - typedResults: items) - ]; - }, - ); - }, - )); -} - -typedef $$PlaylistTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $PlaylistTableTable, - PlaylistTableData, - $$PlaylistTableTableFilterComposer, - $$PlaylistTableTableOrderingComposer, - $$PlaylistTableTableCreateCompanionBuilder, - $$PlaylistTableTableUpdateCompanionBuilder, - (PlaylistTableData, $$PlaylistTableTableReferences), - PlaylistTableData, - PrefetchHooks Function( - {bool audioPlayerStateId, bool playlistMediaTableRefs})>; typedef $$PlaylistMediaTableTableCreateCompanionBuilder = PlaylistMediaTableCompanion Function({ Value id, @@ -5661,24 +5304,52 @@ typedef $$PlaylistMediaTableTableUpdateCompanionBuilder Value?> httpHeaders, }); -final class $$PlaylistMediaTableTableReferences extends BaseReferences< - _$AppDatabase, $PlaylistMediaTableTable, PlaylistMediaTableData> { - $$PlaylistMediaTableTableReferences( - super.$_db, super.$_table, super.$_typedResult); - - static $PlaylistTableTable _playlistIdTable(_$AppDatabase db) => - db.playlistTable.createAlias($_aliasNameGenerator( - db.playlistMediaTable.playlistId, db.playlistTable.id)); - - $$PlaylistTableTableProcessedTableManager? get playlistId { - if ($_item.playlistId == null) return null; - final manager = $$PlaylistTableTableTableManager($_db, $_db.playlistTable) - .filter((f) => f.id($_item.playlistId!)); - final item = $_typedResult.readTableOrNull(_playlistIdTable($_db)); - if (item == null) return manager; - return ProcessedTableManager( - manager.$state.copyWith(prefetchedData: [item])); - } +class $$PlaylistMediaTableTableTableManager extends RootTableManager< + _$AppDatabase, + $PlaylistMediaTableTable, + PlaylistMediaTableData, + $$PlaylistMediaTableTableFilterComposer, + $$PlaylistMediaTableTableOrderingComposer, + $$PlaylistMediaTableTableCreateCompanionBuilder, + $$PlaylistMediaTableTableUpdateCompanionBuilder> { + $$PlaylistMediaTableTableTableManager( + _$AppDatabase db, $PlaylistMediaTableTable table) + : super(TableManagerState( + db: db, + table: table, + filteringComposer: + $$PlaylistMediaTableTableFilterComposer(ComposerState(db, table)), + orderingComposer: $$PlaylistMediaTableTableOrderingComposer( + ComposerState(db, table)), + updateCompanionCallback: ({ + Value id = const Value.absent(), + Value playlistId = const Value.absent(), + Value uri = const Value.absent(), + Value?> extras = const Value.absent(), + Value?> httpHeaders = const Value.absent(), + }) => + PlaylistMediaTableCompanion( + id: id, + playlistId: playlistId, + uri: uri, + extras: extras, + httpHeaders: httpHeaders, + ), + createCompanionCallback: ({ + Value id = const Value.absent(), + required int playlistId, + required String uri, + Value?> extras = const Value.absent(), + Value?> httpHeaders = const Value.absent(), + }) => + PlaylistMediaTableCompanion.insert( + id: id, + playlistId: playlistId, + uri: uri, + extras: extras, + httpHeaders: httpHeaders, + ), + )); } class $$PlaylistMediaTableTableFilterComposer @@ -5760,110 +5431,6 @@ class $$PlaylistMediaTableTableOrderingComposer } } -class $$PlaylistMediaTableTableTableManager extends RootTableManager< - _$AppDatabase, - $PlaylistMediaTableTable, - PlaylistMediaTableData, - $$PlaylistMediaTableTableFilterComposer, - $$PlaylistMediaTableTableOrderingComposer, - $$PlaylistMediaTableTableCreateCompanionBuilder, - $$PlaylistMediaTableTableUpdateCompanionBuilder, - (PlaylistMediaTableData, $$PlaylistMediaTableTableReferences), - PlaylistMediaTableData, - PrefetchHooks Function({bool playlistId})> { - $$PlaylistMediaTableTableTableManager( - _$AppDatabase db, $PlaylistMediaTableTable table) - : super(TableManagerState( - db: db, - table: table, - filteringComposer: - $$PlaylistMediaTableTableFilterComposer(ComposerState(db, table)), - orderingComposer: $$PlaylistMediaTableTableOrderingComposer( - ComposerState(db, table)), - updateCompanionCallback: ({ - Value id = const Value.absent(), - Value playlistId = const Value.absent(), - Value uri = const Value.absent(), - Value?> extras = const Value.absent(), - Value?> httpHeaders = const Value.absent(), - }) => - PlaylistMediaTableCompanion( - id: id, - playlistId: playlistId, - uri: uri, - extras: extras, - httpHeaders: httpHeaders, - ), - createCompanionCallback: ({ - Value id = const Value.absent(), - required int playlistId, - required String uri, - Value?> extras = const Value.absent(), - Value?> httpHeaders = const Value.absent(), - }) => - PlaylistMediaTableCompanion.insert( - id: id, - playlistId: playlistId, - uri: uri, - extras: extras, - httpHeaders: httpHeaders, - ), - withReferenceMapper: (p0) => p0 - .map((e) => ( - e.readTable(table), - $$PlaylistMediaTableTableReferences(db, table, e) - )) - .toList(), - prefetchHooksCallback: ({playlistId = false}) { - return PrefetchHooks( - db: db, - explicitlyWatchedTables: [], - addJoins: < - T extends TableManagerState< - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic, - dynamic>>(state) { - if (playlistId) { - state = state.withJoin( - currentTable: table, - currentColumn: table.playlistId, - referencedTable: $$PlaylistMediaTableTableReferences - ._playlistIdTable(db), - referencedColumn: $$PlaylistMediaTableTableReferences - ._playlistIdTable(db) - .id, - ) as T; - } - - return state; - }, - getPrefetchedDataCallback: (items) async { - return []; - }, - ); - }, - )); -} - -typedef $$PlaylistMediaTableTableProcessedTableManager = ProcessedTableManager< - _$AppDatabase, - $PlaylistMediaTableTable, - PlaylistMediaTableData, - $$PlaylistMediaTableTableFilterComposer, - $$PlaylistMediaTableTableOrderingComposer, - $$PlaylistMediaTableTableCreateCompanionBuilder, - $$PlaylistMediaTableTableUpdateCompanionBuilder, - (PlaylistMediaTableData, $$PlaylistMediaTableTableReferences), - PlaylistMediaTableData, - PrefetchHooks Function({bool playlistId})>; - class $AppDatabaseManager { final _$AppDatabase _db; $AppDatabaseManager(this._db); diff --git a/pubspec.lock b/pubspec.lock index 5098386..ed1e4b0 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -186,10 +186,10 @@ packages: dependency: "direct main" description: name: cached_network_image - sha256: "7c1183e361e5c8b0a0f21a28401eecdbde252441106a9816400dd4c2b2424916" + sha256: "4a5d8d2c728b0f3d0245f69f921d7be90cae4c2fd5288f773088672c0893f819" url: "https://pub.dev" source: hosted - version: "3.4.1" + version: "3.4.0" cached_network_image_platform_interface: dependency: transitive description: @@ -202,10 +202,10 @@ packages: dependency: transitive description: name: cached_network_image_web - sha256: "980842f4e8e2535b8dbd3d5ca0b1f0ba66bf61d14cc3a17a9b4788a3685ba062" + sha256: "6322dde7a5ad92202e64df659241104a43db20ed594c41ca18de1014598d7996" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.0" characters: dependency: transitive description: @@ -305,11 +305,12 @@ packages: desktop_webview_window: dependency: "direct main" description: - name: desktop_webview_window - sha256: "57cf20d81689d5cbb1adfd0017e96b669398a669d927906073b0e42fc64111c0" - url: "https://pub.dev" - source: hosted - version: "0.2.3" + path: "packages/desktop_webview_window" + ref: "feat/cookies" + resolved-ref: f20e433d4a948515b35089d40069f7dd9bced9e4 + url: "https://github.com/KRTirtho/flutter-plugins.git" + source: git + version: "0.2.4" device_info_plus: dependency: "direct main" description: @@ -354,26 +355,18 @@ packages: dependency: "direct main" description: name: drift - sha256: "15b51e0ee1970455c0c3f7e560f3ac02ecb9c04711a9657586e470b234659dba" + sha256: "4e0ffee40d23f0b809e6cff1ad202886f51d629649073ed42d9cd1d194ea943e" url: "https://pub.dev" source: hosted - version: "2.20.0" + version: "2.19.1+1" drift_dev: dependency: "direct dev" description: name: drift_dev - sha256: b9ec6159a731288e805a44225ccbebad507dd84d52ab71352c52584f13199d2d + sha256: ac7647c6cedca99724ca300cff9181f6dd799428f8ed71f94159ed0528eaec26 url: "https://pub.dev" source: hosted - version: "2.20.1" - drift_flutter: - dependency: "direct main" - description: - name: drift_flutter - sha256: c670c947fe17ad149678a43fdbbfdb69321f0c83d315043e34e8ad2729e11f49 - url: "https://pub.dev" - source: hosted - version: "0.2.0" + version: "2.19.1" duration: dependency: "direct main" description: @@ -527,10 +520,10 @@ packages: dependency: transitive description: name: flutter_rust_bridge - sha256: "02720226035257ad0b571c1256f43df3e1556a499f6bcb004849a0faaa0e87f0" + sha256: fac14d2dd67eeba29a20e5d99fac0d4d9fcd552cdf6bf4f8945f7679c6b07b1d url: "https://pub.dev" source: hosted - version: "1.82.6" + version: "2.1.0" flutter_secure_storage: dependency: "direct main" description: @@ -1077,14 +1070,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" - puppeteer: - dependency: transitive - description: - name: puppeteer - sha256: a6752d4f09b510ae41911bfd0997f957e723d38facf320dd9ee0e5661108744a - url: "https://pub.dev" - source: hosted - version: "3.13.0" recase: dependency: transitive description: @@ -1206,14 +1191,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.4" - shelf_static: - dependency: transitive - description: - name: shelf_static - sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e - url: "https://pub.dev" - source: hosted - version: "1.1.2" shelf_web_socket: dependency: transitive description: @@ -1238,10 +1215,11 @@ packages: smtc_windows: dependency: "direct main" description: - name: smtc_windows - sha256: "0fd64d0c6a0c8ea4ea7908d31195eadc8f6d45d5245159fc67259e9e8704100f" - url: "https://pub.dev" - source: hosted + path: "packages/smtc_windows" + ref: cargokit + resolved-ref: "331636d8e378e3ac9ad30a4b0d3eed17d5a85fe9" + url: "https://github.com/KRTirtho/frb_plugins.git" + source: git version: "0.1.3" source_gen: dependency: transitive @@ -1303,10 +1281,10 @@ packages: dependency: "direct main" description: name: sqlite3 - sha256: "45f168ae2213201b54e09429ed0c593dc2c88c924a1488d6f9c523a255d567cb" + sha256: fde692580bee3379374af1f624eb3e113ab2865ecb161dbe2d8ac2de9735dbdb url: "https://pub.dev" source: hosted - version: "2.4.6" + version: "2.4.5" sqlite3_flutter_libs: dependency: "direct main" description: @@ -1387,14 +1365,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" - tuple: - dependency: transitive - description: - name: tuple - sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 - url: "https://pub.dev" - source: hosted - version: "2.0.2" typed_data: dependency: transitive description: @@ -1455,10 +1425,10 @@ packages: dependency: transitive description: name: web - sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "0.5.1" web_socket_channel: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index e98e420..ce858ff 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -39,7 +39,7 @@ dependencies: go_router: ^14.2.7 youtube_explode_dart: ^2.2.1 spotify: ^0.13.7 - cached_network_image: ^3.4.1 + cached_network_image: ^3.4.0 package_info_plus: ^8.0.2 skeletonizer: ^1.4.2 gap: ^3.0.1 @@ -51,13 +51,17 @@ dependencies: freeze: ^1.0.0 freezed_annotation: ^2.4.4 http: ^1.2.2 - drift: ^2.20.0 + drift: ^2.18.0 collection: ^1.18.0 piped_client: ^0.1.1 flutter_broadcasts: ^0.4.0 audio_session: ^0.1.21 audio_service: ^0.18.15 - smtc_windows: ^0.1.3 + smtc_windows: + git: + url: https://github.com/KRTirtho/frb_plugins.git + path: packages/smtc_windows + ref: cargokit win32_registry: ^1.1.4 uuid: ^4.4.2 device_info_plus: ^10.1.2 @@ -65,7 +69,6 @@ dependencies: shelf_router: ^1.1.4 dio: ^5.6.0 json_annotation: ^4.9.0 - drift_flutter: ^0.2.0 encrypt: ^5.0.3 flutter_secure_storage: ^9.2.2 window_manager: ^0.4.2 @@ -73,8 +76,8 @@ dependencies: json_serializable: ^6.8.0 path: ^1.9.0 path_provider: ^2.1.4 - sqlite3: ^2.4.6 - sqlite3_flutter_libs: ^0.5.24 + sqlite3_flutter_libs: ^0.5.23 + sqlite3: ^2.4.3 palette_generator: ^0.3.3+4 scrobblenaut: git: @@ -86,7 +89,11 @@ dependencies: animations: ^2.0.11 flutter_animate: ^4.5.0 duration: ^4.0.3 - desktop_webview_window: ^0.2.3 + desktop_webview_window: + git: + url: https://github.com/KRTirtho/flutter-plugins.git + ref: feat/cookies + path: packages/desktop_webview_window flutter_inappwebview: ^6.0.0 dev_dependencies: @@ -99,7 +106,7 @@ dev_dependencies: # package. See that file for information about deactivating specific lint # rules and activating additional ones. flutter_lints: ^4.0.0 - drift_dev: ^2.20.1 + drift_dev: ^2.18.0 build_runner: ^2.4.12 flutter_launcher_icons: ^0.13.1