Bug 325094 - Dynamic playlist fails to add appropriate tracks automatically
Summary: Dynamic playlist fails to add appropriate tracks automatically
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playlists/Dynamic Playlists (show other bugs)
Version: kf5
Platform: Ubuntu Linux
: NOR normal
Target Milestone: kf5
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-19 14:18 UTC by Zach
Modified: 2024-04-30 08:45 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zach 2013-09-19 14:18:13 UTC
I use the "partition" and "rating" biases for my dynamic playlist.  If I click "Repopulate" then it adds tracks following the set biases.  However, if I just let it run, all newly added tracks in the playlist are only rated 5 stars, which is one of the set biases in the partition.   Everything worked normally until I upgraded to 2.8.0.

Reproducible: Always



Expected Results:  
Amarok should automatically add tracks following the set biases.

<playlist>
        <title>Rating</title>
        <partBias>
            <tagMatchBias weight="0">
                <field>rating</field>
                <numValue>2</numValue>
                <numValue2>0</numValue2>
                <condition>less</condition>
            </tagMatchBias>
            <tagMatchBias weight="0.0310851">
                <field>rating</field>
                <numValue>2</numValue>
                <numValue2>0</numValue2>
                <condition>equals</condition>
            </tagMatchBias>
            <tagMatchBias weight="0.0310851">
                <field>rating</field>
                <numValue>3</numValue>
                <numValue2>0</numValue2>
                <condition>equals</condition>
            </tagMatchBias>
            <tagMatchBias weight="0.0414468">
                <field>rating</field>
                <numValue>4</numValue>
                <numValue2>0</numValue2>
                <condition>equals</condition>
            </tagMatchBias>
            <tagMatchBias weight="0.0518085">
                <field>rating</field>
                <numValue>5</numValue>
                <numValue2>0</numValue2>
                <condition>equals</condition>
            </tagMatchBias>
            <tagMatchBias weight="0.0828937">
                <field>rating</field>
                <numValue>6</numValue>
                <numValue2>0</numValue2>
                <condition>equals</condition>
            </tagMatchBias>
            <tagMatchBias weight="0.103617">
                <field>rating</field>
                <numValue>7</numValue>
                <numValue2>0</numValue2>
                <condition>equals</condition>
            </tagMatchBias>
            <tagMatchBias weight="0.145064">
                <field>rating</field>
                <numValue>8</numValue>
                <numValue2>0</numValue2>
                <condition>equals</condition>
            </tagMatchBias>
            <tagMatchBias weight="0.224553">
                <field>rating</field>
                <numValue>9</numValue>
                <numValue2>0</numValue2>
                <condition>equals</condition>
            </tagMatchBias>
            <tagMatchBias weight="0.288447">
                <field>rating</field>
                <numValue>10</numValue>
                <numValue2>0</numValue2>
                <condition>equals</condition>
            </tagMatchBias>
        </partBias>
    </playlist>
Comment 1 Zach 2013-10-13 03:06:21 UTC
Still having troubles with this.  I've tried VLC backend and GStreamer backend, both with and without Pulseaudio and under every configuration Amarok will not perform correctly.  I created several new playlists to experiment with and in everyone, newly added tracks are only of the last rating category in the partition.
Comment 2 Zach 2013-11-11 08:02:38 UTC
I did a fresh install of Kubuntu 13.10.  I started with a clean .kde/apps/amarok folder.  Same problem.  I ran amarok in debug mode and got several playlist related warnings:

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length1=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length2=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length3=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length4=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length5=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length6=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length7=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length8=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length1=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length2=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length3=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length4=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length5=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length6=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length7=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length8=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length1=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length2=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length3=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length4=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length5=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length6=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length7=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length8=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length1=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length2=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length3=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length4=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length5=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length6=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length7=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length8=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length9=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length10=-1" " 

amarok: [WARNING] .pls playlist: Invalid "NumberOfEntries" value.   NumberOfEntries= 0   counted= 3 

amarok: [WARNING] .pls playlist: Unrecognized line: " "numberofentries=3" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length1=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length2=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length3=-1" " 

amarok: [WARNING] .pls playlist: Invalid "NumberOfEntries" value.   NumberOfEntries= 0   counted= 3 

amarok: [WARNING] .pls playlist: Unrecognized line: " "numberofentries=3" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length1=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length2=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length3=-1" " 

amarok: [WARNING] .pls playlist: Invalid "NumberOfEntries" value.   NumberOfEntries= 0   counted= 3 

amarok: [WARNING] .pls playlist: Unrecognized line: " "numberofentries=3" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length1=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length2=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length3=-1" " 

amarok: [WARNING] .pls playlist: Invalid "NumberOfEntries" value.   NumberOfEntries= 0   counted= 4 

amarok: [WARNING] .pls playlist: Unrecognized line: " "numberofentries=4" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length1=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length2=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length3=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length4=-1" " 

amarok: [WARNING] .pls playlist: Invalid "NumberOfEntries" value.   NumberOfEntries= 0   counted= 2 

amarok: [WARNING] .pls playlist: Unrecognized line: " "numberofentries=2" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length1=-1" " 

amarok: [WARNING] .pls playlist: Unrecognized line: " "Length2=-1" " 

Calling appendChild() on a null node does nothing.
amarok: [WARNING] .pls playlist: Invalid "NumberOfEntries" value.   NumberOfEntries= 0   counted= 2 

amarok: [WARNING] .pls playlist: Unrecognized line: " "numberofentries=2" " 


Also, when I change tracks, I get warnings:

amarok:   BEGIN: void Playlist::Actions::slotTrackPlaying(Meta::TrackPtr) 
amarok:     [WARNING] [Playlist::Actions] engineNewTrackPlaying: "Plush" does not match what the playlist controller thought it should be
Comment 3 Matěj Laitl 2014-01-03 12:08:01 UTC
Hmm, strange. All the warnings you posted here (and on http://forum.kde.org/viewtopic.php?f=115&t=118340 ) are rather harmless and should be unrelated to this bug.

Can you please first rule-out any corrupted/nonsense data in your collection? This is best accomplished by adding the whole Local Collection do the playlist and setting playlist layout to Verbose.
Comment 4 Ralf Engels 2014-01-03 17:17:36 UTC
How long is your generated playlist?
It might be that with a short list you run into some rounding issues.

Could you try deleting some of the parts and check if it starts working, e.g. delete half of the sub-parts.
Comment 5 Zach 2014-03-01 10:09:22 UTC
"Hmm, strange. All the warnings you posted here (and on http://forum.kde.org/viewtopic.php?f=115&t=118340 ) are rather harmless and should be unrelated to this bug. Can you please first rule-out any corrupted/nonsense data in your collection? This is best accomplished by adding the whole Local Collection do the playlist and setting playlist layout to Verbose."

All my tracks are in the local collection, and the playlist is set to verbose.  Everything looks fine.  If data was corrupted, what would it look like?

"How long is your generated playlist? It might be that with a short list you run into some rounding issues. Could you try deleting some of the parts and check if it starts working, e.g. delete half of the sub-parts."

I believe that dynamic playlists use the entire local collection to automatically generate playlists matching the criteria selected.  My local collection currently has over 3,000 tracks.  Even very simple dynamic playlists fail to work properly when I use both partition and rating biases.
Comment 6 Andrew Crouthamel 2018-11-11 04:34:43 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 7 Andrew Crouthamel 2018-11-12 03:22:23 UTC
Changing back to REPORTED per request of Myriam (Amarok dev).
Comment 8 Georg Brunmayr 2019-10-12 06:05:14 UTC
I have the same issue on Arch amarok 2.9.70.
Not sure if this is the root cause but i get this line in log after a track changed and a new one should be added:
amarok: BEGIN: void EngineController::slotNewTrackPlaying(const Phonon::MediaSource&)
amarok:   [EngineController] Previous track finished completely, updating statistics
amarok:   [EngineController] slotTrackFinishedPlaying( "CAKE" - "OST - Herr Lehmann" - "I Will Survive" , 1 )
amarok:   [EngineController] Using gain of -9.12 with relative peak of 2.62362
amarok:   BEGIN: QVariantMap Meta::Field::mprisMapFromTrack(const TrackPtr&)
amarok:   END__: QVariantMap Meta::Field::mprisMapFromTrack(const TrackPtr&) [Took: 0s]
amarok:   BEGIN: void Playlist::Actions::slotTrackPlaying(Meta::TrackPtr)
amarok:   END__: void Playlist::Actions::slotTrackPlaying(Meta::TrackPtr) [Took: 0s]
amarok:   [MySqlStorage] Initialized thread, count == 17
amarok:   BEGIN: void ProgressWidget::redrawBookmarks(const QString*)
amarok:     [SqlRegistryP] obtained max_allowed_packet is  "10485760"
amarok:     found  0  timecodes on this track
amarok:   END__: void ProgressWidget::redrawBookmarks(const QString*) [Took: 0.002s]
QWidget::insertAction: Attempt to insert null action
QWidget::insertAction: Attempt to insert null action
amarok:   [MySqlStorage] Deinitialized thread, count == 16
amarok:   BEGIN: void OSDWidget::show(const QString&, const QImage&)
amarok:   END__: void OSDWidget::show(const QString&, const QImage&) [Took: 0s]
amarok:   BEGIN: void AlbumsEngine::update()
amarok:   END__: void AlbumsEngine::update() [Took: 0s]
amarok: END__: void EngineController::slotNewTrackPlaying(const Phonon::MediaSource&) [Took: 0.008s]
Comment 9 Myriam Schweingruber 2019-10-13 16:20:17 UTC
(In reply to Georg Brunmayr from comment #8)
> I have the same issue on Arch amarok 2.9.70.
> Not sure if this is the root cause but i get this line in log after a track
> changed and a new one should be added:

Changing the version to kf5, then. Please be aware that you are on a pre-alpha Qt5 port with quite a few missing items.
Comment 10 Charlemagne Lasse 2020-05-30 19:12:21 UTC
Please merge the bugfix https://invent.kde.org/multimedia/amarok/-/merge_requests/4
Comment 11 Pedro de Carvalho Gomes 2020-06-14 08:44:13 UTC
Myriam, this report is from an older version. But looking at the code, I can see that the issue has been there since long and probably the cause was the same as the others. Thus, I believe that this should be closed as well. Please do so if you agree
Comment 12 Myriam Schweingruber 2020-06-19 17:46:37 UTC
(In reply to Pedro de Carvalho Gomes from comment #11)
> Myriam, this report is from an older version. But looking at the code, I can
> see that the issue has been there since long and probably the cause was the
> same as the others. Thus, I believe that this should be closed as well.
> Please do so if you agree

The version was updated as it was still showing in the kf5 version, so if this is indeed fixed, please go ahead and close it. the version in the bug report is always about the most recent version this is reproducible with, we don't have the manpower to maintain more than one version anyway.
Please also close the merge request, then, unless it is still needed.

FWIW: would be nice to close bugs with the automatic hooks in a commit, or at least link to the commit fixing a bug when you use the "FIXED" attribute.
Comment 13 Tuomas Nurmi 2024-04-30 08:45:30 UTC
As far as I can tell, seems to have been fixed with the changes merged in 2020, so closing. Please do reopen if you encounter this with 3.0.0 or later.