Bug 312461

Summary: JJ: New Folder counter in Saved Playlists and Podcasts does not go beyond 10, causes duplicate folders
Product: [Applications] amarok Reporter: Bart Cerneels <bart.cerneels>
Component: Playlists/Saved PlaylistsAssignee: Amarok Developers <amarok-bugs-dist>
Severity: minor CC: bart.cerneels
Priority: NOR Keywords: junior-jobs
Version: 2.6.90 (2.7 beta)   
Target Milestone: 2.7   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 2.7

Description Bart Cerneels 2013-01-01 20:38:44 UTC
In PlaylistBrowserCategory::createNewFolder() PlaylistBrowserCategory.cpp:271
regex needs to match multi-digit numbers.

Reproducible: Always
Comment 1 Myriam Schweingruber 2013-01-02 07:22:40 UTC
This has been made a Google Code-In task, please only work on this if you are a Code-In student and claim the task here: http://www.google-melange.com/gci/task/view/google/gci2012/8173205
Comment 2 Bart Cerneels 2013-01-02 07:28:11 UTC
To reproduce: in the Saved Playlist or Podcast section, with "merged view" enabled (default) click the "add folder" button > 10 times without renaming the new folders.
Comment 3 Edward Hades 2013-01-09 15:39:01 UTC
Git commit a358770be9650802ab2d7e780019bc502e4cbaa6 by Edward Hades, on behalf of Peter Amidon.
Committed on 07/01/2013 at 17:20.
Pushed by hades into branch 'master'.

Fix duplicate-name bug in creating playlist folders

Previously, the code sorted numbers as string when determining the
current largest number of duplicate folders. The code now uses
std::max_element on a list of integers to circumvent that problem
REVIEW: 108245

M  +11   -8    src/browsers/playlistbrowser/PlaylistBrowserCategory.cpp