Skip to content

Commit

Permalink
MythArchive: Convert to use the python bindings and a few other fixes
Browse files Browse the repository at this point in the history
- Convert mythburn.py to use the python bindings (based on an original patch
  from Raymond Wagner. Among other things this fixes the cut list being
  reversed after changes elsewhere in Myth. Fixes #9389.

- Always convert the audio tracks to ac3. This fixes at last one instance of
  the audio dropping out part way through a DVD. Also our internal player
  gets very confused if a DVD has different codecs used by the into, menus
  and titles.

- Switch to use mythffmpeg rather than an external version of ffmpeg.

- Other stuff I've long since forgot about :)
  • Loading branch information
Paul Harrison committed Dec 28, 2011
1 parent 053b49e commit c5aca5c
Show file tree
Hide file tree
Showing 6 changed files with 216 additions and 556 deletions.
22 changes: 0 additions & 22 deletions mythplugins/mytharchive/mytharchive/archivesettings.cpp
Expand Up @@ -81,17 +81,6 @@ static HostLineEdit *MythArchiveDVDPlayerCmd()
return gc;
};

static HostCheckBox *MythArchiveEncodeToAc3()
{
HostCheckBox *gc = new HostCheckBox("MythArchiveEncodeToAc3");
gc->setLabel(QObject::tr("Always Encode to AC3"));
gc->setValue(false);
gc->setHelpText(QObject::tr("If set audio tracks will always be "
"re-encoded to AC3 for better compatibility with DVD players in "
"NTSC countries."));
return gc;
};

static HostCheckBox *MythArchiveCopyRemoteFiles()
{
HostCheckBox *gc = new HostCheckBox("MythArchiveCopyRemoteFiles");
Expand Down Expand Up @@ -234,15 +223,6 @@ static HostComboBox *MythArchiveDefaultEncProfile()
return gc;
}

static HostLineEdit *MythArchiveFfmpegCmd()
{
HostLineEdit *gc = new HostLineEdit("MythArchiveFfmpegCmd");
gc->setLabel(QObject::tr("FFmpeg Command"));
gc->setValue("ffmpeg");
gc->setHelpText(QObject::tr("Command to run FFmpeg."));
return gc;
};

static HostLineEdit *MythArchiveMplexCmd()
{
HostLineEdit *gc = new HostLineEdit("MythArchiveMplexCmd");
Expand Down Expand Up @@ -340,7 +320,6 @@ ArchiveSettings::ArchiveSettings()

VerticalConfigurationGroup* vcg2 = new VerticalConfigurationGroup(false);
vcg2->setLabel(QObject::tr("MythArchive Settings (2)"));
vcg2->addChild(MythArchiveEncodeToAc3());
vcg2->addChild(MythArchiveCopyRemoteFiles());
vcg2->addChild(MythArchiveAlwaysUseMythTranscode());
vcg2->addChild(MythArchiveUseProjectX());
Expand All @@ -359,7 +338,6 @@ ArchiveSettings::ArchiveSettings()

VerticalConfigurationGroup* vcg4 = new VerticalConfigurationGroup(false);
vcg4->setLabel(QObject::tr("MythArchive External Commands (1)"));
vcg4->addChild(MythArchiveFfmpegCmd());
vcg4->addChild(MythArchiveMplexCmd());
vcg4->addChild(MythArchiveDvdauthorCmd());
vcg4->addChild(MythArchiveSpumuxCmd());
Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mytharchive/mytharchive/main.cpp
Expand Up @@ -223,7 +223,7 @@ static void runTestDVD(void)
if (tempDir == "")
return;

QString filename = tempDir + "work/dvd/";
QString filename = tempDir + "work/dvd";
QString command = gCoreContext->GetSetting("MythArchiveDVDPlayerCmd", "");

if ((command.indexOf("internal", 0, Qt::CaseInsensitive) > -1) ||
Expand Down
6 changes: 5 additions & 1 deletion mythplugins/mytharchive/mytharchive/mythburn.cpp
Expand Up @@ -442,7 +442,11 @@ void MythBurn::updateArchiveList(void)

// get duration of this file
if (a->duration == 0)
getFileDetails(a);
{
if (!getFileDetails(a))
LOG(VB_GENERAL, LOG_ERR,
QString("MythBurn: failed to get file details for: %1").arg(a->filename));
}

// get default encoding profile if needed

Expand Down
13 changes: 0 additions & 13 deletions mythplugins/mytharchive/mytharchive/recordingselector.cpp
Expand Up @@ -500,19 +500,6 @@ void RecordingSelector::getRecordingList(void)
for ( ; i != m_recordingList->end(); ++i)
{
p = *i;

// we can't handle recordings that have to be streamed to us
if (p->GetPlaybackURL(false, true).startsWith("myth://"))
{
LOG(VB_FILE, LOG_ERR,
QString("MythArchive cannot handle this file because it "
"isn't available locally - %1")
.arg(p->GetPlaybackURL(false, true)));
i = m_recordingList->erase(i);
--i;
continue;
}

// ignore live tv and deleted recordings
if (p->GetRecordingGroup() == "LiveTV" ||
p->GetRecordingGroup() == "Deleted")
Expand Down

0 comments on commit c5aca5c

Please sign in to comment.