Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(desktop): webview based login support #1688

Merged
merged 32 commits into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3fb003e
refactor(preferences): use Drift sql db for preferences
KRTirtho Jun 13, 2024
52d4f60
refactor: use drift for skip segments and source matches
KRTirtho Jun 14, 2024
bf6cec8
refactor(blacklist): use drift sql db instead of hive
KRTirtho Jun 14, 2024
a799ca5
chore: add encrypted text column support
KRTirtho Jun 16, 2024
d18f74f
refactor: use drift db based authentication
KRTirtho Jun 16, 2024
b9b7d5c
refactor: lastfm scrobbling to drift db
KRTirtho Jun 17, 2024
5936f08
refactor(volumeProvider): use notifier and kvstore for persistence
KRTirtho Jun 17, 2024
59041a2
chore: use .value for scrobble encrypted text
KRTirtho Jun 20, 2024
f79fede
chore: create new audio player centric playback notifier with drift p…
KRTirtho Jun 23, 2024
a83dd64
refactor: replace all instances of proxy playlist
KRTirtho Jun 24, 2024
75173e5
refactor: use provider based is track loading implementation
KRTirtho Jun 24, 2024
a621a45
chore: fix alternative track sources not showing up
KRTirtho Jun 24, 2024
1b420e6
chore: player skipping all tracks from cache
KRTirtho Jun 24, 2024
6c5cab9
chore: fix use SpotubeMedia to avoid duplicate sourceTrackProvider in…
KRTirtho Jun 25, 2024
4441886
chore: fix volume not being set after launch
KRTirtho Jun 25, 2024
08ac29c
refactor(stats): migrate stats to use drift db
KRTirtho Jun 29, 2024
1cfd377
refactor: synced lyric cache to use drift db
KRTirtho Jun 30, 2024
a3021e4
chore: removed unused files
KRTirtho Jun 30, 2024
ffb3a33
chore: add migration script to migrate hive to drift
KRTirtho Jun 30, 2024
261e1b6
chore: fix queue collections not being loaded
KRTirtho Jun 30, 2024
4c5564f
chore: use enum properties for history duration in top stats
KRTirtho Jun 30, 2024
3bdc46d
feat(stats): add lazy loading support
KRTirtho Jun 30, 2024
15bd58a
feat(desktop): implement webview based login
KRTirtho Jul 5, 2024
1284b40
chore: add linux dependencies and update CI + docker config
KRTirtho Jul 5, 2024
79b842d
chore: use flutter 3.19.6 to avoid window stretching error in windows
KRTirtho Jul 5, 2024
f2f35bd
chore: fix windows webview2 trying to store data in admin folders
KRTirtho Jul 5, 2024
7dd76d2
chore: fix windows cookie invalid characters
KRTirtho Jul 5, 2024
359b918
chore: fix windows playback not working for loop back ipv4
KRTirtho Jul 5, 2024
2f46fa3
chore: fix webview and app window freezing after successful login
KRTirtho Jul 6, 2024
2ce4853
chore: fix while loading playlists/album already playing ones doesn't…
KRTirtho Jul 6, 2024
ccea4a0
fix: changed source doesn't get saved and uses the wrong once again
KRTirtho Jul 6, 2024
86f5b80
chore: fix insert failing to invalid conflict check
KRTirtho Jul 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: fix insert failing to invalid conflict check
  • Loading branch information
KRTirtho committed Jul 6, 2024
commit 86f5b80177b5c1d3da2ff9fbe7694165c48ac190
2 changes: 1 addition & 1 deletion lib/provider/authentication/authentication.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class AuthenticationNotifier extends AsyncNotifier<AuthenticationTableData?> {

await database
.into(database.authenticationTable)
.insertOnConflictUpdate(refreshedCredentials);
.insert(refreshedCredentials, mode: InsertMode.replace);
}

Future<AuthenticationTableCompanion> credentialsFromCookie(
Expand Down
3 changes: 2 additions & 1 deletion lib/provider/spotify/lyrics/synced.dart
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,12 @@ class SyncedLyricsNotifier extends FamilyAsyncNotifier<SubtitleSimple, Track?> {
}

if (cachedLyrics == null || cachedLyrics.lyrics.isEmpty) {
await database.into(database.lyricsTable).insertOnConflictUpdate(
await database.into(database.lyricsTable).insert(
LyricsTableCompanion.insert(
trackId: track.id!,
data: lyrics,
),
mode: InsertMode.replace,
);
}

Expand Down
1 change: 1 addition & 0 deletions lib/provider/spotify/spotify.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ library spotify;

import 'dart:async';

import 'package:drift/drift.dart';
import 'package:spotube/models/database/database.dart';
import 'package:spotube/provider/database/database.dart';
import 'package:spotube/provider/spotify/utils/json_cast.dart';
Expand Down
9 changes: 6 additions & 3 deletions lib/utils/migrations/hive.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ Future<void> migrateAuthenticationInfo() async {

if (credentials == null) return;

await _database.into(_database.authenticationTable).insertOnConflictUpdate(
await _database.into(_database.authenticationTable).insert(
AuthenticationTableCompanion.insert(
accessToken: DecryptedText(credentials.accessToken),
cookie: DecryptedText(credentials.cookie),
expiration: credentials.expiration,
id: const Value(0),
),
mode: InsertMode.insertOrReplace,
);

AppLogger.log.i("✅ Migrated authentication info");
Expand All @@ -58,7 +59,7 @@ Future<void> migratePreferences() async {

if (preferences == null) return;

await _database.into(_database.preferencesTable).insertOnConflictUpdate(
await _database.into(_database.preferencesTable).insert(
PreferencesTableCompanion.insert(
id: const Value(0),
accentColorScheme: Value(preferences.accentColorScheme),
Expand Down Expand Up @@ -108,6 +109,7 @@ Future<void> migratePreferences() async {
systemTitleBar: Value(preferences.systemTitleBar),
themeMode: Value(preferences.themeMode),
),
mode: InsertMode.replace,
);

AppLogger.log.i("✅ Migrated preferences");
Expand Down Expand Up @@ -235,12 +237,13 @@ Future<void> migrateLastFmCredentials() async {

if (data == null) return;

await _database.into(_database.scrobblerTable).insertOnConflictUpdate(
await _database.into(_database.scrobblerTable).insert(
ScrobblerTableCompanion.insert(
id: const Value(0),
passwordHash: DecryptedText(data.passwordHash),
username: data.username,
),
mode: InsertMode.replace,
);

AppLogger.log.i("✅ Migrated Last.fm credentials");
Expand Down