Fix playlist import after API keys refactor merge
Remove unused ProviderCredentials parameters from playlist import functions. The proxy now handles all provider credentials, making these parameters obsolete. Changes: - preview_public_playlist: Remove spotify_creds and tidal_creds params - import_public_playlist: Remove spotify_creds and tidal_creds params - Update all callers to remove None, None arguments - Remove unused ProviderCredentials import This fixes compilation error: error[E0061]: this function takes 1 argument but 3 arguments were supplied
This commit is contained in:
1 parent
2b04d05af4
commit
d530b13497
2 files changed
+4
-10
No files matched your search
@@ -13,7 +13,7 @@ pub async fn playlist_import_preview(
|
||||
) -> Result<ImportPlaylist, String> {
|
||||
log::info!("Command: playlist_import_preview {}", url);
|
||||
|
||||
preview_public_playlist(&url, None, None)
|
||||
preview_public_playlist(&url)
|
||||
.await
|
||||
.map_err(|e| e.to_string())
|
||||
}
|
||||
@@ -33,8 +33,6 @@ pub async fn playlist_import_execute(
|
||||
&client,
|
||||
name_override.as_deref(),
|
||||
is_public.unwrap_or(false),
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.await
|
||||
.map_err(|e| e.to_string())
|
||||
|
||||
@@ -4,17 +4,15 @@ use crate::api::QobuzClient;
|
||||
use crate::playlist_import::errors::PlaylistImportError;
|
||||
use crate::playlist_import::match_qobuz::match_tracks;
|
||||
use crate::playlist_import::models::{ImportPlaylist, ImportSummary};
|
||||
use crate::playlist_import::providers::{detect_provider, fetch_playlist, ProviderCredentials};
|
||||
use crate::playlist_import::providers::{detect_provider, fetch_playlist};
|
||||
|
||||
const ADD_CHUNK_SIZE: usize = 50;
|
||||
|
||||
pub async fn preview_public_playlist(
|
||||
url: &str,
|
||||
spotify_creds: Option<ProviderCredentials>,
|
||||
tidal_creds: Option<ProviderCredentials>,
|
||||
) -> Result<ImportPlaylist, PlaylistImportError> {
|
||||
let provider = detect_provider(url)?;
|
||||
fetch_playlist(provider, spotify_creds, tidal_creds).await
|
||||
fetch_playlist(provider).await
|
||||
}
|
||||
|
||||
pub async fn import_public_playlist(
|
||||
@@ -22,10 +20,8 @@ pub async fn import_public_playlist(
|
||||
client: &QobuzClient,
|
||||
name_override: Option<&str>,
|
||||
is_public: bool,
|
||||
spotify_creds: Option<ProviderCredentials>,
|
||||
tidal_creds: Option<ProviderCredentials>,
|
||||
) -> Result<ImportSummary, PlaylistImportError> {
|
||||
let playlist = preview_public_playlist(url, spotify_creds, tidal_creds).await?;
|
||||
let playlist = preview_public_playlist(url).await?;
|
||||
let matches = match_tracks(client, &playlist.tracks).await?;
|
||||
|
||||
let mut matched_track_ids = Vec::new();
|
||||
|
||||
Reference in new issue
Block a user