mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
moviebrowser.cpp: try to optimize "seen" tag with record settings
Origin commit data
------------------
Branch: ni/coolstream
Commit: 99c3c3b921
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-05-25 (Sat, 25 May 2019)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1964,9 +1964,21 @@ void CMovieBrowser::refreshBrowserList(void) //P1
|
|||||||
if (m_settings.browserRowItem[row] == MB_INFO_PERCENT_ELAPSED)
|
if (m_settings.browserRowItem[row] == MB_INFO_PERCENT_ELAPSED)
|
||||||
{
|
{
|
||||||
getMovieInfoItem(*m_vHandleBrowserList[handle], MB_INFO_PERCENT_ELAPSED, &string_item);
|
getMovieInfoItem(*m_vHandleBrowserList[handle], MB_INFO_PERCENT_ELAPSED, &string_item);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NOTE: Get threshold offset from record safety settings to trigger the "seen" tag.
|
||||||
|
* Better solutions are welcome!
|
||||||
|
*/
|
||||||
|
int pre = 0,post = 0;
|
||||||
|
g_Timerd->getRecordingSafety(pre,post);
|
||||||
|
g_settings.record_safety_time_before = pre/60;
|
||||||
|
g_settings.record_safety_time_after = post/60;
|
||||||
|
int trigger_offset = (g_settings.record_safety_time_before + g_settings.record_safety_time_after) * m_vHandleBrowserList[handle]->length / 100;
|
||||||
|
|
||||||
int elapsed_percent = atoi(string_item);
|
int elapsed_percent = atoi(string_item);
|
||||||
string_item = ""; //not needed
|
string_item.clear(); // reset not needed
|
||||||
if (elapsed_percent < 100)
|
|
||||||
|
if (elapsed_percent < 100-trigger_offset)
|
||||||
{
|
{
|
||||||
if (elapsed_percent > 0)
|
if (elapsed_percent > 0)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user