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

just cleared confusion and prevent invalid snippet error due to disallowed character passed to youtube api #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ def create(
save_to_sync: bool,
):
"""Create a YouTube Playlist from Spotify Playlist"""

not_allowed_symbols_for_title = [">","<"]
if any([symbol in name for symbol in not_allowed_symbols_for_title]):
return click.secho(f"Aborting : Your playlist name contains disallowed character.\nHere is list of disallowed character : {not_allowed_symbols_for_title}",fg="red")

spotify = SpotifyClient()
youtube = YouTubeClient()
Expand Down Expand Up @@ -154,7 +158,7 @@ def sync(
for playlist in playlists_to_be_synced:
if not only_link:
click.secho(
f"Syncing YouTube: {playlist['youtube_playlist_id']} to Spotify: {playlist['spotify_playlist_id']}", fg="blue"
f"Syncing YouTube: {playlist['youtube_playlist_id']} with Spotify: {playlist['spotify_playlist_id']}", fg="blue"
)

spotify_playlist = spotify.get_playlist(playlist["spotify_playlist_id"])
Expand Down