Adding a music to an existent playlist is overwriting previously created one of the same name instead of appending the new music.
How to reproduce
$ mpsyt
> / ncs cartoon on and on // Searching for a music.
### All search content..
> add 1 Dance-Electronic // Playlist "Dance-Electronic" don't exist yet and it's being created right now with the music of index 1 in it.
> / darkside alan walker // Searching for another music.
> add 1 Dance Electronic // Playlist "Dance Electronic" don't exist yet because of the space instead of the hyphen and then will be created as "Dance-Electronic" again overwriting the previously created one and erasing any musics in it.
I think the problem here is the verification of already created playlists, it's only verifying playlists with the exact same name that is specified in the command, while the correct would be to do so only after the replacement of spaces with hyphens.
My Environment
$ mpsyt --version
mpsyt version : 0.2.8
notes : released 17 February 2018
pafy version : 0.5.5 (youtube-dl backend)
youtube-dl version : 2019.12.25
Python version : 3.8.1 (default, Dec 21 2019, 20:57:38)
[GCC 9.2.0]
Processor :
Machine type : x86_64
Architecture : 64bit, ELF
Platform : Linux-5.4.6-arch3-1-x86_64-with-glibc2.2.5
sys.stdout.enc : utf-8
default enc : utf-8
Config dir : /home/deracinator/.config/mps-youtube
env:TERM : xterm-termite
env:SHELL : /bin/zsh
env:LANG : en_US.UTF-8
$ uname -a
Linux archlinux 5.4.6-arch3-1 #1 SMP PREEMPT Tue, 24 Dec 2019 04:36:53 +0000 x86_64 GNU/Linux
Adding a music to an existent playlist is overwriting previously created one of the same name instead of appending the new music.
How to reproduce
I think the problem here is the verification of already created playlists, it's only verifying playlists with the exact same name that is specified in the command, while the correct would be to do so only after the replacement of spaces with hyphens.
My Environment