• Synchronize a Spotify track or playlist using spotdl CLI. If a .spotdl file exists for the given name, resumes sync from it; otherwise, performs an initial sync from the URL and saves the .spotdl file. Returns the path to the folder where files are stored.

    Parameters

    • url: string

      Spotify track or playlist URL

    • name: string

      Base name for the .spotdl file and subdirectory

    • dir: string = default_dir

      Optional base directory to store data (defaults to default_dir)

    Returns Promise<string>