Mailing List Archive

[MythTV/mythtv] 902a1f: Services API: Fix inconsistent results
Branch: refs/heads/master
Home: https://github.com/MythTV/mythtv
Commit: 902a1f79a024c23ee16c9e8e0bc163ca2f2ccdd1
https://github.com/MythTV/mythtv/commit/902a1f79a024c23ee16c9e8e0bc163ca2f2ccdd1
Author: Peter Bennett <pbennett@mythtv.org>
Date: 2023-03-30 (Thu, 30 Mar 2023)

Changed paths:
M mythtv/libs/libmythbase/http/serialisers/mythjsonserialiser.cpp
M mythtv/libs/libmythbase/http/serialisers/mythjsonserialiser.h
M mythtv/programs/mythbackend/servicesv2/v2dvr.cpp
M mythtv/programs/mythbackend/servicesv2/v2dvr.h
M mythtv/programs/mythbackend/servicesv2/v2recording.h
M mythtv/programs/mythbackend/servicesv2/v2serviceUtil.cpp

Log Message:
-----------
Services API: Fix inconsistent results

- Fix the bug in the existing code. The code for xml translates enum
variables to their names (if they use Q_ENUM), but the code for json
does not. Add the missing code to the json serializer so that enum
variables are treated the same in all cases.
- Change the Status field to be an int so that it always returns the
numeric value
- Add a field StatusName that is defined as a RecStatus enum and returns
the enum value name.
- Change the RecStatusToString and RecStatusToDescription methods to take
either the numeric Status value or the enum value name.

Fixes #740


_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-commits