record_setup: add check existing recordings before set new timers

Origin commit data
------------------
Branch: ni/coolstream
Commit: 6dddaff0d2
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-06-02 (Thu, 02 Jun 2016)

Origin message was:
------------------
- record_setup: add check existing recordings before set new timers

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-06-02 21:37:33 +02:00
parent 75dc6e0027
commit 8e429f9e6a
12 changed files with 110 additions and 7 deletions

View File

@@ -46,6 +46,7 @@
#include <driver/screen_max.h>
#include <driver/fade.h>
#include <gui/filebrowser.h>
#include <gui/moviebrowser.h>
#include <gui/customcolor.h>
#include <gui/pictureviewer.h>
#include <gui/tmdb.h>
@@ -898,6 +899,22 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
if (lid != -1)
recDir = g_settings.network_nfs[lid].local_dir;
}
if (doRecord && g_settings.recording_already_found_check)
{
CHintBox loadBox(LOCALE_RECORDING_ALREADY_FOUND_CHECK, LOCALE_MOVIEBROWSER_SCAN_FOR_MOVIES);
loadBox.paint();
CMovieBrowser moviebrowser;
const char *rec_title = epgData.title.c_str();
bool already_found = moviebrowser.gotMovie(rec_title);
loadBox.hide();
if (already_found)
{
printf("already found in moviebrowser: %s\n", rec_title);
char message[1024];
snprintf(message, sizeof(message)-1, g_Locale->getText(LOCALE_RECORDING_ALREADY_FOUND), rec_title);
doRecord = (ShowMsg(LOCALE_RECORDING_ALREADY_FOUND_CHECK, message, CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo) == CMessageBox::mbrYes);
}
}
if (doRecord)
{
if (g_Timerd->addRecordTimerEvent(channel_id,