Skip to content

Commit

Permalink
API: Fix bug in Guide/GetProgramGuide when details are not requested
Browse files Browse the repository at this point in the history
If Details=true is not specified, some details, including Season and
Episode are not returned. However it was returning random garbage for
those fields. Changed to initialize all fields to zero in case they are
not being valued.
  • Loading branch information
bennettpeter committed May 11, 2024
1 parent eed58ef commit d38347e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion mythtv/programs/mythbackend/servicesv2/v2programAndChannel.h
Expand Up @@ -68,6 +68,7 @@ class V2ChannelInfo : public QObject

Q_INVOKABLE V2ChannelInfo(QObject *parent = nullptr)
: QObject ( parent ),
m_ChanId (0),
m_MplexId (0),
m_ServiceId (0),
m_ATSCMajorChan (0),
Expand Down Expand Up @@ -173,7 +174,16 @@ class V2Program : public QObject
public:

Q_INVOKABLE V2Program(QObject *parent = nullptr)
: QObject( parent )
: QObject( parent ),
m_Repeat (false),
m_Stars (0),
m_ProgramFlags (0),
m_VideoProps (0),
m_AudioProps (0),
m_Season (0),
m_Episode (0),
m_TotalEpisodes (0),
m_FileSize (0)
{
}

Expand Down

0 comments on commit d38347e

Please sign in to comment.