Created
March 29, 2022 02:30
-
-
Save webtroter/e8057b906762bebf09e04c21913f0eb6 to your computer and use it in GitHub Desktop.
Change Public Playlists to Private
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -Module Spotishell | |
# Install and setup Spotishell | |
# https://github.com/wardbox/spotishell | |
$InformationPreference = "Continue" | |
# Set your spotify username here | |
$username = "myspotifyusername" | |
$public_playlists = Get-UserPlaylists -Id $username | Where-Object { $_.owner.uri -eq "spotify:user:$username" -and $_.public} | |
Write-Information $("There are {0} public playlist in {1} account" -f $public_playlists.Count, $username) | |
$selected_playlists = $public_playlists | |
# Uncomment the following line to be able to select some playlist | |
# The display is a bit ugly, but it works (on windows) | |
# $selected_playlists = $public_playlists | Out-GridView -OutputMode Multiple | |
$selected_playlists | ForEach-Object { Set-Playlist -Id $_.id -Public $false} | |
Write-Information $("{0} public playlist have been made private" -f $selected_playlists.Count) | |
# Uncomment the following line to undo (make all the playlist public) | |
# $public_playlists | ForEach-Object { Set-Playlist -Id $_.id -Public $true} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just wanted to say thanks for sharing this. Was able to remove all my playlists from being shown on my profile with it.