Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mpeg/AVCParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ MythAVRational AVCParser::getFrameRate() const
{
if (m_unitsInTick == 0)
return MythAVRational(0);
else if (m_timeScale & 0x1)
if (m_timeScale & 0x1)
return MythAVRational(m_timeScale, m_unitsInTick * 2);
return MythAVRational(m_timeScale / 2, m_unitsInTick);
}
17 changes: 10 additions & 7 deletions mythtv/libs/libmythtv/tv_play.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7026,7 +7026,7 @@ void TV::DoEditSchedule(int EditType, const QString & EditArg)
}
}

void TV::EditSchedule(int EditType, const QString arg)
void TV::EditSchedule(int EditType, const QString& arg)
{
// post the request so the guide will be created in the UI thread
QString message = QString("START_EPG %1 %2").arg(EditType).arg(arg);
Expand Down Expand Up @@ -9616,11 +9616,9 @@ void TV::RetrieveCast(const ProgramInfo& ProgInfo)
if (query.exec() && query.size() > 0)
{
QStringList plist;
QString rstr;
QString role;
QString pname;
QString character;
int pid;

while(query.next())
{
Expand All @@ -9640,7 +9638,7 @@ void TV::RetrieveCast(const ProgramInfo& ProgInfo)
* majority of other columns, or we'll have the same problem in
* reverse.
*/
pid = query.value(3).toInt();
int pid = query.value(3).toInt();
pname = QString::fromUtf8(query.value(1)
.toByteArray().constData()) +
"|" + QString::number(pid);
Expand All @@ -9664,12 +9662,16 @@ void TV::FillOSDMenuCastButton(MythOSDDialogData & dialog,
for (const auto & [actor, role] : std::as_const(people))
{
if (role.isEmpty())
{
dialog.m_buttons.push_back( {actor.split('|')[0],
QString("JUMPCAST|%1").arg(actor), true} );
}
else
{
dialog.m_buttons.push_back( {QString("%1 as %2")
.arg(actor.split('|')[0], role),
QString("JUMPCAST|%1").arg(actor), true} );
}
}
}

Expand Down Expand Up @@ -9719,15 +9721,14 @@ void TV::FillOSDMenuActorShows(const QString & actor, int person_id,
" ORDER BY starttime;").arg(table));
query.bindValue(":PERSON", person_id);

int chanid;
QDateTime starttime;
if (query.exec() && query.size() > 0)
{
while(query.next())
{
chanid = query.value(0).toInt();
int chanid = query.value(0).toInt();
starttime = MythDate::fromString(query.value(1).toString());
ProgramInfo *pi = new ProgramInfo(chanid, starttime.toUTC());
auto *pi = new ProgramInfo(chanid, starttime.toUTC());
if (!pi->GetTitle().isEmpty() &&
pi->GetRecordingGroup() != "LiveTV" &&
pi->GetRecordingGroup() != "Deleted")
Expand All @@ -9747,9 +9748,11 @@ void TV::FillOSDMenuActorShows(const QString & actor, int person_id,
if (show.isEmpty())
continue;
if (!pi->GetSubtitle().isEmpty())
{
show += QString(" %1x%2 %3").arg(pi->GetSeason())
.arg(pi->GetEpisode())
.arg(pi->GetSubtitle());
}

dialog.m_buttons.push_back( {show,
QString("JUMPPROG %1 %2").arg(actor).arg(++idx) });
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/tv_play.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class MTV_PUBLIC TV : public TVPlaybackState, public MythTVMenuItemDisplayer, pu

// Commands used by frontend UI screens (PlaybackBox, GuideGrid etc)
void EditSchedule(int EditType = kScheduleProgramGuide,
const QString arg = "");
const QString& arg = "");
bool IsTunablePriv(uint ChanId);
static QVector<uint> IsTunableOn(PlayerContext* Context, uint ChanId);
void ChangeChannel(const ChannelInfoList& Options);
Expand Down Expand Up @@ -491,7 +491,7 @@ class MTV_PUBLIC TV : public TVPlaybackState, public MythTVMenuItemDisplayer, pu
// Menu dialog
void ShowOSDMenu(bool isCompact = false);
void FillOSDMenuJumpRec(const QString &Category = "", int Level = 0, const QString &Selected = "");
void FillOSDMenuCastButton(MythOSDDialogData & dialog,
static void FillOSDMenuCastButton(MythOSDDialogData & dialog,
const QVector<string_pair> & people);
void FillOSDMenuCast(void);
void FillOSDMenuActorShows(const QString & actor, int person_id,
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythfrontend/proglist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ ProgLister::ProgLister(MythScreenStack *parent, TV* player,
ProgListType pltype, const QString & extraArg) :
ScheduleCommon(parent, "ProgLister"),
m_type(pltype),
m_extraArg(std::move(extraArg)),
m_extraArg(extraArg),
m_startTime(MythDate::current()),
m_searchTime(m_startTime),
m_channelOrdering(gCoreContext->GetSetting("ChannelOrdering", "channum")),
Expand Down

0 comments on commit 755b7cd

Please sign in to comment.