mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 09:21:18 +02:00
moviebrowser.cpp: try to optimize "seen" tag with record settings
This commit is contained in:
@@ -1950,9 +1950,21 @@ void CMovieBrowser::refreshBrowserList(void) //P1
|
||||
if (m_settings.browserRowItem[row] == MB_INFO_PERCENT_ELAPSED)
|
||||
{
|
||||
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);
|
||||
string_item = ""; //not needed
|
||||
if (elapsed_percent < 100)
|
||||
string_item.clear(); // reset not needed
|
||||
|
||||
if (elapsed_percent < 100-trigger_offset)
|
||||
{
|
||||
if (elapsed_percent > 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user