Bug 283618 - New constraint type for APG : size of the generated playlist
Summary: New constraint type for APG : size of the generated playlist
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playlists/Automated Playlist Generator (show other bugs)
Version: 2.4.3
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-08 18:39 UTC by Michel Poleur
Modified: 2012-11-12 16:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.7
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Poleur 2011-10-08 18:39:49 UTC
Version:           2.4.3 (using KDE 4.7.1) 
OS:                Linux

Use case : you want to fill a 8 GB USB key or a 750 MB CD-R. You then specify a constraint with a value (expressed in MB or GB) used as an approximate maximum size for the playlist.

Reproducible: Didn't try



Expected Results:  
A playlist whose size is approximately the value specified for the constraint.
Comment 1 Soren Harward 2011-10-09 00:47:24 UTC
Good idea.  I may not get around to it for 2.5, but will plan it for a future release.
Comment 2 shaddowy2 2012-11-08 11:14:08 UTC
Soren, is there any chance to see the feature in 2.7?
I really liked it back then when I was using Media Monkey.
Comment 3 Soren Harward 2012-11-08 22:25:50 UTC
Git commit e725f3364f56d2d3db7258217a132c03cccc6038 by Soren Harward.
Committed on 08/11/2012 at 22:35.
Pushed by stharward into branch 'master'.

Whole bunch of APG improvements and bugfixes

See ChangeLog for details
Related: bug 293616, bug 294743, bug 301829

M  +7    -0    ChangeLog
M  +2    -0    src/CMakeLists.txt
M  +2    -1    src/browsers/playlistbrowser/APGCategory.cpp
M  +7    -1    src/playlistgenerator/ConstraintFactory.cpp
M  +3    -13   src/playlistgenerator/ConstraintGroup.cpp
M  +2    -6    src/playlistgenerator/ConstraintGroup.h
M  +2    -2    src/playlistgenerator/ConstraintNode.cpp
M  +2    -6    src/playlistgenerator/ConstraintNode.h
M  +3    -17   src/playlistgenerator/ConstraintSolver.cpp
M  +1    -3    src/playlistgenerator/ConstraintSolver.h
M  +7    -1    src/playlistgenerator/PresetModel.cpp
M  +2    -1    src/playlistgenerator/PresetModel.h
M  +4    -3    src/playlistgenerator/TODO
M  +2    -26   src/playlistgenerator/constraints/Checkpoint.cpp
M  +2    -4    src/playlistgenerator/constraints/Checkpoint.h
M  +1    -1    src/playlistgenerator/constraints/Matching.h
M  +5    -13   src/playlistgenerator/constraints/PlaylistDuration.cpp
M  +2    -2    src/playlistgenerator/constraints/PlaylistDuration.h
A  +281  -0    src/playlistgenerator/constraints/PlaylistFileSize.cpp     [License: GPL (v2+)]
C  +22   -19   src/playlistgenerator/constraints/PlaylistFileSize.h [from: src/playlistgenerator/constraints/PlaylistLength.h - 071% similarity]
A  +193  -0    src/playlistgenerator/constraints/PlaylistFileSizeEditWidget.ui
M  +11   -11   src/playlistgenerator/constraints/PlaylistLength.cpp
M  +2    -2    src/playlistgenerator/constraints/PlaylistLength.h
M  +1    -55   src/playlistgenerator/constraints/PreventDuplicates.cpp
M  +1    -5    src/playlistgenerator/constraints/PreventDuplicates.h
M  +1    -21   src/playlistgenerator/constraints/TagMatch.cpp
M  +1    -5    src/playlistgenerator/constraints/TagMatch.h
M  +1    -12   src/playlistgenerator/constraints/TagMatchComparer.cpp
M  +1    -2    src/playlistgenerator/constraints/TagMatchSupport.cpp
M  +1    -25   src/playlistgenerator/constraints/TrackSpreader.cpp
M  +1    -5    src/playlistgenerator/constraints/TrackSpreader.h

http://commits.kde.org/amarok/e725f3364f56d2d3db7258217a132c03cccc6038
Comment 4 shaddowy2 2012-11-12 15:32:01 UTC
Wow, excellent!
Thank you very much for the fast support :)
Comment 5 Soren Harward 2012-11-12 16:47:33 UTC
I wrote like 90% of this code over the summer, but just didn't finish it before 2.6 went into feature freeze.  This was a good reminder to commit it.  Thanks.