Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
medialibrary
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
31
Issues
31
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
medialibrary
Commits
b11915ba
Commit
b11915ba
authored
Nov 06, 2015
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Album: Don't mess up tracks ordering when filling the cache
parent
d081c460
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
src/Album.cpp
src/Album.cpp
+5
-0
No files found.
src/Album.cpp
View file @
b11915ba
...
...
@@ -20,6 +20,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <algorithm>
#include "Album.h"
#include "AlbumTrack.h"
#include "Artist.h"
...
...
@@ -169,6 +171,9 @@ std::shared_ptr<AlbumTrack> Album::addTrack(std::shared_ptr<Media> media, unsign
return
nullptr
;
m_nbTracks
++
;
m_tracks
.
push_back
(
std
::
move
(
media
)
);
std
::
sort
(
begin
(
m_tracks
),
end
(
m_tracks
),
[](
const
MediaPtr
&
a
,
const
MediaPtr
&
b
)
{
return
a
->
albumTrack
()
->
trackNumber
()
<
b
->
albumTrack
()
->
trackNumber
();
});
m_tracksCached
=
true
;
return
track
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment