Bug 313791

Summary: "Remove duplicates" function does not work completely
Product: [Applications] amarok Reporter: Manuel Ullmann <labre>
Component: PlaylistAssignee: Amarok Bugs <amarok-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: e.m.a.t.i.r.o.v, gopesh.7500, ralf-engels, teo
Priority: NOR    
Version First Reported In: 2.8.0   
Target Milestone: later   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Amarok showing playlist before removing duplicates.
Amarok showing playlist after removing duplicates.
Amarok showing playlist before removing duplicates.
Amarok showing playlist after removing duplicates.
Before remove duplicates (Amarok 2.8.0)
After removing duplicates (Amarok v2.8.0)
Amarok jingle ripped from streamripper
Icecast config for local server configuration

Description Manuel Ullmann 2013-01-23 21:59:51 UTC
The "remove duplicates" function does not work for my random sorted playlist. One duplicate remains in the playlist. If I sort it by filename and insert one file, it does not work entirely. Two or more duplicates are detected, beginning with the second. The appended track may not be the last one. For this case the function does also work.

Reproducible: Always

Steps to Reproduce:
1. Append tow or more duplicates to the playlist, which is not one of the last entry (see also details).
2. Use the "remove duplicates" function.

Actual Results:  
All duplicates except for the first one are deleted.

Expected Results:  
All duplicates should be removed.

I'll append two screenshots to describe the issue.
Comment 1 Manuel Ullmann 2013-01-23 22:00:50 UTC
Created attachment 76673 [details]
Amarok showing playlist before removing duplicates.
Comment 2 Manuel Ullmann 2013-01-23 22:01:18 UTC
Created attachment 76674 [details]
Amarok showing playlist after removing duplicates.
Comment 3 Manuel Ullmann 2013-01-23 22:03:27 UTC
This also happens with playlists, which are differently sorted (tested sorting by albums).
Comment 4 Myriam Schweingruber 2013-01-23 23:04:19 UTC
bug 252246 might also be related
Comment 5 Ralf Engels 2013-02-08 14:31:54 UTC
Can you remember what you did?
Might it be that you had tracks from different sources as in bug 252246?

At least for me, duplicate tracks from the local collection are all removed.
Comment 6 Manuel Ullmann 2013-02-08 19:18:34 UTC
Created attachment 77025 [details]
Amarok showing playlist before removing duplicates.

Noticed, that my screenshots did not show the bug.
Comment 7 Manuel Ullmann 2013-02-08 19:19:43 UTC
Created attachment 77026 [details]
Amarok showing playlist after removing duplicates.
Comment 8 Manuel Ullmann 2013-02-08 19:26:37 UTC
Ok, this is harder to reproduce, than I thought. It seems to happen for my special playlist. I was trying to find out, what is so special about it, but it is at least not the length (playlist is 690, test playlist was ca. 900).
So what I actually did, is loading this playlist, cut it down to a few tracks and adding duplicates for it. I also can´t reproduce this for new playlists. So I change the Importance to minor.
I could attach the playlist, but amarok won´t load it due to unavailable files, so this makes no sense.
Comment 9 Mikhail Ivchenko 2013-12-04 09:47:24 UTC
I can reproduce with amarok v2.8.0
Comment 10 Mikhail Ivchenko 2013-12-04 09:48:07 UTC
Created attachment 83919 [details]
Before remove duplicates (Amarok 2.8.0)
Comment 11 Mikhail Ivchenko 2013-12-04 09:48:42 UTC
Created attachment 83920 [details]
After removing duplicates (Amarok v2.8.0)
Comment 12 Mikhail Ivchenko 2013-12-04 09:50:16 UTC
I created attachments. Playlist after removing duplicates still have 2 songs of Nickelback ("Figured you out")
Comment 13 Manuel Ullmann 2013-12-04 15:46:00 UTC
Nice, that you hit it. Maybe the reproducability was increased in the meantime. Well, I don't know, if you hit exactly "my" bug, because I could not reproduce it any more. However I had often problems with duplicates, which were e. g. pulled in from big folders (of which I knew, that there were none). In the meantime Amarok 2.7.1 pulled in the kde-base/kdelibs[semantic-desktop] dependency. That, the high CPU load on playback and bug 296100 brought me to switch my audio player to Quodlibet, which uses according to top 0,4% less CPU than gst-inspect-0.10 playbin.

Therefore I'll close all my Amarok-Bugs, because I can't give any feedback. They were strange anyway and just affecting me. For this one you are free to give further feedback. I'll give you a vote.
Comment 14 Andrew Crouthamel 2018-11-11 04:22:22 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 15 Andrew Crouthamel 2018-11-12 03:22:42 UTC
Changing back to REPORTED per request of Myriam (Amarok dev).
Comment 16 Justin Zobel 2022-12-03 09:01:36 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 17 Bug Janitor Service 2022-12-18 05:14:26 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 18 Manuel Ullmann 2022-12-18 23:20:29 UTC
Created attachment 154683 [details]
Amarok jingle ripped from streamripper
Comment 19 Manuel Ullmann 2022-12-18 23:27:56 UTC
Yes, it is still reproducible in today’s Amarok git.

The issue seems to be limited to files ripped from streamripper though. So I set up a local icecast server, passed the Amarok jingle into it with ffmpeg and ripped it with streamripper. This file reproduces the issue.

Please also note, that that output of streamripper always differs for the same tracks, so the database duplication detection fails. Searching for those duplicated tracks, which also have different formats in my collection via library search crashes Amarok. So it might be useful to play around with its outputs until it works.

Here is the command used to stream and rip it:
(ffmpeg -re -i first_run_jingle.ogg -c:a copy -content_type audio/ogg -f ogg icecast://source:hackme@localhost:8000/default &); sleep 0.1; streamripper http://localhost:8000/default -a -c

I’ll attach the icecast.xml next.
Comment 20 Manuel Ullmann 2022-12-18 23:35:49 UTC
Created attachment 154684 [details]
Icecast config for local server configuration

Check the config before using it. It is not secure, but at least running on localhost.

Last note: Amarok is not in the Gentoo repositories anymore, because the Qt5 migration took too long and there has been no stable release, since then. Apart from Krusader I’m not using any KDE software nowadays, so please excuse me, if I don’t open a new bug on the crash issue.

As a developer I just was polite enough to report back on an old bug report. Happy debugging! :)
Comment 21 Bug Janitor Service 2024-05-27 20:50:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/amarok/-/merge_requests/102
Comment 22 Tuomas Nurmi 2024-05-28 19:34:01 UTC
Git commit 1569068ddc911e1a8970aa3afe2ae6d5986d3877 by Tuomas Nurmi.
Committed on 28/05/2024 at 17:45.
Pushed by nurmi into branch 'master'.

Avoid deleting multiple tracks instead of one

Additionally, testing with a sample track provided on bug report, an earlier bug
where duplicate removal didn't work for some specific tracks seems to have been fixed.

M  +1    -0    ChangeLog
M  +5    -5    src/playlist/PlaylistController.cpp

https://invent.kde.org/multimedia/amarok/-/commit/1569068ddc911e1a8970aa3afe2ae6d5986d3877