gui/moviebrowser.cpp: change marked list to pointers; honor sort order

This commit is contained in:
[CST] Focus
2014-09-22 17:03:02 +04:00
parent 857b9ade83
commit 2003ed670d
5 changed files with 15 additions and 11 deletions

View File

@@ -434,7 +434,7 @@ bool CMoviePlayerGui::prepareFile(CFile *file)
if (isMovieBrowser) {
if (filelist_it != filelist.end()) {
unsigned idx = filelist_it - filelist.begin();
p_movie_info = &milist[idx];
p_movie_info = milist[idx];
}
if (isYT) {
file_name = file->Url;
@@ -492,7 +492,7 @@ bool CMoviePlayerGui::SelectFile()
filelist_it = filelist.end();
if (moviebrowser->getSelectedFiles(filelist, milist)) {
filelist_it = filelist.begin();
p_movie_info = &(*milist.begin());
p_movie_info = *(milist.begin());
file = &(*filelist_it);
}
else if ((file = moviebrowser->getSelectedFile()) != NULL) {
@@ -690,8 +690,11 @@ bool CMoviePlayerGui::PlayFileStart(void)
printf("IS FILE PLAYER: %s\n", is_file_player ? "true": "false" );
if (p_movie_info) {
movie_info = *p_movie_info;
p_movie_info = &movie_info;
if (timeshift != TSHIFT_MODE_OFF) {
// p_movie_info may be invalidated by CRecordManager while we're still using it. Create and use a copy.
movie_info = *p_movie_info;
p_movie_info = &movie_info;
}
duration = p_movie_info->length * 60 * 1000;
int percent = CZapit::getInstance()->GetPidVolume(p_movie_info->epgId, currentapid, currentac3 == 1);