[mythtv] Services API for ChannelServices / Video Source

Bill Meek keemllib at gmail.com
Fri Nov 1 16:25:21 UTC 2019


On 10/31/19 4:42 PM, Klaas de Waal wrote:

...

> I have committed support for the bouquet ID and the region ID in the
> services API  but not yet tested anything. I followed what was done
> for the dvb_nit_id and I think the C++ code is correct and complete. I
> made some changes to the Javascript code but I am not sure what else
> needs to be done there or what needs to be done in other non-C++ parts
> of the code. I do appreciate it very much if you would have a look at
> it.

...

Looks good. BouquetId and RegionId default to 0 (so they aren't required.)
The output of GetVideoSource[List] changes, that could cause users of those
endpoints problems if they don't handle unexpected parameters.

Users should be looking at BE:6544/<Service name>/version, more on
that below.

I've never used/tested the Add/Update VideoSource endpoints, but noticed
that when Update is used, the return is true even if a non-existing SourceId
is used. Not sure how to make the SQL return false and has nothing to do
with these additions.

Otherwise, Add returns the SourceId as expected. Add and Update change the
DB as expected.

I believe the only change required is to bump the minor version. Which I
forgot to do after adding the OnlyTunable parameter to Channel/GetChannelInfoList.

I'll do that unless someone disagrees (same for the new Myth/DelayShutdown endpoint.)

diff --git a/mythtv/libs/libmythservicecontracts/services/channelServices.h b/mythtv/libs/libmythservicecontracts/services/channelServices.h
index 6d194b3a0d..8a8df6bb13 100644
--- a/mythtv/libs/libmythservicecontracts/services/channelServices.h
+++ b/mythtv/libs/libmythservicecontracts/services/channelServices.h
@@ -41,7 +41,7 @@
  class SERVICE_PUBLIC ChannelServices : public Service
  {
      Q_OBJECT
-    Q_CLASSINFO( "version"    , "1.6" );
+    Q_CLASSINFO( "version"    , "1.7" );
      Q_CLASSINFO( "AddDBChannel_Method",              "POST" )
      Q_CLASSINFO( "UpdateDBChannel_Method",           "POST" )
      Q_CLASSINFO( "RemoveDBChannel_Method",           "POST" )
diff --git a/mythtv/libs/libmythservicecontracts/services/mythServices.h b/mythtv/libs/libmythservicecontracts/services/mythServices.h
index b4fc7834d4..29696bd44f 100644
--- a/mythtv/libs/libmythservicecontracts/services/mythServices.h
+++ b/mythtv/libs/libmythservicecontracts/services/mythServices.h
@@ -44,7 +44,7 @@
  class SERVICE_PUBLIC MythServices : public Service  //, public QScriptable ???
  {
      Q_OBJECT
-    Q_CLASSINFO( "version"    , "5.1" );
+    Q_CLASSINFO( "version"    , "5.2" );
      Q_CLASSINFO( "AddStorageGroupDir_Method",    "POST" )
      Q_CLASSINFO( "RemoveStorageGroupDir_Method", "POST" )
      Q_CLASSINFO( "PutSetting_Method",            "POST" )

-- 
Bill


More information about the mythtv-dev mailing list