diff --git a/lib/provider/spotify/views/home.dart b/lib/provider/spotify/views/home.dart index ad6a076a..3e186c24 100644 --- a/lib/provider/spotify/views/home.dart +++ b/lib/provider/spotify/views/home.dart @@ -1,5 +1,4 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:spotube/provider/authentication/authentication.dart'; import 'package:spotube/provider/custom_spotify_endpoint_provider.dart'; import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; @@ -7,16 +6,8 @@ final homeViewProvider = FutureProvider((ref) async { final country = ref.watch( userPreferencesProvider.select((s) => s.market), ); - final spTCookie = ref.watch( - authenticationProvider.select((s) => s.asData?.value?.getCookie("sp_t")), - ); - - if (spTCookie == null) return null; final spotify = ref.watch(customSpotifyEndpointProvider); - return spotify.getHomeFeed( - country: country, - spTCookie: spTCookie, - ); + return spotify.getHomeFeed(country: country); }); diff --git a/lib/provider/spotify/views/home_section.dart b/lib/provider/spotify/views/home_section.dart index 5eb9183d..e876065e 100644 --- a/lib/provider/spotify/views/home_section.dart +++ b/lib/provider/spotify/views/home_section.dart @@ -1,26 +1,19 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:spotube/models/spotify/home_feed.dart'; -import 'package:spotube/provider/authentication/authentication.dart'; import 'package:spotube/provider/custom_spotify_endpoint_provider.dart'; import 'package:spotube/provider/user_preferences/user_preferences_provider.dart'; final homeSectionViewProvider = - FutureProvider.family( + FutureProvider.family( (ref, sectionUri) async { final country = ref.watch( userPreferencesProvider.select((s) => s.market), ); - final spTCookie = ref.watch( - authenticationProvider.select((s) => s.asData?.value?.getCookie("sp_t")), - ); - - if (spTCookie == null) return null; final spotify = ref.watch(customSpotifyEndpointProvider); return spotify.getHomeFeedSection( sectionUri, country: country, - spTCookie: spTCookie, ); }); diff --git a/lib/services/custom_spotify_endpoints/spotify_endpoints.dart b/lib/services/custom_spotify_endpoints/spotify_endpoints.dart index 3b358366..964d3e76 100644 --- a/lib/services/custom_spotify_endpoints/spotify_endpoints.dart +++ b/lib/services/custom_spotify_endpoints/spotify_endpoints.dart @@ -117,7 +117,6 @@ class CustomSpotifyEndpoints { } Future getHomeFeed({ - required String spTCookie, required Market country, }) async { final headers = { @@ -137,7 +136,7 @@ class CustomSpotifyEndpoints { "operationName": "home", "variables": jsonEncode({ "timeZone": tz.local.name, - "sp_t": spTCookie, + "sp_t": "", "country": country.name, "facet": null, "sectionItemsLimit": 10 @@ -169,7 +168,6 @@ class CustomSpotifyEndpoints { Future getHomeFeedSection( String sectionUri, { - required String spTCookie, required Market country, }) async { final headers = { @@ -189,7 +187,7 @@ class CustomSpotifyEndpoints { "operationName": "homeSection", "variables": jsonEncode({ "timeZone": tz.local.name, - "sp_t": spTCookie, + "sp_t": "", "country": country.name, "uri": sectionUri }),