mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 15:26:01 +03:00
[GH-ISSUE #107] Enhancement - Add an option to remove duplicate songs from a playlist #81
Labels
No labels
a/b
bug
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
yt-error
yt-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ytmusicapi#81
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sheenwins on GitHub (Nov 18, 2020).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/107
I like copying Spotify playlists over to YoutubeMusic and then adding that playlist to my main playlist in YoutubeMusic. However, doing this causes songs to duplicate when they already exist. I would love an option to automatically remove duplicate songs in any given playlist. Seem doable?
@sigma67 commented on GitHub (Nov 18, 2020):
See here: https://ytmusicapi.readthedocs.io/en/latest/reference.html#ytmusicapi.YTMusic.add_playlist_items
You can choose to not add duplicates when using add_playlist_items.
You can implement this yourself using get_playlist and remove_playlist_items.
@sheenwins commented on GitHub (Nov 19, 2020):
Hi and thanks for the reply!
looking at spotifyplaylist_to_gmusic, it seems to be exactly what I want.
great job!
however, I'm still struggling with figuring out how to supply a destination
YTMusic playlist name/id.
what would the command line be to copy a spotify playlist to an already
existing YTMusic playlist?
im working on my python skills and I was able to successfully run the
ytmusicapi functions, but it's gonna take me a while to get a working
project together...so hoping you can help me out!
Thanks!
Jeff
On Wed, Nov 18, 2020 at 8:22 AM sigmatics notifications@github.com wrote:
@sigma67 commented on GitHub (Nov 19, 2020):
You can use the command line switch
--update. You need to provide the correct name of the playlist you want to update. From the project description:Despite the description, this switch also works with YouTube Music.
Hope that helps!
@sheenwins commented on GitHub (Nov 19, 2020):
thank you, that worked!
I was confused with the arguments documentation:
-u UPDATE, --update UPDATE
might be better as:
-u <PLAYLIST_NAME>
or
-u PLAYLIST
Thanks!!
On Thu, Nov 19, 2020 at 9:45 AM sigmatics notifications@github.com wrote:
@sheenwins commented on GitHub (Nov 20, 2020):
ok, I'm making some progress. I'm able to copy a spotify playlist to a
youtubemusic playlist with it deleting all the songs in the destination
playlist first. and im also able to use remove_playlist_items to remove
some songs from that playlist after. however...
is there a way to use YouTube.py to copy a playlist from spotify to an
existing youttubemusic playlist without deleting all the tracks in that
destination playlist? that way, i can manually add to that playlist and
not worry abt it getting deleted when it gets 'refreshed' from spotify.
and if so, also have it not add duplicates?
thank you for your help!
Jeff
On Wed, Nov 18, 2020 at 8:22 AM sigmatics notifications@github.com wrote:
@sigma67 commented on GitHub (Nov 20, 2020):
Not yet, but feel free to fork and modify the code in spotifyplaylist_to_gmusic to your liking