WACUP

General => General Discussion => Topic started by: Master on November 24, 2023, 01:01:33 AM

Title: Drag and drop a music folder with a playlist file adds duplicate files
Post by: Master on November 24, 2023, 01:01:33 AM
Hi quick question:

When I drag and drop a folder (with mp3 files and a m3u playlist) to the playlist editor it always adds all files twice, it adds both the mp3s AND all the files inside the m3u playlist (the same) it seems. Old Winamp somehow filtered the dupe files when drag and dropping. I cant seem to find any WACUP setting for this unfortunately.

Can anyone help me out? Thanks in advance.

Version 1.9.20.17040
OS Win 10
Title: Re: Drag and drop a music folder with a playlist file adds duplicate files
Post by: dro on November 24, 2023, 01:31:35 AM
No such option currently exists & a smarter handling of drag+drop still needs to be coded so for now it'll just add what it's given even if that then duplicates things. I'm also not aware of Winamp having done any filtering of things either since both programs just parse the given list of files from the drag+drop action.

-dro
Title: Re: Drag and drop a music folder with a playlist file adds duplicate files
Post by: Master on November 24, 2023, 05:39:35 AM
Hi, thanks for your quick reply.

In Winamp 5.666 it works fine. It looks like they do some kind of duplicate file check when drag-and-dropping from file explorer.

I've added a video to make it more clear what I mean.
Title: Re: Drag and drop a music folder with a playlist file adds duplicate files
Post by: dro on November 24, 2023, 11:01:16 AM
I get what you're describing, I just don't remember it as being a thing Winamp would do from having previously worked on it to ignore playlists found within drag+drop actions though I see 5.666 acting as described from a quick re-test so I guess my memory of things isn't all that great nowadays. Maybe I need to consider adding in an option to ignore playlist files on drag+drop actions.

De-duplicating what WACUP adds from drag+drop actions along with trying to use the playlist ordering &/or metadata to get the expected track order to deal with Explorer not often providing files in the expected order (due to file creation, selection quirks in Explorer) is something already on my list of things to do. So doing all of that might be the more sensible thing to do with my time vs an option that imho could cause more issues than it helps, will have to have a think & see when I can schedule it into things.

-dro
Title: Re: Drag and drop a music folder with a playlist file adds duplicate files
Post by: Master on November 27, 2023, 02:25:44 PM
Thanks again for your reply, this was just an annoyance I encountered while using WACUP for the first time. I thought maybe it was some kind of setting but maybe it was not.

The strange thing is when I choose "Add folder" from the "playlist editor" it DOES filter out dupes and only adds a file  once when it contains mp3+m3u. Maybe some code could be reused there.
Title: Re: Drag and drop a music folder with a playlist file adds duplicate files
Post by: SoundLight on September 06, 2025, 04:29:54 AM
No such option currently exists & a smarter handling of drag+drop still needs to be coded so for now it'll just add what it's given even if that then duplicates things. I'm also not aware of Winamp having done any filtering of things either since both programs just parse the given list of files from the drag+drop action.

-dro

Btw, this is still present... kind of prevents new users starting to use Wacup as a librarian... opening m3u or other playlist files, or practically any file, creates duplicates, triplicates or quadruplicates

Wondering how to filter, with only the songs one wants to listen to bc now opening two albums of music = 24 mouseclicks easily and sitting by the screen

Thank you still, for your great work, i love the player in many other ways
Title: Re: Drag and drop a music folder with a playlist file adds duplicate files
Post by: olaflaten on March 06, 2026, 10:37:50 PM
I'm a new WACUP user, experiencing this as an annoyance as well. Using notepad, writing the path to my main music folder and saving it as an .m3u file, I have a shortcut to always updated playlist-format access to all my music with a double click. that's the way I've been doing it in winamp for ages.
Title: Solved an issue with duplicates in playlists
Post by: olaflaten on March 07, 2026, 08:28:18 PM
I haven't found a solution to this online thus far.

*English is not my first language.

*I had a friend help me over the phone, I'm not very technically savvy myself.  The explanation might not be the best. But readers more savvy than me should be able to piece it together.

As a new WACUP user, I noticed an issue I haven't had in WinAmp: Opening my entire music folder as an .m3u8 playlist gives me duplicates of most audio files, as the subdirectories of albums etc also contain playlist files such as .m3u8 and .m3u. I prefer to keep them there, allowing me to open a single album at a time. It's an old habit. But most often i want to open my media player and search around in my entire collection of music.

Up until now, I have used the method described here:
https://forums.winamp.com/forum/winamp/winamp-discussion/237207-shortcut-to-play-all-music-in-folder
To open my music folder as a playlist. I never liked WinAmps library. I just use the playlist, but since I want the playlist to be updated each time I open it and have added new music, this "soft hack" has been very useful. You just write the path to your music folder in a text editor like notepad and save it as an .m3u8 file.

In WinAmp, this didn't result in duplicates, but in Wacup it does. This issue had been discussed here, with an admin saying that no resolution has been found: https://getwacup.com/community/index.php?topic=1854.msg14156#msg14156

So....

What I have now is a .bat file to open all my music in Wacup, instead of the .m3u8 file I have used before.
A .bat file is a "batch" file, I don't really speak computer speak, but I think what I have is a script, basically?

Writing stuff into my text editor (notepad) and saving the file as a .bat file.

With my directories and file structure it looks like this:

@echo off
cd /d "M:\Musikk"
chcp 65001
dir /s /b *.mp3 *.flac *.aif *.aiff *.wma *.wav > O:\Annet\Hacking\Musikk.m3u8
cd /d "C:\Program Files (x86)\WACUP"
start wacup.exe "O:\Annet\Hacking\Musikk.m3u8"

The above is verbatim the exact text that the .bat file contains.

It instructs command prompt (you could probably use powershell too, but it might have to look a bit different.) to go into my music directory, read the entire thing and then write out as text the paths to all of my music files. Then it saves this list as an .m3u8 playlist in my specified location. Then it ties this batch/script/whatwouldyoucallit with the opening of the Wacup program file "wacup.exe" and also to open the newly generated/overwritten (with new music) .m3u8 music file.

More of the computer speak syntax poorly explained:

"@echo off"
This is a Windows command prompt command used at the beginning of batch files (.bat or .cmd) to prevent the command prompt from displaying each command it executes. It makes the script's output cleaner and hides the underlying code, ensuring only the results are visible.

"chcp 65001"
This is to ensure that the .m3u8 playlist file is UTF-8 encoded. I had some issues where music with foreign lettering such as "Молчат Дома" (Molchat Doma) and "林憶蓮" (Sandy Lam) wouldn't play. Using .m3u8 instead of .m3u files seems to be a good start, but not always an instant win.

"cd /d "M:\Musikk""
This helps command prompt do things in my music directories instead of the system disk which is default.

"dir /s /b *.mp3 *.flac *.aif *.aiff *.wma *.wav"
The dir command in Windows Command Prompt lists files and subdirectories in the current directory, with the "/s" part showing all subdirectories. The "/b" part prompts a "bare format (names only)". I think this means that it lists the path to each file instead of just the name of each file.
The audio file types "*.mp3" etc is a list of all the different file types in my collection of music. You need to put the star "*"before each file type.

"> O:\Annet\Hacking\Musikk.m3u8"
This is the prompt to create the .m3u8 playlist and where to put it.

...

I hope this can be useful to someone, somewhere!
Title: Re: Solved an issue with duplicates in playlists
Post by: dro on March 11, 2026, 01:32:10 PM
If you're telling it to just parse a folder from an entry in a playlist file then wacup is going to do that for _anything_ that it supports. If the playlist being loaded is also within the folder itself then it's going to be counted (it probably shouldn't per the other thread where you'd posted about this but it's how wacup is currently coded - what winamp does is unrelated as these are different programs) as part of the folder enumeration.

If the existing playlist file you were using was in a folder one level up from what's wanting to be enumerated then it shouldn't have been a problem as long as what's in that playlist file is done as an absolute file path (e.g. c:\my\music & _not_ music). As you've effectively created a batch script that is just doing what wacup is doing when given a path.
Quote
cd /d "C:\Program Files (x86)\WACUP"
start wacup.exe "O:\Annet\Hacking\Musikk.m3u8"
As for your batch script, the part above could probably just be start "C:\Program Files (x86)\WACUP\wacup.exe" "O:\Annet\Hacking\Musikk.m3u8" as changing the directory shouldn't be needed as long as the complete exe path works.