[mythtv-commits] [MythTV/mythtv] e78642: ServicesAPI: make some parts of the reply from Dvr...
Paul Harrison
noreply at github.com
Tue Apr 12 18:01:19 UTC 2022
Branch: refs/heads/master
Home: https://github.com/MythTV/mythtv
Commit: e78642b5e236512cdc3f5c323907ec1d75dd0af6
https://github.com/MythTV/mythtv/commit/e78642b5e236512cdc3f5c323907ec1d75dd0af6
Author: Paul Harrison <paul at mythqml.net>
Date: 2022-04-12 (Tue, 12 Apr 2022)
Changed paths:
M mythtv/libs/libmythbase/http/mythhttpservice.h
M mythtv/programs/mythbackend/servicesv2/v2dvr.cpp
M mythtv/programs/mythbackend/servicesv2/v2dvr.h
M mythtv/programs/mythbackend/servicesv2/v2programAndChannel.h
M mythtv/programs/mythbackend/servicesv2/v2serviceUtil.cpp
M mythtv/programs/mythbackend/servicesv2/v2serviceUtil.h
Log Message:
-----------
ServicesAPI: make some parts of the reply from Dvr/GetRecordedList optional
This adds 5 extra parameters to fine tune what details the endpoint returns in
the reply. The idea is to speed up the API query by reducing the number of SQL
queries required from at least 4 per recording to just one if you only require
the basic information for the recording.
On a test system this reduced the time required to query for all 5298 recordings
from over 1 min 10 secs to under 1 second when asking just for the basic
information.
The new bool parameters are :-
Details - this adds some extra information (this was already present in the function that creates the reply so I just left it as is)
IncRecording - this will add/remove the Recording element to the reply
IncCast - this will add/remove the Cast element containing the programs cast members if available
IncChannel - this will add/remove the Channel element containing the channel details
IncArtWork - this will add/remove the ArtWork element for the program if available
Example query:-
http://localhost:6744/Dvr/GetRecordedList?Details=True&IncRecording=True&IncArtWork=False&IncChannel=False&IncCast=False
Any missing parameters default to True so the default behaviour should be unchanged.
More information about the mythtv-commits
mailing list