mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
movieplayer/record: move timeshift deletion code to moviebrowser ...
... to get sure it's not deleted until playback is stopped
Origin commit data
------------------
Branch: ni/coolstream
Commit: 4df740d539
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-08-01 (Wed, 01 Aug 2018)
Origin message was:
------------------
- movieplayer/record: move timeshift deletion code to moviebrowser ...
... to get sure it's not deleted until playback is stopped
------------------
This commit was generated by Migit
This commit is contained in:
@@ -595,6 +595,7 @@ void CMoviePlayerGui::Cleanup()
|
||||
is_file_player = false;
|
||||
p_movie_info = NULL;
|
||||
autoshot_done = false;
|
||||
timeshift_deletion = false;
|
||||
currentaudioname = "Unk";
|
||||
}
|
||||
|
||||
@@ -2033,6 +2034,21 @@ void CMoviePlayerGui::PlayFileEnd(bool restore)
|
||||
|
||||
stopped = true;
|
||||
printf("%s: stopped\n", __func__);
|
||||
|
||||
if (timeshift_deletion && (file_name.find("_temp.ts") == file_name.size() - 8))
|
||||
{
|
||||
std::string file = file_name;
|
||||
printf("%s: delete %s\n", __func__, file.c_str());
|
||||
unlink(file.c_str());
|
||||
CMovieInfo mi;
|
||||
if (mi.convertTs2XmlName(file))
|
||||
{
|
||||
printf("%s: delete %s\n", __func__, file.c_str());
|
||||
unlink(file.c_str());
|
||||
}
|
||||
timeshift_deletion = false;
|
||||
}
|
||||
|
||||
if (!filelist.empty() && filelist_it != filelist.end()) {
|
||||
pretty_name.clear();
|
||||
prepareFile(&(*filelist_it));
|
||||
|
Reference in New Issue
Block a user