Skip to content

Commit

Permalink
All EDL to be sent as SCENE rather than COMM_BREAK
Browse files Browse the repository at this point in the history
  • Loading branch information
b-pass authored and janbar committed Feb 1, 2019
1 parent 22b3098 commit ed3949e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,11 @@ msgctxt "#30069"
msgid "Show default recording group as root"
msgstr ""

# empty strings from id 30070 to 30099
msgctxt "#30070"
msgid "Scene Only"
msgstr ""

# empty strings from id 30071 to 30099

# Systeminformation labels
msgctxt "#30100"
Expand Down
2 changes: 1 addition & 1 deletion pvr.mythtv/resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<setting id="livetv_recordings" type="bool" label="30067" default="true" />
<setting id="group_recordings" type="enum" label="30054" lvalues="30055|30056|30057" default="1" />
<setting id="use_airdate" type="bool" label="30048" default="false" />
<setting id="enable_edl" type="enum" label="30058" lvalues="30059|30060|30061" default="0" />
<setting id="enable_edl" type="enum" label="30058" lvalues="30059|30060|30061|30070" default="0" />
<setting id="inactive_upcomings" type="bool" label="30066" default="true" />
<setting id="prompt_delete" type="bool" label="30047" default="false" />
<setting id="root_default_group" type="bool" label="30069" default="false" />
Expand Down
1 change: 1 addition & 0 deletions src/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
#define ENABLE_EDL_ALWAYS 0
#define ENABLE_EDL_DIALOG 1
#define ENABLE_EDL_NEVER 2
#define ENABLE_EDL_SCENE 3
#define DEFAULT_BLOCK_SHUTDOWN true
#define DEFAULT_LIMIT_TUNE_ATTEMPTS true
#define DEFAULT_SHOW_NOT_RECORDING true
Expand Down
19 changes: 14 additions & 5 deletions src/pvrclient-mythtv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1475,13 +1475,22 @@ PVR_ERROR PVRClientMythTV::GetRecordingEdl(const PVR_RECORDING &recording, PVR_E
PVR_EDL_ENTRY entry;
double s = (double)(startPtr->markValue) / rate;
double e = (double)((*it)->markValue) / rate;
entry.start = (int64_t)(s * 1000.0);
entry.end = (int64_t)(e * 1000.0);
entry.type = PVR_EDL_TYPE_COMBREAK;
// Use scene marker instead commercial break
if (g_iEnableEDL == ENABLE_EDL_SCENE)
{
entry.start = entry.end = (int64_t)(e * 1000.0);
entry.type = PVR_EDL_TYPE_SCENE;
XBMC->Log(LOG_DEBUG, "%s: SCENE %9.3f", __FUNCTION__, e);
}
else
{
entry.start = (int64_t)(s * 1000.0);
entry.end = (int64_t)(e * 1000.0);
entry.type = PVR_EDL_TYPE_COMBREAK;
XBMC->Log(LOG_DEBUG, "%s: COMBREAK %9.3f - %9.3f", __FUNCTION__, s, e);
}
entries[index] = entry;
index++;
if (g_bExtraDebug)
XBMC->Log(LOG_DEBUG, "%s: COMBREAK %9.3f - %9.3f", __FUNCTION__, s, e);
}
startPtr.reset();
break;
Expand Down

0 comments on commit ed3949e

Please sign in to comment.