From 8c4caee48df058bda0926370719ceee7bed69e81 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 5 Jun 2025 00:12:09 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.555.3 --- .speakeasy/gen.lock | 498 ++++----- .speakeasy/gen.yaml | 3 +- .speakeasy/workflow.lock | 14 +- README.md | 6 +- RELEASES.md | 12 +- activities.go | 69 +- authentication.go | 129 ++- butler.go | 159 +-- codeSamples.yaml | 72 +- docs/models/operations/country.md | 10 +- docs/models/operations/director.md | 10 +- docs/models/operations/genre.md | 10 +- .../getactorslibraryqueryparamtype.md | 20 +- docs/models/operations/getalllibrariestype.md | 20 +- .../getallmedialibraryactivedirection.md | 12 - .../getallmedialibrarydefaultdirection.md | 12 - .../operations/getallmedialibraryfieldtype.md | 9 - .../operations/getallmedialibraryguids.md | 8 - .../getallmedialibraryhasthumbnail.md | 11 - .../operations/getallmedialibraryimage.md | 10 - ...edialibrarylibraryoptimizedforstreaming.md | 19 - .../getallmedialibrarylibraryresponsetype.md | 11 - .../getallmedialibrarylibrarytype.md | 16 - .../operations/getallmedialibrarymedia.md | 26 - .../getallmedialibrarymediacontainer.md | 26 - .../operations/getallmedialibrarymeta.md | 12 - ...getallmedialibraryoptimizedforstreaming.md | 19 - ...etallmedialibraryoptimizedforstreaming1.md | 9 - .../operations/getallmedialibrarypart.md | 23 - .../getallmedialibraryqueryparamtype.md | 22 - .../operations/getallmedialibraryresponse.md | 11 - .../getallmedialibraryresponsebody.md | 10 - .../operations/getallmedialibrarysort.md | 15 - .../operations/getallmedialibrarystream.md | 58 -- .../getallmedialibrarystreamtype.md | 16 - .../operations/getallmedialibrarytype.md | 15 - .../getcountrieslibraryqueryparamtype.md | 20 +- .../getgenreslibraryqueryparamtype.md | 20 +- .../operations/getlibraryitemslibrarytype.md | 22 +- .../operations/getlibraryitemsmetadata.md | 2 +- .../getlibraryitemsqueryparamtype.md | 20 +- ...> getlibrarysectionsallactivedirection.md} | 8 +- ....md => getlibrarysectionsallcollection.md} | 2 +- ...try.md => getlibrarysectionsallcountry.md} | 2 +- .../getlibrarysectionsalldefaultdirection.md | 12 + ...or.md => getlibrarysectionsalldirector.md} | 2 +- ...field.md => getlibrarysectionsallfield.md} | 2 +- .../getlibrarysectionsallfieldtype.md | 9 + ...lter.md => getlibrarysectionsallfilter.md} | 2 +- ...genre.md => getlibrarysectionsallgenre.md} | 2 +- .../operations/getlibrarysectionsallguids.md | 8 + .../getlibrarysectionsallhasthumbnail.md | 11 + .../operations/getlibrarysectionsallimage.md | 10 + ...sectionsalllibraryoptimizedforstreaming.md | 19 + ...etlibrarysectionsalllibraryresponsetype.md | 11 + .../getlibrarysectionsalllibrarytype.md | 20 + .../operations/getlibrarysectionsallmedia.md | 26 + .../getlibrarysectionsallmediacontainer.md | 26 + .../getlibrarysectionsallmeta.md} | 9 +- ...ta.md => getlibrarysectionsallmetadata.md} | 24 +- ...or.md => getlibrarysectionsalloperator.md} | 2 +- ...librarysectionsalloptimizedforstreaming.md | 19 + ...ibrarysectionsalloptimizedforstreaming1.md | 9 + .../operations/getlibrarysectionsallpart.md | 23 + ...librarysectionsallqueryparamincludemeta.md | 12 + .../getlibrarysectionsallqueryparamtype.md | 24 + ...est.md => getlibrarysectionsallrequest.md} | 6 +- .../getlibrarysectionsallresponse.md | 11 + .../getlibrarysectionsallresponsebody.md | 10 + ...ryrole.md => getlibrarysectionsallrole.md} | 2 +- .../operations/getlibrarysectionsallsort.md | 15 + .../operations/getlibrarysectionsallstream.md | 58 ++ .../getlibrarysectionsallstreamtype.md | 16 + .../operations/getlibrarysectionsalltype.md | 15 + ...> getlibrarysectionsallultrablurcolors.md} | 2 +- ...iter.md => getlibrarysectionsallwriter.md} | 2 +- .../operations/getmediametadatacountry.md | 10 +- .../operations/getmediametadatadirector.md | 14 +- .../operations/getmediametadatagenre.md | 10 +- .../operations/getmediametadataguids.md | 6 +- .../operations/getmediametadatametadata.md | 2 +- .../operations/getmediametadatarequest.md | 32 +- .../models/operations/getmediametadatarole.md | 16 +- .../models/operations/getmediametadatatype.md | 22 +- .../operations/getmediametadatawriter.md | 14 +- .../getplaylistcontentsqueryparamtype.md | 20 +- .../operations/getrecentlyaddedhubstype.md | 22 +- .../operations/getrecentlyaddedmetadata.md | 2 +- .../getsearchalllibrariesmetadata.md | 2 +- .../operations/getsearchalllibrariestype.md | 22 +- .../getsearchlibraryqueryparamtype.md | 20 +- .../gettopwatchedcontentmediacontainer.md | 10 +- ...topwatchedcontentqueryparamincludeguids.md | 12 + .../gettopwatchedcontentqueryparamtype.md | 20 +- .../operations/gettopwatchedcontentrequest.md | 4 +- docs/models/operations/guids.md | 6 +- docs/models/operations/producer.md | 14 +- docs/models/operations/queryparamtype.md | 20 +- docs/models/operations/rating.md | 10 +- docs/models/operations/role.md | 16 +- docs/models/operations/similar.md | 2 +- docs/models/operations/type.md | 20 +- docs/models/operations/writer.md | 13 +- .../sdkerrors/getallmedialibrarybadrequest.md | 11 - .../getlibrarysectionsallbadrequest.md | 11 + ...rors.md => getlibrarysectionsallerrors.md} | 2 +- ... => getlibrarysectionsalllibraryerrors.md} | 2 +- .../getlibrarysectionsallunauthorized.md | 11 + docs/sdks/authentication/README.md | 2 +- docs/sdks/butler/README.md | 4 +- docs/sdks/hubs/README.md | 5 +- docs/sdks/library/README.md | 58 +- docs/sdks/playlists/README.md | 18 +- docs/sdks/plex/README.md | 5 +- docs/sdks/search/README.md | 4 +- docs/sdks/server/README.md | 5 +- docs/sdks/watchlist/README.md | 2 +- hubs.go | 99 +- internal/config/sdkconfiguration.go | 34 + internal/hooks/hooks.go | 18 +- library.go | 628 +++++++----- log.go | 99 +- media.go | 159 +-- models/operations/getactorslibrary.go | 16 +- models/operations/getalllibraries.go | 16 +- models/operations/getcountrieslibrary.go | 16 +- models/operations/getgenreslibrary.go | 16 +- models/operations/getlibraryitems.go | 36 +- ...dialibrary.go => getlibrarysectionsall.go} | 962 +++++++++--------- models/operations/getmediametadata.go | 119 ++- models/operations/getplaylistcontents.go | 16 +- models/operations/getrecentlyadded.go | 181 ++-- models/operations/getrecentlyaddedlibrary.go | 16 +- models/operations/getsearchalllibraries.go | 20 +- models/operations/getsearchlibrary.go | 16 +- models/operations/gettopwatchedcontent.go | 105 +- models/sdkerrors/getallmedialibrary.go | 90 -- models/sdkerrors/getlibrarysectionsall.go | 90 ++ playlists.go | 279 ++--- plex.go | 219 ++-- plexapi.go | 119 +-- search.go | 99 +- server.go | 279 ++--- sessions.go | 129 ++- statistics.go | 99 +- updater.go | 99 +- users.go | 39 +- video.go | 69 +- watchlist.go | 39 +- 149 files changed, 3663 insertions(+), 2976 deletions(-) delete mode 100644 docs/models/operations/getallmedialibraryactivedirection.md delete mode 100644 docs/models/operations/getallmedialibrarydefaultdirection.md delete mode 100644 docs/models/operations/getallmedialibraryfieldtype.md delete mode 100644 docs/models/operations/getallmedialibraryguids.md delete mode 100644 docs/models/operations/getallmedialibraryhasthumbnail.md delete mode 100644 docs/models/operations/getallmedialibraryimage.md delete mode 100644 docs/models/operations/getallmedialibrarylibraryoptimizedforstreaming.md delete mode 100644 docs/models/operations/getallmedialibrarylibraryresponsetype.md delete mode 100644 docs/models/operations/getallmedialibrarylibrarytype.md delete mode 100644 docs/models/operations/getallmedialibrarymedia.md delete mode 100644 docs/models/operations/getallmedialibrarymediacontainer.md delete mode 100644 docs/models/operations/getallmedialibrarymeta.md delete mode 100644 docs/models/operations/getallmedialibraryoptimizedforstreaming.md delete mode 100644 docs/models/operations/getallmedialibraryoptimizedforstreaming1.md delete mode 100644 docs/models/operations/getallmedialibrarypart.md delete mode 100644 docs/models/operations/getallmedialibraryqueryparamtype.md delete mode 100644 docs/models/operations/getallmedialibraryresponse.md delete mode 100644 docs/models/operations/getallmedialibraryresponsebody.md delete mode 100644 docs/models/operations/getallmedialibrarysort.md delete mode 100644 docs/models/operations/getallmedialibrarystream.md delete mode 100644 docs/models/operations/getallmedialibrarystreamtype.md delete mode 100644 docs/models/operations/getallmedialibrarytype.md rename docs/models/operations/{getallmedialibraryqueryparamincludemeta.md => getlibrarysectionsallactivedirection.md} (57%) rename docs/models/operations/{getallmedialibrarycollection.md => getlibrarysectionsallcollection.md} (96%) rename docs/models/operations/{getallmedialibrarycountry.md => getlibrarysectionsallcountry.md} (95%) create mode 100644 docs/models/operations/getlibrarysectionsalldefaultdirection.md rename docs/models/operations/{getallmedialibrarydirector.md => getlibrarysectionsalldirector.md} (91%) rename docs/models/operations/{getallmedialibraryfield.md => getlibrarysectionsallfield.md} (95%) create mode 100644 docs/models/operations/getlibrarysectionsallfieldtype.md rename docs/models/operations/{getallmedialibraryfilter.md => getlibrarysectionsallfilter.md} (97%) rename docs/models/operations/{getallmedialibrarygenre.md => getlibrarysectionsallgenre.md} (95%) create mode 100644 docs/models/operations/getlibrarysectionsallguids.md create mode 100644 docs/models/operations/getlibrarysectionsallhasthumbnail.md create mode 100644 docs/models/operations/getlibrarysectionsallimage.md create mode 100644 docs/models/operations/getlibrarysectionsalllibraryoptimizedforstreaming.md create mode 100644 docs/models/operations/getlibrarysectionsalllibraryresponsetype.md create mode 100644 docs/models/operations/getlibrarysectionsalllibrarytype.md create mode 100644 docs/models/operations/getlibrarysectionsallmedia.md create mode 100644 docs/models/operations/getlibrarysectionsallmediacontainer.md rename docs/models/{sdkerrors/getallmedialibraryunauthorized.md => operations/getlibrarysectionsallmeta.md} (62%) rename docs/models/operations/{getallmedialibrarymetadata.md => getlibrarysectionsallmetadata.md} (97%) rename docs/models/operations/{getallmedialibraryoperator.md => getlibrarysectionsalloperator.md} (93%) create mode 100644 docs/models/operations/getlibrarysectionsalloptimizedforstreaming.md create mode 100644 docs/models/operations/getlibrarysectionsalloptimizedforstreaming1.md create mode 100644 docs/models/operations/getlibrarysectionsallpart.md create mode 100644 docs/models/operations/getlibrarysectionsallqueryparamincludemeta.md create mode 100644 docs/models/operations/getlibrarysectionsallqueryparamtype.md rename docs/models/operations/{getallmedialibraryrequest.md => getlibrarysectionsallrequest.md} (97%) create mode 100644 docs/models/operations/getlibrarysectionsallresponse.md create mode 100644 docs/models/operations/getlibrarysectionsallresponsebody.md rename docs/models/operations/{getallmedialibraryrole.md => getlibrarysectionsallrole.md} (97%) create mode 100644 docs/models/operations/getlibrarysectionsallsort.md create mode 100644 docs/models/operations/getlibrarysectionsallstream.md create mode 100644 docs/models/operations/getlibrarysectionsallstreamtype.md create mode 100644 docs/models/operations/getlibrarysectionsalltype.md rename docs/models/operations/{getallmedialibraryultrablurcolors.md => getlibrarysectionsallultrablurcolors.md} (94%) rename docs/models/operations/{getallmedialibrarywriter.md => getlibrarysectionsallwriter.md} (91%) create mode 100644 docs/models/operations/gettopwatchedcontentqueryparamincludeguids.md delete mode 100644 docs/models/sdkerrors/getallmedialibrarybadrequest.md create mode 100644 docs/models/sdkerrors/getlibrarysectionsallbadrequest.md rename docs/models/sdkerrors/{getallmedialibraryerrors.md => getlibrarysectionsallerrors.md} (97%) rename docs/models/sdkerrors/{getallmedialibrarylibraryerrors.md => getlibrarysectionsalllibraryerrors.md} (95%) create mode 100644 docs/models/sdkerrors/getlibrarysectionsallunauthorized.md create mode 100644 internal/config/sdkconfiguration.go rename models/operations/{getallmedialibrary.go => getlibrarysectionsall.go} (53%) delete mode 100644 models/sdkerrors/getallmedialibrary.go create mode 100644 models/sdkerrors/getlibrarysectionsall.go diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 60494e8..4ad2883 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: dfa99515-01c0-42eb-9be5-ee212fd03eb3 management: - docChecksum: 48621865085324b8b8eda5901f092a37 + docChecksum: b2624bb972abebc11eff6d460c59de68 docVersion: 0.0.3 - speakeasyVersion: 1.542.3 - generationVersion: 2.597.9 - releaseVersion: 0.21.2 - configChecksum: 9b887a3b269025f2afc6ff5be933ce43 + speakeasyVersion: 1.555.3 + generationVersion: 2.620.2 + releaseVersion: 0.22.0 + configChecksum: 77f7694922b75adf20a7eee48a2c199e repoURL: https://github.com/LukeHagar/plexgo.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/plexgo @@ -15,7 +15,7 @@ features: go: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.12 - core: 3.7.4 + core: 3.7.5 defaultEnabledRetries: 0.2.0 deprecations: 2.81.3 downloadStreams: 0.1.2 @@ -26,15 +26,15 @@ features: globalSecurity: 2.82.11 globalSecurityCallbacks: 0.1.0 globalSecurityFlattening: 0.1.0 - globalServerURLs: 2.82.2 + globalServerURLs: 2.82.3 intellisenseMarkdownSupport: 0.1.0 methodServerURLs: 2.82.1 nameOverrides: 2.81.2 nullables: 0.1.1 openEnums: 0.1.0 responseFormat: 0.1.2 - retries: 2.83.2 - sdkHooks: 0.1.0 + retries: 2.83.3 + sdkHooks: 0.2.0 unions: 2.85.10 uploadStreams: 0.1.0 generatedFiles: @@ -51,7 +51,6 @@ generatedFiles: - /models/operations/enablepapertrail.go - /models/operations/getactorslibrary.go - /models/operations/getalllibraries.go - - /models/operations/getallmedialibrary.go - /models/operations/getavailableclients.go - /models/operations/getbandwidthstatistics.go - /models/operations/getbannerimage.go @@ -67,6 +66,7 @@ generatedFiles: - /models/operations/getlibrarydetails.go - /models/operations/getlibraryhubs.go - /models/operations/getlibraryitems.go + - /models/operations/getlibrarysectionsall.go - /models/operations/getmediaarts.go - /models/operations/getmediametadata.go - /models/operations/getmediaposters.go @@ -135,7 +135,6 @@ generatedFiles: - /models/sdkerrors/enablepapertrail.go - /models/sdkerrors/getactorslibrary.go - /models/sdkerrors/getalllibraries.go - - /models/sdkerrors/getallmedialibrary.go - /models/sdkerrors/getavailableclients.go - /models/sdkerrors/getbandwidthstatistics.go - /models/sdkerrors/getbannerimage.go @@ -151,6 +150,7 @@ generatedFiles: - /models/sdkerrors/getlibrarydetails.go - /models/sdkerrors/getlibraryhubs.go - /models/sdkerrors/getlibraryitems.go + - /models/sdkerrors/getlibrarysectionsall.go - /models/sdkerrors/getmediametadata.go - /models/sdkerrors/getmediaproviders.go - /models/sdkerrors/getmetadatachildren.go @@ -283,41 +283,6 @@ generatedFiles: - docs/models/operations/getalllibrariesresponse.md - docs/models/operations/getalllibrariesresponsebody.md - docs/models/operations/getalllibrariestype.md - - docs/models/operations/getallmedialibraryactivedirection.md - - docs/models/operations/getallmedialibrarycollection.md - - docs/models/operations/getallmedialibrarycountry.md - - docs/models/operations/getallmedialibrarydefaultdirection.md - - docs/models/operations/getallmedialibrarydirector.md - - docs/models/operations/getallmedialibraryfield.md - - docs/models/operations/getallmedialibraryfieldtype.md - - docs/models/operations/getallmedialibraryfilter.md - - docs/models/operations/getallmedialibrarygenre.md - - docs/models/operations/getallmedialibraryguids.md - - docs/models/operations/getallmedialibraryhasthumbnail.md - - docs/models/operations/getallmedialibraryimage.md - - docs/models/operations/getallmedialibrarylibraryoptimizedforstreaming.md - - docs/models/operations/getallmedialibrarylibraryresponsetype.md - - docs/models/operations/getallmedialibrarylibrarytype.md - - docs/models/operations/getallmedialibrarymedia.md - - docs/models/operations/getallmedialibrarymediacontainer.md - - docs/models/operations/getallmedialibrarymeta.md - - docs/models/operations/getallmedialibrarymetadata.md - - docs/models/operations/getallmedialibraryoperator.md - - docs/models/operations/getallmedialibraryoptimizedforstreaming.md - - docs/models/operations/getallmedialibraryoptimizedforstreaming1.md - - docs/models/operations/getallmedialibrarypart.md - - docs/models/operations/getallmedialibraryqueryparamincludemeta.md - - docs/models/operations/getallmedialibraryqueryparamtype.md - - docs/models/operations/getallmedialibraryrequest.md - - docs/models/operations/getallmedialibraryresponse.md - - docs/models/operations/getallmedialibraryresponsebody.md - - docs/models/operations/getallmedialibraryrole.md - - docs/models/operations/getallmedialibrarysort.md - - docs/models/operations/getallmedialibrarystream.md - - docs/models/operations/getallmedialibrarystreamtype.md - - docs/models/operations/getallmedialibrarytype.md - - docs/models/operations/getallmedialibraryultrablurcolors.md - - docs/models/operations/getallmedialibrarywriter.md - docs/models/operations/getavailableclientsmediacontainer.md - docs/models/operations/getavailableclientsresponse.md - docs/models/operations/getavailableclientsresponsebody.md @@ -422,6 +387,41 @@ generatedFiles: - docs/models/operations/getlibraryitemstype.md - docs/models/operations/getlibraryitemsultrablurcolors.md - docs/models/operations/getlibraryitemswriter.md + - docs/models/operations/getlibrarysectionsallactivedirection.md + - docs/models/operations/getlibrarysectionsallcollection.md + - docs/models/operations/getlibrarysectionsallcountry.md + - docs/models/operations/getlibrarysectionsalldefaultdirection.md + - docs/models/operations/getlibrarysectionsalldirector.md + - docs/models/operations/getlibrarysectionsallfield.md + - docs/models/operations/getlibrarysectionsallfieldtype.md + - docs/models/operations/getlibrarysectionsallfilter.md + - docs/models/operations/getlibrarysectionsallgenre.md + - docs/models/operations/getlibrarysectionsallguids.md + - docs/models/operations/getlibrarysectionsallhasthumbnail.md + - docs/models/operations/getlibrarysectionsallimage.md + - docs/models/operations/getlibrarysectionsalllibraryoptimizedforstreaming.md + - docs/models/operations/getlibrarysectionsalllibraryresponsetype.md + - docs/models/operations/getlibrarysectionsalllibrarytype.md + - docs/models/operations/getlibrarysectionsallmedia.md + - docs/models/operations/getlibrarysectionsallmediacontainer.md + - docs/models/operations/getlibrarysectionsallmeta.md + - docs/models/operations/getlibrarysectionsallmetadata.md + - docs/models/operations/getlibrarysectionsalloperator.md + - docs/models/operations/getlibrarysectionsalloptimizedforstreaming.md + - docs/models/operations/getlibrarysectionsalloptimizedforstreaming1.md + - docs/models/operations/getlibrarysectionsallpart.md + - docs/models/operations/getlibrarysectionsallqueryparamincludemeta.md + - docs/models/operations/getlibrarysectionsallqueryparamtype.md + - docs/models/operations/getlibrarysectionsallrequest.md + - docs/models/operations/getlibrarysectionsallresponse.md + - docs/models/operations/getlibrarysectionsallresponsebody.md + - docs/models/operations/getlibrarysectionsallrole.md + - docs/models/operations/getlibrarysectionsallsort.md + - docs/models/operations/getlibrarysectionsallstream.md + - docs/models/operations/getlibrarysectionsallstreamtype.md + - docs/models/operations/getlibrarysectionsalltype.md + - docs/models/operations/getlibrarysectionsallultrablurcolors.md + - docs/models/operations/getlibrarysectionsallwriter.md - docs/models/operations/getmediaartsmediacontainer.md - docs/models/operations/getmediaartsmetadata.md - docs/models/operations/getmediaartsrequest.md @@ -641,6 +641,7 @@ generatedFiles: - docs/models/operations/gettopwatchedcontentguids.md - docs/models/operations/gettopwatchedcontentmediacontainer.md - docs/models/operations/gettopwatchedcontentmetadata.md + - docs/models/operations/gettopwatchedcontentqueryparamincludeguids.md - docs/models/operations/gettopwatchedcontentqueryparamtype.md - docs/models/operations/gettopwatchedcontentrequest.md - docs/models/operations/gettopwatchedcontentresponse.md @@ -858,10 +859,6 @@ generatedFiles: - docs/models/sdkerrors/getalllibrarieserrors.md - docs/models/sdkerrors/getalllibrarieslibraryerrors.md - docs/models/sdkerrors/getalllibrariesunauthorized.md - - docs/models/sdkerrors/getallmedialibrarybadrequest.md - - docs/models/sdkerrors/getallmedialibraryerrors.md - - docs/models/sdkerrors/getallmedialibrarylibraryerrors.md - - docs/models/sdkerrors/getallmedialibraryunauthorized.md - docs/models/sdkerrors/getavailableclientsbadrequest.md - docs/models/sdkerrors/getavailableclientserrors.md - docs/models/sdkerrors/getavailableclientsservererrors.md @@ -922,6 +919,10 @@ generatedFiles: - docs/models/sdkerrors/getlibraryitemserrors.md - docs/models/sdkerrors/getlibraryitemslibraryerrors.md - docs/models/sdkerrors/getlibraryitemsunauthorized.md + - docs/models/sdkerrors/getlibrarysectionsallbadrequest.md + - docs/models/sdkerrors/getlibrarysectionsallerrors.md + - docs/models/sdkerrors/getlibrarysectionsalllibraryerrors.md + - docs/models/sdkerrors/getlibrarysectionsallunauthorized.md - docs/models/sdkerrors/getmediametadatabadrequest.md - docs/models/sdkerrors/getmediametadataerrors.md - docs/models/sdkerrors/getmediametadatalibraryerrors.md @@ -1145,6 +1146,7 @@ generatedFiles: - docs/types/date.md - go.mod - hubs.go + - internal/config/sdkconfiguration.go - internal/hooks/hooks.go - internal/utils/contenttype.go - internal/utils/env.go @@ -1186,36 +1188,36 @@ examples: "200": application/json: {} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getServerPreferences: speakeasy-default-get-server-preferences: responses: "200": - application/json: {"MediaContainer": {"size": 161, "Setting": [{"id": "EnableDatabaseTrace", "label": "", "summary": "", "type": "bool", "default": false, "value": false, "hidden": true, "advanced": false, "group": "", "enumValues": "1:admin only|2:everyone"}, {"id": "EnableDatabaseTrace", "label": "", "summary": "", "type": "bool", "default": false, "value": false, "hidden": true, "advanced": false, "group": "", "enumValues": "1:admin only|2:everyone"}, {"id": "EnableDatabaseTrace", "label": "", "summary": "", "type": "bool", "default": false, "value": false, "hidden": true, "advanced": false, "group": "", "enumValues": "1:admin only|2:everyone"}]}} + application/json: {"MediaContainer": {"size": 161, "Setting": [{"id": "EnableDatabaseTrace", "label": "", "summary": "", "type": "bool", "default": false, "value": false, "hidden": true, "advanced": false, "group": "", "enumValues": "1:admin only|2:everyone"}]}} "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getAvailableClients: speakeasy-default-get-available-clients: responses: "200": - application/json: {"MediaContainer": {"size": 1, "Server": [{"name": "iPad", "host": "10.10.10.102", "address": "10.10.10.102", "port": 32500, "machineIdentifier": "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05", "version": "8.17", "protocol": "plex", "product": "Plex for iOS", "deviceClass": "tablet", "protocolVersion": 2, "protocolCapabilities": "playback,playqueues,timeline,provider-playback"}, {"name": "iPad", "host": "10.10.10.102", "address": "10.10.10.102", "port": 32500, "machineIdentifier": "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05", "version": "8.17", "protocol": "plex", "product": "Plex for iOS", "deviceClass": "tablet", "protocolVersion": 2, "protocolCapabilities": "playback,playqueues,timeline,provider-playback"}, {"name": "iPad", "host": "10.10.10.102", "address": "10.10.10.102", "port": 32500, "machineIdentifier": "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05", "version": "8.17", "protocol": "plex", "product": "Plex for iOS", "deviceClass": "tablet", "protocolVersion": 2, "protocolCapabilities": "playback,playqueues,timeline,provider-playback"}]}} + application/json: {"MediaContainer": {"size": 1, "Server": [{"name": "iPad", "host": "10.10.10.102", "address": "10.10.10.102", "port": 32500, "machineIdentifier": "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05", "version": "8.17", "protocol": "plex", "product": "Plex for iOS", "deviceClass": "tablet", "protocolVersion": 2, "protocolCapabilities": "playback,playqueues,timeline,provider-playback"}]}} "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getDevices: speakeasy-default-get-devices: responses: "200": - application/json: {"MediaContainer": {"size": 151, "identifier": "com.plexapp.system.devices", "Device": [{"id": 1, "name": "iPhone", "platform": "iOS", "createdAt": 1654131230}, {"id": 1, "name": "iPhone", "platform": "iOS", "createdAt": 1654131230}, {"id": 1, "name": "iPhone", "platform": "iOS", "createdAt": 1654131230}]}} + application/json: {"MediaContainer": {"size": 151, "identifier": "com.plexapp.system.devices", "Device": [{"id": 1, "name": "iPhone", "platform": "iOS", "createdAt": 1654131230}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-server-identity: speakeasy-default-get-server-identity: responses: @@ -1229,9 +1231,9 @@ examples: "200": application/json: {"MyPlex": {"authToken": "Z5v-PrNASDFpsaCi3CPK7", "username": "example.email@mail.com", "mappingState": "mapped", "signInState": "ok", "publicAddress": "140.20.68.140", "publicPort": 32400, "privateAddress": "10.10.10.47", "privatePort": 32400, "subscriptionFeatures": "federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks", "subscriptionState": "Active"}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getResizedPhoto: speakeasy-default-get-resized-photo: parameters: @@ -1240,12 +1242,12 @@ examples: height: 165 opacity: 100 blur: 0 - minSize: 1 - upscale: 1 + minSize: 0 + upscale: 0 url: "/library/metadata/49564/thumb/1654258204" responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-media-providers: @@ -1255,7 +1257,7 @@ examples: X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" responses: "200": - application/json: {"MediaContainer": {"MediaProvider": [{"Feature": [{"type": "", "flavor": "global", "scrobbleKey": "/:/scrobble/new", "unscrobbleKey": "/:/unscrobble/new", "Action": [{"id": "addToContinueWatching", "key": "/actions/addToContinueWatching"}]}, {"type": "", "flavor": "global", "scrobbleKey": "/:/scrobble/new", "unscrobbleKey": "/:/unscrobble/new", "Action": [{"id": "addToContinueWatching", "key": "/actions/addToContinueWatching"}, {"id": "addToContinueWatching", "key": "/actions/addToContinueWatching"}]}, {"type": "", "flavor": "global", "scrobbleKey": "/:/scrobble/new", "unscrobbleKey": "/:/unscrobble/new", "Action": [{"id": "addToContinueWatching", "key": "/actions/addToContinueWatching"}, {"id": "addToContinueWatching", "key": "/actions/addToContinueWatching"}]}]}, {"Feature": [{"type": "", "flavor": "global", "scrobbleKey": "/:/scrobble/new", "unscrobbleKey": "/:/unscrobble/new", "Action": [{"id": "addToContinueWatching", "key": "/actions/addToContinueWatching"}]}]}]}} + application/json: {"MediaContainer": {"MediaProvider": [{"Feature": [{"type": "", "flavor": "global", "scrobbleKey": "/:/scrobble/new", "unscrobbleKey": "/:/unscrobble/new", "Action": [{"id": "addToContinueWatching", "key": "/actions/addToContinueWatching"}]}]}]}} "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": @@ -1264,11 +1266,11 @@ examples: speakeasy-default-get-server-list: responses: "200": - application/json: {"MediaContainer": {"size": 1, "Server": [{"name": "Hera", "host": "10.10.10.47", "address": "10.10.10.47", "port": 32400, "machineIdentifier": "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", "version": "1.31.3.6868-28fc46b27"}, {"name": "Hera", "host": "10.10.10.47", "address": "10.10.10.47", "port": 32400, "machineIdentifier": "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", "version": "1.31.3.6868-28fc46b27"}, {"name": "Hera", "host": "10.10.10.47", "address": "10.10.10.47", "port": 32400, "machineIdentifier": "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", "version": "1.31.3.6868-28fc46b27"}]}} + application/json: {"MediaContainer": {"size": 1, "Server": [{"name": "Hera", "host": "10.10.10.47", "address": "10.10.10.47", "port": 32400, "machineIdentifier": "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", "version": "1.31.3.6868-28fc46b27"}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} markPlayed: speakeasy-default-mark-played: parameters: @@ -1278,7 +1280,7 @@ examples: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} markUnplayed: speakeasy-default-mark-unplayed: parameters: @@ -1286,9 +1288,9 @@ examples: key: 59398 responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} updatePlayProgress: "": parameters: @@ -1298,9 +1300,9 @@ examples: state: "played" responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-banner-image: speakeasy-default-get-banner-image: parameters: @@ -1317,9 +1319,9 @@ examples: "200": image/jpeg: "x-file: example.file" "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-thumb-image: speakeasy-default-get-thumb-image: parameters: @@ -1357,7 +1359,7 @@ examples: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} startUniversalTranscode: "": parameters: @@ -1380,9 +1382,9 @@ examples: autoAdjustQuality: 0 responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getServerActivities: speakeasy-default-get-server-activities: responses: @@ -1399,68 +1401,68 @@ examples: activityUUID: "25b71ed5-0f9d-461c-baa7-d404e9e10d3e" responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getButlerTasks: speakeasy-default-get-butler-tasks: responses: "200": - application/json: {"ButlerTasks": {"ButlerTask": [{"name": "BackupDatabase", "interval": 3, "title": "Backup Database", "description": "Create a backup copy of the server's database in the configured backup directory"}, {"name": "BackupDatabase", "interval": 3, "title": "Backup Database", "description": "Create a backup copy of the server's database in the configured backup directory"}]}} + application/json: {"ButlerTasks": {"ButlerTask": [{"name": "BackupDatabase", "interval": 3, "title": "Backup Database", "description": "Create a backup copy of the server's database in the configured backup directory"}]}} "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} startAllTasks: speakeasy-default-start-all-tasks: responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} stopAllTasks: speakeasy-default-stop-all-tasks: responses: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} startTask: speakeasy-default-start-task: parameters: path: - taskName: "CleanOldBundles" + taskName: "RefreshPeriodicMetadata" responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} stopTask: speakeasy-default-stop-task: parameters: path: - taskName: "BackupDatabase" + taskName: "CleanOldCacheFiles" responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getCompanionsData: speakeasy-default-get-companions-data: responses: "200": - application/json: [{"identifier": "tv.plex.sonos", "baseURL": "https://sonos.plex.tv", "title": "Sonos", "linkURL": "https://sonos.plex.tv/link", "provides": "client,player", "token": ""}, {"identifier": "tv.plex.sonos", "baseURL": "https://sonos.plex.tv", "title": "Sonos", "linkURL": "https://sonos.plex.tv/link", "provides": "client,player", "token": ""}] + application/json: [{"identifier": "tv.plex.sonos", "baseURL": "https://sonos.plex.tv", "title": "Sonos", "linkURL": "https://sonos.plex.tv/link", "provides": "client,player", "token": ""}] "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getUserFriends: speakeasy-default-get-user-friends: responses: "200": application/json: [{"email": "username@email.com", "friendlyName": "exampleUser", "home": true, "id": 0, "restricted": false, "sharedServers": [], "sharedSources": [], "status": "accepted", "thumb": "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578", "title": "username123", "username": "username123", "uuid": "7d1916e0d8f6e76b"}] "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getGeoData: @@ -1469,9 +1471,9 @@ examples: "200": application/json: {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": "802", "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getHomeData: speakeasy-default-get-home-data: responses: @@ -1492,11 +1494,11 @@ examples: X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58" responses: "200": - application/json: [{"name": "", "product": "Luxurious Frozen Bike", "productVersion": "", "platform": "", "platformVersion": "", "device": "Mobile", "clientIdentifier": "", "createdAt": "2019-06-24T11:38:02Z", "lastSeenAt": "2019-06-24T11:38:02Z", "provides": "", "ownerId": 575734, "sourceTitle": "", "publicAddress": "", "accessToken": "", "owned": false, "home": false, "synced": false, "relay": true, "presence": false, "httpsRequired": false, "publicAddressMatches": true, "dnsRebindingProtection": true, "natLoopbackSupported": true, "connections": []}] + application/json: [{"name": "", "product": "Ergonomic Plastic Hat", "productVersion": "", "platform": "", "platformVersion": "", "device": "Mobile", "clientIdentifier": "", "createdAt": "2019-06-24T11:38:02Z", "lastSeenAt": "2019-06-24T11:38:02Z", "provides": "", "ownerId": null, "sourceTitle": "", "publicAddress": "", "accessToken": "", "owned": true, "home": false, "synced": false, "relay": true, "presence": false, "httpsRequired": true, "publicAddressMatches": false, "dnsRebindingProtection": true, "natLoopbackSupported": false, "connections": [{"protocol": "http", "address": "5746 Mount Street", "port": 441996, "uri": "https://wide-kick.name/", "local": false, "relay": true, "IPv6": true}]}] "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getPin: "": parameters: @@ -1512,12 +1514,12 @@ examples: "201": application/json: {"id": 308667304, "code": "7RQZ", "product": "0", "trusted": false, "qr": "https://plex.tv/api/v2/pins/qr/7RQZ", "clientIdentifier": "string", "location": {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": "802", "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"}, "expiresIn": 876, "createdAt": "2024-07-16T17:03:05Z", "expiresAt": "2024-07-16T17:18:05Z", "authToken": null, "newRegistration": null} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} getTokenByPinId: "": parameters: path: - pinID: 408895 + pinID: 232248 header: X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58" X-Plex-Product: "Plex for Roku" @@ -1531,16 +1533,16 @@ examples: speakeasy-default-get-global-hubs: responses: "200": - application/json: {"MediaContainer": {"size": 8, "allowSync": true, "identifier": "com.plexapp.plugins.library", "Hub": [{"hubKey": "/library/metadata/50768,65523,58188,57341,57302,57070", "key": "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio", "title": "Recent Playlists", "type": "playlist", "hubIdentifier": "home.playlists", "context": "hub.home.playlists", "size": 6, "more": true, "style": "shelf", "promoted": true, "Metadata": [{"ratingKey": "57070", "key": "/playlists/57070/items", "guid": "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c", "type": "playlist", "title": "November Movie Day", "titleSort": "Tracks", "summary": "", "smart": false, "playlistType": "video", "composite": "/playlists/57070/composite/1668787730", "icon": "playlist://image.smart", "viewCount": 2, "lastViewedAt": 1668787732, "duration": 16873000, "leafCount": 3, "addedAt": 1668779618, "updatedAt": 1668787730}, {"ratingKey": "57070", "key": "/playlists/57070/items", "guid": "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c", "type": "playlist", "title": "November Movie Day", "titleSort": "Tracks", "summary": "", "smart": false, "playlistType": "video", "composite": "/playlists/57070/composite/1668787730", "icon": "playlist://image.smart", "viewCount": 2, "lastViewedAt": 1668787732, "duration": 16873000, "leafCount": 3, "addedAt": 1668779618, "updatedAt": 1668787730}, {"ratingKey": "57070", "key": "/playlists/57070/items", "guid": "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c", "type": "playlist", "title": "November Movie Day", "titleSort": "Tracks", "summary": "", "smart": false, "playlistType": "video", "composite": "/playlists/57070/composite/1668787730", "icon": "playlist://image.smart", "viewCount": 2, "lastViewedAt": 1668787732, "duration": 16873000, "leafCount": 3, "addedAt": 1668779618, "updatedAt": 1668787730}]}]}} + application/json: {"MediaContainer": {"size": 8, "allowSync": true, "identifier": "com.plexapp.plugins.library", "Hub": [{"hubKey": "/library/metadata/50768,65523,58188,57341,57302,57070", "key": "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio", "title": "Recent Playlists", "type": "playlist", "hubIdentifier": "home.playlists", "context": "hub.home.playlists", "size": 6, "more": true, "style": "shelf", "promoted": true, "Metadata": [{"ratingKey": "57070", "key": "/playlists/57070/items", "guid": "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c", "type": "playlist", "title": "November Movie Day", "titleSort": "Tracks", "summary": "", "smart": false, "playlistType": "video", "composite": "/playlists/57070/composite/1668787730", "icon": "playlist://image.smart", "viewCount": 2, "lastViewedAt": 1668787732, "duration": 16873000, "leafCount": 3, "addedAt": 1668779618, "updatedAt": 1668787730}]}]}} "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-recently-added: speakeasy-default-get-recently-added: parameters: query: - contentDirectoryID: 470161 + contentDirectoryID: 39486 sectionID: 2 type: 2 includeMeta: 1 @@ -1548,31 +1550,30 @@ examples: X-Plex-Container-Size: 50 responses: "200": - application/json: {"MediaContainer": {"size": 50, "totalSize": 50, "offset": 0, "allowSync": false, "identifier": "com.plexapp.plugins.library", "Meta": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}]}, {"type": "tag", "Operator": []}, {"type": "tag", "Operator": []}]}, "Metadata": [{"addedAt": 1556281940, "art": "/library/metadata/58683/art/1703239236", "audienceRatingImage": "rottentomatoes://image.rating.upright", "audienceRating": 9.2, "chapterSource": "media", "childCount": 1, "contentRating": "PG-13", "createdAtAccuracy": "epoch,local", "createdAtTZOffset": "0", "duration": 11558112, "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentRatingKey": "66", "grandparentSlug": "alice-in-borderland-2020", "grandparentTheme": "/library/metadata/66/theme/1705716261", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "grandparentTitle": "Caprica", "guid": "plex://movie/5d7768ba96b655001fdc0408", "index": 1, "key": "/library/metadata/58683", "lastRatedAt": 1721813113, "lastViewedAt": 1682752242, "leafCount": 14, "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "librarySectionTitle": "Movies", "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "originallyAvailableAt": "2022-12-14", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentIndex": 1, "parentKey": "/library/metadata/66", "parentRatingKey": "66", "parentSlug": "alice-in-borderland-2020", "parentStudio": "UCP", "parentTheme": "/library/metadata/66/theme/1705716261", "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTitle": "Caprica", "parentYear": 2010, "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "ratingKey": "58683", "rating": 7.6, "seasonCount": 2022, "skipCount": 1, "slug": "4-for-texas", "studio": "20th Century Studios", "subtype": "clip", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\nOnce a familiar threat returns to finish what was previously started, Jake must\nwork with Neytiri and the army of the Na'vi race to protect their home.\n", "tagline": "Return to Pandora.", "theme": "/library/metadata/1/theme/1705636920", "thumb": "/library/metadata/58683/thumb/1703239236", "titleSort": "Whale", "title": "Avatar: The Way of Water", "type": "movie", "updatedAt": 1556281940, "userRating": 10, "viewCount": 1, "viewOffset": 5222500, "viewedLeafCount": 0, "year": 2022, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}, {"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}, {"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}], "Genre": [{"id": 259, "filter": "genre=19", "tag": "Crime"}], "Country": [{"id": 259, "tag": "United States of America", "filter": "country=19"}], "Director": [{"tag": "Danny Boyle"}, {"tag": "Danny Boyle"}, {"tag": "Danny Boyle"}], "Writer": [{"id": 126522, "filter": "writer=126522", "tag": "Jamie P. Hanson", "tagKey": "5d77683d85719b001f3a535e"}, {"id": 126522, "filter": "writer=126522", "tag": "Jamie P. Hanson", "tagKey": "5d77683d85719b001f3a535e"}, {"id": 126522, "filter": "writer=126522", "tag": "Jamie P. Hanson", "tagKey": "5d77683d85719b001f3a535e"}], "Role": [{"id": 126522, "filter": "actor=126522", "tag": "Teller", "tagKey": "5d77683d85719b001f3a535e", "role": "Self - Judge", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Producer": [{"id": 126522, "filter": "producer=126522", "tag": "Amelia Knapp", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "filter": "producer=126522", "tag": "Amelia Knapp", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "filter": "producer=126522", "tag": "Amelia Knapp", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Rating": [{"image": "imdb://image.rating", "value": 5.1, "type": "audience"}], "Similar": [{"id": 259, "filter": "similar=259", "tag": "Criss Angel Mindfreak"}, {"id": 259, "filter": "similar=259", "tag": "Criss Angel Mindfreak"}, {"id": 259, "filter": "similar=259", "tag": "Criss Angel Mindfreak"}], "Location": [{"path": "/TV Shows/Clarkson's Farm"}], "Guid": [{"id": "tvdb://2337"}, {"id": "tvdb://2337"}], "Collection": [{"tag": "My Awesome Collection"}, {"tag": "My Awesome Collection"}, {"tag": "My Awesome Collection"}]}, {"addedAt": 1556281940, "art": "/library/metadata/58683/art/1703239236", "audienceRatingImage": "rottentomatoes://image.rating.upright", "audienceRating": 9.2, "chapterSource": "media", "childCount": 1, "contentRating": "PG-13", "createdAtAccuracy": "epoch,local", "createdAtTZOffset": "0", "duration": 11558112, "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentRatingKey": "66", "grandparentSlug": "alice-in-borderland-2020", "grandparentTheme": "/library/metadata/66/theme/1705716261", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "grandparentTitle": "Caprica", "guid": "plex://movie/5d7768ba96b655001fdc0408", "index": 1, "key": "/library/metadata/58683", "lastRatedAt": 1721813113, "lastViewedAt": 1682752242, "leafCount": 14, "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "librarySectionTitle": "Movies", "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "originallyAvailableAt": "2022-12-14", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentIndex": 1, "parentKey": "/library/metadata/66", "parentRatingKey": "66", "parentSlug": "alice-in-borderland-2020", "parentStudio": "UCP", "parentTheme": "/library/metadata/66/theme/1705716261", "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTitle": "Caprica", "parentYear": 2010, "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "ratingKey": "58683", "rating": 7.6, "seasonCount": 2022, "skipCount": 1, "slug": "4-for-texas", "studio": "20th Century Studios", "subtype": "clip", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\nOnce a familiar threat returns to finish what was previously started, Jake must\nwork with Neytiri and the army of the Na'vi race to protect their home.\n", "tagline": "Return to Pandora.", "theme": "/library/metadata/1/theme/1705636920", "thumb": "/library/metadata/58683/thumb/1703239236", "titleSort": "Whale", "title": "Avatar: The Way of Water", "type": "movie", "updatedAt": 1556281940, "userRating": 10, "viewCount": 1, "viewOffset": 5222500, "viewedLeafCount": 0, "year": 2022, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}, {"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}], "Genre": [{"id": 259, "filter": "genre=19", "tag": "Crime"}, {"id": 259, "filter": "genre=19", "tag": "Crime"}], "Country": [{"id": 259, "tag": "United States of America", "filter": "country=19"}], "Director": [{"tag": "Danny Boyle"}, {"tag": "Danny Boyle"}], "Writer": [{"id": 126522, "filter": "writer=126522", "tag": "Jamie P. Hanson", "tagKey": "5d77683d85719b001f3a535e"}, {"id": 126522, "filter": "writer=126522", "tag": "Jamie P. Hanson", "tagKey": "5d77683d85719b001f3a535e"}], "Role": [{"id": 126522, "filter": "actor=126522", "tag": "Teller", "tagKey": "5d77683d85719b001f3a535e", "role": "Self - Judge", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Producer": [{"id": 126522, "filter": "producer=126522", "tag": "Amelia Knapp", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "filter": "producer=126522", "tag": "Amelia Knapp", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Rating": [{"image": "imdb://image.rating", "value": 5.1, "type": "audience"}], "Similar": [{"id": 259, "filter": "similar=259", "tag": "Criss Angel Mindfreak"}, {"id": 259, "filter": "similar=259", "tag": "Criss Angel Mindfreak"}, {"id": 259, "filter": "similar=259", "tag": "Criss Angel Mindfreak"}], "Location": [{"path": "/TV Shows/Clarkson's Farm"}, {"path": "/TV Shows/Clarkson's Farm"}, {"path": "/TV Shows/Clarkson's Farm"}], "Guid": [{"id": "tvdb://2337"}, {"id": "tvdb://2337"}], "Collection": [{"tag": "My Awesome Collection"}, {"tag": "My Awesome Collection"}]}]}} + application/json: {"MediaContainer": {"size": 50, "totalSize": 50, "offset": 0, "allowSync": false, "identifier": "com.plexapp.plugins.library", "Meta": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}]}]}, "Metadata": [{"addedAt": 1556281940, "art": "/library/metadata/58683/art/1703239236", "audienceRatingImage": "rottentomatoes://image.rating.upright", "audienceRating": 9.2, "chapterSource": "media", "childCount": 1, "contentRating": "PG-13", "createdAtAccuracy": "epoch,local", "createdAtTZOffset": "0", "duration": 11558112, "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentRatingKey": "66", "grandparentSlug": "alice-in-borderland-2020", "grandparentTheme": "/library/metadata/66/theme/1705716261", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "grandparentTitle": "Caprica", "guid": "plex://movie/5d7768ba96b655001fdc0408", "index": 1, "key": "/library/metadata/58683", "lastRatedAt": 1721813113, "lastViewedAt": 1682752242, "leafCount": 14, "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "librarySectionTitle": "Movies", "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "originallyAvailableAt": "2022-12-14", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentIndex": 1, "parentKey": "/library/metadata/66", "parentRatingKey": "66", "parentSlug": "alice-in-borderland-2020", "parentStudio": "UCP", "parentTheme": "/library/metadata/66/theme/1705716261", "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTitle": "Caprica", "parentYear": 2010, "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "ratingKey": "58683", "rating": 7.6, "seasonCount": 2022, "skipCount": 1, "slug": "4-for-texas", "studio": "20th Century Studios", "subtype": "clip", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\nOnce a familiar threat returns to finish what was previously started, Jake must\nwork with Neytiri and the army of the Na'vi race to protect their home.\n", "tagline": "Return to Pandora.", "theme": "/library/metadata/1/theme/1705636920", "thumb": "/library/metadata/58683/thumb/1703239236", "titleSort": "Whale", "title": "Avatar: The Way of Water", "type": "movie", "updatedAt": 1556281940, "userRating": 10, "viewCount": 1, "viewOffset": 5222500, "viewedLeafCount": 0, "year": 2022, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Guid": [{"id": "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}"}], "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}], "Genre": [{"id": 259, "filter": "genre=19", "tag": "Crime"}], "Country": [{"id": 259, "tag": "United States of America", "filter": "country=19"}], "Director": [{"id": 126522, "filter": "director=235876", "tag": "Danny Boyle", "tagKey": "5d776831151a60001f24d031", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg"}], "Writer": [{"id": 126522, "filter": "writer=126522", "tag": "Jamie P. Hanson", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg"}], "Role": [{"id": 126522, "filter": "actor=126522", "tag": "Teller", "tagKey": "5d77683d85719b001f3a535e", "role": "Self - Judge", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Producer": [{"id": 126522, "filter": "producer=126522", "tag": "Amelia Knapp", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Rating": [{"image": "imdb://image.rating", "value": 5.1, "type": "audience"}], "Similar": [{"id": 259, "filter": "similar=259", "tag": "Criss Angel Mindfreak"}], "Location": [{"path": "/TV Shows/Clarkson's Farm"}], "Collection": [{"tag": "My Awesome Collection"}]}]}} getLibraryHubs: speakeasy-default-get-library-hubs: parameters: path: - sectionId: 6728.76 - query: {} + sectionId: 492.74 responses: "200": - application/json: {"MediaContainer": {"size": 7, "allowSync": true, "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "Hub": [{"key": "/library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0", "title": "Recently Played Movies", "type": "movie", "hubIdentifier": "movie.recentlyviewed.1", "context": "hub.movie.recentlyviewed", "size": 6, "more": true, "style": "shelf", "hubKey": "/library/metadata/66485,66098,57249,11449,5858,14944", "Metadata": [{"ratingKey": "14944", "key": "/library/metadata/14944", "guid": "plex://movie/5d77686eeb5d26001f1eb339", "studio": "Walt Disney Animation Studios", "type": "movie", "title": "Tangled", "librarySectionTitle": "Movies", "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "contentRating": "PG", "summary": "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.", "rating": 8.9, "audienceRating": 8.7, "viewCount": 1, "lastViewedAt": 1704936047, "year": 2010, "tagline": "They're taking adventure to new lengths.", "thumb": "/library/metadata/14944/thumb/1705739847", "art": "/library/metadata/14944/art/1705739847", "duration": 6017237, "originallyAvailableAt": "2010-11-24T00:00:00Z", "addedAt": 1589412494, "updatedAt": 1705739847, "audienceRatingImage": "rottentomatoes://image.rating.upright", "primaryExtraKey": "/library/metadata/14952", "ratingImage": "rottentomatoes://image.rating.ripe", "Media": [{"id": 38247, "duration": 6017237, "bitrate": 2051, "width": 1920, "height": 1080, "aspectRatio": 1.78, "audioChannels": 2, "audioCodec": "aac", "videoCodec": "h264", "videoResolution": "1080", "container": "mp4", "videoFrameRate": "24p", "optimizedForStreaming": 1, "audioProfile": "lc", "has64bitOffsets": false, "videoProfile": "high", "Part": [{"id": 38247, "key": "/library/parts/38247/1589412494/file.mp4", "duration": 6017237, "file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", "size": 1545647447, "audioProfile": "lc", "container": "mp4", "has64bitOffsets": false, "optimizedForStreaming": true, "videoProfile": "high"}, {"id": 38247, "key": "/library/parts/38247/1589412494/file.mp4", "duration": 6017237, "file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", "size": 1545647447, "audioProfile": "lc", "container": "mp4", "has64bitOffsets": false, "optimizedForStreaming": true, "videoProfile": "high"}]}, {"id": 38247, "duration": 6017237, "bitrate": 2051, "width": 1920, "height": 1080, "aspectRatio": 1.78, "audioChannels": 2, "audioCodec": "aac", "videoCodec": "h264", "videoResolution": "1080", "container": "mp4", "videoFrameRate": "24p", "optimizedForStreaming": 1, "audioProfile": "lc", "has64bitOffsets": false, "videoProfile": "high", "Part": [{"id": 38247, "key": "/library/parts/38247/1589412494/file.mp4", "duration": 6017237, "file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", "size": 1545647447, "audioProfile": "lc", "container": "mp4", "has64bitOffsets": false, "optimizedForStreaming": true, "videoProfile": "high"}, {"id": 38247, "key": "/library/parts/38247/1589412494/file.mp4", "duration": 6017237, "file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", "size": 1545647447, "audioProfile": "lc", "container": "mp4", "has64bitOffsets": false, "optimizedForStreaming": true, "videoProfile": "high"}]}], "Genre": [{"tag": "Animation"}, {"tag": "Animation"}, {"tag": "Animation"}], "Country": [{"tag": "United States of America"}, {"tag": "United States of America"}], "Director": [{"tag": "Nathan Greno"}, {"tag": "Nathan Greno"}], "Role": [{"tag": "Donna Murphy"}], "Writer": [{"tag": "Wilhelm Grimm"}, {"tag": "Wilhelm Grimm"}, {"tag": "Wilhelm Grimm"}], "skipCount": 1, "chapterSource": "media"}, {"ratingKey": "14944", "key": "/library/metadata/14944", "guid": "plex://movie/5d77686eeb5d26001f1eb339", "studio": "Walt Disney Animation Studios", "type": "movie", "title": "Tangled", "librarySectionTitle": "Movies", "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "contentRating": "PG", "summary": "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.", "rating": 8.9, "audienceRating": 8.7, "viewCount": 1, "lastViewedAt": 1704936047, "year": 2010, "tagline": "They're taking adventure to new lengths.", "thumb": "/library/metadata/14944/thumb/1705739847", "art": "/library/metadata/14944/art/1705739847", "duration": 6017237, "originallyAvailableAt": "2010-11-24T00:00:00Z", "addedAt": 1589412494, "updatedAt": 1705739847, "audienceRatingImage": "rottentomatoes://image.rating.upright", "primaryExtraKey": "/library/metadata/14952", "ratingImage": "rottentomatoes://image.rating.ripe", "Media": [{"id": 38247, "duration": 6017237, "bitrate": 2051, "width": 1920, "height": 1080, "aspectRatio": 1.78, "audioChannels": 2, "audioCodec": "aac", "videoCodec": "h264", "videoResolution": "1080", "container": "mp4", "videoFrameRate": "24p", "optimizedForStreaming": 1, "audioProfile": "lc", "has64bitOffsets": false, "videoProfile": "high", "Part": [{"id": 38247, "key": "/library/parts/38247/1589412494/file.mp4", "duration": 6017237, "file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", "size": 1545647447, "audioProfile": "lc", "container": "mp4", "has64bitOffsets": false, "optimizedForStreaming": true, "videoProfile": "high"}]}], "Genre": [{"tag": "Animation"}, {"tag": "Animation"}], "Country": [{"tag": "United States of America"}, {"tag": "United States of America"}, {"tag": "United States of America"}], "Director": [{"tag": "Nathan Greno"}], "Role": [{"tag": "Donna Murphy"}, {"tag": "Donna Murphy"}, {"tag": "Donna Murphy"}], "Writer": [{"tag": "Wilhelm Grimm"}, {"tag": "Wilhelm Grimm"}, {"tag": "Wilhelm Grimm"}], "skipCount": 1, "chapterSource": "media"}, {"ratingKey": "14944", "key": "/library/metadata/14944", "guid": "plex://movie/5d77686eeb5d26001f1eb339", "studio": "Walt Disney Animation Studios", "type": "movie", "title": "Tangled", "librarySectionTitle": "Movies", "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "contentRating": "PG", "summary": "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.", "rating": 8.9, "audienceRating": 8.7, "viewCount": 1, "lastViewedAt": 1704936047, "year": 2010, "tagline": "They're taking adventure to new lengths.", "thumb": "/library/metadata/14944/thumb/1705739847", "art": "/library/metadata/14944/art/1705739847", "duration": 6017237, "originallyAvailableAt": "2010-11-24T00:00:00Z", "addedAt": 1589412494, "updatedAt": 1705739847, "audienceRatingImage": "rottentomatoes://image.rating.upright", "primaryExtraKey": "/library/metadata/14952", "ratingImage": "rottentomatoes://image.rating.ripe", "Media": [{"id": 38247, "duration": 6017237, "bitrate": 2051, "width": 1920, "height": 1080, "aspectRatio": 1.78, "audioChannels": 2, "audioCodec": "aac", "videoCodec": "h264", "videoResolution": "1080", "container": "mp4", "videoFrameRate": "24p", "optimizedForStreaming": 1, "audioProfile": "lc", "has64bitOffsets": false, "videoProfile": "high", "Part": [{"id": 38247, "key": "/library/parts/38247/1589412494/file.mp4", "duration": 6017237, "file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", "size": 1545647447, "audioProfile": "lc", "container": "mp4", "has64bitOffsets": false, "optimizedForStreaming": true, "videoProfile": "high"}, {"id": 38247, "key": "/library/parts/38247/1589412494/file.mp4", "duration": 6017237, "file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", "size": 1545647447, "audioProfile": "lc", "container": "mp4", "has64bitOffsets": false, "optimizedForStreaming": true, "videoProfile": "high"}, {"id": 38247, "key": "/library/parts/38247/1589412494/file.mp4", "duration": 6017237, "file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", "size": 1545647447, "audioProfile": "lc", "container": "mp4", "has64bitOffsets": false, "optimizedForStreaming": true, "videoProfile": "high"}]}], "Genre": [{"tag": "Animation"}], "Country": [{"tag": "United States of America"}, {"tag": "United States of America"}], "Director": [{"tag": "Nathan Greno"}, {"tag": "Nathan Greno"}, {"tag": "Nathan Greno"}], "Role": [{"tag": "Donna Murphy"}], "Writer": [{"tag": "Wilhelm Grimm"}, {"tag": "Wilhelm Grimm"}, {"tag": "Wilhelm Grimm"}], "skipCount": 1, "chapterSource": "media"}], "promoted": true, "random": true}]}} + application/json: {"MediaContainer": {"size": 7, "allowSync": true, "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "Hub": [{"key": "/library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0", "title": "Recently Played Movies", "type": "movie", "hubIdentifier": "movie.recentlyviewed.1", "context": "hub.movie.recentlyviewed", "size": 6, "more": true, "style": "shelf", "hubKey": "/library/metadata/66485,66098,57249,11449,5858,14944", "Metadata": [{"ratingKey": "14944", "key": "/library/metadata/14944", "guid": "plex://movie/5d77686eeb5d26001f1eb339", "studio": "Walt Disney Animation Studios", "type": "movie", "title": "Tangled", "librarySectionTitle": "Movies", "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "contentRating": "PG", "summary": "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.", "rating": 8.9, "audienceRating": 8.7, "viewCount": 1, "lastViewedAt": 1704936047, "year": 2010, "tagline": "They're taking adventure to new lengths.", "thumb": "/library/metadata/14944/thumb/1705739847", "art": "/library/metadata/14944/art/1705739847", "duration": 6017237, "originallyAvailableAt": "2010-11-24T00:00:00Z", "addedAt": 1589412494, "updatedAt": 1705739847, "audienceRatingImage": "rottentomatoes://image.rating.upright", "primaryExtraKey": "/library/metadata/14952", "ratingImage": "rottentomatoes://image.rating.ripe", "Media": [{"id": 38247, "duration": 6017237, "bitrate": 2051, "width": 1920, "height": 1080, "aspectRatio": 1.78, "audioChannels": 2, "audioCodec": "aac", "videoCodec": "h264", "videoResolution": "1080", "container": "mp4", "videoFrameRate": "24p", "optimizedForStreaming": 1, "audioProfile": "lc", "has64bitOffsets": false, "videoProfile": "high", "Part": [{"id": 38247, "key": "/library/parts/38247/1589412494/file.mp4", "duration": 6017237, "file": "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", "size": 1545647447, "audioProfile": "lc", "container": "mp4", "has64bitOffsets": false, "optimizedForStreaming": true, "videoProfile": "high"}]}], "Genre": [{"tag": "Animation"}], "Country": [{"tag": "United States of America"}], "Director": [{"tag": "Nathan Greno"}], "Role": [{"tag": "Donna Murphy"}], "Writer": [{"tag": "Wilhelm Grimm"}], "skipCount": 1, "chapterSource": "media"}], "promoted": true, "random": true}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} performSearch: speakeasy-default-perform-search: parameters: query: - query: "dylan" + query: "arnold" limit: 5 responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} performVoiceSearch: speakeasy-default-perform-voice-search: parameters: @@ -1581,9 +1582,9 @@ examples: limit: 5 responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getSearchResults: speakeasy-default-get-search-results: parameters: @@ -1591,11 +1592,11 @@ examples: query: "110" responses: "200": - application/json: {"MediaContainer": {"size": 26, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1680021154, "Metadata": [{"librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "sourceTitle": "Hera", "ratingKey": 10398, "key": "/library/metadata/10398", "guid": "plex://movie/5d7768284de0ee001fcc8f52", "studio": "Paramount", "type": "movie", "title": "Mission: Impossible", "contentRating": "PG-13", "summary": "When Ethan Hunt the leader of a crack espionage team whose perilous operation has gone awry with no explanation discovers that a mole has penetrated the CIA he's surprised to learn that he's the No. 1 suspect. To clear his name Hunt now must ferret out the real double agent and in the process even the score.", "rating": 6.6, "audienceRating": 7.1, "year": 1996, "tagline": "Expect the impossible.", "thumb": "/library/metadata/10398/thumb/1679505055", "art": "/library/metadata/10398/art/1679505055", "duration": 6612628, "originallyAvailableAt": "1996-05-22T00:00:00Z", "addedAt": 1589234571, "updatedAt": 1679505055, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/10501", "ratingImage": "rottentomatoes://image.rating.ripe", "Media": [{"id": 26610, "duration": 6612628, "bitrate": 4751, "width": 1916, "height": 796, "aspectRatio": 2.35, "audioChannels": 6, "audioCodec": "aac", "videoCodec": "hevc", "videoResolution": 1080, "container": "mkv", "videoFrameRate": "24p", "audioProfile": "lc", "videoProfile": "main 10", "Part": [{"id": 26610, "key": "/library/parts/26610/1589234571/file.mkv", "duration": 6612628, "file": "/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv", "size": 3926903851, "audioProfile": "lc", "container": "mkv", "videoProfile": "main 10"}, {"id": 26610, "key": "/library/parts/26610/1589234571/file.mkv", "duration": 6612628, "file": "/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv", "size": 3926903851, "audioProfile": "lc", "container": "mkv", "videoProfile": "main 10"}]}, {"id": 26610, "duration": 6612628, "bitrate": 4751, "width": 1916, "height": 796, "aspectRatio": 2.35, "audioChannels": 6, "audioCodec": "aac", "videoCodec": "hevc", "videoResolution": 1080, "container": "mkv", "videoFrameRate": "24p", "audioProfile": "lc", "videoProfile": "main 10", "Part": [{"id": 26610, "key": "/library/parts/26610/1589234571/file.mkv", "duration": 6612628, "file": "/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv", "size": 3926903851, "audioProfile": "lc", "container": "mkv", "videoProfile": "main 10"}]}, {"id": 26610, "duration": 6612628, "bitrate": 4751, "width": 1916, "height": 796, "aspectRatio": 2.35, "audioChannels": 6, "audioCodec": "aac", "videoCodec": "hevc", "videoResolution": 1080, "container": "mkv", "videoFrameRate": "24p", "audioProfile": "lc", "videoProfile": "main 10", "Part": [{"id": 26610, "key": "/library/parts/26610/1589234571/file.mkv", "duration": 6612628, "file": "/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv", "size": 3926903851, "audioProfile": "lc", "container": "mkv", "videoProfile": "main 10"}]}], "Genre": [{"tag": "Action"}], "Director": [{"tag": "Brian De Palma"}, {"tag": "Brian De Palma"}, {"tag": "Brian De Palma"}], "Writer": [{"tag": "David Koepp"}, {"tag": "David Koepp"}, {"tag": "David Koepp"}], "Country": [{"tag": "United States of America"}, {"tag": "United States of America"}], "Role": [{"tag": "Tom Cruise"}]}], "Provider": [{"key": "/system/search", "title": "Local Network", "type": "mixed"}, {"key": "/system/search", "title": "Local Network", "type": "mixed"}, {"key": "/system/search", "title": "Local Network", "type": "mixed"}]}} + application/json: {"MediaContainer": {"size": 26, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1680021154, "Metadata": [{"librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "sourceTitle": "Hera", "ratingKey": 10398, "key": "/library/metadata/10398", "guid": "plex://movie/5d7768284de0ee001fcc8f52", "studio": "Paramount", "type": "movie", "title": "Mission: Impossible", "contentRating": "PG-13", "summary": "When Ethan Hunt the leader of a crack espionage team whose perilous operation has gone awry with no explanation discovers that a mole has penetrated the CIA he's surprised to learn that he's the No. 1 suspect. To clear his name Hunt now must ferret out the real double agent and in the process even the score.", "rating": 6.6, "audienceRating": 7.1, "year": 1996, "tagline": "Expect the impossible.", "thumb": "/library/metadata/10398/thumb/1679505055", "art": "/library/metadata/10398/art/1679505055", "duration": 6612628, "originallyAvailableAt": "1996-05-22T00:00:00Z", "addedAt": 1589234571, "updatedAt": 1679505055, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/10501", "ratingImage": "rottentomatoes://image.rating.ripe", "Media": [{"id": 26610, "duration": 6612628, "bitrate": 4751, "width": 1916, "height": 796, "aspectRatio": 2.35, "audioChannels": 6, "audioCodec": "aac", "videoCodec": "hevc", "videoResolution": 1080, "container": "mkv", "videoFrameRate": "24p", "audioProfile": "lc", "videoProfile": "main 10", "Part": [{"id": 26610, "key": "/library/parts/26610/1589234571/file.mkv", "duration": 6612628, "file": "/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv", "size": 3926903851, "audioProfile": "lc", "container": "mkv", "videoProfile": "main 10"}]}], "Genre": [{"tag": "Action"}], "Director": [{"tag": "Brian De Palma"}], "Writer": [{"tag": "David Koepp"}], "Country": [{"tag": "United States of America"}], "Role": [{"tag": "Tom Cruise"}]}], "Provider": [{"key": "/system/search", "title": "Local Network", "type": "mixed"}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getFileHash: speakeasy-default-get-file-hash: parameters: @@ -1603,9 +1604,9 @@ examples: url: "file://C:\\Image.png&type=13" responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-recently-added-library: speakeasy-default-get-recently-added-library: parameters: @@ -1619,20 +1620,20 @@ examples: X-Plex-Container-Size: 50 responses: "200": - application/json: {"MediaContainer": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}]}], "size": 50, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1680021154, "Metadata": [{"librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "ratingKey": 59398, "key": "/library/metadata/59398", "guid": "plex://movie/5e161a83bea6ac004126e148", "studio": "Marvel Studios", "type": "movie", "title": "Ant-Man and the Wasp: Quantumania", "contentRating": "PG-13", "summary": "Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible.", "rating": 4.7, "audienceRating": 8.3, "year": 2023, "tagline": "Witness the beginning of a new dynasty.", "thumb": "/library/metadata/59398/thumb/1681888010", "art": "/library/metadata/59398/art/1681888010", "duration": 7474422, "originallyAvailableAt": "2023-02-15T00:00:00Z", "addedAt": 1681803215, "updatedAt": 1681888010, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/59399", "ratingImage": "rottentomatoes://image.rating.rotten", "Media": [{"id": 120345, "duration": 7474422, "bitrate": 3623, "width": 1920, "height": 804, "aspectRatio": 2.35, "audioChannels": 6, "audioCodec": "ac3", "videoCodec": "h264", "videoResolution": 1080, "container": "mp4", "videoFrameRate": "24p", "optimizedForStreaming": 0, "videoProfile": "high", "Part": [{"id": 120353, "key": "/library/parts/120353/1681803203/file.mp4", "duration": 7474422, "file": "/movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4", "size": 3395307162, "container": "mp4", "hasThumbnail": 1, "videoProfile": "high"}]}], "Genre": [{"tag": "Comedy"}], "Director": [{"tag": "Peyton Reed"}], "Writer": [{"tag": "Jeff Loveness"}], "Country": [{"tag": "United States of America"}, {"tag": "United States of America"}, {"tag": "United States of America"}], "Role": [{"tag": "Paul Rudd"}]}]}} + application/json: {"MediaContainer": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}]}], "size": 50, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1680021154, "Metadata": [{"librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "ratingKey": 59398, "key": "/library/metadata/59398", "guid": "plex://movie/5e161a83bea6ac004126e148", "studio": "Marvel Studios", "type": "movie", "title": "Ant-Man and the Wasp: Quantumania", "contentRating": "PG-13", "summary": "Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible.", "rating": 4.7, "audienceRating": 8.3, "year": 2023, "tagline": "Witness the beginning of a new dynasty.", "thumb": "/library/metadata/59398/thumb/1681888010", "art": "/library/metadata/59398/art/1681888010", "duration": 7474422, "originallyAvailableAt": "2023-02-15T00:00:00Z", "addedAt": 1681803215, "updatedAt": 1681888010, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/59399", "ratingImage": "rottentomatoes://image.rating.rotten", "Media": [{"id": 120345, "duration": 7474422, "bitrate": 3623, "width": 1920, "height": 804, "aspectRatio": 2.35, "audioChannels": 6, "audioCodec": "ac3", "videoCodec": "h264", "videoResolution": 1080, "container": "mp4", "videoFrameRate": "24p", "optimizedForStreaming": 0, "videoProfile": "high", "Part": [{"id": 120353, "key": "/library/parts/120353/1681803203/file.mp4", "duration": 7474422, "file": "/movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4", "size": 3395307162, "container": "mp4", "hasThumbnail": 1, "videoProfile": "high"}]}], "Genre": [{"tag": "Comedy"}], "Director": [{"tag": "Peyton Reed"}], "Writer": [{"tag": "Jeff Loveness"}], "Country": [{"tag": "United States of America"}], "Role": [{"tag": "Paul Rudd"}]}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-all-libraries: speakeasy-default-get-all-libraries: responses: "200": - application/json: {"MediaContainer": {"size": 50, "allowSync": false, "title1": "TV Series", "Directory": [{"allowSync": false, "art": "/:/resources/show-fanart.jpg", "composite": "/library/sections/1/composite/1743824484", "filters": true, "refreshing": true, "thumb": "/:/resources/show.png", "key": "1", "type": "movie", "title": "Movies", "agent": "tv.plex.agents.movie", "scanner": "Plex Movie", "language": "en-US", "uuid": "e69655a2-ef48-4aba-bb19-01e7d3cc34d6", "updatedAt": 1556281940, "createdAt": 1556281940, "scannedAt": 1556281940, "content": true, "directory": true, "contentChangedAt": 9173960, "hidden": 1, "Location": [{"id": 1, "path": "/Movies"}, {"id": 1, "path": "/Movies"}]}, {"allowSync": false, "art": "/:/resources/show-fanart.jpg", "composite": "/library/sections/1/composite/1743824484", "filters": true, "refreshing": true, "thumb": "/:/resources/show.png", "key": "1", "type": "movie", "title": "Movies", "agent": "tv.plex.agents.movie", "scanner": "Plex Movie", "language": "en-US", "uuid": "e69655a2-ef48-4aba-bb19-01e7d3cc34d6", "updatedAt": 1556281940, "createdAt": 1556281940, "scannedAt": 1556281940, "content": true, "directory": true, "contentChangedAt": 9173960, "hidden": 1, "Location": [{"id": 1, "path": "/Movies"}, {"id": 1, "path": "/Movies"}]}]}} + application/json: {"MediaContainer": {"size": 50, "allowSync": false, "title1": "TV Series", "Directory": [{"allowSync": false, "art": "/:/resources/show-fanart.jpg", "composite": "/library/sections/1/composite/1743824484", "filters": true, "refreshing": true, "thumb": "/:/resources/show.png", "key": "1", "type": "movie", "title": "Movies", "agent": "tv.plex.agents.movie", "scanner": "Plex Movie", "language": "en-US", "uuid": "e69655a2-ef48-4aba-bb19-01e7d3cc34d6", "updatedAt": 1556281940, "createdAt": 1556281940, "scannedAt": 1556281940, "content": true, "directory": true, "contentChangedAt": 9173960, "hidden": 1, "Location": [{"id": 1, "path": "/Movies"}]}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-library-details: speakeasy-default-get-library-details: parameters: @@ -1642,9 +1643,9 @@ examples: includeDetails: 0 responses: "200": - application/json: {"MediaContainer": {"size": 29, "allowSync": false, "art": "/:/resources/movie-fanart.jpg", "content": "secondary", "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "thumb": "/:/resources/movie.png", "title1": "Movies", "viewGroup": "secondary", "viewMode": 65592, "Directory": [{"key": "search?type=1", "title": "Search...", "secondary": true, "prompt": "Search Movies", "search": true}], "Type": [{"key": "/library/sections/1/all?type=1", "type": "movie", "title": "Movies", "active": false, "Filter": [{"filter": "label", "filterType": "string", "key": "/library/sections/1/label", "title": "Labels", "type": "filter"}], "Sort": [{"default": "asc", "defaultDirection": "desc", "descKey": "random:desc", "firstCharacterKey": "/library/sections/1/firstCharacter", "key": "random", "title": "Randomly"}, {"default": "asc", "defaultDirection": "desc", "descKey": "random:desc", "firstCharacterKey": "/library/sections/1/firstCharacter", "key": "random", "title": "Randomly"}, {"default": "asc", "defaultDirection": "desc", "descKey": "random:desc", "firstCharacterKey": "/library/sections/1/firstCharacter", "key": "random", "title": "Randomly"}], "Field": [{"key": "label", "title": "Label", "type": "tag", "subType": "bitrate"}, {"key": "label", "title": "Label", "type": "tag", "subType": "bitrate"}, {"key": "label", "title": "Label", "type": "tag", "subType": "bitrate"}]}, {"key": "/library/sections/1/all?type=1", "type": "movie", "title": "Movies", "active": false, "Filter": [{"filter": "label", "filterType": "string", "key": "/library/sections/1/label", "title": "Labels", "type": "filter"}, {"filter": "label", "filterType": "string", "key": "/library/sections/1/label", "title": "Labels", "type": "filter"}, {"filter": "label", "filterType": "string", "key": "/library/sections/1/label", "title": "Labels", "type": "filter"}], "Sort": [{"default": "asc", "defaultDirection": "desc", "descKey": "random:desc", "firstCharacterKey": "/library/sections/1/firstCharacter", "key": "random", "title": "Randomly"}, {"default": "asc", "defaultDirection": "desc", "descKey": "random:desc", "firstCharacterKey": "/library/sections/1/firstCharacter", "key": "random", "title": "Randomly"}, {"default": "asc", "defaultDirection": "desc", "descKey": "random:desc", "firstCharacterKey": "/library/sections/1/firstCharacter", "key": "random", "title": "Randomly"}], "Field": [{"key": "label", "title": "Label", "type": "tag", "subType": "bitrate"}, {"key": "label", "title": "Label", "type": "tag", "subType": "bitrate"}, {"key": "label", "title": "Label", "type": "tag", "subType": "bitrate"}]}], "FieldType": [{"type": "resolution", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}, {"type": "resolution", "Operator": [{"key": "=", "title": "is"}]}]}} + application/json: {"MediaContainer": {"size": 29, "allowSync": false, "art": "/:/resources/movie-fanart.jpg", "content": "secondary", "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "thumb": "/:/resources/movie.png", "title1": "Movies", "viewGroup": "secondary", "viewMode": 65592, "Directory": [{"key": "search?type=1", "title": "Search...", "secondary": true, "prompt": "Search Movies", "search": true}], "Type": [{"key": "/library/sections/1/all?type=1", "type": "movie", "title": "Movies", "active": false, "Filter": [{"filter": "label", "filterType": "string", "key": "/library/sections/1/label", "title": "Labels", "type": "filter"}], "Sort": [{"default": "asc", "defaultDirection": "desc", "descKey": "random:desc", "firstCharacterKey": "/library/sections/1/firstCharacter", "key": "random", "title": "Randomly"}], "Field": [{"key": "label", "title": "Label", "type": "tag", "subType": "bitrate"}]}], "FieldType": [{"type": "resolution", "Operator": [{"key": "=", "title": "is"}]}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} deleteLibrary: @@ -1654,14 +1655,14 @@ examples: sectionKey: 9518 responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-library-items: speakeasy-default-get-library-items: parameters: path: - tag: "edition" + tag: "newest" sectionKey: 9518 query: includeGuids: 1 @@ -1671,13 +1672,13 @@ examples: X-Plex-Container-Size: 50 responses: "200": - application/json: {"MediaContainer": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}]}, {"type": "tag", "Operator": []}], "size": 70, "totalSize": 170, "offset": 0, "content": "secondary", "allowSync": true, "nocache": true, "art": "/:/resources/movie-fanart.jpg", "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "thumb": "/:/resources/movie.png", "title1": "Movies", "title2": "Recently Released", "viewGroup": "movie", "viewMode": 65592, "mixedParents": true, "Metadata": [{"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "type": "movie", "title": "Avatar: The Way of Water", "slug": "4-for-texas", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "seasonCount": 2022, "tagline": "Return to Pandora.", "flattenSeasons": "1", "episodeSort": "0", "enableCreditsMarkerGeneration": "-1", "showOrdering": "absolute", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "banner": "/library/metadata/58683/banner/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "grandparentRatingKey": "66", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "parentSlug": "alice-in-borderland-2020", "grandparentSlug": "alice-in-borderland-2020", "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}, {"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}, {"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": []}], "Genre": [{"tag": "Adventure"}], "Country": [{"tag": "United States of America"}, {"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}, {"tag": "James Cameron"}, {"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}, {"tag": "Working NL Subs"}, {"tag": "Working NL Subs"}], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Location": [{"path": "/TV Shows/House"}, {"path": "/TV Shows/House"}], "Guid": [{"id": "imdb://tt13015952"}, {"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [{"image": "themoviedb://image.rating", "value": 3, "type": "audience"}, {"image": "themoviedb://image.rating", "value": 3, "type": "audience"}, {"image": "themoviedb://image.rating", "value": 3, "type": "audience"}], "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "titleSort": "Whale", "viewCount": 1, "lastViewedAt": 1682752242, "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "viewOffset": 5222500, "skipCount": 1, "index": 1, "theme": "/library/metadata/1/theme/1705636920", "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "parentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentStudio": "UCP", "parentKey": "/library/metadata/66", "parentTitle": "Caprica", "parentIndex": 1, "parentYear": 2010, "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTheme": "/library/metadata/66/theme/1705716261"}, {"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "type": "movie", "title": "Avatar: The Way of Water", "slug": "4-for-texas", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "seasonCount": 2022, "tagline": "Return to Pandora.", "flattenSeasons": "1", "episodeSort": "0", "enableCreditsMarkerGeneration": "-1", "showOrdering": "absolute", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "banner": "/library/metadata/58683/banner/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "grandparentRatingKey": "66", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "parentSlug": "alice-in-borderland-2020", "grandparentSlug": "alice-in-borderland-2020", "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}, {"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}], "Genre": [{"tag": "Adventure"}, {"tag": "Adventure"}], "Country": [{"tag": "United States of America"}, {"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Location": [{"path": "/TV Shows/House"}, {"path": "/TV Shows/House"}, {"path": "/TV Shows/House"}], "Guid": [{"id": "imdb://tt13015952"}, {"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [{"image": "themoviedb://image.rating", "value": 3, "type": "audience"}, {"image": "themoviedb://image.rating", "value": 3, "type": "audience"}], "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "titleSort": "Whale", "viewCount": 1, "lastViewedAt": 1682752242, "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "viewOffset": 5222500, "skipCount": 1, "index": 1, "theme": "/library/metadata/1/theme/1705636920", "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "parentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentStudio": "UCP", "parentKey": "/library/metadata/66", "parentTitle": "Caprica", "parentIndex": 1, "parentYear": 2010, "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTheme": "/library/metadata/66/theme/1705716261"}], "Meta": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}, {"type": "tag", "Operator": [{"key": "=", "title": "is"}, {"key": "=", "title": "is"}, {"key": "=", "title": "is"}]}, {"type": "tag", "Operator": [{"key": "=", "title": "is"}]}]}}} + application/json: {"MediaContainer": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": [{"key": "=", "title": "is"}]}], "size": 70, "totalSize": 170, "offset": 0, "content": "secondary", "allowSync": true, "nocache": true, "art": "/:/resources/movie-fanart.jpg", "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "322a231a-b7f7-49f5-920f-14c61199cd30", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "thumb": "/:/resources/movie.png", "title1": "Movies", "title2": "Recently Released", "viewGroup": "movie", "viewMode": 65592, "mixedParents": true, "Metadata": [{"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "type": "movie", "title": "Avatar: The Way of Water", "slug": "4-for-texas", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "seasonCount": 2022, "tagline": "Return to Pandora.", "flattenSeasons": "1", "episodeSort": "0", "enableCreditsMarkerGeneration": "-1", "showOrdering": "absolute", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "banner": "/library/metadata/58683/banner/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "grandparentRatingKey": "66", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "parentSlug": "alice-in-borderland-2020", "grandparentSlug": "alice-in-borderland-2020", "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 1, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "1", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}], "Genre": [{"tag": "Adventure"}], "Country": [{"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Location": [{"path": "/TV Shows/House"}], "Guid": [{"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [{"image": "themoviedb://image.rating", "value": 3, "type": "audience"}], "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "titleSort": "Whale", "viewCount": 1, "lastViewedAt": 1682752242, "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "viewOffset": 5222500, "skipCount": 1, "index": 1, "theme": "/library/metadata/1/theme/1705636920", "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "parentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentStudio": "UCP", "parentKey": "/library/metadata/66", "parentTitle": "Caprica", "parentIndex": 1, "parentYear": 2010, "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTheme": "/library/metadata/66/theme/1705716261"}], "Meta": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "show", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter"}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": []}]}}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} - get-all-media-library: - speakeasy-default-get-all-media-library: + get-library-sections-all: + speakeasy-default-get-library-sections-all: parameters: path: sectionKey: 9518 @@ -1692,11 +1693,11 @@ examples: X-Plex-Container-Size: 50 responses: "200": - application/json: {"MediaContainer": {"size": 50, "totalSize": 50, "offset": 0, "allowSync": false, "art": "/:/resources/show-fanart.jpg", "content": "secondary", "identifier": "com.plexapp.plugins.library", "librarySectionID": 2, "librarySectionTitle": "TV Series", "librarySectionUUID": "e69655a2-ef48-4aba-bb19-0cc34d1e7d36", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "thumb": "/:/resources/show.png", "nocache": true, "title1": "TV Series", "title2": "By Starring Actor", "viewGroup": "secondary", "Meta": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}, {"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}, {"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}, {"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}, {"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": []}]}, "Metadata": [{"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "slug": "4-for-texas", "studio": "20th Century Studios", "type": "movie", "title": "Avatar: The Way of Water", "titleSort": "Whale", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\nOnce a familiar threat returns to finish what was previously started, Jake must\nwork with Neytiri and the army of the Na'vi race to protect their home.\n", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "tagline": "Return to Pandora.", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "theme": "/library/metadata/1/theme/1705636920", "index": 1, "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "seasonCount": 2022, "duration": 11558112, "originallyAvailableAt": "2022-12-14", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "parentRatingKey": "66", "grandparentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentSlug": "alice-in-borderland-2020", "grandparentKey": "/library/metadata/66", "parentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "grandparentArt": "/library/metadata/66/art/1705716261", "parentTitle": "Caprica", "parentIndex": 1, "parentThumb": "/library/metadata/66/thumb/1705716261", "ratingImage": "rottentomatoes://image.rating.ripe", "viewCount": 1, "viewOffset": 5222500, "skipCount": 1, "subtype": "clip", "lastRatedAt": 1721813113, "createdAtAccuracy": "epoch,local", "createdAtTZOffset": "0", "lastViewedAt": 1682752242, "userRating": 10, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}, {"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}, {"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}, {"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}, {"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}], "Genre": [{"tag": "Crime"}, {"tag": "Crime"}, {"tag": "Crime"}], "Country": [{"tag": "United States of America"}, {"tag": "United States of America"}], "Director": [{"tag": "Danny Boyle"}, {"tag": "Danny Boyle"}], "Writer": [{"tag": "Jamie P. Hanson"}, {"tag": "Jamie P. Hanson"}], "Role": [{"tag": "Teller"}], "Guid": [{"id": "tvdb://2337"}], "Collection": [{"tag": "My Awesome Collection"}, {"tag": "My Awesome Collection"}]}]}} + application/json: {"MediaContainer": {"size": 50, "totalSize": 50, "offset": 0, "allowSync": false, "art": "/:/resources/show-fanart.jpg", "content": "secondary", "identifier": "com.plexapp.plugins.library", "librarySectionID": 2, "librarySectionTitle": "TV Series", "librarySectionUUID": "e69655a2-ef48-4aba-bb19-0cc34d1e7d36", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "thumb": "/:/resources/show.png", "nocache": true, "title1": "TV Series", "title2": "By Starring Actor", "viewGroup": "secondary", "Meta": {"Type": [{"key": "/library/sections/2/all?type=2", "type": "filter", "subtype": "clip", "title": "TV Shows", "active": false, "Filter": [{"filter": "genre", "filterType": "string", "key": "/library/sections/2/genre?type=2", "title": "Genre", "type": "filter", "advanced": true}], "Sort": [{"default": "asc", "active": false, "activeDirection": "asc", "defaultDirection": "asc", "descKey": "titleSort:desc", "firstCharacterKey": "/library/sections/2/firstCharacter", "key": "titleSort", "title": "Title"}], "Field": [{"key": "show.title", "title": "Show Title", "type": "string", "subType": "rating"}]}], "FieldType": [{"type": "tag", "Operator": []}]}, "Metadata": [{"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "slug": "4-for-texas", "studio": "20th Century Studios", "type": "movie", "title": "Avatar: The Way of Water", "titleSort": "Whale", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\nOnce a familiar threat returns to finish what was previously started, Jake must\nwork with Neytiri and the army of the Na'vi race to protect their home.\n", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "tagline": "Return to Pandora.", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "theme": "/library/metadata/1/theme/1705636920", "index": 1, "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "seasonCount": 2022, "duration": 11558112, "originallyAvailableAt": "2022-12-14", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "parentRatingKey": "66", "grandparentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentSlug": "alice-in-borderland-2020", "grandparentKey": "/library/metadata/66", "parentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "grandparentArt": "/library/metadata/66/art/1705716261", "parentTitle": "Caprica", "parentIndex": 1, "parentThumb": "/library/metadata/66/thumb/1705716261", "ratingImage": "rottentomatoes://image.rating.ripe", "viewCount": 1, "viewOffset": 5222500, "skipCount": 1, "subtype": "clip", "lastRatedAt": 1721813113, "createdAtAccuracy": "epoch,local", "createdAtTZOffset": "0", "lastViewedAt": 1682752242, "userRating": 10, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Guid": [{"id": "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}"}], "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}], "Genre": [{"tag": "Crime"}], "Country": [{"tag": "United States of America"}], "Director": [{"tag": "Danny Boyle"}], "Writer": [{"tag": "Jamie P. Hanson"}], "Role": [{"tag": "Teller"}], "Collection": [{"tag": "My Awesome Collection"}]}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-refresh-library-metadata: speakeasy-default-get-refresh-library-metadata: parameters: @@ -1706,9 +1707,9 @@ examples: force: 0 responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-search-library: speakeasy-default-get-search-library: parameters: @@ -1720,9 +1721,9 @@ examples: "200": application/json: {"MediaContainer": {"size": 2, "allowSync": false, "art": "/:/resources/show-fanart.jpg", "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1698860922, "nocache": true, "thumb": "/:/resources/show.png", "title1": "TV Shows", "title2": "Search for ''", "viewGroup": "season", "viewMode": 65593, "Metadata": [{"ratingKey": "2", "key": "/library/metadata/2/children", "parentRatingKey": "1", "guid": "plex://season/602e67e766dfdb002c0a1b5b", "parentGuid": "plex://show/5d9c086c7d06d9001ffd27aa", "parentStudio": "Mutant Enemy Productions", "type": "season", "title": "Season 1", "parentKey": "/library/metadata/1", "parentTitle": "Firefly", "summary": "Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship \"Serenity\". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government \"The Alliance\"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space.", "index": 1, "parentIndex": 1, "parentYear": 2002, "thumb": "/library/metadata/2/thumb/1705636920", "art": "/library/metadata/1/art/1705636920", "parentThumb": "/library/metadata/1/thumb/1705636920", "parentTheme": "/library/metadata/1/theme/1705636920", "addedAt": 1705636916, "updatedAt": 1705636920}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-genres-library: speakeasy-default-get-genres-library: parameters: @@ -1736,7 +1737,7 @@ examples: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-countries-library: speakeasy-default-get-countries-library: parameters: @@ -1748,9 +1749,9 @@ examples: "200": application/json: {"MediaContainer": {"size": 50, "allowSync": false, "art": "/:/resources/show-fanart.jpg", "content": "secondary", "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "nocache": true, "thumb": "/:/resources/show.png", "title1": "TV Series", "title2": "By Starring Actor", "viewGroup": "secondary", "Directory": [{"fastKey": "/library/sections/2/all?country=15491", "key": "15491", "title": "Japan"}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-actors-library: speakeasy-default-get-actors-library: parameters: @@ -1760,11 +1761,11 @@ examples: type: 2 responses: "200": - application/json: {"MediaContainer": {"size": 50, "allowSync": false, "art": "/:/resources/show-fanart.jpg", "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "nocache": true, "thumb": "/:/resources/show.png", "title1": "TV Series", "title2": "By Starring Actor", "viewGroup": "secondary", "viewMode": "131131", "Directory": [{"fastKey": "/library/sections/2/all?actor=134671", "thumb": "https://metadata-static.plex.tv/e/people/e2a915b537ef720252b6d408bc1f91b3.jpg", "key": "134671", "title": "Aaron Paul"}, {"fastKey": "/library/sections/2/all?actor=134671", "thumb": "https://metadata-static.plex.tv/e/people/e2a915b537ef720252b6d408bc1f91b3.jpg", "key": "134671", "title": "Aaron Paul"}]}} + application/json: {"MediaContainer": {"size": 50, "allowSync": false, "art": "/:/resources/show-fanart.jpg", "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "nocache": true, "thumb": "/:/resources/show.png", "title1": "TV Series", "title2": "By Starring Actor", "viewGroup": "secondary", "viewMode": "131131", "Directory": [{"fastKey": "/library/sections/2/all?actor=134671", "thumb": "https://metadata-static.plex.tv/e/people/e2a915b537ef720252b6d408bc1f91b3.jpg", "key": "134671", "title": "Aaron Paul"}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-search-all-libraries: "": parameters: @@ -1777,16 +1778,16 @@ examples: X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58" responses: "200": - application/json: {"MediaContainer": {"size": 9266.91, "SearchResult": [{"score": 2698.71, "Metadata": {"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "type": "movie", "title": "Avatar: The Way of Water", "slug": "4-for-texas", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "seasonCount": 2022, "tagline": "Return to Pandora.", "flattenSeasons": "1", "episodeSort": "0", "enableCreditsMarkerGeneration": "-1", "showOrdering": "absolute", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "banner": "/library/metadata/58683/banner/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "grandparentRatingKey": "66", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "parentSlug": "alice-in-borderland-2020", "grandparentSlug": "alice-in-borderland-2020", "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 0, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "0", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}, {"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 0, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "0", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "0", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "0", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}, {"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 0, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "0", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "0", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "0", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}], "Genre": [{"tag": "Adventure"}, {"tag": "Adventure"}, {"tag": "Adventure"}], "Country": [{"tag": "United States of America"}, {"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}, {"tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Location": [{"path": "/TV Shows/House"}, {"path": "/TV Shows/House"}, {"path": "/TV Shows/House"}], "Guid": [{"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [{"image": "themoviedb://image.rating", "value": 3, "type": "audience"}], "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "titleSort": "Whale", "viewCount": 1, "lastViewedAt": 1682752242, "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "viewOffset": 5222500, "skipCount": 1, "index": 1, "theme": "/library/metadata/1/theme/1705636920", "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "parentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentStudio": "UCP", "parentKey": "/library/metadata/66", "parentTitle": "Caprica", "parentIndex": 1, "parentYear": 2010, "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTheme": "/library/metadata/66/theme/1705716261"}}, {"score": 8744.37, "Metadata": {"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "type": "movie", "title": "Avatar: The Way of Water", "slug": "4-for-texas", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "seasonCount": 2022, "tagline": "Return to Pandora.", "flattenSeasons": "1", "episodeSort": "0", "enableCreditsMarkerGeneration": "-1", "showOrdering": "absolute", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "banner": "/library/metadata/58683/banner/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "grandparentRatingKey": "66", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "parentSlug": "alice-in-borderland-2020", "grandparentSlug": "alice-in-borderland-2020", "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 0, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "0", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}, {"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 0, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "0", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "0", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "0", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}, {"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 0, "has64bitOffsets": false, "Part": []}], "Genre": [{"tag": "Adventure"}, {"tag": "Adventure"}], "Country": [{"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}, {"tag": "James Cameron"}, {"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}, {"tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}, {"tag": "Working NL Subs"}], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Location": [{"path": "/TV Shows/House"}], "Guid": [{"id": "imdb://tt13015952"}, {"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [{"image": "themoviedb://image.rating", "value": 3, "type": "audience"}, {"image": "themoviedb://image.rating", "value": 3, "type": "audience"}], "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "titleSort": "Whale", "viewCount": 1, "lastViewedAt": 1682752242, "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "viewOffset": 5222500, "skipCount": 1, "index": 1, "theme": "/library/metadata/1/theme/1705636920", "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "parentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentStudio": "UCP", "parentKey": "/library/metadata/66", "parentTitle": "Caprica", "parentIndex": 1, "parentYear": 2010, "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTheme": "/library/metadata/66/theme/1705716261"}}, {"score": 6729.16, "Metadata": {"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "studio": "20th Century Studios", "skipChildren": false, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "type": "movie", "title": "Avatar: The Way of Water", "slug": "4-for-texas", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "seasonCount": 2022, "tagline": "Return to Pandora.", "flattenSeasons": "1", "episodeSort": "0", "enableCreditsMarkerGeneration": "-1", "showOrdering": "absolute", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "banner": "/library/metadata/58683/banner/1703239236", "duration": 11558112, "originallyAvailableAt": "2022-12-14T00:00:00Z", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "ratingImage": "rottentomatoes://image.rating.ripe", "grandparentRatingKey": "66", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "parentSlug": "alice-in-borderland-2020", "grandparentSlug": "alice-in-borderland-2020", "grandparentArt": "/library/metadata/66/art/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "Media": [{"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 0, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "0", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "0", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}, {"id": 119534, "duration": 11558112, "bitrate": 25025, "width": 3840, "height": 2072, "aspectRatio": 1.85, "audioProfile": "dts", "audioChannels": 6, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "optimizedForStreaming": 0, "has64bitOffsets": false, "Part": [{"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "0", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "0", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}, {"id": 119542, "key": "/library/parts/119542/1680457526/file.mkv", "duration": 11558112, "file": "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", "size": 36158371307, "container": "mkv", "audioProfile": "dts", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "main 10", "indexes": "sd", "hasThumbnail": "0", "Stream": [{"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}, {"id": 272796, "streamType": 1, "default": true, "selected": true, "codec": "h264", "index": 0, "bitrate": 6273, "colorPrimaries": "bt709", "colorRange": "tv", "colorSpace": "bt709", "colorTrc": "bt709", "bitDepth": 8, "chromaLocation": "left", "streamIdentifier": "2", "chromaSubsampling": "4:2:0", "codedHeight": 1088, "codedWidth": 1920, "frameRate": 29.97, "hasScalingMatrix": false, "hearingImpaired": false, "closedCaptions": false, "embeddedInVideo": "1", "height": 1080, "level": 40, "profile": "main", "refFrames": 4, "scanType": "progressive", "width": 1920, "displayTitle": "1080p (H.264)", "extendedDisplayTitle": "1080p (H.264)", "channels": 2, "language": "English", "languageTag": "en", "languageCode": "eng", "audioChannelLayout": "stereo", "samplingRate": 48000, "title": "English", "canAutoSync": false}]}]}], "Genre": [{"tag": "Adventure"}, {"tag": "Adventure"}, {"tag": "Adventure"}], "Country": [{"tag": "United States of America"}], "Director": [{"tag": "James Cameron"}, {"tag": "James Cameron"}], "Writer": [{"tag": "James Cameron"}, {"tag": "James Cameron"}, {"tag": "James Cameron"}], "Collection": [{"tag": "Working NL Subs"}, {"tag": "Working NL Subs"}, {"tag": "Working NL Subs"}], "Role": [{"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}, {"id": 294129, "filter": "actor=294129", "thumb": "https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg", "tag": "Mike Smith", "tagKey": "668e7e7b22bcad9064350c91", "role": "Self"}], "Location": [{"path": "/TV Shows/House"}], "Guid": [{"id": "imdb://tt13015952"}, {"id": "imdb://tt13015952"}, {"id": "imdb://tt13015952"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Rating": [{"image": "themoviedb://image.rating", "value": 3, "type": "audience"}, {"image": "themoviedb://image.rating", "value": 3, "type": "audience"}], "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "titleSort": "Whale", "viewCount": 1, "lastViewedAt": 1682752242, "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "viewOffset": 5222500, "skipCount": 1, "index": 1, "theme": "/library/metadata/1/theme/1705636920", "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "parentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "parentStudio": "UCP", "parentKey": "/library/metadata/66", "parentTitle": "Caprica", "parentIndex": 1, "parentYear": 2010, "parentThumb": "/library/metadata/66/thumb/1705716261", "parentTheme": "/library/metadata/66/theme/1705716261"}}]}} + application/json: {"MediaContainer": {"size": 5709.89, "SearchResult": []}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-media-meta-data: speakeasy-default-get-media-meta-data: parameters: path: - ratingKey: 9518 + ratingKey: "21119,21617" query: includeConcerts: true includeExtras: true @@ -1803,11 +1804,11 @@ examples: asyncRefreshLocalMediaAgent: true responses: "200": - application/json: {"MediaContainer": {"size": 50, "allowSync": false, "identifier": "com.plexapp.plugins.library", "librarySectionID": 2, "librarySectionTitle": "TV Series", "librarySectionUUID": "e69655a2-ef48-4aba-bb19-0cc34d1e7d36", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "Metadata": [{"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "slug": "4-for-texas", "studio": "20th Century Studios", "type": "movie", "title": "Avatar: The Way of Water", "titleSort": "Whale", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\nOnce a familiar threat returns to finish what was previously started, Jake must\nwork with Neytiri and the army of the Na'vi race to protect their home.\n", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "tagline": "Return to Pandora.", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "theme": "/library/metadata/1/theme/1705636920", "index": 1, "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "seasonCount": 2022, "duration": 11558112, "originallyAvailableAt": "2022-12-14", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "parentRatingKey": "66", "grandparentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentSlug": "alice-in-borderland-2020", "grandparentKey": "/library/metadata/66", "parentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "grandparentArt": "/library/metadata/66/art/1705716261", "parentTitle": "Caprica", "parentIndex": 1, "parentThumb": "/library/metadata/66/thumb/1705716261", "ratingImage": "rottentomatoes://image.rating.ripe", "viewCount": 1, "viewOffset": 5222500, "skipCount": 1, "subtype": "clip", "lastRatedAt": 1721813113, "createdAtAccuracy": "epoch,local", "createdAtTZOffset": "0", "lastViewedAt": 1682752242, "userRating": 10, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}, {"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}, {"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}, {"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}], "Genre": [{"id": 259, "tag": "Crime", "filter": "genre=19"}], "Country": [{"id": 259, "tag": "United States of America", "filter": "country=19"}, {"id": 259, "tag": "United States of America", "filter": "country=19"}], "Director": [{"id": 126522, "tag": "Danny Boyle", "filter": "director=235876", "tagKey": "5d776831151a60001f24d031", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg"}], "Writer": [{"id": 126522, "tag": "Jamie P. Hanson", "filter": "writer=126522", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", "tagKey": "5d77683d85719b001f3a535e"}, {"id": 126522, "tag": "Jamie P. Hanson", "filter": "writer=126522", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", "tagKey": "5d77683d85719b001f3a535e"}], "Producer": [{"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}], "Role": [{"id": 126522, "tag": "Teller", "role": "Self - Judge", "filter": "actor=126522", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "tag": "Teller", "role": "Self - Judge", "filter": "actor=126522", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "tag": "Teller", "role": "Self - Judge", "filter": "actor=126522", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Guid": [{"id": "imdb://tt3032476"}, {"id": "imdb://tt3032476"}], "Rating": [{"image": "imdb://image.rating", "value": 9, "type": "audience"}], "Similar": [{"id": 26, "filter": "similar=26", "tag": "Breaking Bad"}, {"id": 26, "filter": "similar=26", "tag": "Breaking Bad"}, {"id": 26, "filter": "similar=26", "tag": "Breaking Bad"}], "Location": [{"path": "/TV Shows/Better Call Saul"}], "Chapter": [{"id": 4, "filter": "thumb=4", "index": 1, "startTimeOffset": 0, "endTimeOffset": 100100, "thumb": "/library/media/46883/chapterImages/1"}, {"id": 4, "filter": "thumb=4", "index": 1, "startTimeOffset": 0, "endTimeOffset": 100100, "thumb": "/library/media/46883/chapterImages/1"}, {"id": 4, "filter": "thumb=4", "index": 1, "startTimeOffset": 0, "endTimeOffset": 100100, "thumb": "/library/media/46883/chapterImages/1"}], "Marker": [{"id": 306970, "type": "credits", "startTimeOffset": 4176050, "endTimeOffset": 4393389, "final": true, "Attributes": {"id": 306970, "version": 4}}, {"id": 306970, "type": "credits", "startTimeOffset": 4176050, "endTimeOffset": 4393389, "final": true, "Attributes": {"id": 306970, "version": 4}}, {"id": 306970, "type": "credits", "startTimeOffset": 4176050, "endTimeOffset": 4393389, "final": true, "Attributes": {"id": 306970, "version": 4}}], "Extras": {"size": 1}}, {"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "slug": "4-for-texas", "studio": "20th Century Studios", "type": "movie", "title": "Avatar: The Way of Water", "titleSort": "Whale", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\nOnce a familiar threat returns to finish what was previously started, Jake must\nwork with Neytiri and the army of the Na'vi race to protect their home.\n", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "tagline": "Return to Pandora.", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "theme": "/library/metadata/1/theme/1705636920", "index": 1, "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "seasonCount": 2022, "duration": 11558112, "originallyAvailableAt": "2022-12-14", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "parentRatingKey": "66", "grandparentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentSlug": "alice-in-borderland-2020", "grandparentKey": "/library/metadata/66", "parentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "grandparentArt": "/library/metadata/66/art/1705716261", "parentTitle": "Caprica", "parentIndex": 1, "parentThumb": "/library/metadata/66/thumb/1705716261", "ratingImage": "rottentomatoes://image.rating.ripe", "viewCount": 1, "viewOffset": 5222500, "skipCount": 1, "subtype": "clip", "lastRatedAt": 1721813113, "createdAtAccuracy": "epoch,local", "createdAtTZOffset": "0", "lastViewedAt": 1682752242, "userRating": 10, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}, {"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}, {"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}], "Genre": [{"id": 259, "tag": "Crime", "filter": "genre=19"}, {"id": 259, "tag": "Crime", "filter": "genre=19"}, {"id": 259, "tag": "Crime", "filter": "genre=19"}], "Country": [{"id": 259, "tag": "United States of America", "filter": "country=19"}], "Director": [{"id": 126522, "tag": "Danny Boyle", "filter": "director=235876", "tagKey": "5d776831151a60001f24d031", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg"}, {"id": 126522, "tag": "Danny Boyle", "filter": "director=235876", "tagKey": "5d776831151a60001f24d031", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg"}], "Writer": [{"id": 126522, "tag": "Jamie P. Hanson", "filter": "writer=126522", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", "tagKey": "5d77683d85719b001f3a535e"}, {"id": 126522, "tag": "Jamie P. Hanson", "filter": "writer=126522", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", "tagKey": "5d77683d85719b001f3a535e"}], "Producer": [{"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}, {"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}], "Role": [{"id": 126522, "tag": "Teller", "role": "Self - Judge", "filter": "actor=126522", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "tag": "Teller", "role": "Self - Judge", "filter": "actor=126522", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "tag": "Teller", "role": "Self - Judge", "filter": "actor=126522", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Guid": [{"id": "imdb://tt3032476"}], "Rating": [{"image": "imdb://image.rating", "value": 9, "type": "audience"}], "Similar": [{"id": 26, "filter": "similar=26", "tag": "Breaking Bad"}, {"id": 26, "filter": "similar=26", "tag": "Breaking Bad"}], "Location": [{"path": "/TV Shows/Better Call Saul"}, {"path": "/TV Shows/Better Call Saul"}, {"path": "/TV Shows/Better Call Saul"}], "Chapter": [{"id": 4, "filter": "thumb=4", "index": 1, "startTimeOffset": 0, "endTimeOffset": 100100, "thumb": "/library/media/46883/chapterImages/1"}, {"id": 4, "filter": "thumb=4", "index": 1, "startTimeOffset": 0, "endTimeOffset": 100100, "thumb": "/library/media/46883/chapterImages/1"}], "Marker": [{"id": 306970, "type": "credits", "startTimeOffset": 4176050, "endTimeOffset": 4393389, "final": true, "Attributes": {"id": 306970, "version": 4}}, {"id": 306970, "type": "credits", "startTimeOffset": 4176050, "endTimeOffset": 4393389, "final": true, "Attributes": {"id": 306970, "version": 4}}, {"id": 306970, "type": "credits", "startTimeOffset": 4176050, "endTimeOffset": 4393389, "final": true, "Attributes": {"id": 306970, "version": 4}}], "Extras": {"size": 1}}, {"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "slug": "4-for-texas", "studio": "20th Century Studios", "type": "movie", "title": "Avatar: The Way of Water", "titleSort": "Whale", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\nOnce a familiar threat returns to finish what was previously started, Jake must\nwork with Neytiri and the army of the Na'vi race to protect their home.\n", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "tagline": "Return to Pandora.", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "theme": "/library/metadata/1/theme/1705636920", "index": 1, "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "seasonCount": 2022, "duration": 11558112, "originallyAvailableAt": "2022-12-14", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "parentRatingKey": "66", "grandparentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentSlug": "alice-in-borderland-2020", "grandparentKey": "/library/metadata/66", "parentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "grandparentArt": "/library/metadata/66/art/1705716261", "parentTitle": "Caprica", "parentIndex": 1, "parentThumb": "/library/metadata/66/thumb/1705716261", "ratingImage": "rottentomatoes://image.rating.ripe", "viewCount": 1, "viewOffset": 5222500, "skipCount": 1, "subtype": "clip", "lastRatedAt": 1721813113, "createdAtAccuracy": "epoch,local", "createdAtTZOffset": "0", "lastViewedAt": 1682752242, "userRating": 10, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}, {"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}, {"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}, {"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}, {"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}], "Genre": [{"id": 259, "tag": "Crime", "filter": "genre=19"}], "Country": [{"id": 259, "tag": "United States of America", "filter": "country=19"}], "Director": [{"id": 126522, "tag": "Danny Boyle", "filter": "director=235876", "tagKey": "5d776831151a60001f24d031", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg"}, {"id": 126522, "tag": "Danny Boyle", "filter": "director=235876", "tagKey": "5d776831151a60001f24d031", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg"}, {"id": 126522, "tag": "Danny Boyle", "filter": "director=235876", "tagKey": "5d776831151a60001f24d031", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg"}], "Writer": [{"id": 126522, "tag": "Jamie P. Hanson", "filter": "writer=126522", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", "tagKey": "5d77683d85719b001f3a535e"}, {"id": 126522, "tag": "Jamie P. Hanson", "filter": "writer=126522", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", "tagKey": "5d77683d85719b001f3a535e"}, {"id": 126522, "tag": "Jamie P. Hanson", "filter": "writer=126522", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", "tagKey": "5d77683d85719b001f3a535e"}], "Producer": [{"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}, {"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}, {"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}], "Role": [{"id": 126522, "tag": "Teller", "role": "Self - Judge", "filter": "actor=126522", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "tag": "Teller", "role": "Self - Judge", "filter": "actor=126522", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}, {"id": 126522, "tag": "Teller", "role": "Self - Judge", "filter": "actor=126522", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Guid": [{"id": "imdb://tt3032476"}, {"id": "imdb://tt3032476"}], "Rating": [{"image": "imdb://image.rating", "value": 9, "type": "audience"}], "Similar": [{"id": 26, "filter": "similar=26", "tag": "Breaking Bad"}, {"id": 26, "filter": "similar=26", "tag": "Breaking Bad"}], "Location": [{"path": "/TV Shows/Better Call Saul"}, {"path": "/TV Shows/Better Call Saul"}], "Chapter": [{"id": 4, "filter": "thumb=4", "index": 1, "startTimeOffset": 0, "endTimeOffset": 100100, "thumb": "/library/media/46883/chapterImages/1"}, {"id": 4, "filter": "thumb=4", "index": 1, "startTimeOffset": 0, "endTimeOffset": 100100, "thumb": "/library/media/46883/chapterImages/1"}, {"id": 4, "filter": "thumb=4", "index": 1, "startTimeOffset": 0, "endTimeOffset": 100100, "thumb": "/library/media/46883/chapterImages/1"}], "Marker": [{"id": 306970, "type": "credits", "startTimeOffset": 4176050, "endTimeOffset": 4393389, "final": true, "Attributes": {"id": 306970, "version": 4}}], "Extras": {"size": 1}}]}} + application/json: {"MediaContainer": {"size": 50, "allowSync": false, "identifier": "com.plexapp.plugins.library", "librarySectionID": 2, "librarySectionTitle": "TV Series", "librarySectionUUID": "e69655a2-ef48-4aba-bb19-0cc34d1e7d36", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "Metadata": [{"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "slug": "4-for-texas", "studio": "20th Century Studios", "type": "movie", "title": "Avatar: The Way of Water", "titleSort": "Whale", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\nOnce a familiar threat returns to finish what was previously started, Jake must\nwork with Neytiri and the army of the Na'vi race to protect their home.\n", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "tagline": "Return to Pandora.", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "theme": "/library/metadata/1/theme/1705636920", "index": 1, "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "seasonCount": 2022, "duration": 11558112, "originallyAvailableAt": "2022-12-14", "addedAt": 1556281940, "updatedAt": 1556281940, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "parentRatingKey": "66", "grandparentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentSlug": "alice-in-borderland-2020", "grandparentKey": "/library/metadata/66", "parentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "grandparentArt": "/library/metadata/66/art/1705716261", "parentTitle": "Caprica", "parentIndex": 1, "parentThumb": "/library/metadata/66/thumb/1705716261", "ratingImage": "rottentomatoes://image.rating.ripe", "viewCount": 1, "viewOffset": 5222500, "skipCount": 1, "subtype": "clip", "lastRatedAt": 1721813113, "createdAtAccuracy": "epoch,local", "createdAtTZOffset": "0", "lastViewedAt": 1682752242, "userRating": 10, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "Guid": [{"id": "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}"}], "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "eac3", "videoCodec": "hevc", "videoResolution": "4k", "container": "mkv", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1", "Stream": [{"id": 1002625, "streamType": 1, "format": "srt", "default": true, "codec": "hevc", "index": 0, "bitrate": 24743, "language": "English", "languageTag": "en", "languageCode": "eng", "headerCompression": true, "DOVIBLCompatID": 1, "DOVIBLPresent": true, "DOVIELPresent": false, "DOVILevel": 6, "DOVIPresent": true, "DOVIProfile": 8, "DOVIRPUPresent": true, "DOVIVersion": "1.0", "bitDepth": 10, "chromaLocation": "topleft", "chromaSubsampling": "4:2:0", "codedHeight": 1608, "codedWidth": 3840, "closedCaptions": true, "colorPrimaries": "bt2020", "colorRange": "tv", "colorSpace": "bt2020nc", "colorTrc": "smpte2084", "frameRate": 23.976, "key": "/library/streams/216389", "height": 1602, "level": 150, "original": true, "hasScalingMatrix": false, "profile": "main 10", "scanType": "progressive", "embeddedInVideo": "progressive", "refFrames": 1, "width": 3840, "displayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "extendedDisplayTitle": "4K DoVi/HDR10 (HEVC Main 10)", "selected": true, "forced": true, "channels": 6, "audioChannelLayout": "5.1(side)", "samplingRate": 48000, "canAutoSync": false, "hearingImpaired": true, "dub": true, "title": "SDH"}]}]}], "Genre": [{"id": 259, "tag": "Crime", "filter": "genre=19"}], "Country": [{"id": 259, "tag": "United States of America", "filter": "country=19"}], "Director": [{"id": 126522, "tag": "Danny Boyle", "filter": "director=235876", "tagKey": "5d776831151a60001f24d031", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg"}], "Writer": [{"id": 126522, "tag": "Jamie P. Hanson", "filter": "writer=126522", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg", "tagKey": "5d77683d85719b001f3a535e"}], "Producer": [{"id": 109501, "filter": "actor=109501", "tag": "Bob Odenkirk", "tagKey": "5d77683254f42c001f8c3f69", "role": "Jimmy McGill", "thumb": "https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg"}], "Role": [{"id": 126522, "tag": "Teller", "role": "Self - Judge", "filter": "actor=126522", "tagKey": "5d77683d85719b001f3a535e", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Rating": [{"image": "imdb://image.rating", "value": 9, "type": "audience"}], "Similar": [{"id": 26, "filter": "similar=26", "tag": "Breaking Bad"}], "Location": [{"path": "/TV Shows/Better Call Saul"}], "Chapter": [{"id": 4, "filter": "thumb=4", "index": 1, "startTimeOffset": 0, "endTimeOffset": 100100, "thumb": "/library/media/46883/chapterImages/1"}], "Marker": [{"id": 306970, "type": "credits", "startTimeOffset": 4176050, "endTimeOffset": 4393389, "final": true, "Attributes": {"id": 306970, "version": 4}}], "Extras": {"size": 1}}]}} "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-media-arts: speakeasy-default-get-media-arts: parameters: @@ -1815,7 +1816,7 @@ examples: ratingKey: 16099 responses: "200": - application/json: {"MediaContainer": {"size": 50, "mediaTagVersion": 1734362201, "mediaTagPrefix": "/system/bundle/media/flags/", "identifier": "com.plexapp.plugins.library", "Metadata": [{"key": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg"}, {"key": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg"}, {"key": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg"}]}} + application/json: {"MediaContainer": {"size": 50, "mediaTagVersion": 1734362201, "mediaTagPrefix": "/system/bundle/media/flags/", "identifier": "com.plexapp.plugins.library", "Metadata": [{"key": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg"}]}} post-media-arts: speakeasy-default-post-media-arts: parameters: @@ -1830,7 +1831,7 @@ examples: ratingKey: 16099 responses: "200": - application/json: {"MediaContainer": {"size": 50, "mediaTagVersion": 1734362201, "mediaTagPrefix": "/system/bundle/media/flags/", "identifier": "com.plexapp.plugins.library", "Metadata": [{"key": "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg"}, {"key": "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", "provider": "tmdb", "ratingKey": "https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg", "selected": true, "thumb": "https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg"}]}} + application/json: {"MediaContainer": {"size": 50, "mediaTagVersion": 1734362201, "mediaTagPrefix": "/system/bundle/media/flags/", "identifier": "com.plexapp.plugins.library", "Metadata": []}} post-media-poster: speakeasy-default-post-media-poster: parameters: @@ -1842,20 +1843,20 @@ examples: include-stream: parameters: path: - ratingKey: 1539.14 + ratingKey: 2403.67 query: includeElements: "Stream" responses: "200": - application/json: {"MediaContainer": {"size": 3, "allowSync": true, "art": "/library/metadata/30072/art/1705739923", "identifier": "com.plexapp.plugins.library", "key": "30072", "librarySectionID": 2, "librarySectionTitle": "TV Shows", "librarySectionUUID": "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "nocache": true, "parentIndex": 1, "parentTitle": "Reacher", "parentYear": 2022, "summary": "When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.", "theme": "/library/metadata/30072/theme/1705739923", "thumb": "/library/metadata/30072/thumb/1705739923", "title1": "TV Shows", "title2": "Reacher", "viewGroup": "season", "viewMode": 65593, "Directory": [{"leafCount": 16, "thumb": "/library/metadata/30072/thumb/1705739923", "viewedLeafCount": 16, "key": "/library/metadata/30072/allLeaves", "title": "All episodes"}], "Metadata": [{"ratingKey": "66488", "key": "/library/metadata/66488/children", "parentRatingKey": "30072", "guid": "plex://season/652aea6549508477c34c6000", "parentGuid": "plex://show/5d9c09190aaccd001f8f42f0", "parentStudio": "Amazon Studios", "type": "season", "title": "Season 2", "parentKey": "/library/metadata/30072", "parentTitle": "Reacher", "summary": "Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind-revenge.", "index": 2, "parentIndex": 1, "viewCount": 11, "lastViewedAt": 1705646565, "parentYear": 2022, "thumb": "/library/metadata/66488/thumb/1703065033", "art": "/library/metadata/30072/art/1705739923", "parentThumb": "/library/metadata/30072/thumb/1705739923", "parentTheme": "/library/metadata/30072/theme/1705739923", "leafCount": 8, "viewedLeafCount": 8, "addedAt": 1702602021, "updatedAt": 1703065033, "userRating": 9, "skipCount": 1, "lastRatedAt": 1703881224}, {"ratingKey": "66488", "key": "/library/metadata/66488/children", "parentRatingKey": "30072", "guid": "plex://season/652aea6549508477c34c6000", "parentGuid": "plex://show/5d9c09190aaccd001f8f42f0", "parentStudio": "Amazon Studios", "type": "season", "title": "Season 2", "parentKey": "/library/metadata/30072", "parentTitle": "Reacher", "summary": "Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind-revenge.", "index": 2, "parentIndex": 1, "viewCount": 11, "lastViewedAt": 1705646565, "parentYear": 2022, "thumb": "/library/metadata/66488/thumb/1703065033", "art": "/library/metadata/30072/art/1705739923", "parentThumb": "/library/metadata/30072/thumb/1705739923", "parentTheme": "/library/metadata/30072/theme/1705739923", "leafCount": 8, "viewedLeafCount": 8, "addedAt": 1702602021, "updatedAt": 1703065033, "userRating": 9, "skipCount": 1, "lastRatedAt": 1703881224}]}} + application/json: {"MediaContainer": {"size": 3, "allowSync": true, "art": "/library/metadata/30072/art/1705739923", "identifier": "com.plexapp.plugins.library", "key": "30072", "librarySectionID": 2, "librarySectionTitle": "TV Shows", "librarySectionUUID": "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "nocache": true, "parentIndex": 1, "parentTitle": "Reacher", "parentYear": 2022, "summary": "When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.", "theme": "/library/metadata/30072/theme/1705739923", "thumb": "/library/metadata/30072/thumb/1705739923", "title1": "TV Shows", "title2": "Reacher", "viewGroup": "season", "viewMode": 65593, "Directory": [{"leafCount": 16, "thumb": "/library/metadata/30072/thumb/1705739923", "viewedLeafCount": 16, "key": "/library/metadata/30072/allLeaves", "title": "All episodes"}], "Metadata": [{"ratingKey": "66488", "key": "/library/metadata/66488/children", "parentRatingKey": "30072", "guid": "plex://season/652aea6549508477c34c6000", "parentGuid": "plex://show/5d9c09190aaccd001f8f42f0", "parentStudio": "Amazon Studios", "type": "season", "title": "Season 2", "parentKey": "/library/metadata/30072", "parentTitle": "Reacher", "summary": "Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind-revenge.", "index": 2, "parentIndex": 1, "viewCount": 11, "lastViewedAt": 1705646565, "parentYear": 2022, "thumb": "/library/metadata/66488/thumb/1703065033", "art": "/library/metadata/30072/art/1705739923", "parentThumb": "/library/metadata/30072/thumb/1705739923", "parentTheme": "/library/metadata/30072/theme/1705739923", "leafCount": 8, "viewedLeafCount": 8, "addedAt": 1702602021, "updatedAt": 1703065033, "userRating": 9, "skipCount": 1, "lastRatedAt": 1703881224}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} include-stream-otheritem: parameters: path: - ratingKey: 2900.64 + ratingKey: 5846.06 query: includeElements: "Stream,OtherItem" responses: @@ -1868,34 +1869,34 @@ examples: include-stream-otheritem-anotheritem: parameters: path: - ratingKey: 8466.85 + ratingKey: 8273.28 query: includeElements: "Stream,OtherItem,AnotherItem" responses: "200": - application/json: {"MediaContainer": {"size": 3, "allowSync": true, "art": "/library/metadata/30072/art/1705739923", "identifier": "com.plexapp.plugins.library", "key": "30072", "librarySectionID": 2, "librarySectionTitle": "TV Shows", "librarySectionUUID": "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "nocache": true, "parentIndex": 1, "parentTitle": "Reacher", "parentYear": 2022, "summary": "When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.", "theme": "/library/metadata/30072/theme/1705739923", "thumb": "/library/metadata/30072/thumb/1705739923", "title1": "TV Shows", "title2": "Reacher", "viewGroup": "season", "viewMode": 65593, "Directory": [{"leafCount": 16, "thumb": "/library/metadata/30072/thumb/1705739923", "viewedLeafCount": 16, "key": "/library/metadata/30072/allLeaves", "title": "All episodes"}], "Metadata": [{"ratingKey": "66488", "key": "/library/metadata/66488/children", "parentRatingKey": "30072", "guid": "plex://season/652aea6549508477c34c6000", "parentGuid": "plex://show/5d9c09190aaccd001f8f42f0", "parentStudio": "Amazon Studios", "type": "season", "title": "Season 2", "parentKey": "/library/metadata/30072", "parentTitle": "Reacher", "summary": "Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind-revenge.", "index": 2, "parentIndex": 1, "viewCount": 11, "lastViewedAt": 1705646565, "parentYear": 2022, "thumb": "/library/metadata/66488/thumb/1703065033", "art": "/library/metadata/30072/art/1705739923", "parentThumb": "/library/metadata/30072/thumb/1705739923", "parentTheme": "/library/metadata/30072/theme/1705739923", "leafCount": 8, "viewedLeafCount": 8, "addedAt": 1702602021, "updatedAt": 1703065033, "userRating": 9, "skipCount": 1, "lastRatedAt": 1703881224}, {"ratingKey": "66488", "key": "/library/metadata/66488/children", "parentRatingKey": "30072", "guid": "plex://season/652aea6549508477c34c6000", "parentGuid": "plex://show/5d9c09190aaccd001f8f42f0", "parentStudio": "Amazon Studios", "type": "season", "title": "Season 2", "parentKey": "/library/metadata/30072", "parentTitle": "Reacher", "summary": "Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind-revenge.", "index": 2, "parentIndex": 1, "viewCount": 11, "lastViewedAt": 1705646565, "parentYear": 2022, "thumb": "/library/metadata/66488/thumb/1703065033", "art": "/library/metadata/30072/art/1705739923", "parentThumb": "/library/metadata/30072/thumb/1705739923", "parentTheme": "/library/metadata/30072/theme/1705739923", "leafCount": 8, "viewedLeafCount": 8, "addedAt": 1702602021, "updatedAt": 1703065033, "userRating": 9, "skipCount": 1, "lastRatedAt": 1703881224}]}} + application/json: {"MediaContainer": {"size": 3, "allowSync": true, "art": "/library/metadata/30072/art/1705739923", "identifier": "com.plexapp.plugins.library", "key": "30072", "librarySectionID": 2, "librarySectionTitle": "TV Shows", "librarySectionUUID": "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1701731894, "nocache": true, "parentIndex": 1, "parentTitle": "Reacher", "parentYear": 2022, "summary": "When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.", "theme": "/library/metadata/30072/theme/1705739923", "thumb": "/library/metadata/30072/thumb/1705739923", "title1": "TV Shows", "title2": "Reacher", "viewGroup": "season", "viewMode": 65593, "Directory": [{"leafCount": 16, "thumb": "/library/metadata/30072/thumb/1705739923", "viewedLeafCount": 16, "key": "/library/metadata/30072/allLeaves", "title": "All episodes"}], "Metadata": [{"ratingKey": "66488", "key": "/library/metadata/66488/children", "parentRatingKey": "30072", "guid": "plex://season/652aea6549508477c34c6000", "parentGuid": "plex://show/5d9c09190aaccd001f8f42f0", "parentStudio": "Amazon Studios", "type": "season", "title": "Season 2", "parentKey": "/library/metadata/30072", "parentTitle": "Reacher", "summary": "Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind-revenge.", "index": 2, "parentIndex": 1, "viewCount": 11, "lastViewedAt": 1705646565, "parentYear": 2022, "thumb": "/library/metadata/66488/thumb/1703065033", "art": "/library/metadata/30072/art/1705739923", "parentThumb": "/library/metadata/30072/thumb/1705739923", "parentTheme": "/library/metadata/30072/theme/1705739923", "leafCount": 8, "viewedLeafCount": 8, "addedAt": 1702602021, "updatedAt": 1703065033, "userRating": 9, "skipCount": 1, "lastRatedAt": 1703881224}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getTopWatchedContent: - "": + speakeasy-default-get-top-watched-content: parameters: query: - includeGuids: 1 type: 2 + includeGuids: 1 responses: "200": - application/json: {"MediaContainer": {"size": 1, "allowSync": true, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1698860922, "Metadata": [{"ratingKey": "17", "key": "/library/metadata/17", "guid": "plex://movie/5d77683f6f4521001ea9dc53", "slug": "waterloo-road", "studio": "Universal Pictures", "type": "movie", "title": "Serenity", "librarySectionTitle": "Movies", "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "contentRating": "PG-13", "summary": "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", "index": 1, "audienceRating": 9.1, "year": 2005, "tagline": "They aim to misbehave.", "thumb": "/library/metadata/17/thumb/1705637165", "art": "/library/metadata/17/art/1705637165", "duration": 141417, "originallyAvailableAt": "2005-09-29T00:00:00Z", "leafCount": 222, "viewedLeafCount": 100, "childCount": 13, "addedAt": 1705637164, "updatedAt": 1705637165, "globalViewCount": 80, "audienceRatingImage": "rottentomatoes://image.rating.upright", "Genre": [{"id": 184, "filter": "genre=184", "tag": "Thriller"}], "Country": [{"id": 116, "filter": "country=116", "tag": "United States of America"}, {"id": 116, "filter": "country=116", "tag": "United States of America"}], "Guid": [{"id": "tvdb://2337"}], "Role": [{"id": 220, "filter": "actor=220", "tag": "Dennis Keiffer", "tagKey": "5d77683554f42c001f8c4708", "role": "Bar Guy (uncredited)", "thumb": "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg"}, {"id": 220, "filter": "actor=220", "tag": "Dennis Keiffer", "tagKey": "5d77683554f42c001f8c4708", "role": "Bar Guy (uncredited)", "thumb": "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg"}], "User": [{"id": 220}, {"id": 220}, {"id": 220}]}, {"ratingKey": "17", "key": "/library/metadata/17", "guid": "plex://movie/5d77683f6f4521001ea9dc53", "slug": "waterloo-road", "studio": "Universal Pictures", "type": "movie", "title": "Serenity", "librarySectionTitle": "Movies", "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "contentRating": "PG-13", "summary": "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", "index": 1, "audienceRating": 9.1, "year": 2005, "tagline": "They aim to misbehave.", "thumb": "/library/metadata/17/thumb/1705637165", "art": "/library/metadata/17/art/1705637165", "duration": 141417, "originallyAvailableAt": "2005-09-29T00:00:00Z", "leafCount": 222, "viewedLeafCount": 100, "childCount": 13, "addedAt": 1705637164, "updatedAt": 1705637165, "globalViewCount": 80, "audienceRatingImage": "rottentomatoes://image.rating.upright", "Genre": [{"id": 184, "filter": "genre=184", "tag": "Thriller"}], "Country": [{"id": 116, "filter": "country=116", "tag": "United States of America"}, {"id": 116, "filter": "country=116", "tag": "United States of America"}], "Guid": [{"id": "tvdb://2337"}, {"id": "tvdb://2337"}], "Role": [{"id": 220, "filter": "actor=220", "tag": "Dennis Keiffer", "tagKey": "5d77683554f42c001f8c4708", "role": "Bar Guy (uncredited)", "thumb": "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg"}], "User": [{"id": 220}, {"id": 220}]}]}} + application/json: {"MediaContainer": {"size": 50, "allowSync": false, "identifier": "com.plexapp.plugins.library", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "Metadata": [{"ratingKey": "17", "key": "/library/metadata/17", "guid": "plex://movie/5d77683f6f4521001ea9dc53", "slug": "waterloo-road", "studio": "Universal Pictures", "type": "movie", "title": "Serenity", "librarySectionTitle": "Movies", "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "contentRating": "PG-13", "summary": "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", "index": 1, "audienceRating": 9.1, "year": 2005, "tagline": "They aim to misbehave.", "thumb": "/library/metadata/17/thumb/1705637165", "art": "/library/metadata/17/art/1705637165", "duration": 141417, "originallyAvailableAt": "2005-09-29T00:00:00Z", "leafCount": 222, "viewedLeafCount": 100, "childCount": 13, "addedAt": 1705637164, "updatedAt": 1705637165, "globalViewCount": 80, "audienceRatingImage": "rottentomatoes://image.rating.upright", "Genre": [{"id": 184, "filter": "genre=184", "tag": "Thriller"}], "Country": [{"id": 116, "filter": "country=116", "tag": "United States of America"}], "Guid": [{"id": "tvdb://2337"}], "Role": [{"id": 220, "filter": "actor=220", "tag": "Dennis Keiffer", "tagKey": "5d77683554f42c001f8c4708", "role": "Bar Guy (uncredited)", "thumb": "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg"}], "User": [{"id": 220}]}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-watch-list: speakeasy-default-get-watch-list: parameters: path: - filter: "available" + filter: "released" query: X-Plex-Container-Start: 0 X-Plex-Container-Size: 50 @@ -1905,7 +1906,7 @@ examples: "200": application/json: {} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} logLine: @@ -1917,7 +1918,7 @@ examples: source: "Postman" responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} logMultiLine: @@ -1926,124 +1927,123 @@ examples: text/plain: "level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman\nlevel=1&message=Test%20message%203&source=postman" responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} enablePaperTrail: speakeasy-default-enable-paper-trail: responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} createPlaylist: speakeasy-default-create-playlist: parameters: query: title: "" - type: "photo" + type: "audio" smart: 1 - uri: "https://hoarse-testing.info/" + uri: "https://short-term-disconnection.name/" responses: "200": - application/json: {"MediaContainer": {"size": 7, "Metadata": [{"ratingKey": "96", "key": "/playlists/96/items", "guid": "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55", "type": "playlist", "title": "A Great Playlist", "summary": "What a great playlist", "smart": false, "playlistType": "video", "icon": "playlist://image.smart", "viewCount": 1, "lastViewedAt": 1705719589, "leafCount": 1, "addedAt": 1705719589, "updatedAt": 1705724593, "composite": "/playlists/96/composite/1705724593", "duration": 141000}, {"ratingKey": "96", "key": "/playlists/96/items", "guid": "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55", "type": "playlist", "title": "A Great Playlist", "summary": "What a great playlist", "smart": false, "playlistType": "video", "icon": "playlist://image.smart", "viewCount": 1, "lastViewedAt": 1705719589, "leafCount": 1, "addedAt": 1705719589, "updatedAt": 1705724593, "composite": "/playlists/96/composite/1705724593", "duration": 141000}]}} + application/json: {"MediaContainer": {"size": 7, "Metadata": [{"ratingKey": "96", "key": "/playlists/96/items", "guid": "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55", "type": "playlist", "title": "A Great Playlist", "summary": "What a great playlist", "smart": false, "playlistType": "video", "icon": "playlist://image.smart", "viewCount": 1, "lastViewedAt": 1705719589, "leafCount": 1, "addedAt": 1705719589, "updatedAt": 1705724593, "composite": "/playlists/96/composite/1705724593", "duration": 141000}]}} "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getPlaylists: speakeasy-default-get-playlists: responses: "200": application/json: {"MediaContainer": {"size": 4, "Metadata": [{"ratingKey": "92", "key": "/playlists/92/items", "guid": "com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903", "type": "playlist", "title": "Static Playlist", "summary": "A Great Playlist", "smart": false, "playlistType": "video", "composite": "/playlists/92/composite/1705716440", "icon": "playlist://image.smart", "viewCount": 1, "lastViewedAt": 1705716298, "duration": 7328000, "leafCount": 32, "addedAt": 1705716298, "updatedAt": 1705716440}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getPlaylist: speakeasy-default-get-playlist: parameters: path: - playlistID: 4109.48 + playlistID: 8419.53 responses: "200": - application/json: {"MediaContainer": {"size": 1, "Metadata": [{"content": "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1", "ratingKey": "95", "key": "/playlists/95/items", "guid": "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91", "type": "playlist", "title": "Smart Movie Playlist", "summary": "", "smart": true, "playlistType": "video", "composite": "/playlists/95/composite/1705717387", "icon": "playlist://image.smart", "duration": 282000, "leafCount": 2, "addedAt": 1705716493, "updatedAt": 1705717387}, {"content": "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1", "ratingKey": "95", "key": "/playlists/95/items", "guid": "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91", "type": "playlist", "title": "Smart Movie Playlist", "summary": "", "smart": true, "playlistType": "video", "composite": "/playlists/95/composite/1705717387", "icon": "playlist://image.smart", "duration": 282000, "leafCount": 2, "addedAt": 1705716493, "updatedAt": 1705717387}, {"content": "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1", "ratingKey": "95", "key": "/playlists/95/items", "guid": "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91", "type": "playlist", "title": "Smart Movie Playlist", "summary": "", "smart": true, "playlistType": "video", "composite": "/playlists/95/composite/1705717387", "icon": "playlist://image.smart", "duration": 282000, "leafCount": 2, "addedAt": 1705716493, "updatedAt": 1705717387}]}} + application/json: {"MediaContainer": {"size": 1, "Metadata": [{"content": "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1", "ratingKey": "95", "key": "/playlists/95/items", "guid": "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91", "type": "playlist", "title": "Smart Movie Playlist", "summary": "", "smart": true, "playlistType": "video", "composite": "/playlists/95/composite/1705717387", "icon": "playlist://image.smart", "duration": 282000, "leafCount": 2, "addedAt": 1705716493, "updatedAt": 1705717387}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} deletePlaylist: speakeasy-default-delete-playlist: parameters: path: - playlistID: 216.22 + playlistID: 3432.93 responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} updatePlaylist: speakeasy-default-update-playlist: parameters: path: - playlistID: 3915 - query: {} + playlistID: 1579.66 responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getPlaylistContents: speakeasy-default-get-playlist-contents: parameters: path: - playlistID: 5004.46 + playlistID: 5535.42 query: type: 2 responses: "200": - application/json: {"MediaContainer": {"size": 2, "composite": "/playlists/95/composite/1705717521", "duration": 282, "leafCount": 2, "playlistType": "video", "ratingKey": "95", "smart": true, "title": "Smart Movie Playlist", "Metadata": [{"ratingKey": "17", "key": "/library/metadata/17", "guid": "plex://movie/5d77683f6f4521001ea9dc53", "studio": "Universal Pictures", "type": "movie", "title": "Serenity", "titleSort": "Amazing Spider-Man 2", "librarySectionTitle": "Movies", "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "contentRating": "PG-13", "summary": "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", "rating": 8.2, "audienceRating": 9.1, "year": 2005, "tagline": "They aim to misbehave.", "thumb": "/library/metadata/17/thumb/1705637165", "art": "/library/metadata/17/art/1705637165", "duration": 141416, "originallyAvailableAt": "2005-09-29T00:00:00Z", "addedAt": 1705637164, "updatedAt": 1705637165, "audienceRatingImage": "rottentomatoes://image.rating.upright", "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "ratingImage": "rottentomatoes://image.rating.ripe", "Media": [{"id": 15, "duration": 141416, "bitrate": 2273, "width": 1920, "height": 814, "aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "videoCodec": "h264", "videoResolution": "1080", "container": "mp4", "videoFrameRate": "24p", "optimizedForStreaming": 0, "audioProfile": "lc", "has64bitOffsets": false, "videoProfile": "high", "Part": [{"id": 15, "key": "/library/parts/15/1705637151/file.mp4", "duration": 141416, "file": "/movies/Serenity (2005)/Serenity (2005).mp4", "size": 40271948, "audioProfile": "lc", "container": "mp4", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "high"}, {"id": 15, "key": "/library/parts/15/1705637151/file.mp4", "duration": 141416, "file": "/movies/Serenity (2005)/Serenity (2005).mp4", "size": 40271948, "audioProfile": "lc", "container": "mp4", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "high"}]}, {"id": 15, "duration": 141416, "bitrate": 2273, "width": 1920, "height": 814, "aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "videoCodec": "h264", "videoResolution": "1080", "container": "mp4", "videoFrameRate": "24p", "optimizedForStreaming": 0, "audioProfile": "lc", "has64bitOffsets": false, "videoProfile": "high", "Part": [{"id": 15, "key": "/library/parts/15/1705637151/file.mp4", "duration": 141416, "file": "/movies/Serenity (2005)/Serenity (2005).mp4", "size": 40271948, "audioProfile": "lc", "container": "mp4", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "high"}]}], "Genre": [{"tag": "Action"}, {"tag": "Action"}], "Country": [{"tag": "United States of America"}, {"tag": "United States of America"}, {"tag": "United States of America"}], "Director": [{"tag": "Joss Whedon"}], "Writer": [{"tag": "Joss Whedon"}, {"tag": "Joss Whedon"}, {"tag": "Joss Whedon"}], "Role": [{"tag": "Gina Torres"}, {"tag": "Gina Torres"}]}]}} + application/json: {"MediaContainer": {"size": 2, "composite": "/playlists/95/composite/1705717521", "duration": 282, "leafCount": 2, "playlistType": "video", "ratingKey": "95", "smart": true, "title": "Smart Movie Playlist", "Metadata": [{"ratingKey": "17", "key": "/library/metadata/17", "guid": "plex://movie/5d77683f6f4521001ea9dc53", "studio": "Universal Pictures", "type": "movie", "title": "Serenity", "titleSort": "Amazing Spider-Man 2", "librarySectionTitle": "Movies", "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "contentRating": "PG-13", "summary": "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", "rating": 8.2, "audienceRating": 9.1, "year": 2005, "tagline": "They aim to misbehave.", "thumb": "/library/metadata/17/thumb/1705637165", "art": "/library/metadata/17/art/1705637165", "duration": 141416, "originallyAvailableAt": "2005-09-29T00:00:00Z", "addedAt": 1705637164, "updatedAt": 1705637165, "audienceRatingImage": "rottentomatoes://image.rating.upright", "hasPremiumExtras": "1", "hasPremiumPrimaryExtra": "1", "ratingImage": "rottentomatoes://image.rating.ripe", "Media": [{"id": 15, "duration": 141416, "bitrate": 2273, "width": 1920, "height": 814, "aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "videoCodec": "h264", "videoResolution": "1080", "container": "mp4", "videoFrameRate": "24p", "optimizedForStreaming": 0, "audioProfile": "lc", "has64bitOffsets": false, "videoProfile": "high", "Part": [{"id": 15, "key": "/library/parts/15/1705637151/file.mp4", "duration": 141416, "file": "/movies/Serenity (2005)/Serenity (2005).mp4", "size": 40271948, "audioProfile": "lc", "container": "mp4", "has64bitOffsets": false, "optimizedForStreaming": false, "videoProfile": "high"}]}], "Genre": [{"tag": "Action"}], "Country": [{"tag": "United States of America"}], "Director": [{"tag": "Joss Whedon"}], "Writer": [{"tag": "Joss Whedon"}], "Role": [{"tag": "Gina Torres"}]}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} clearPlaylistContents: speakeasy-default-clear-playlist-contents: parameters: path: - playlistID: 1893.18 + playlistID: 4137.37 responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} addPlaylistContents: speakeasy-default-add-playlist-contents: parameters: path: - playlistID: 8502.01 + playlistID: 7013.44 query: uri: "server://12345/com.plexapp.plugins.library/library/metadata/1" playQueueID: 123 responses: "200": - application/json: {"MediaContainer": {"size": 1, "leafCountAdded": 1, "leafCountRequested": 1, "Metadata": [{"ratingKey": "94", "key": "/playlists/94/items", "guid": "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2", "type": "playlist", "title": "A great playlist", "summary": "One of my great playlists", "smart": false, "playlistType": "video", "composite": "/playlists/94/composite/1705800070", "duration": 423000, "leafCount": 3, "addedAt": 1705716458, "updatedAt": 1705800070}, {"ratingKey": "94", "key": "/playlists/94/items", "guid": "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2", "type": "playlist", "title": "A great playlist", "summary": "One of my great playlists", "smart": false, "playlistType": "video", "composite": "/playlists/94/composite/1705800070", "duration": 423000, "leafCount": 3, "addedAt": 1705716458, "updatedAt": 1705800070}]}} + application/json: {"MediaContainer": {"size": 1, "leafCountAdded": 1, "leafCountRequested": 1, "Metadata": [{"ratingKey": "94", "key": "/playlists/94/items", "guid": "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2", "type": "playlist", "title": "A great playlist", "summary": "One of my great playlists", "smart": false, "playlistType": "video", "composite": "/playlists/94/composite/1705800070", "duration": 423000, "leafCount": 3, "addedAt": 1705716458, "updatedAt": 1705800070}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} uploadPlaylist: speakeasy-default-upload-playlist: parameters: query: path: "/home/barkley/playlist.m3u" - force: 0 + force: 1 sectionID: 1 responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getTransientToken: speakeasy-default-get-transient-token: parameters: @@ -2059,19 +2059,19 @@ examples: speakeasy-default-get-source-connection-information: parameters: query: - source: "provider://provider-identifier" + source: "server://client-identifier" responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getTokenDetails: speakeasy-default-get-token-details: responses: "200": - application/json: {"adsConsent": false, "adsConsentReminderAt": 1556281940, "adsConsentSetAt": 1556281940, "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": ["[]"], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1556281940, "locale": "ja", "mailingListActive": false, "mailingListStatus": "active", "maxHomeSize": 15, "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": 1, "defaultSubtitleAccessibility": 1, "defaultSubtitleForced": 1, "watchedIndicator": 1, "mediaReviewsVisibility": 1}, "protected": false, "rememberExpiresAt": 1556281940, "restricted": false, "scrobbleTypes": "", "services": [{"identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "", "status": "online"}], "subscription": {"active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive"}, "subscriptionDescription": "", "subscriptions": [{"active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive"}, {"active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive"}, {"active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f", "attributionPartner": null} + application/json: {"adsConsent": true, "adsConsentReminderAt": 1556281940, "adsConsentSetAt": 1556281940, "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": ["[]"], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1556281940, "locale": "it", "mailingListActive": false, "mailingListStatus": "active", "maxHomeSize": 15, "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": 1, "defaultSubtitleAccessibility": 1, "defaultSubtitleForced": 1, "watchedIndicator": 1, "mediaReviewsVisibility": 1}, "protected": false, "rememberExpiresAt": 1556281940, "restricted": false, "scrobbleTypes": "", "services": [], "subscription": {"active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive"}, "subscriptionDescription": "", "subscriptions": [{"active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f", "attributionPartner": null} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} post-users-sign-in-data: @@ -2087,11 +2087,11 @@ examples: application/x-www-form-urlencoded: {"login": "username@email.com", "password": "password123", "rememberMe": false, "verificationCode": "123456"} responses: "201": - application/json: {"adsConsent": false, "adsConsentReminderAt": 1556281940, "adsConsentSetAt": 1556281940, "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": ["[]"], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1556281940, "locale": "zh", "mailingListActive": false, "mailingListStatus": "active", "maxHomeSize": 15, "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": 0, "defaultSubtitleAccessibility": 0, "defaultSubtitleForced": 0, "watchedIndicator": 0, "mediaReviewsVisibility": 0}, "protected": false, "rememberExpiresAt": 1556281940, "restricted": false, "scrobbleTypes": "", "services": [{"identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "", "status": "online"}, {"identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "", "status": "online"}, {"identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "", "status": "online"}], "subscription": {"active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive"}, "subscriptionDescription": "", "subscriptions": [{"active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f", "attributionPartner": null, "pastSubscriptions": [{"id": "", "mode": "", "renewsAt": 1556281940, "endsAt": 1556281940, "canceled": false, "gracePeriod": false, "onHold": false, "canReactivate": false, "canUpgrade": false, "canDowngrade": false, "canConvert": false, "type": "plexpass", "transfer": "", "state": "ended", "billing": {"internalPaymentMethod": {}, "paymentMethodId": 778268}}, {"id": "", "mode": "", "renewsAt": 1556281940, "endsAt": 1556281940, "canceled": false, "gracePeriod": false, "onHold": false, "canReactivate": false, "canUpgrade": false, "canDowngrade": false, "canConvert": false, "type": "plexpass", "transfer": "", "state": "ended", "billing": {"internalPaymentMethod": {}, "paymentMethodId": 417052}}, {"id": "", "mode": "", "renewsAt": 1556281940, "endsAt": 1556281940, "canceled": false, "gracePeriod": false, "onHold": false, "canReactivate": false, "canUpgrade": false, "canDowngrade": false, "canConvert": false, "type": "plexpass", "transfer": "", "state": "ended", "billing": {"internalPaymentMethod": {}, "paymentMethodId": 860168}}], "trials": [{}, {}]} + application/json: {"adsConsent": null, "adsConsentReminderAt": 1556281940, "adsConsentSetAt": 1556281940, "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": ["[]"], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1556281940, "locale": "ru", "mailingListActive": false, "mailingListStatus": "active", "maxHomeSize": 15, "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": 1, "defaultSubtitleAccessibility": 1, "defaultSubtitleForced": 1, "watchedIndicator": 1, "mediaReviewsVisibility": 1}, "protected": false, "rememberExpiresAt": 1556281940, "restricted": false, "scrobbleTypes": "", "services": [], "subscription": {"active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive"}, "subscriptionDescription": "", "subscriptions": [{"active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f", "attributionPartner": null, "pastSubscriptions": [], "trials": []} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getStatistics: "": parameters: @@ -2099,9 +2099,9 @@ examples: timespan: 4 responses: "200": - application/json: {"MediaContainer": {"size": 5497, "Device": [{"id": 208, "name": "Roku Express", "platform": "Roku", "clientIdentifier": "793095d235660625108ef785cc7646e9", "createdAt": 1706470556}, {"id": 208, "name": "Roku Express", "platform": "Roku", "clientIdentifier": "793095d235660625108ef785cc7646e9", "createdAt": 1706470556}], "Account": [{"id": 238960586, "key": "/accounts/238960586", "name": "Diane", "defaultAudioLanguage": "en", "autoSelectAudio": true, "defaultSubtitleLanguage": "en", "subtitleMode": 1, "thumb": "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"}], "StatisticsMedia": [{"accountID": 1, "deviceID": 13, "timespan": 4, "at": 1707141600, "metadataType": 4, "count": 1, "duration": 1555}, {"accountID": 1, "deviceID": 13, "timespan": 4, "at": 1707141600, "metadataType": 4, "count": 1, "duration": 1555}, {"accountID": 1, "deviceID": 13, "timespan": 4, "at": 1707141600, "metadataType": 4, "count": 1, "duration": 1555}]}} + application/json: {"MediaContainer": {"size": 5497, "Device": [{"id": 208, "name": "Roku Express", "platform": "Roku", "clientIdentifier": "793095d235660625108ef785cc7646e9", "createdAt": 1706470556}], "Account": [{"id": 238960586, "key": "/accounts/238960586", "name": "Diane", "defaultAudioLanguage": "en", "autoSelectAudio": true, "defaultSubtitleLanguage": "en", "subtitleMode": 1, "thumb": "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"}], "StatisticsMedia": [{"accountID": 1, "deviceID": 13, "timespan": 4, "at": 1707141600, "metadataType": 4, "count": 1, "duration": 1555}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getResourcesStatistics: @@ -2111,11 +2111,11 @@ examples: timespan: 4 responses: "200": - application/json: {"MediaContainer": {"size": 5497, "StatisticsResources": [{"timespan": 6, "at": 1718384427, "hostCpuUtilization": 1.276, "processCpuUtilization": 0.025, "hostMemoryUtilization": 17.026, "processMemoryUtilization": 0.493}, {"timespan": 6, "at": 1718384427, "hostCpuUtilization": 1.276, "processCpuUtilization": 0.025, "hostMemoryUtilization": 17.026, "processMemoryUtilization": 0.493}]}} + application/json: {"MediaContainer": {"size": 5497, "StatisticsResources": [{"timespan": 6, "at": 1718384427, "hostCpuUtilization": 1.276, "processCpuUtilization": 0.025, "hostMemoryUtilization": 17.026, "processMemoryUtilization": 0.493}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getBandwidthStatistics: "": parameters: @@ -2123,18 +2123,18 @@ examples: timespan: 4 responses: "200": - application/json: {"MediaContainer": {"size": 5497, "Device": [{"id": 208, "name": "Roku Express", "platform": "Roku", "clientIdentifier": "793095d235660625108ef785cc7646e9", "createdAt": 1706470556}, {"id": 208, "name": "Roku Express", "platform": "Roku", "clientIdentifier": "793095d235660625108ef785cc7646e9", "createdAt": 1706470556}, {"id": 208, "name": "Roku Express", "platform": "Roku", "clientIdentifier": "793095d235660625108ef785cc7646e9", "createdAt": 1706470556}], "Account": [{"id": 238960586, "key": "/accounts/238960586", "name": "Diane", "defaultAudioLanguage": "en", "autoSelectAudio": true, "defaultSubtitleLanguage": "en", "subtitleMode": 1, "thumb": "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"}, {"id": 238960586, "key": "/accounts/238960586", "name": "Diane", "defaultAudioLanguage": "en", "autoSelectAudio": true, "defaultSubtitleLanguage": "en", "subtitleMode": 1, "thumb": "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"}, {"id": 238960586, "key": "/accounts/238960586", "name": "Diane", "defaultAudioLanguage": "en", "autoSelectAudio": true, "defaultSubtitleLanguage": "en", "subtitleMode": 1, "thumb": "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"}], "StatisticsBandwidth": [{"accountID": 238960586, "deviceID": 208, "timespan": 6, "at": 1718387650, "lan": true, "bytes": 22}, {"accountID": 238960586, "deviceID": 208, "timespan": 6, "at": 1718387650, "lan": true, "bytes": 22}]}} + application/json: {"MediaContainer": {"size": 5497, "Device": [{"id": 208, "name": "Roku Express", "platform": "Roku", "clientIdentifier": "793095d235660625108ef785cc7646e9", "createdAt": 1706470556}], "Account": [{"id": 238960586, "key": "/accounts/238960586", "name": "Diane", "defaultAudioLanguage": "en", "autoSelectAudio": true, "defaultSubtitleLanguage": "en", "subtitleMode": 1, "thumb": "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"}], "StatisticsBandwidth": [{"accountID": 238960586, "deviceID": 208, "timespan": 6, "at": 1718387650, "lan": true, "bytes": 22}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getSessions: speakeasy-default-get-sessions: responses: "200": - application/json: {"MediaContainer": {"size": 1, "Metadata": [{"addedAt": 1705543312, "art": "/library/metadata/39904/art/1705310687", "duration": 186240, "grandparentArt": "/library/metadata/39904/art/1705310687", "grandparentGuid": "plex://artist/5d07bbfd403c6402904a6480", "grandparentKey": "/library/metadata/39904", "grandparentRatingKey": "39904", "grandparentThumb": "/library/metadata/39904/thumb/1705310687", "grandparentTitle": "Green Day", "guid": "plex://track/6535834f71f22f36f71a8e8f", "index": 1, "key": "/library/metadata/67085", "librarySectionID": "3", "librarySectionKey": "/library/sections/3", "librarySectionTitle": "Music", "musicAnalysisVersion": "1", "originalTitle": "The American Dream Is Killing Me", "parentGuid": "plex://album/65394d6d472b8ab03ef47f12", "parentIndex": 1, "parentKey": "/library/metadata/67084", "parentRatingKey": "67084", "parentStudio": "Reprise Records", "parentThumb": "/library/metadata/67084/thumb/1705543314", "parentTitle": "Saviors", "parentYear": 2024, "ratingCount": 45885, "ratingKey": "67085", "sessionKey": "203", "thumb": "/library/metadata/67084/thumb/1705543314", "title": "The American Dream Is Killing Me", "titleSort": "American Dream Is Killing Me", "type": "track", "updatedAt": 1705543314, "viewOffset": 1000, "Media": [{"audioChannels": 2, "audioCodec": "flac", "bitrate": 1014, "container": "flac", "duration": 186240, "id": "130355", "selected": true, "Part": [{"container": "flac", "duration": 186240, "file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", "hasThumbnail": "1", "id": "130625", "key": "/library/parts/130625/1705543268/file.flac", "size": 23644000, "decision": "directplay", "selected": true, "Stream": [{"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}]}, {"container": "flac", "duration": 186240, "file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", "hasThumbnail": "1", "id": "130625", "key": "/library/parts/130625/1705543268/file.flac", "size": 23644000, "decision": "directplay", "selected": true, "Stream": [{"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}, {"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}, {"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}]}]}, {"audioChannels": 2, "audioCodec": "flac", "bitrate": 1014, "container": "flac", "duration": 186240, "id": "130355", "selected": true, "Part": [{"container": "flac", "duration": 186240, "file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", "hasThumbnail": "1", "id": "130625", "key": "/library/parts/130625/1705543268/file.flac", "size": 23644000, "decision": "directplay", "selected": true, "Stream": [{"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}, {"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}]}, {"container": "flac", "duration": 186240, "file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", "hasThumbnail": "1", "id": "130625", "key": "/library/parts/130625/1705543268/file.flac", "size": 23644000, "decision": "directplay", "selected": true, "Stream": [{"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}]}, {"container": "flac", "duration": 186240, "file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", "hasThumbnail": "1", "id": "130625", "key": "/library/parts/130625/1705543268/file.flac", "size": 23644000, "decision": "directplay", "selected": true, "Stream": [{"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}, {"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}]}]}, {"audioChannels": 2, "audioCodec": "flac", "bitrate": 1014, "container": "flac", "duration": 186240, "id": "130355", "selected": true, "Part": [{"container": "flac", "duration": 186240, "file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", "hasThumbnail": "1", "id": "130625", "key": "/library/parts/130625/1705543268/file.flac", "size": 23644000, "decision": "directplay", "selected": true, "Stream": [{"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}, {"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}]}]}], "User": {"id": "1", "thumb": "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661", "title": "Blindkitty38"}, "Player": {"address": "10.10.10.171", "machineIdentifier": "3tsdzir85m2onc3qyr255aq1", "model": "standalone", "platform": "windows", "platformVersion": "10.0.22621", "product": "Plex for Windows", "profile": "Plex Desktop", "remotePublicAddress": "68.248.140.20", "state": "playing", "title": "DESKTOP-BL80MTD", "version": "1.85.0.4071-21128b56", "local": true, "relayed": false, "secure": true, "userID": 1}, "Session": {"id": "93h7e00ncblxncqw9lkfaoxi", "bandwidth": 1050, "location": "lan"}}, {"addedAt": 1705543312, "art": "/library/metadata/39904/art/1705310687", "duration": 186240, "grandparentArt": "/library/metadata/39904/art/1705310687", "grandparentGuid": "plex://artist/5d07bbfd403c6402904a6480", "grandparentKey": "/library/metadata/39904", "grandparentRatingKey": "39904", "grandparentThumb": "/library/metadata/39904/thumb/1705310687", "grandparentTitle": "Green Day", "guid": "plex://track/6535834f71f22f36f71a8e8f", "index": 1, "key": "/library/metadata/67085", "librarySectionID": "3", "librarySectionKey": "/library/sections/3", "librarySectionTitle": "Music", "musicAnalysisVersion": "1", "originalTitle": "The American Dream Is Killing Me", "parentGuid": "plex://album/65394d6d472b8ab03ef47f12", "parentIndex": 1, "parentKey": "/library/metadata/67084", "parentRatingKey": "67084", "parentStudio": "Reprise Records", "parentThumb": "/library/metadata/67084/thumb/1705543314", "parentTitle": "Saviors", "parentYear": 2024, "ratingCount": 45885, "ratingKey": "67085", "sessionKey": "203", "thumb": "/library/metadata/67084/thumb/1705543314", "title": "The American Dream Is Killing Me", "titleSort": "American Dream Is Killing Me", "type": "track", "updatedAt": 1705543314, "viewOffset": 1000, "Media": [{"audioChannels": 2, "audioCodec": "flac", "bitrate": 1014, "container": "flac", "duration": 186240, "id": "130355", "selected": true, "Part": [{"container": "flac", "duration": 186240, "file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", "hasThumbnail": "1", "id": "130625", "key": "/library/parts/130625/1705543268/file.flac", "size": 23644000, "decision": "directplay", "selected": true, "Stream": [{"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}, {"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}]}, {"container": "flac", "duration": 186240, "file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", "hasThumbnail": "1", "id": "130625", "key": "/library/parts/130625/1705543268/file.flac", "size": 23644000, "decision": "directplay", "selected": true, "Stream": [{"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}]}, {"container": "flac", "duration": 186240, "file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", "hasThumbnail": "1", "id": "130625", "key": "/library/parts/130625/1705543268/file.flac", "size": 23644000, "decision": "directplay", "selected": true, "Stream": [{"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}, {"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}, {"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}]}]}, {"audioChannels": 2, "audioCodec": "flac", "bitrate": 1014, "container": "flac", "duration": 186240, "id": "130355", "selected": true, "Part": [{"container": "flac", "duration": 186240, "file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", "hasThumbnail": "1", "id": "130625", "key": "/library/parts/130625/1705543268/file.flac", "size": 23644000, "decision": "directplay", "selected": true, "Stream": [{"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}, {"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}, {"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}]}]}, {"audioChannels": 2, "audioCodec": "flac", "bitrate": 1014, "container": "flac", "duration": 186240, "id": "130355", "selected": true, "Part": [{"container": "flac", "duration": 186240, "file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", "hasThumbnail": "1", "id": "130625", "key": "/library/parts/130625/1705543268/file.flac", "size": 23644000, "decision": "directplay", "selected": true, "Stream": [{"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}, {"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}]}]}], "User": {"id": "1", "thumb": "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661", "title": "Blindkitty38"}, "Player": {"address": "10.10.10.171", "machineIdentifier": "3tsdzir85m2onc3qyr255aq1", "model": "standalone", "platform": "windows", "platformVersion": "10.0.22621", "product": "Plex for Windows", "profile": "Plex Desktop", "remotePublicAddress": "68.248.140.20", "state": "playing", "title": "DESKTOP-BL80MTD", "version": "1.85.0.4071-21128b56", "local": true, "relayed": false, "secure": true, "userID": 1}, "Session": {"id": "93h7e00ncblxncqw9lkfaoxi", "bandwidth": 1050, "location": "lan"}}]}} + application/json: {"MediaContainer": {"size": 1, "Metadata": [{"addedAt": 1705543312, "art": "/library/metadata/39904/art/1705310687", "duration": 186240, "grandparentArt": "/library/metadata/39904/art/1705310687", "grandparentGuid": "plex://artist/5d07bbfd403c6402904a6480", "grandparentKey": "/library/metadata/39904", "grandparentRatingKey": "39904", "grandparentThumb": "/library/metadata/39904/thumb/1705310687", "grandparentTitle": "Green Day", "guid": "plex://track/6535834f71f22f36f71a8e8f", "index": 1, "key": "/library/metadata/67085", "librarySectionID": "3", "librarySectionKey": "/library/sections/3", "librarySectionTitle": "Music", "musicAnalysisVersion": "1", "originalTitle": "The American Dream Is Killing Me", "parentGuid": "plex://album/65394d6d472b8ab03ef47f12", "parentIndex": 1, "parentKey": "/library/metadata/67084", "parentRatingKey": "67084", "parentStudio": "Reprise Records", "parentThumb": "/library/metadata/67084/thumb/1705543314", "parentTitle": "Saviors", "parentYear": 2024, "ratingCount": 45885, "ratingKey": "67085", "sessionKey": "203", "thumb": "/library/metadata/67084/thumb/1705543314", "title": "The American Dream Is Killing Me", "titleSort": "American Dream Is Killing Me", "type": "track", "updatedAt": 1705543314, "viewOffset": 1000, "Media": [{"audioChannels": 2, "audioCodec": "flac", "bitrate": 1014, "container": "flac", "duration": 186240, "id": "130355", "selected": true, "Part": [{"container": "flac", "duration": 186240, "file": "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", "hasThumbnail": "1", "id": "130625", "key": "/library/parts/130625/1705543268/file.flac", "size": 23644000, "decision": "directplay", "selected": true, "Stream": [{"albumGain": "-12.94", "albumPeak": "1.000000", "albumRange": "4.751014", "audioChannelLayout": "stereo", "bitDepth": 16, "bitrate": 1014, "channels": 2, "codec": "flac", "displayTitle": "FLAC (Stereo)", "extendedDisplayTitle": "FLAC (Stereo)", "gain": "-12.94", "id": "352487", "index": 0, "loudness": "-5.94", "lra": "1.74", "peak": "1.000000", "samplingRate": 44100, "selected": true, "streamType": 2, "location": "direct"}]}]}], "User": {"id": "1", "thumb": "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661", "title": "Blindkitty38"}, "Player": {"address": "10.10.10.171", "machineIdentifier": "3tsdzir85m2onc3qyr255aq1", "model": "standalone", "platform": "windows", "platformVersion": "10.0.22621", "product": "Plex for Windows", "profile": "Plex Desktop", "remotePublicAddress": "68.248.140.20", "state": "playing", "title": "DESKTOP-BL80MTD", "version": "1.85.0.4071-21128b56", "local": true, "relayed": false, "secure": true, "userID": 1}, "Session": {"id": "93h7e00ncblxncqw9lkfaoxi", "bandwidth": 1050, "location": "lan"}}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getSessionHistory: @@ -2143,75 +2143,81 @@ examples: query: sort: "viewedAt:desc" accountId: 1 + filter: {} librarySectionID: 12 responses: "200": - application/json: {"MediaContainer": {"size": 10855, "Metadata": [{"historyKey": "/status/sessions/history/1", "key": "/library/metadata/32171", "ratingKey": "32171", "librarySectionID": "2", "parentKey": "/library/metadata/32170", "grandparentKey": "/library/metadata/32132", "title": "The Noise That Blue Makes", "grandparentTitle": "Taskmaster", "type": "episode", "thumb": "/library/metadata/32171/thumb/-1", "parentThumb": "/library/metadata/32170/thumb/1654134301", "grandparentThumb": "/library/metadata/32132/thumb/1703933346", "grandparentArt": "/library/metadata/32132/art/1703933346", "index": 1, "parentIndex": 13, "originallyAvailableAt": "2022-04-14T00:00:00Z", "viewedAt": 1654139223, "accountID": 1, "deviceID": 5}, {"historyKey": "/status/sessions/history/1", "key": "/library/metadata/32171", "ratingKey": "32171", "librarySectionID": "2", "parentKey": "/library/metadata/32170", "grandparentKey": "/library/metadata/32132", "title": "The Noise That Blue Makes", "grandparentTitle": "Taskmaster", "type": "episode", "thumb": "/library/metadata/32171/thumb/-1", "parentThumb": "/library/metadata/32170/thumb/1654134301", "grandparentThumb": "/library/metadata/32132/thumb/1703933346", "grandparentArt": "/library/metadata/32132/art/1703933346", "index": 1, "parentIndex": 13, "originallyAvailableAt": "2022-04-14T00:00:00Z", "viewedAt": 1654139223, "accountID": 1, "deviceID": 5}]}} + application/json: {"MediaContainer": {"size": 10855, "Metadata": [{"historyKey": "/status/sessions/history/1", "key": "/library/metadata/32171", "ratingKey": "32171", "librarySectionID": "2", "parentKey": "/library/metadata/32170", "grandparentKey": "/library/metadata/32132", "title": "The Noise That Blue Makes", "grandparentTitle": "Taskmaster", "type": "episode", "thumb": "/library/metadata/32171/thumb/-1", "parentThumb": "/library/metadata/32170/thumb/1654134301", "grandparentThumb": "/library/metadata/32132/thumb/1703933346", "grandparentArt": "/library/metadata/32132/art/1703933346", "index": 1, "parentIndex": 13, "originallyAvailableAt": "2022-04-14T00:00:00Z", "viewedAt": 1654139223, "accountID": 1, "deviceID": 5}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} viewed-at-ascending: parameters: query: sort: "viewedAt:asc" accountId: 1 + filter: {} librarySectionID: 12 responses: "200": application/json: {"MediaContainer": {"size": 10855, "Metadata": [{"historyKey": "/status/sessions/history/1", "key": "/library/metadata/32171", "ratingKey": "32171", "librarySectionID": "2", "parentKey": "/library/metadata/32170", "grandparentKey": "/library/metadata/32132", "title": "The Noise That Blue Makes", "grandparentTitle": "Taskmaster", "type": "episode", "thumb": "/library/metadata/32171/thumb/-1", "parentThumb": "/library/metadata/32170/thumb/1654134301", "grandparentThumb": "/library/metadata/32132/thumb/1703933346", "grandparentArt": "/library/metadata/32132/art/1703933346", "index": 1, "parentIndex": 13, "originallyAvailableAt": "2022-04-14T00:00:00Z", "viewedAt": 1654139223, "accountID": 1, "deviceID": 5}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} rating-descending: parameters: query: sort: "rating:desc" accountId: 1 + filter: {} librarySectionID: 12 responses: "200": application/json: {"MediaContainer": {"size": 10855, "Metadata": [{"historyKey": "/status/sessions/history/1", "key": "/library/metadata/32171", "ratingKey": "32171", "librarySectionID": "2", "parentKey": "/library/metadata/32170", "grandparentKey": "/library/metadata/32132", "title": "The Noise That Blue Makes", "grandparentTitle": "Taskmaster", "type": "episode", "thumb": "/library/metadata/32171/thumb/-1", "parentThumb": "/library/metadata/32170/thumb/1654134301", "grandparentThumb": "/library/metadata/32132/thumb/1703933346", "grandparentArt": "/library/metadata/32132/art/1703933346", "index": 1, "parentIndex": 13, "originallyAvailableAt": "2022-04-14T00:00:00Z", "viewedAt": 1654139223, "accountID": 1, "deviceID": 5}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} rating-ascending: parameters: query: sort: "rating:asc" accountId: 1 + filter: {} librarySectionID: 12 responses: "200": application/json: {"MediaContainer": {"size": 10855, "Metadata": [{"historyKey": "/status/sessions/history/1", "key": "/library/metadata/32171", "ratingKey": "32171", "librarySectionID": "2", "parentKey": "/library/metadata/32170", "grandparentKey": "/library/metadata/32132", "title": "The Noise That Blue Makes", "grandparentTitle": "Taskmaster", "type": "episode", "thumb": "/library/metadata/32171/thumb/-1", "parentThumb": "/library/metadata/32170/thumb/1654134301", "grandparentThumb": "/library/metadata/32132/thumb/1703933346", "grandparentArt": "/library/metadata/32132/art/1703933346", "index": 1, "parentIndex": 13, "originallyAvailableAt": "2022-04-14T00:00:00Z", "viewedAt": 1654139223, "accountID": 1, "deviceID": 5}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} "": parameters: query: accountId: 1 + filter: {} librarySectionID: 12 responses: "200": - application/json: {"MediaContainer": {"size": 10855, "Metadata": [{"historyKey": "/status/sessions/history/1", "key": "/library/metadata/32171", "ratingKey": "32171", "librarySectionID": "2", "parentKey": "/library/metadata/32170", "grandparentKey": "/library/metadata/32132", "title": "The Noise That Blue Makes", "grandparentTitle": "Taskmaster", "type": "episode", "thumb": "/library/metadata/32171/thumb/-1", "parentThumb": "/library/metadata/32170/thumb/1654134301", "grandparentThumb": "/library/metadata/32132/thumb/1703933346", "grandparentArt": "/library/metadata/32132/art/1703933346", "index": 1, "parentIndex": 13, "originallyAvailableAt": "2022-04-14T00:00:00Z", "viewedAt": 1654139223, "accountID": 1, "deviceID": 5}, {"historyKey": "/status/sessions/history/1", "key": "/library/metadata/32171", "ratingKey": "32171", "librarySectionID": "2", "parentKey": "/library/metadata/32170", "grandparentKey": "/library/metadata/32132", "title": "The Noise That Blue Makes", "grandparentTitle": "Taskmaster", "type": "episode", "thumb": "/library/metadata/32171/thumb/-1", "parentThumb": "/library/metadata/32170/thumb/1654134301", "grandparentThumb": "/library/metadata/32132/thumb/1703933346", "grandparentArt": "/library/metadata/32132/art/1703933346", "index": 1, "parentIndex": 13, "originallyAvailableAt": "2022-04-14T00:00:00Z", "viewedAt": 1654139223, "accountID": 1, "deviceID": 5}]}} + application/json: {"MediaContainer": {"size": 10855, "Metadata": [{"historyKey": "/status/sessions/history/1", "key": "/library/metadata/32171", "ratingKey": "32171", "librarySectionID": "2", "parentKey": "/library/metadata/32170", "grandparentKey": "/library/metadata/32132", "title": "The Noise That Blue Makes", "grandparentTitle": "Taskmaster", "type": "episode", "thumb": "/library/metadata/32171/thumb/-1", "parentThumb": "/library/metadata/32170/thumb/1654134301", "grandparentThumb": "/library/metadata/32132/thumb/1703933346", "grandparentArt": "/library/metadata/32132/art/1703933346", "index": 1, "parentIndex": 13, "originallyAvailableAt": "2022-04-14T00:00:00Z", "viewedAt": 1654139223, "accountID": 1, "deviceID": 5}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} ViewedAt: parameters: query: accountId: 1 + filter: {} librarySectionID: 12 responses: "200": - application/json: {"MediaContainer": {"size": 10855, "Metadata": [{"historyKey": "/status/sessions/history/1", "key": "/library/metadata/32171", "ratingKey": "32171", "librarySectionID": "2", "parentKey": "/library/metadata/32170", "grandparentKey": "/library/metadata/32132", "title": "The Noise That Blue Makes", "grandparentTitle": "Taskmaster", "type": "episode", "thumb": "/library/metadata/32171/thumb/-1", "parentThumb": "/library/metadata/32170/thumb/1654134301", "grandparentThumb": "/library/metadata/32132/thumb/1703933346", "grandparentArt": "/library/metadata/32132/art/1703933346", "index": 1, "parentIndex": 13, "originallyAvailableAt": "2022-04-14T00:00:00Z", "viewedAt": 1654139223, "accountID": 1, "deviceID": 5}, {"historyKey": "/status/sessions/history/1", "key": "/library/metadata/32171", "ratingKey": "32171", "librarySectionID": "2", "parentKey": "/library/metadata/32170", "grandparentKey": "/library/metadata/32132", "title": "The Noise That Blue Makes", "grandparentTitle": "Taskmaster", "type": "episode", "thumb": "/library/metadata/32171/thumb/-1", "parentThumb": "/library/metadata/32170/thumb/1654134301", "grandparentThumb": "/library/metadata/32132/thumb/1703933346", "grandparentArt": "/library/metadata/32132/art/1703933346", "index": 1, "parentIndex": 13, "originallyAvailableAt": "2022-04-14T00:00:00Z", "viewedAt": 1654139223, "accountID": 1, "deviceID": 5}]}} + application/json: {"MediaContainer": {"size": 10855, "Metadata": [{"historyKey": "/status/sessions/history/1", "key": "/library/metadata/32171", "ratingKey": "32171", "librarySectionID": "2", "parentKey": "/library/metadata/32170", "grandparentKey": "/library/metadata/32132", "title": "The Noise That Blue Makes", "grandparentTitle": "Taskmaster", "type": "episode", "thumb": "/library/metadata/32171/thumb/-1", "parentThumb": "/library/metadata/32170/thumb/1654134301", "grandparentThumb": "/library/metadata/32132/thumb/1703933346", "grandparentArt": "/library/metadata/32132/art/1703933346", "index": 1, "parentIndex": 13, "originallyAvailableAt": "2022-04-14T00:00:00Z", "viewedAt": 1654139223, "accountID": 1, "deviceID": 5}]}} "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getTranscodeSessions: @@ -2222,7 +2228,7 @@ examples: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} stopTranscodeSession: speakeasy-default-stop-transcode-session: parameters: @@ -2230,9 +2236,9 @@ examples: sessionKey: "zz7llzqlx8w9vnrsbnwhbmep" responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} getUpdateStatus: speakeasy-default-get-update-status: responses: @@ -2241,7 +2247,7 @@ examples: "400": application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} checkForUpdates: "": parameters: @@ -2249,9 +2255,9 @@ examples: download: 1 responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} applyUpdates: "": parameters: @@ -2260,7 +2266,7 @@ examples: skip: 1 responses: "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} get-users: @@ -2282,10 +2288,10 @@ examples: X-Plex-Token: "CV5xoxjTpFKUzBTShsaf" responses: "200": - application/xml: "0xa9CdebeF9E" + application/xml: "0xfD5052DbD1" "400": - application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}, {"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} + application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]} "401": - application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}, {"code": 1001, "message": "User could not be authenticated", "status": 401}]} -examplesVersion: 1.0.1 + application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]} +examplesVersion: 1.0.2 generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 366e71c..a7ce12e 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -4,6 +4,7 @@ generation: maintainOpenAPIOrder: true usageSnippets: optionalPropertyRendering: withExample + sdkInitStyle: constructor useClassNamesForArrayFields: true fixes: nameResolutionDec2023: true @@ -16,7 +17,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false go: - version: 0.21.2 + version: 0.22.0 additionalDependencies: {} allowUnknownFieldsInWeakUnions: false clientServerStatusCodesAsErrors: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index e6c689c..509302f 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.542.3 +speakeasyVersion: 1.555.3 sources: my-source: sourceNamespace: my-source @@ -9,19 +9,19 @@ sources: - main plexapi: sourceNamespace: plexapi - sourceRevisionDigest: sha256:37adc934a79841fb00cfe6ed569f5b1c88534b20202ecbde64b4e84828cee22a - sourceBlobDigest: sha256:ffb5b8d288111a763e4d035c8c9e37f5c89690d146b7297493b43a71d8298e6c + sourceRevisionDigest: sha256:78d07ad78ff60d0e9918696208d8c68a562e170d4e9c431797c02995fb8816d0 + sourceBlobDigest: sha256:d38dd2a36c1b2fd73409267f7b30c2d5d45d709616141803ea01db424ec68ae4 tags: - latest - - speakeasy-sdk-regen-1746490234 + - speakeasy-sdk-regen-1749082259 targets: plexgo: source: plexapi sourceNamespace: plexapi - sourceRevisionDigest: sha256:37adc934a79841fb00cfe6ed569f5b1c88534b20202ecbde64b4e84828cee22a - sourceBlobDigest: sha256:ffb5b8d288111a763e4d035c8c9e37f5c89690d146b7297493b43a71d8298e6c + sourceRevisionDigest: sha256:78d07ad78ff60d0e9918696208d8c68a562e170d4e9c431797c02995fb8816d0 + sourceBlobDigest: sha256:d38dd2a36c1b2fd73409267f7b30c2d5d45d709616141803ea01db424ec68ae4 codeSamplesNamespace: code-samples-go-plexgo - codeSamplesRevisionDigest: sha256:503a6f9a35834921087204d51ede9941cacedef3a61b322bbd2b269d24ccb970 + codeSamplesRevisionDigest: sha256:92b1cc82ef36c033e0829db07006a9d1fd240244dd846ed236c51115a902001a workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index cdc88cf..14b7d33 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ func main() { * [GetLibraryDetails](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details * [DeleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section * [GetLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items -* [GetAllMediaLibrary](docs/sdks/library/README.md#getallmedialibrary) - Get all media of library +* [GetLibrarySectionsAll](docs/sdks/library/README.md#getlibrarysectionsall) - Get Library section media by tag ALL * [GetRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library * [GetSearchLibrary](docs/sdks/library/README.md#getsearchlibrary) - Search Library * [GetGenresLibrary](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media @@ -423,8 +423,8 @@ func main() { s := plexgo.New( plexgo.WithProtocol("https"), - plexgo.WithIP("e0c3:bcc0:6bac:dccc:c4ec:34b1:ca98:4cb9"), - plexgo.WithPort("40311"), + plexgo.WithIP("4982:bc2a:b4f8:efb5:2394:5bc3:ab4f:0e6d"), + plexgo.WithPort("44765"), plexgo.WithSecurity(""), ) diff --git a/RELEASES.md b/RELEASES.md index ecc74ea..cdacc6d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1152,4 +1152,14 @@ Based on: ### Generated - [go v0.21.2] . ### Releases -- [Go v0.21.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.21.2 - . \ No newline at end of file +- [Go v0.21.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.21.2 - . + +## 2025-06-05 00:10:42 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.555.3 (2.620.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.22.0] . +### Releases +- [Go v0.22.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.22.0 - . \ No newline at end of file diff --git a/activities.go b/activities.go index 1552ac0..d8d8cf3 100644 --- a/activities.go +++ b/activities.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" @@ -23,12 +24,16 @@ import ( // - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) // - The may contain a `Response` object which attributes which represent the result of the asynchronous operation. type Activities struct { - sdkConfiguration sdkConfiguration + rootSDK *PlexAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } -func newActivities(sdkConfig sdkConfiguration) *Activities { +func newActivities(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Activities { return &Activities{ + rootSDK: rootSDK, sdkConfiguration: sdkConfig, + hooks: hooks, } } @@ -59,11 +64,13 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getServerActivities", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getServerActivities", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -112,15 +119,17 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -137,7 +146,7 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -145,13 +154,13 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -164,17 +173,17 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -308,11 +317,13 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "cancelServerActivities", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "cancelServerActivities", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -361,15 +372,17 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -386,7 +399,7 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -394,13 +407,13 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -413,17 +426,17 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/authentication.go b/authentication.go index fe13725..8da3c31 100644 --- a/authentication.go +++ b/authentication.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" @@ -17,12 +18,16 @@ import ( // Authentication - API Calls regarding authentication for Plex Media Server type Authentication struct { - sdkConfiguration sdkConfiguration + rootSDK *PlexAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } -func newAuthentication(sdkConfig sdkConfiguration) *Authentication { +func newAuthentication(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Authentication { return &Authentication{ + rootSDK: rootSDK, sdkConfiguration: sdkConfig, + hooks: hooks, } } @@ -58,11 +63,13 @@ func (s *Authentication) GetTransientToken(ctx context.Context, type_ operations } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getTransientToken", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getTransientToken", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -115,15 +122,17 @@ func (s *Authentication) GetTransientToken(ctx context.Context, type_ operations "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -140,7 +149,7 @@ func (s *Authentication) GetTransientToken(ctx context.Context, type_ operations err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -148,13 +157,13 @@ func (s *Authentication) GetTransientToken(ctx context.Context, type_ operations if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -167,17 +176,17 @@ func (s *Authentication) GetTransientToken(ctx context.Context, type_ operations err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -292,11 +301,13 @@ func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, sou } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getSourceConnectionInformation", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getSourceConnectionInformation", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -349,15 +360,17 @@ func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, sou "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -374,7 +387,7 @@ func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, sou err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -382,13 +395,13 @@ func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, sou if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -401,17 +414,17 @@ func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, sou err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -520,11 +533,13 @@ func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getTokenDetails", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getTokenDetails", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -573,15 +588,17 @@ func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -598,7 +615,7 @@ func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -606,13 +623,13 @@ func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -625,17 +642,17 @@ func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -764,11 +781,13 @@ func (s *Authentication) PostUsersSignInData(ctx context.Context, request operat } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "post-users-sign-in-data", - OAuth2Scopes: []string{}, - SecuritySource: nil, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "post-users-sign-in-data", + OAuth2Scopes: []string{}, + SecuritySource: nil, } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "form", `request:"mediaType=application/x-www-form-urlencoded"`) if err != nil { @@ -822,15 +841,17 @@ func (s *Authentication) PostUsersSignInData(ctx context.Context, request operat "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -847,7 +868,7 @@ func (s *Authentication) PostUsersSignInData(ctx context.Context, request operat err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -855,13 +876,13 @@ func (s *Authentication) PostUsersSignInData(ctx context.Context, request operat if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -874,17 +895,17 @@ func (s *Authentication) PostUsersSignInData(ctx context.Context, request operat err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/butler.go b/butler.go index 484e012..9fd8279 100644 --- a/butler.go +++ b/butler.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" @@ -17,12 +18,16 @@ import ( // Butler is the task manager of the Plex Media Server Ecosystem. type Butler struct { - sdkConfiguration sdkConfiguration + rootSDK *PlexAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } -func newButler(sdkConfig sdkConfiguration) *Butler { +func newButler(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Butler { return &Butler{ + rootSDK: rootSDK, sdkConfiguration: sdkConfig, + hooks: hooks, } } @@ -53,11 +58,13 @@ func (s *Butler) GetButlerTasks(ctx context.Context, opts ...operations.Option) } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getButlerTasks", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getButlerTasks", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -106,15 +113,17 @@ func (s *Butler) GetButlerTasks(ctx context.Context, opts ...operations.Option) "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -131,7 +140,7 @@ func (s *Butler) GetButlerTasks(ctx context.Context, opts ...operations.Option) err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -139,13 +148,13 @@ func (s *Butler) GetButlerTasks(ctx context.Context, opts ...operations.Option) if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -158,17 +167,17 @@ func (s *Butler) GetButlerTasks(ctx context.Context, opts ...operations.Option) err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -302,11 +311,13 @@ func (s *Butler) StartAllTasks(ctx context.Context, opts ...operations.Option) ( } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "startAllTasks", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "startAllTasks", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -355,15 +366,17 @@ func (s *Butler) StartAllTasks(ctx context.Context, opts ...operations.Option) ( "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -380,7 +393,7 @@ func (s *Butler) StartAllTasks(ctx context.Context, opts ...operations.Option) ( err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -388,13 +401,13 @@ func (s *Butler) StartAllTasks(ctx context.Context, opts ...operations.Option) ( if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -407,17 +420,17 @@ func (s *Butler) StartAllTasks(ctx context.Context, opts ...operations.Option) ( err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -527,11 +540,13 @@ func (s *Butler) StopAllTasks(ctx context.Context, opts ...operations.Option) (* } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "stopAllTasks", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "stopAllTasks", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -580,15 +595,17 @@ func (s *Butler) StopAllTasks(ctx context.Context, opts ...operations.Option) (* "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -605,7 +622,7 @@ func (s *Butler) StopAllTasks(ctx context.Context, opts ...operations.Option) (* err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -613,13 +630,13 @@ func (s *Butler) StopAllTasks(ctx context.Context, opts ...operations.Option) (* if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -632,17 +649,17 @@ func (s *Butler) StopAllTasks(ctx context.Context, opts ...operations.Option) (* err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -760,11 +777,13 @@ func (s *Butler) StartTask(ctx context.Context, taskName operations.TaskName, op } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "startTask", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "startTask", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -813,15 +832,17 @@ func (s *Butler) StartTask(ctx context.Context, taskName operations.TaskName, op "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -838,7 +859,7 @@ func (s *Butler) StartTask(ctx context.Context, taskName operations.TaskName, op err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -846,13 +867,13 @@ func (s *Butler) StartTask(ctx context.Context, taskName operations.TaskName, op if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -865,17 +886,17 @@ func (s *Butler) StartTask(ctx context.Context, taskName operations.TaskName, op err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -991,11 +1012,13 @@ func (s *Butler) StopTask(ctx context.Context, taskName operations.PathParamTask } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "stopTask", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "stopTask", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -1044,15 +1067,17 @@ func (s *Butler) StopTask(ctx context.Context, taskName operations.PathParamTask "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -1069,7 +1094,7 @@ func (s *Butler) StopTask(ctx context.Context, taskName operations.PathParamTask err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -1077,13 +1102,13 @@ func (s *Butler) StopTask(ctx context.Context, taskName operations.PathParamTask if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -1096,17 +1121,17 @@ func (s *Butler) StopTask(ctx context.Context, taskName operations.PathParamTask err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "404", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/codeSamples.yaml b/codeSamples.yaml index ced07ee..d27c4b7 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -356,7 +356,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Butler.StopTask(ctx, operations.PathParamTaskNameBackupDatabase) + res, err := s.Butler.StopTask(ctx, operations.PathParamTaskNameCleanOldCacheFiles) if err != nil { log.Fatal(err) } @@ -386,7 +386,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Butler.StartTask(ctx, operations.TaskNameCleanOldBundles) + res, err := s.Butler.StartTask(ctx, operations.TaskNameRefreshPeriodicMetadata) if err != nil { log.Fatal(err) } @@ -618,9 +618,10 @@ actions: ) res, err := s.Hubs.GetRecentlyAdded(ctx, operations.GetRecentlyAddedRequest{ - ContentDirectoryID: 470161, + ContentDirectoryID: 39486, SectionID: plexgo.Int64(2), Type: operations.TypeTvShow, + IncludeMeta: operations.IncludeMetaEnable.ToPointer(), }) if err != nil { log.Fatal(err) @@ -650,7 +651,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Search.PerformSearch(ctx, "dylan", nil, nil) + res, err := s.Search.PerformSearch(ctx, "arnold", nil, plexgo.Float64(5)) if err != nil { log.Fatal(err) } @@ -679,7 +680,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Search.PerformVoiceSearch(ctx, "dead+poop", nil, nil) + res, err := s.Search.PerformVoiceSearch(ctx, "dead+poop", nil, plexgo.Float64(5)) if err != nil { log.Fatal(err) } @@ -708,7 +709,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Hubs.GetLibraryHubs(ctx, 6728.76, nil, nil) + res, err := s.Hubs.GetLibraryHubs(ctx, 492.74, nil, nil) if err != nil { log.Fatal(err) } @@ -765,7 +766,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Library.GetTopWatchedContent(ctx, operations.GetTopWatchedContentQueryParamTypeTvShow, plexgo.Int64(1)) + res, err := s.Library.GetTopWatchedContent(ctx, operations.GetTopWatchedContentQueryParamTypeTvShow, operations.GetTopWatchedContentQueryParamIncludeGuidsEnable.ToPointer()) if err != nil { log.Fatal(err) } @@ -825,7 +826,7 @@ actions: ) res, err := s.Library.GetMediaMetaData(ctx, operations.GetMediaMetaDataRequest{ - RatingKey: 9518, + RatingKey: "21119,21617", IncludeConcerts: plexgo.Bool(true), IncludeExtras: plexgo.Bool(true), IncludeOnDeck: plexgo.Bool(true), @@ -963,7 +964,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Library.GetMetadataChildren(ctx, 1539.14, plexgo.String("Stream")) + res, err := s.Library.GetMetadataChildren(ctx, 2403.67, plexgo.String("Stream")) if err != nil { log.Fatal(err) } @@ -1106,6 +1107,7 @@ actions: }, SectionID: plexgo.Int64(2), Type: operations.QueryParamTypeTvShow, + IncludeMeta: operations.QueryParamIncludeMetaEnable.ToPointer(), }) if err != nil { log.Fatal(err) @@ -1142,6 +1144,8 @@ actions: SearchTypes: []operations.SearchTypes{ operations.SearchTypesPeople, }, + IncludeCollections: operations.GetSearchAllLibrariesQueryParamIncludeCollectionsEnable.ToPointer(), + IncludeExternalMedia: operations.GetSearchAllLibrariesQueryParamIncludeExternalMediaEnable.ToPointer(), }) if err != nil { log.Fatal(err) @@ -1202,7 +1206,7 @@ actions: ) res, err := s.Watchlist.GetWatchList(ctx, operations.GetWatchListRequest{ - Filter: operations.FilterAvailable, + Filter: operations.FilterReleased, XPlexToken: "CV5xoxjTpFKUzBTShsaf", }) if err != nil { @@ -1252,6 +1256,7 @@ actions: import( "context" "github.com/LukeHagar/plexgo" + "github.com/LukeHagar/plexgo/models/operations" "log" ) @@ -1262,7 +1267,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Library.GetLibraryDetails(ctx, 9518, nil) + res, err := s.Library.GetLibraryDetails(ctx, 9518, operations.IncludeDetailsZero.ToPointer()) if err != nil { log.Fatal(err) } @@ -1322,9 +1327,14 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Library.GetAllMediaLibrary(ctx, operations.GetAllMediaLibraryRequest{ + res, err := s.Library.GetLibrarySectionsAll(ctx, operations.GetLibrarySectionsAllRequest{ SectionKey: 9518, - Type: operations.GetAllMediaLibraryQueryParamTypeTvShow, + Type: operations.GetLibrarySectionsAllQueryParamTypeTvShow, + IncludeMeta: operations.GetLibrarySectionsAllQueryParamIncludeMetaEnable.ToPointer(), + IncludeGuids: operations.QueryParamIncludeGuidsEnable.ToPointer(), + IncludeAdvanced: operations.IncludeAdvancedEnable.ToPointer(), + IncludeCollections: operations.QueryParamIncludeCollectionsEnable.ToPointer(), + IncludeExternalMedia: operations.QueryParamIncludeExternalMediaEnable.ToPointer(), }) if err != nil { log.Fatal(err) @@ -1415,7 +1425,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Library.GetRefreshLibraryMetadata(ctx, 9518, operations.ForceOne.ToPointer()) + res, err := s.Library.GetRefreshLibraryMetadata(ctx, 9518, operations.ForceZero.ToPointer()) if err != nil { log.Fatal(err) } @@ -1476,9 +1486,11 @@ actions: ) res, err := s.Library.GetLibraryItems(ctx, operations.GetLibraryItemsRequest{ - Tag: operations.TagEdition, + Tag: operations.TagNewest, + IncludeGuids: operations.IncludeGuidsEnable.ToPointer(), Type: operations.GetLibraryItemsQueryParamTypeTvShow, SectionKey: 9518, + IncludeMeta: operations.GetLibraryItemsQueryParamIncludeMetaEnable.ToPointer(), }) if err != nil { log.Fatal(err) @@ -1660,10 +1672,9 @@ actions: res, err := s.Server.GetResizedPhoto(ctx, operations.GetResizedPhotoRequest{ Width: 110, Height: 165, - Opacity: 100, Blur: 0, - MinSize: operations.MinSizeOne, - Upscale: operations.UpscaleOne, + MinSize: operations.MinSizeZero, + Upscale: operations.UpscaleZero, URL: "/library/metadata/49564/thumb/1654258204", }) if err != nil { @@ -1728,7 +1739,7 @@ actions: s := plexgo.New() res, err := s.Plex.GetTokenByPinID(ctx, operations.GetTokenByPinIDRequest{ - PinID: 408895, + PinID: 232248, ClientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", ClientName: plexgo.String("Plex for Roku"), DeviceNickname: plexgo.String("Roku 3"), @@ -1795,9 +1806,9 @@ actions: res, err := s.Playlists.CreatePlaylist(ctx, operations.CreatePlaylistRequest{ Title: "", - Type: operations.CreatePlaylistQueryParamTypePhoto, + Type: operations.CreatePlaylistQueryParamTypeAudio, Smart: operations.SmartOne, - URI: "https://hoarse-testing.info/", + URI: "https://short-term-disconnection.name/", }) if err != nil { log.Fatal(err) @@ -1828,7 +1839,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Playlists.UploadPlaylist(ctx, "/home/barkley/playlist.m3u", operations.QueryParamForceZero, 1) + res, err := s.Playlists.UploadPlaylist(ctx, "/home/barkley/playlist.m3u", operations.QueryParamForceOne, 1) if err != nil { log.Fatal(err) } @@ -1857,7 +1868,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Playlists.DeletePlaylist(ctx, 216.22) + res, err := s.Playlists.DeletePlaylist(ctx, 3432.93) if err != nil { log.Fatal(err) } @@ -1886,7 +1897,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Playlists.GetPlaylist(ctx, 4109.48) + res, err := s.Playlists.GetPlaylist(ctx, 8419.53) if err != nil { log.Fatal(err) } @@ -1915,7 +1926,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Playlists.UpdatePlaylist(ctx, 3915, nil, nil) + res, err := s.Playlists.UpdatePlaylist(ctx, 1579.66, nil, nil) if err != nil { log.Fatal(err) } @@ -1944,7 +1955,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Playlists.ClearPlaylistContents(ctx, 1893.18) + res, err := s.Playlists.ClearPlaylistContents(ctx, 4137.37) if err != nil { log.Fatal(err) } @@ -1974,7 +1985,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Playlists.GetPlaylistContents(ctx, 5004.46, operations.GetPlaylistContentsQueryParamTypeTvShow) + res, err := s.Playlists.GetPlaylistContents(ctx, 5535.42, operations.GetPlaylistContentsQueryParamTypeTvShow) if err != nil { log.Fatal(err) } @@ -2003,7 +2014,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Playlists.AddPlaylistContents(ctx, 8502.01, "server://12345/com.plexapp.plugins.library/library/metadata/1", plexgo.Float64(123)) + res, err := s.Playlists.AddPlaylistContents(ctx, 7013.44, "server://12345/com.plexapp.plugins.library/library/metadata/1", plexgo.Float64(123)) if err != nil { log.Fatal(err) } @@ -2022,6 +2033,7 @@ actions: import( "context" "github.com/LukeHagar/plexgo" + "github.com/LukeHagar/plexgo/models/operations" "log" ) @@ -2032,7 +2044,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Plex.GetServerResources(ctx, "3381b62b-9ab7-4e37-827b-203e9809eb58", nil, nil, nil) + res, err := s.Plex.GetServerResources(ctx, "3381b62b-9ab7-4e37-827b-203e9809eb58", operations.IncludeHTTPSEnable.ToPointer(), operations.IncludeRelayEnable.ToPointer(), operations.IncludeIPv6Enable.ToPointer()) if err != nil { log.Fatal(err) } @@ -2090,7 +2102,7 @@ actions: plexgo.WithSecurity(""), ) - res, err := s.Authentication.GetSourceConnectionInformation(ctx, "provider://provider-identifier") + res, err := s.Authentication.GetSourceConnectionInformation(ctx, "server://client-identifier") if err != nil { log.Fatal(err) } diff --git a/docs/models/operations/country.md b/docs/models/operations/country.md index e7d1da1..90aee71 100644 --- a/docs/models/operations/country.md +++ b/docs/models/operations/country.md @@ -5,8 +5,8 @@ The filter query string for country media items. ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `ID` | *int* | :heavy_check_mark: | N/A | 259 | -| `Tag` | *string* | :heavy_check_mark: | The country of origin of this media item | United States of America | -| `Filter` | **string* | :heavy_minus_sign: | N/A | country=19 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `ID` | *int* | :heavy_check_mark: | The unique identifier for the country.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | +| `Tag` | *string* | :heavy_check_mark: | The country of origin of this media item | United States of America | +| `Filter` | *string* | :heavy_check_mark: | N/A | country=19 | \ No newline at end of file diff --git a/docs/models/operations/director.md b/docs/models/operations/director.md index d5bc7ba..a0b5a82 100644 --- a/docs/models/operations/director.md +++ b/docs/models/operations/director.md @@ -3,6 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | -| `Tag` | *string* | :heavy_check_mark: | The role of Director | Danny Boyle | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `ID` | *int* | :heavy_check_mark: | Unique identifier for the director. | 126522 | +| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this director. | director=235876 | +| `Tag` | *string* | :heavy_check_mark: | The role of Director | Danny Boyle | +| `TagKey` | *string* | :heavy_check_mark: | A unique 24-character hexadecimal key associated with the director's tag, used for internal identification. | 5d776831151a60001f24d031 | +| `Thumb` | **string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the director. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/models/operations/genre.md b/docs/models/operations/genre.md index d715d0d..a8d2e5e 100644 --- a/docs/models/operations/genre.md +++ b/docs/models/operations/genre.md @@ -5,8 +5,8 @@ The filter query string for similar items. ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `ID` | *int64* | :heavy_check_mark: | N/A | 259 | -| `Filter` | *string* | :heavy_check_mark: | N/A | genre=19 | -| `Tag` | *string* | :heavy_check_mark: | The genre name of this media-item
| Crime | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `ID` | *int* | :heavy_check_mark: | The unique identifier for the genre.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | +| `Filter` | *string* | :heavy_check_mark: | N/A | genre=19 | +| `Tag` | *string* | :heavy_check_mark: | The genre name of this media-item
| Crime | \ No newline at end of file diff --git a/docs/models/operations/getactorslibraryqueryparamtype.md b/docs/models/operations/getactorslibraryqueryparamtype.md index f789daf..d4adb04 100644 --- a/docs/models/operations/getactorslibraryqueryparamtype.md +++ b/docs/models/operations/getactorslibraryqueryparamtype.md @@ -11,12 +11,14 @@ E.g. A movie library will not return anything with type 3 as there are no season ## Values -| Name | Value | -| --------------------------------------- | --------------------------------------- | -| `GetActorsLibraryQueryParamTypeMovie` | 1 | -| `GetActorsLibraryQueryParamTypeTvShow` | 2 | -| `GetActorsLibraryQueryParamTypeSeason` | 3 | -| `GetActorsLibraryQueryParamTypeEpisode` | 4 | -| `GetActorsLibraryQueryParamTypeAudio` | 8 | -| `GetActorsLibraryQueryParamTypeAlbum` | 9 | -| `GetActorsLibraryQueryParamTypeTrack` | 10 | \ No newline at end of file +| Name | Value | +| ------------------------------------------ | ------------------------------------------ | +| `GetActorsLibraryQueryParamTypeMovie` | 1 | +| `GetActorsLibraryQueryParamTypeTvShow` | 2 | +| `GetActorsLibraryQueryParamTypeSeason` | 3 | +| `GetActorsLibraryQueryParamTypeEpisode` | 4 | +| `GetActorsLibraryQueryParamTypeArtist` | 5 | +| `GetActorsLibraryQueryParamTypeAlbum` | 6 | +| `GetActorsLibraryQueryParamTypeTrack` | 7 | +| `GetActorsLibraryQueryParamTypePhotoAlbum` | 8 | +| `GetActorsLibraryQueryParamTypePhoto` | 9 | \ No newline at end of file diff --git a/docs/models/operations/getalllibrariestype.md b/docs/models/operations/getalllibrariestype.md index 9719839..535be9d 100644 --- a/docs/models/operations/getalllibrariestype.md +++ b/docs/models/operations/getalllibrariestype.md @@ -5,11 +5,15 @@ The library type ## Values -| Name | Value | -| ---------------------------- | ---------------------------- | -| `GetAllLibrariesTypeMovie` | movie | -| `GetAllLibrariesTypeTvShow` | show | -| `GetAllLibrariesTypeSeason` | season | -| `GetAllLibrariesTypeEpisode` | episode | -| `GetAllLibrariesTypeArtist` | artist | -| `GetAllLibrariesTypeAlbum` | album | \ No newline at end of file +| Name | Value | +| ------------------------------- | ------------------------------- | +| `GetAllLibrariesTypeMovie` | movie | +| `GetAllLibrariesTypeTvShow` | show | +| `GetAllLibrariesTypeSeason` | season | +| `GetAllLibrariesTypeEpisode` | episode | +| `GetAllLibrariesTypeArtist` | artist | +| `GetAllLibrariesTypeAlbum` | album | +| `GetAllLibrariesTypeTrack` | track | +| `GetAllLibrariesTypePhotoAlbum` | photoalbum | +| `GetAllLibrariesTypePhoto` | photo | +| `GetAllLibrariesTypeCollection` | collection | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibraryactivedirection.md b/docs/models/operations/getallmedialibraryactivedirection.md deleted file mode 100644 index fc226dd..0000000 --- a/docs/models/operations/getallmedialibraryactivedirection.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetAllMediaLibraryActiveDirection - -The direction of the sort. Can be either `asc` or `desc`. - - - -## Values - -| Name | Value | -| --------------------------------------------- | --------------------------------------------- | -| `GetAllMediaLibraryActiveDirectionAscending` | asc | -| `GetAllMediaLibraryActiveDirectionDescending` | desc | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibrarydefaultdirection.md b/docs/models/operations/getallmedialibrarydefaultdirection.md deleted file mode 100644 index 48f89da..0000000 --- a/docs/models/operations/getallmedialibrarydefaultdirection.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetAllMediaLibraryDefaultDirection - -The direction of the sort. Can be either `asc` or `desc`. - - - -## Values - -| Name | Value | -| ---------------------------------------------- | ---------------------------------------------- | -| `GetAllMediaLibraryDefaultDirectionAscending` | asc | -| `GetAllMediaLibraryDefaultDirectionDescending` | desc | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibraryfieldtype.md b/docs/models/operations/getallmedialibraryfieldtype.md deleted file mode 100644 index cd80a11..0000000 --- a/docs/models/operations/getallmedialibraryfieldtype.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetAllMediaLibraryFieldType - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `Type` | *string* | :heavy_check_mark: | N/A | tag | -| `Operator` | [][operations.GetAllMediaLibraryOperator](../../models/operations/getallmedialibraryoperator.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibraryguids.md b/docs/models/operations/getallmedialibraryguids.md deleted file mode 100644 index 709a1ec..0000000 --- a/docs/models/operations/getallmedialibraryguids.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetAllMediaLibraryGuids - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `ID` | **string* | :heavy_minus_sign: | The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337
| tvdb://2337 | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibraryhasthumbnail.md b/docs/models/operations/getallmedialibraryhasthumbnail.md deleted file mode 100644 index bcd5173..0000000 --- a/docs/models/operations/getallmedialibraryhasthumbnail.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetAllMediaLibraryHasThumbnail - -Indicates if the part has a thumbnail. - - -## Values - -| Name | Value | -| ------------------------------------- | ------------------------------------- | -| `GetAllMediaLibraryHasThumbnailFalse` | 0 | -| `GetAllMediaLibraryHasThumbnailTrue` | 1 | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibraryimage.md b/docs/models/operations/getallmedialibraryimage.md deleted file mode 100644 index 3e0a6a4..0000000 --- a/docs/models/operations/getallmedialibraryimage.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetAllMediaLibraryImage - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `Alt` | *string* | :heavy_check_mark: | N/A | Episode 1 | -| `Type` | [operations.GetAllMediaLibraryLibraryResponseType](../../models/operations/getallmedialibrarylibraryresponsetype.md) | :heavy_check_mark: | N/A | background | -| `URL` | *string* | :heavy_check_mark: | N/A | /library/metadata/45521/thumb/1644710589 | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibrarylibraryoptimizedforstreaming.md b/docs/models/operations/getallmedialibrarylibraryoptimizedforstreaming.md deleted file mode 100644 index d0a36b6..0000000 --- a/docs/models/operations/getallmedialibrarylibraryoptimizedforstreaming.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetAllMediaLibraryLibraryOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - - -## Supported Types - -### GetAllMediaLibraryOptimizedForStreaming1 - -```go -getAllMediaLibraryLibraryOptimizedForStreaming := operations.CreateGetAllMediaLibraryLibraryOptimizedForStreamingGetAllMediaLibraryOptimizedForStreaming1(operations.GetAllMediaLibraryOptimizedForStreaming1{/* values here */}) -``` - -### - -```go -getAllMediaLibraryLibraryOptimizedForStreaming := operations.CreateGetAllMediaLibraryLibraryOptimizedForStreamingBoolean(bool{/* values here */}) -``` - diff --git a/docs/models/operations/getallmedialibrarylibraryresponsetype.md b/docs/models/operations/getallmedialibrarylibraryresponsetype.md deleted file mode 100644 index 9c79333..0000000 --- a/docs/models/operations/getallmedialibrarylibraryresponsetype.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetAllMediaLibraryLibraryResponseType - - -## Values - -| Name | Value | -| -------------------------------------------------- | -------------------------------------------------- | -| `GetAllMediaLibraryLibraryResponseTypeCoverPoster` | coverPoster | -| `GetAllMediaLibraryLibraryResponseTypeBackground` | background | -| `GetAllMediaLibraryLibraryResponseTypeSnapshot` | snapshot | -| `GetAllMediaLibraryLibraryResponseTypeClearLogo` | clearLogo | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibrarylibrarytype.md b/docs/models/operations/getallmedialibrarylibrarytype.md deleted file mode 100644 index 0b3f798..0000000 --- a/docs/models/operations/getallmedialibrarylibrarytype.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetAllMediaLibraryLibraryType - -The type of media content - - - -## Values - -| Name | Value | -| -------------------------------------- | -------------------------------------- | -| `GetAllMediaLibraryLibraryTypeMovie` | movie | -| `GetAllMediaLibraryLibraryTypeTvShow` | show | -| `GetAllMediaLibraryLibraryTypeSeason` | season | -| `GetAllMediaLibraryLibraryTypeEpisode` | episode | -| `GetAllMediaLibraryLibraryTypeArtist` | artist | -| `GetAllMediaLibraryLibraryTypeAlbum` | album | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibrarymedia.md b/docs/models/operations/getallmedialibrarymedia.md deleted file mode 100644 index c1a774a..0000000 --- a/docs/models/operations/getallmedialibrarymedia.md +++ /dev/null @@ -1,26 +0,0 @@ -# GetAllMediaLibraryMedia - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| `ID` | *int64* | :heavy_check_mark: | Unique media identifier. | 387322 | -| `Duration` | **int* | :heavy_minus_sign: | Duration of the media in milliseconds. | 9610350 | -| `Bitrate` | **int* | :heavy_minus_sign: | Bitrate in bits per second. | 25512 | -| `Width` | **int* | :heavy_minus_sign: | Video width in pixels. | 3840 | -| `Height` | **int* | :heavy_minus_sign: | Video height in pixels. | 1602 | -| `AspectRatio` | **float32* | :heavy_minus_sign: | Aspect ratio of the video. | 2.35 | -| `AudioChannels` | **int* | :heavy_minus_sign: | Number of audio channels. | 6 | -| `DisplayOffset` | **int* | :heavy_minus_sign: | N/A | 50 | -| `AudioCodec` | **string* | :heavy_minus_sign: | Audio codec used. | eac3 | -| `VideoCodec` | **string* | :heavy_minus_sign: | Video codec used. | hevc | -| `VideoResolution` | **string* | :heavy_minus_sign: | Video resolution (e.g., 4k). | 4k | -| `Container` | **string* | :heavy_minus_sign: | File container type. | mkv | -| `VideoFrameRate` | **string* | :heavy_minus_sign: | Frame rate of the video. Values found include NTSC, PAL, 24p
| 24p | -| `VideoProfile` | **string* | :heavy_minus_sign: | Video profile (e.g., main 10). | main 10 | -| `HasVoiceActivity` | **bool* | :heavy_minus_sign: | Indicates whether voice activity is detected. | false | -| `AudioProfile` | **string* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `OptimizedForStreaming` | [*operations.GetAllMediaLibraryOptimizedForStreaming](../../models/operations/getallmedialibraryoptimizedforstreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | -| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false | -| `Part` | [][operations.GetAllMediaLibraryPart](../../models/operations/getallmedialibrarypart.md) | :heavy_minus_sign: | An array of parts for this media item. | | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibrarymediacontainer.md b/docs/models/operations/getallmedialibrarymediacontainer.md deleted file mode 100644 index cd25647..0000000 --- a/docs/models/operations/getallmedialibrarymediacontainer.md +++ /dev/null @@ -1,26 +0,0 @@ -# GetAllMediaLibraryMediaContainer - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `Size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | -| `TotalSize` | *int* | :heavy_check_mark: | Total number of media items in the library. | 50 | -| `Offset` | *int64* | :heavy_check_mark: | Offset value for pagination. | 0 | -| `AllowSync` | *bool* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | -| `Art` | *string* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg | -| `Content` | *string* | :heavy_check_mark: | The content type or mode. | secondary | -| `Identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | -| `LibrarySectionID` | *int64* | :heavy_check_mark: | The unique identifier for the library section. | 2 | -| `LibrarySectionTitle` | *string* | :heavy_check_mark: | The title of the library section. | TV Series | -| `LibrarySectionUUID` | **string* | :heavy_minus_sign: | The universally unique identifier for the library section. | e69655a2-ef48-4aba-bb19-0cc34d1e7d36 | -| `MediaTagPrefix` | *string* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | -| `MediaTagVersion` | *int64* | :heavy_check_mark: | The version number for media tags. | 1734362201 | -| `Thumb` | *string* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png | -| `Nocache` | *bool* | :heavy_check_mark: | Specifies whether caching is disabled. | true | -| `Title1` | *string* | :heavy_check_mark: | The primary title of the media container. | TV Series | -| `Title2` | *string* | :heavy_check_mark: | The secondary title of the media container. | By Starring Actor | -| `ViewGroup` | *string* | :heavy_check_mark: | Identifier for the view group layout. | secondary | -| `Meta` | [*operations.GetAllMediaLibraryMeta](../../models/operations/getallmedialibrarymeta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
| | -| `Metadata` | [][operations.GetAllMediaLibraryMetadata](../../models/operations/getallmedialibrarymetadata.md) | :heavy_minus_sign: | An array of metadata items. | | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibrarymeta.md b/docs/models/operations/getallmedialibrarymeta.md deleted file mode 100644 index 7016d69..0000000 --- a/docs/models/operations/getallmedialibrarymeta.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetAllMediaLibraryMeta - -The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. - - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `Type` | [][operations.GetAllMediaLibraryType](../../models/operations/getallmedialibrarytype.md) | :heavy_minus_sign: | N/A | -| `FieldType` | [][operations.GetAllMediaLibraryFieldType](../../models/operations/getallmedialibraryfieldtype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibraryoptimizedforstreaming.md b/docs/models/operations/getallmedialibraryoptimizedforstreaming.md deleted file mode 100644 index f1ab323..0000000 --- a/docs/models/operations/getallmedialibraryoptimizedforstreaming.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetAllMediaLibraryOptimizedForStreaming - -Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - - -## Supported Types - -### OptimizedForStreaming1 - -```go -getAllMediaLibraryOptimizedForStreaming := operations.CreateGetAllMediaLibraryOptimizedForStreamingOptimizedForStreaming1(operations.OptimizedForStreaming1{/* values here */}) -``` - -### - -```go -getAllMediaLibraryOptimizedForStreaming := operations.CreateGetAllMediaLibraryOptimizedForStreamingBoolean(bool{/* values here */}) -``` - diff --git a/docs/models/operations/getallmedialibraryoptimizedforstreaming1.md b/docs/models/operations/getallmedialibraryoptimizedforstreaming1.md deleted file mode 100644 index b5f6c6d..0000000 --- a/docs/models/operations/getallmedialibraryoptimizedforstreaming1.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetAllMediaLibraryOptimizedForStreaming1 - - -## Values - -| Name | Value | -| ---------------------------------------------- | ---------------------------------------------- | -| `GetAllMediaLibraryOptimizedForStreaming1Zero` | 0 | -| `GetAllMediaLibraryOptimizedForStreaming1One` | 1 | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibrarypart.md b/docs/models/operations/getallmedialibrarypart.md deleted file mode 100644 index f3ecc67..0000000 --- a/docs/models/operations/getallmedialibrarypart.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetAllMediaLibraryPart - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -| `Accessible` | **bool* | :heavy_minus_sign: | Indicates if the part is accessible. | true | -| `Exists` | **bool* | :heavy_minus_sign: | Indicates if the part exists. | true | -| `ID` | *int64* | :heavy_check_mark: | Unique part identifier. | 418385 | -| `Key` | *string* | :heavy_check_mark: | Key to access this part. | /library/parts/418385/1735864239/file.mkv | -| `Indexes` | **string* | :heavy_minus_sign: | N/A | sd | -| `Duration` | **int* | :heavy_minus_sign: | Duration of the part in milliseconds. | 9610350 | -| `File` | *string* | :heavy_check_mark: | File path for the part. | /mnt/Movies_1/W/Wicked (2024).mkv | -| `Size` | *int64* | :heavy_check_mark: | File size in bytes. | 30649952104 | -| `PacketLength` | **int* | :heavy_minus_sign: | N/A | 188 | -| `Container` | **string* | :heavy_minus_sign: | Container format of the part. | mkv | -| `VideoProfile` | **string* | :heavy_minus_sign: | Video profile for the part. | main 10 | -| `AudioProfile` | **string* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | -| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false | -| `OptimizedForStreaming` | [*operations.GetAllMediaLibraryLibraryOptimizedForStreaming](../../models/operations/getallmedialibrarylibraryoptimizedforstreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | -| `HasThumbnail` | [*operations.GetAllMediaLibraryHasThumbnail](../../models/operations/getallmedialibraryhasthumbnail.md) | :heavy_minus_sign: | N/A | 1 | -| `Stream` | [][operations.GetAllMediaLibraryStream](../../models/operations/getallmedialibrarystream.md) | :heavy_minus_sign: | An array of streams for this part. | | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibraryqueryparamtype.md b/docs/models/operations/getallmedialibraryqueryparamtype.md deleted file mode 100644 index 442775e..0000000 --- a/docs/models/operations/getallmedialibraryqueryparamtype.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetAllMediaLibraryQueryParamType - -The type of media to retrieve or filter by. -1 = movie -2 = show -3 = season -4 = episode -E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - - - -## Values - -| Name | Value | -| ----------------------------------------- | ----------------------------------------- | -| `GetAllMediaLibraryQueryParamTypeMovie` | 1 | -| `GetAllMediaLibraryQueryParamTypeTvShow` | 2 | -| `GetAllMediaLibraryQueryParamTypeSeason` | 3 | -| `GetAllMediaLibraryQueryParamTypeEpisode` | 4 | -| `GetAllMediaLibraryQueryParamTypeAudio` | 8 | -| `GetAllMediaLibraryQueryParamTypeAlbum` | 9 | -| `GetAllMediaLibraryQueryParamTypeTrack` | 10 | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibraryresponse.md b/docs/models/operations/getallmedialibraryresponse.md deleted file mode 100644 index 1bab186..0000000 --- a/docs/models/operations/getallmedialibraryresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetAllMediaLibraryResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `Object` | [*operations.GetAllMediaLibraryResponseBody](../../models/operations/getallmedialibraryresponsebody.md) | :heavy_minus_sign: | Successful response containing media container data. | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibraryresponsebody.md b/docs/models/operations/getallmedialibraryresponsebody.md deleted file mode 100644 index 6cc5673..0000000 --- a/docs/models/operations/getallmedialibraryresponsebody.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetAllMediaLibraryResponseBody - -Successful response containing media container data. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `MediaContainer` | [*operations.GetAllMediaLibraryMediaContainer](../../models/operations/getallmedialibrarymediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibrarysort.md b/docs/models/operations/getallmedialibrarysort.md deleted file mode 100644 index 7061d1a..0000000 --- a/docs/models/operations/getallmedialibrarysort.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetAllMediaLibrarySort - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `Default` | **string* | :heavy_minus_sign: | N/A | asc | -| `Active` | **bool* | :heavy_minus_sign: | N/A | false | -| `ActiveDirection` | [*operations.GetAllMediaLibraryActiveDirection](../../models/operations/getallmedialibraryactivedirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | -| `DefaultDirection` | [*operations.GetAllMediaLibraryDefaultDirection](../../models/operations/getallmedialibrarydefaultdirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | -| `DescKey` | **string* | :heavy_minus_sign: | N/A | titleSort:desc | -| `FirstCharacterKey` | **string* | :heavy_minus_sign: | N/A | /library/sections/2/firstCharacter | -| `Key` | *string* | :heavy_check_mark: | N/A | titleSort | -| `Title` | *string* | :heavy_check_mark: | N/A | Title | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibrarystream.md b/docs/models/operations/getallmedialibrarystream.md deleted file mode 100644 index 0e29647..0000000 --- a/docs/models/operations/getallmedialibrarystream.md +++ /dev/null @@ -1,58 +0,0 @@ -# GetAllMediaLibraryStream - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `ID` | *int64* | :heavy_check_mark: | Unique stream identifier. | 1002625 | -| `StreamType` | [operations.GetAllMediaLibraryStreamType](../../models/operations/getallmedialibrarystreamtype.md) | :heavy_check_mark: | Stream type:
- 1 = video
- 2 = audio
- 3 = subtitle
| 1 | -| `Format` | **string* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt | -| `Default` | **bool* | :heavy_minus_sign: | Indicates if this stream is default. | true | -| `Codec` | *string* | :heavy_check_mark: | Codec used by the stream. | hevc | -| `Index` | **int* | :heavy_minus_sign: | Index of the stream. | 0 | -| `Bitrate` | **int* | :heavy_minus_sign: | Bitrate of the stream. | 24743 | -| `Language` | **string* | :heavy_minus_sign: | Language of the stream. | English | -| `LanguageTag` | **string* | :heavy_minus_sign: | Language tag (e.g., en). | en | -| `LanguageCode` | **string* | :heavy_minus_sign: | ISO language code. | eng | -| `HeaderCompression` | **bool* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true | -| `DOVIBLCompatID` | **int* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 | -| `DOVIBLPresent` | **bool* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true | -| `DOVIELPresent` | **bool* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false | -| `DOVILevel` | **int* | :heavy_minus_sign: | Dolby Vision level. | 6 | -| `DOVIPresent` | **bool* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true | -| `DOVIProfile` | **int* | :heavy_minus_sign: | Dolby Vision profile. | 8 | -| `DOVIRPUPresent` | **bool* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true | -| `DOVIVersion` | **string* | :heavy_minus_sign: | Dolby Vision version. | 1.0 | -| `BitDepth` | **int* | :heavy_minus_sign: | Bit depth of the video stream. | 10 | -| `ChromaLocation` | **string* | :heavy_minus_sign: | Chroma sample location. | topleft | -| `ChromaSubsampling` | **string* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 | -| `CodedHeight` | **int* | :heavy_minus_sign: | Coded video height. | 1608 | -| `CodedWidth` | **int* | :heavy_minus_sign: | Coded video width. | 3840 | -| `ClosedCaptions` | **bool* | :heavy_minus_sign: | N/A | true | -| `ColorPrimaries` | **string* | :heavy_minus_sign: | Color primaries used. | bt2020 | -| `ColorRange` | **string* | :heavy_minus_sign: | Color range (e.g., tv). | tv | -| `ColorSpace` | **string* | :heavy_minus_sign: | Color space. | bt2020nc | -| `ColorTrc` | **string* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 | -| `FrameRate` | **float32* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 | -| `Key` | **string* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 | -| `Height` | **int* | :heavy_minus_sign: | Height of the video stream. | 1602 | -| `Level` | **int* | :heavy_minus_sign: | Video level. | 150 | -| `Original` | **bool* | :heavy_minus_sign: | Indicates if this is the original stream. | true | -| `HasScalingMatrix` | **bool* | :heavy_minus_sign: | N/A | false | -| `Profile` | **string* | :heavy_minus_sign: | Video profile. | main 10 | -| `ScanType` | **string* | :heavy_minus_sign: | N/A | progressive | -| `EmbeddedInVideo` | **string* | :heavy_minus_sign: | N/A | progressive | -| `RefFrames` | **int* | :heavy_minus_sign: | Number of reference frames. | 1 | -| `Width` | **int* | :heavy_minus_sign: | Width of the video stream. | 3840 | -| `DisplayTitle` | *string* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `ExtendedDisplayTitle` | *string* | :heavy_check_mark: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | -| `Selected` | **bool* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true | -| `Forced` | **bool* | :heavy_minus_sign: | N/A | true | -| `Channels` | **int* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 | -| `AudioChannelLayout` | **string* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) | -| `SamplingRate` | **int* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 | -| `CanAutoSync` | **bool* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false | -| `HearingImpaired` | **bool* | :heavy_minus_sign: | Indicates if the stream is for the hearing impaired. | true | -| `Dub` | **bool* | :heavy_minus_sign: | Indicates if the stream is a dub. | true | -| `Title` | **string* | :heavy_minus_sign: | Optional title for the stream (e.g., language variant). | SDH | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibrarystreamtype.md b/docs/models/operations/getallmedialibrarystreamtype.md deleted file mode 100644 index b7fbaa3..0000000 --- a/docs/models/operations/getallmedialibrarystreamtype.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetAllMediaLibraryStreamType - -Stream type: - - 1 = video - - 2 = audio - - 3 = subtitle - - - -## Values - -| Name | Value | -| -------------------------------------- | -------------------------------------- | -| `GetAllMediaLibraryStreamTypeVideo` | 1 | -| `GetAllMediaLibraryStreamTypeAudio` | 2 | -| `GetAllMediaLibraryStreamTypeSubtitle` | 3 | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibrarytype.md b/docs/models/operations/getallmedialibrarytype.md deleted file mode 100644 index 4749141..0000000 --- a/docs/models/operations/getallmedialibrarytype.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetAllMediaLibraryType - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `Key` | *string* | :heavy_check_mark: | N/A | /library/sections/2/all?type=2 | -| `Type` | *string* | :heavy_check_mark: | N/A | filter | -| `Subtype` | **string* | :heavy_minus_sign: | N/A | clip | -| `Title` | *string* | :heavy_check_mark: | N/A | TV Shows | -| `Active` | *bool* | :heavy_check_mark: | N/A | false | -| `Filter` | [][operations.GetAllMediaLibraryFilter](../../models/operations/getallmedialibraryfilter.md) | :heavy_minus_sign: | N/A | | -| `Sort` | [][operations.GetAllMediaLibrarySort](../../models/operations/getallmedialibrarysort.md) | :heavy_minus_sign: | N/A | | -| `Field` | [][operations.GetAllMediaLibraryField](../../models/operations/getallmedialibraryfield.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getcountrieslibraryqueryparamtype.md b/docs/models/operations/getcountrieslibraryqueryparamtype.md index 8217e1f..44ea08a 100644 --- a/docs/models/operations/getcountrieslibraryqueryparamtype.md +++ b/docs/models/operations/getcountrieslibraryqueryparamtype.md @@ -11,12 +11,14 @@ E.g. A movie library will not return anything with type 3 as there are no season ## Values -| Name | Value | -| ------------------------------------------ | ------------------------------------------ | -| `GetCountriesLibraryQueryParamTypeMovie` | 1 | -| `GetCountriesLibraryQueryParamTypeTvShow` | 2 | -| `GetCountriesLibraryQueryParamTypeSeason` | 3 | -| `GetCountriesLibraryQueryParamTypeEpisode` | 4 | -| `GetCountriesLibraryQueryParamTypeAudio` | 8 | -| `GetCountriesLibraryQueryParamTypeAlbum` | 9 | -| `GetCountriesLibraryQueryParamTypeTrack` | 10 | \ No newline at end of file +| Name | Value | +| --------------------------------------------- | --------------------------------------------- | +| `GetCountriesLibraryQueryParamTypeMovie` | 1 | +| `GetCountriesLibraryQueryParamTypeTvShow` | 2 | +| `GetCountriesLibraryQueryParamTypeSeason` | 3 | +| `GetCountriesLibraryQueryParamTypeEpisode` | 4 | +| `GetCountriesLibraryQueryParamTypeArtist` | 5 | +| `GetCountriesLibraryQueryParamTypeAlbum` | 6 | +| `GetCountriesLibraryQueryParamTypeTrack` | 7 | +| `GetCountriesLibraryQueryParamTypePhotoAlbum` | 8 | +| `GetCountriesLibraryQueryParamTypePhoto` | 9 | \ No newline at end of file diff --git a/docs/models/operations/getgenreslibraryqueryparamtype.md b/docs/models/operations/getgenreslibraryqueryparamtype.md index 3731861..8a151cc 100644 --- a/docs/models/operations/getgenreslibraryqueryparamtype.md +++ b/docs/models/operations/getgenreslibraryqueryparamtype.md @@ -11,12 +11,14 @@ E.g. A movie library will not return anything with type 3 as there are no season ## Values -| Name | Value | -| --------------------------------------- | --------------------------------------- | -| `GetGenresLibraryQueryParamTypeMovie` | 1 | -| `GetGenresLibraryQueryParamTypeTvShow` | 2 | -| `GetGenresLibraryQueryParamTypeSeason` | 3 | -| `GetGenresLibraryQueryParamTypeEpisode` | 4 | -| `GetGenresLibraryQueryParamTypeAudio` | 8 | -| `GetGenresLibraryQueryParamTypeAlbum` | 9 | -| `GetGenresLibraryQueryParamTypeTrack` | 10 | \ No newline at end of file +| Name | Value | +| ------------------------------------------ | ------------------------------------------ | +| `GetGenresLibraryQueryParamTypeMovie` | 1 | +| `GetGenresLibraryQueryParamTypeTvShow` | 2 | +| `GetGenresLibraryQueryParamTypeSeason` | 3 | +| `GetGenresLibraryQueryParamTypeEpisode` | 4 | +| `GetGenresLibraryQueryParamTypeArtist` | 5 | +| `GetGenresLibraryQueryParamTypeAlbum` | 6 | +| `GetGenresLibraryQueryParamTypeTrack` | 7 | +| `GetGenresLibraryQueryParamTypePhotoAlbum` | 8 | +| `GetGenresLibraryQueryParamTypePhoto` | 9 | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemslibrarytype.md b/docs/models/operations/getlibraryitemslibrarytype.md index d462120..da9b757 100644 --- a/docs/models/operations/getlibraryitemslibrarytype.md +++ b/docs/models/operations/getlibraryitemslibrarytype.md @@ -1,16 +1,20 @@ # GetLibraryItemsLibraryType -The type of media content +The type of media content in the Plex library. This can represent videos, music, or photos. ## Values -| Name | Value | -| ----------------------------------- | ----------------------------------- | -| `GetLibraryItemsLibraryTypeMovie` | movie | -| `GetLibraryItemsLibraryTypeTvShow` | show | -| `GetLibraryItemsLibraryTypeSeason` | season | -| `GetLibraryItemsLibraryTypeEpisode` | episode | -| `GetLibraryItemsLibraryTypeArtist` | artist | -| `GetLibraryItemsLibraryTypeAlbum` | album | \ No newline at end of file +| Name | Value | +| -------------------------------------- | -------------------------------------- | +| `GetLibraryItemsLibraryTypeMovie` | movie | +| `GetLibraryItemsLibraryTypeTvShow` | show | +| `GetLibraryItemsLibraryTypeSeason` | season | +| `GetLibraryItemsLibraryTypeEpisode` | episode | +| `GetLibraryItemsLibraryTypeArtist` | artist | +| `GetLibraryItemsLibraryTypeAlbum` | album | +| `GetLibraryItemsLibraryTypeTrack` | track | +| `GetLibraryItemsLibraryTypePhotoAlbum` | photoalbum | +| `GetLibraryItemsLibraryTypePhoto` | photo | +| `GetLibraryItemsLibraryTypeCollection` | collection | \ No newline at end of file diff --git a/docs/models/operations/getlibraryitemsmetadata.md b/docs/models/operations/getlibraryitemsmetadata.md index 9d0c81e..208525f 100644 --- a/docs/models/operations/getlibraryitemsmetadata.md +++ b/docs/models/operations/getlibraryitemsmetadata.md @@ -13,7 +13,7 @@ | `LibrarySectionID` | **int64* | :heavy_minus_sign: | N/A | 1 | | `LibrarySectionTitle` | **string* | :heavy_minus_sign: | N/A | Movies | | `LibrarySectionKey` | **string* | :heavy_minus_sign: | N/A | /library/sections/1 | -| `Type` | [operations.GetLibraryItemsLibraryType](../../models/operations/getlibraryitemslibrarytype.md) | :heavy_check_mark: | The type of media content
| movie | +| `Type` | [operations.GetLibraryItemsLibraryType](../../models/operations/getlibraryitemslibrarytype.md) | :heavy_check_mark: | The type of media content in the Plex library. This can represent videos, music, or photos.
| movie | | `Title` | *string* | :heavy_check_mark: | N/A | Avatar: The Way of Water | | `Slug` | **string* | :heavy_minus_sign: | N/A | 4-for-texas | | `ContentRating` | **string* | :heavy_minus_sign: | N/A | PG-13 | diff --git a/docs/models/operations/getlibraryitemsqueryparamtype.md b/docs/models/operations/getlibraryitemsqueryparamtype.md index 2abc97b..60d1cc2 100644 --- a/docs/models/operations/getlibraryitemsqueryparamtype.md +++ b/docs/models/operations/getlibraryitemsqueryparamtype.md @@ -11,12 +11,14 @@ E.g. A movie library will not return anything with type 3 as there are no season ## Values -| Name | Value | -| -------------------------------------- | -------------------------------------- | -| `GetLibraryItemsQueryParamTypeMovie` | 1 | -| `GetLibraryItemsQueryParamTypeTvShow` | 2 | -| `GetLibraryItemsQueryParamTypeSeason` | 3 | -| `GetLibraryItemsQueryParamTypeEpisode` | 4 | -| `GetLibraryItemsQueryParamTypeAudio` | 8 | -| `GetLibraryItemsQueryParamTypeAlbum` | 9 | -| `GetLibraryItemsQueryParamTypeTrack` | 10 | \ No newline at end of file +| Name | Value | +| ----------------------------------------- | ----------------------------------------- | +| `GetLibraryItemsQueryParamTypeMovie` | 1 | +| `GetLibraryItemsQueryParamTypeTvShow` | 2 | +| `GetLibraryItemsQueryParamTypeSeason` | 3 | +| `GetLibraryItemsQueryParamTypeEpisode` | 4 | +| `GetLibraryItemsQueryParamTypeArtist` | 5 | +| `GetLibraryItemsQueryParamTypeAlbum` | 6 | +| `GetLibraryItemsQueryParamTypeTrack` | 7 | +| `GetLibraryItemsQueryParamTypePhotoAlbum` | 8 | +| `GetLibraryItemsQueryParamTypePhoto` | 9 | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibraryqueryparamincludemeta.md b/docs/models/operations/getlibrarysectionsallactivedirection.md similarity index 57% rename from docs/models/operations/getallmedialibraryqueryparamincludemeta.md rename to docs/models/operations/getlibrarysectionsallactivedirection.md index d3b34ef..6b8914c 100644 --- a/docs/models/operations/getallmedialibraryqueryparamincludemeta.md +++ b/docs/models/operations/getlibrarysectionsallactivedirection.md @@ -1,6 +1,6 @@ -# GetAllMediaLibraryQueryParamIncludeMeta +# GetLibrarySectionsAllActiveDirection -Adds the Meta object to the response +The direction of the sort. Can be either `asc` or `desc`. @@ -8,5 +8,5 @@ Adds the Meta object to the response | Name | Value | | ------------------------------------------------ | ------------------------------------------------ | -| `GetAllMediaLibraryQueryParamIncludeMetaDisable` | 0 | -| `GetAllMediaLibraryQueryParamIncludeMetaEnable` | 1 | \ No newline at end of file +| `GetLibrarySectionsAllActiveDirectionAscending` | asc | +| `GetLibrarySectionsAllActiveDirectionDescending` | desc | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibrarycollection.md b/docs/models/operations/getlibrarysectionsallcollection.md similarity index 96% rename from docs/models/operations/getallmedialibrarycollection.md rename to docs/models/operations/getlibrarysectionsallcollection.md index 73bb1dd..6a5ba61 100644 --- a/docs/models/operations/getallmedialibrarycollection.md +++ b/docs/models/operations/getlibrarysectionsallcollection.md @@ -1,4 +1,4 @@ -# GetAllMediaLibraryCollection +# GetLibrarySectionsAllCollection ## Fields diff --git a/docs/models/operations/getallmedialibrarycountry.md b/docs/models/operations/getlibrarysectionsallcountry.md similarity index 95% rename from docs/models/operations/getallmedialibrarycountry.md rename to docs/models/operations/getlibrarysectionsallcountry.md index 4be36e5..8f7c182 100644 --- a/docs/models/operations/getallmedialibrarycountry.md +++ b/docs/models/operations/getlibrarysectionsallcountry.md @@ -1,4 +1,4 @@ -# GetAllMediaLibraryCountry +# GetLibrarySectionsAllCountry ## Fields diff --git a/docs/models/operations/getlibrarysectionsalldefaultdirection.md b/docs/models/operations/getlibrarysectionsalldefaultdirection.md new file mode 100644 index 0000000..0f966f0 --- /dev/null +++ b/docs/models/operations/getlibrarysectionsalldefaultdirection.md @@ -0,0 +1,12 @@ +# GetLibrarySectionsAllDefaultDirection + +The direction of the sort. Can be either `asc` or `desc`. + + + +## Values + +| Name | Value | +| ------------------------------------------------- | ------------------------------------------------- | +| `GetLibrarySectionsAllDefaultDirectionAscending` | asc | +| `GetLibrarySectionsAllDefaultDirectionDescending` | desc | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibrarydirector.md b/docs/models/operations/getlibrarysectionsalldirector.md similarity index 91% rename from docs/models/operations/getallmedialibrarydirector.md rename to docs/models/operations/getlibrarysectionsalldirector.md index 9cbd384..734b296 100644 --- a/docs/models/operations/getallmedialibrarydirector.md +++ b/docs/models/operations/getlibrarysectionsalldirector.md @@ -1,4 +1,4 @@ -# GetAllMediaLibraryDirector +# GetLibrarySectionsAllDirector ## Fields diff --git a/docs/models/operations/getallmedialibraryfield.md b/docs/models/operations/getlibrarysectionsallfield.md similarity index 95% rename from docs/models/operations/getallmedialibraryfield.md rename to docs/models/operations/getlibrarysectionsallfield.md index 9b052bb..859db65 100644 --- a/docs/models/operations/getallmedialibraryfield.md +++ b/docs/models/operations/getlibrarysectionsallfield.md @@ -1,4 +1,4 @@ -# GetAllMediaLibraryField +# GetLibrarySectionsAllField ## Fields diff --git a/docs/models/operations/getlibrarysectionsallfieldtype.md b/docs/models/operations/getlibrarysectionsallfieldtype.md new file mode 100644 index 0000000..24b5001 --- /dev/null +++ b/docs/models/operations/getlibrarysectionsallfieldtype.md @@ -0,0 +1,9 @@ +# GetLibrarySectionsAllFieldType + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `Type` | *string* | :heavy_check_mark: | N/A | tag | +| `Operator` | [][operations.GetLibrarySectionsAllOperator](../../models/operations/getlibrarysectionsalloperator.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibraryfilter.md b/docs/models/operations/getlibrarysectionsallfilter.md similarity index 97% rename from docs/models/operations/getallmedialibraryfilter.md rename to docs/models/operations/getlibrarysectionsallfilter.md index c49e7d5..5f26bef 100644 --- a/docs/models/operations/getallmedialibraryfilter.md +++ b/docs/models/operations/getlibrarysectionsallfilter.md @@ -1,4 +1,4 @@ -# GetAllMediaLibraryFilter +# GetLibrarySectionsAllFilter ## Fields diff --git a/docs/models/operations/getallmedialibrarygenre.md b/docs/models/operations/getlibrarysectionsallgenre.md similarity index 95% rename from docs/models/operations/getallmedialibrarygenre.md rename to docs/models/operations/getlibrarysectionsallgenre.md index 26739a5..8e47801 100644 --- a/docs/models/operations/getallmedialibrarygenre.md +++ b/docs/models/operations/getlibrarysectionsallgenre.md @@ -1,4 +1,4 @@ -# GetAllMediaLibraryGenre +# GetLibrarySectionsAllGenre ## Fields diff --git a/docs/models/operations/getlibrarysectionsallguids.md b/docs/models/operations/getlibrarysectionsallguids.md new file mode 100644 index 0000000..8eb152c --- /dev/null +++ b/docs/models/operations/getlibrarysectionsallguids.md @@ -0,0 +1,8 @@ +# GetLibrarySectionsAllGuids + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ID` | *string* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
| {
"imdbExample": {
"summary": "IMDB example",
"value": "imdb://tt13015952"
},
"tmdbExample": {
"summary": "TMDB example",
"value": "tmdb://2434012"
},
"tvdbExample": {
"summary": "TVDB example",
"value": "tvdb://7945991"
}
} | \ No newline at end of file diff --git a/docs/models/operations/getlibrarysectionsallhasthumbnail.md b/docs/models/operations/getlibrarysectionsallhasthumbnail.md new file mode 100644 index 0000000..1ab3032 --- /dev/null +++ b/docs/models/operations/getlibrarysectionsallhasthumbnail.md @@ -0,0 +1,11 @@ +# GetLibrarySectionsAllHasThumbnail + +Indicates if the part has a thumbnail. + + +## Values + +| Name | Value | +| ---------------------------------------- | ---------------------------------------- | +| `GetLibrarySectionsAllHasThumbnailFalse` | 0 | +| `GetLibrarySectionsAllHasThumbnailTrue` | 1 | \ No newline at end of file diff --git a/docs/models/operations/getlibrarysectionsallimage.md b/docs/models/operations/getlibrarysectionsallimage.md new file mode 100644 index 0000000..e09cd30 --- /dev/null +++ b/docs/models/operations/getlibrarysectionsallimage.md @@ -0,0 +1,10 @@ +# GetLibrarySectionsAllImage + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `Alt` | *string* | :heavy_check_mark: | N/A | Episode 1 | +| `Type` | [operations.GetLibrarySectionsAllLibraryResponseType](../../models/operations/getlibrarysectionsalllibraryresponsetype.md) | :heavy_check_mark: | N/A | background | +| `URL` | *string* | :heavy_check_mark: | N/A | /library/metadata/45521/thumb/1644710589 | \ No newline at end of file diff --git a/docs/models/operations/getlibrarysectionsalllibraryoptimizedforstreaming.md b/docs/models/operations/getlibrarysectionsalllibraryoptimizedforstreaming.md new file mode 100644 index 0000000..1971cac --- /dev/null +++ b/docs/models/operations/getlibrarysectionsalllibraryoptimizedforstreaming.md @@ -0,0 +1,19 @@ +# GetLibrarySectionsAllLibraryOptimizedForStreaming + +Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + + +## Supported Types + +### GetLibrarySectionsAllOptimizedForStreaming1 + +```go +getLibrarySectionsAllLibraryOptimizedForStreaming := operations.CreateGetLibrarySectionsAllLibraryOptimizedForStreamingGetLibrarySectionsAllOptimizedForStreaming1(operations.GetLibrarySectionsAllOptimizedForStreaming1{/* values here */}) +``` + +### + +```go +getLibrarySectionsAllLibraryOptimizedForStreaming := operations.CreateGetLibrarySectionsAllLibraryOptimizedForStreamingBoolean(bool{/* values here */}) +``` + diff --git a/docs/models/operations/getlibrarysectionsalllibraryresponsetype.md b/docs/models/operations/getlibrarysectionsalllibraryresponsetype.md new file mode 100644 index 0000000..ab34bc2 --- /dev/null +++ b/docs/models/operations/getlibrarysectionsalllibraryresponsetype.md @@ -0,0 +1,11 @@ +# GetLibrarySectionsAllLibraryResponseType + + +## Values + +| Name | Value | +| ----------------------------------------------------- | ----------------------------------------------------- | +| `GetLibrarySectionsAllLibraryResponseTypeCoverPoster` | coverPoster | +| `GetLibrarySectionsAllLibraryResponseTypeBackground` | background | +| `GetLibrarySectionsAllLibraryResponseTypeSnapshot` | snapshot | +| `GetLibrarySectionsAllLibraryResponseTypeClearLogo` | clearLogo | \ No newline at end of file diff --git a/docs/models/operations/getlibrarysectionsalllibrarytype.md b/docs/models/operations/getlibrarysectionsalllibrarytype.md new file mode 100644 index 0000000..f2a7de2 --- /dev/null +++ b/docs/models/operations/getlibrarysectionsalllibrarytype.md @@ -0,0 +1,20 @@ +# GetLibrarySectionsAllLibraryType + +The type of media content in the Plex library. This can represent videos, music, or photos. + + + +## Values + +| Name | Value | +| -------------------------------------------- | -------------------------------------------- | +| `GetLibrarySectionsAllLibraryTypeMovie` | movie | +| `GetLibrarySectionsAllLibraryTypeTvShow` | show | +| `GetLibrarySectionsAllLibraryTypeSeason` | season | +| `GetLibrarySectionsAllLibraryTypeEpisode` | episode | +| `GetLibrarySectionsAllLibraryTypeArtist` | artist | +| `GetLibrarySectionsAllLibraryTypeAlbum` | album | +| `GetLibrarySectionsAllLibraryTypeTrack` | track | +| `GetLibrarySectionsAllLibraryTypePhotoAlbum` | photoalbum | +| `GetLibrarySectionsAllLibraryTypePhoto` | photo | +| `GetLibrarySectionsAllLibraryTypeCollection` | collection | \ No newline at end of file diff --git a/docs/models/operations/getlibrarysectionsallmedia.md b/docs/models/operations/getlibrarysectionsallmedia.md new file mode 100644 index 0000000..36886d2 --- /dev/null +++ b/docs/models/operations/getlibrarysectionsallmedia.md @@ -0,0 +1,26 @@ +# GetLibrarySectionsAllMedia + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `ID` | *int64* | :heavy_check_mark: | Unique media identifier. | 387322 | +| `Duration` | **int* | :heavy_minus_sign: | Duration of the media in milliseconds. | 9610350 | +| `Bitrate` | **int* | :heavy_minus_sign: | Bitrate in bits per second. | 25512 | +| `Width` | **int* | :heavy_minus_sign: | Video width in pixels. | 3840 | +| `Height` | **int* | :heavy_minus_sign: | Video height in pixels. | 1602 | +| `AspectRatio` | **float32* | :heavy_minus_sign: | Aspect ratio of the video. | 2.35 | +| `AudioChannels` | **int* | :heavy_minus_sign: | Number of audio channels. | 6 | +| `DisplayOffset` | **int* | :heavy_minus_sign: | N/A | 50 | +| `AudioCodec` | **string* | :heavy_minus_sign: | Audio codec used. | eac3 | +| `VideoCodec` | **string* | :heavy_minus_sign: | Video codec used. | hevc | +| `VideoResolution` | **string* | :heavy_minus_sign: | Video resolution (e.g., 4k). | 4k | +| `Container` | **string* | :heavy_minus_sign: | File container type. | mkv | +| `VideoFrameRate` | **string* | :heavy_minus_sign: | Frame rate of the video. Values found include NTSC, PAL, 24p
| 24p | +| `VideoProfile` | **string* | :heavy_minus_sign: | Video profile (e.g., main 10). | main 10 | +| `HasVoiceActivity` | **bool* | :heavy_minus_sign: | Indicates whether voice activity is detected. | false | +| `AudioProfile` | **string* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | +| `OptimizedForStreaming` | [*operations.GetLibrarySectionsAllOptimizedForStreaming](../../models/operations/getlibrarysectionsalloptimizedforstreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | +| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false | +| `Part` | [][operations.GetLibrarySectionsAllPart](../../models/operations/getlibrarysectionsallpart.md) | :heavy_minus_sign: | An array of parts for this media item. | | \ No newline at end of file diff --git a/docs/models/operations/getlibrarysectionsallmediacontainer.md b/docs/models/operations/getlibrarysectionsallmediacontainer.md new file mode 100644 index 0000000..4b871d3 --- /dev/null +++ b/docs/models/operations/getlibrarysectionsallmediacontainer.md @@ -0,0 +1,26 @@ +# GetLibrarySectionsAllMediaContainer + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `Size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | +| `TotalSize` | *int* | :heavy_check_mark: | Total number of media items in the library. | 50 | +| `Offset` | *int64* | :heavy_check_mark: | Offset value for pagination. | 0 | +| `AllowSync` | *bool* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | +| `Art` | *string* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg | +| `Content` | *string* | :heavy_check_mark: | The content type or mode. | secondary | +| `Identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | +| `LibrarySectionID` | *int64* | :heavy_check_mark: | The unique identifier for the library section. | 2 | +| `LibrarySectionTitle` | *string* | :heavy_check_mark: | The title of the library section. | TV Series | +| `LibrarySectionUUID` | **string* | :heavy_minus_sign: | The universally unique identifier for the library section. | e69655a2-ef48-4aba-bb19-0cc34d1e7d36 | +| `MediaTagPrefix` | *string* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | +| `MediaTagVersion` | *int64* | :heavy_check_mark: | The version number for media tags. | 1734362201 | +| `Thumb` | *string* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png | +| `Nocache` | *bool* | :heavy_check_mark: | Specifies whether caching is disabled. | true | +| `Title1` | *string* | :heavy_check_mark: | The primary title of the media container. | TV Series | +| `Title2` | *string* | :heavy_check_mark: | The secondary title of the media container. | By Starring Actor | +| `ViewGroup` | *string* | :heavy_check_mark: | Identifier for the view group layout. | secondary | +| `Meta` | [*operations.GetLibrarySectionsAllMeta](../../models/operations/getlibrarysectionsallmeta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.
| | +| `Metadata` | [][operations.GetLibrarySectionsAllMetadata](../../models/operations/getlibrarysectionsallmetadata.md) | :heavy_minus_sign: | An array of metadata items. | | \ No newline at end of file diff --git a/docs/models/sdkerrors/getallmedialibraryunauthorized.md b/docs/models/operations/getlibrarysectionsallmeta.md similarity index 62% rename from docs/models/sdkerrors/getallmedialibraryunauthorized.md rename to docs/models/operations/getlibrarysectionsallmeta.md index c41c5cb..03f64f7 100644 --- a/docs/models/sdkerrors/getallmedialibraryunauthorized.md +++ b/docs/models/operations/getlibrarysectionsallmeta.md @@ -1,11 +1,12 @@ -# GetAllMediaLibraryUnauthorized +# GetLibrarySectionsAllMeta + +The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Fields | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `Errors` | [][sdkerrors.GetAllMediaLibraryLibraryErrors](../../models/sdkerrors/getallmedialibrarylibraryerrors.md) | :heavy_minus_sign: | N/A | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `Type` | [][operations.GetLibrarySectionsAllType](../../models/operations/getlibrarysectionsalltype.md) | :heavy_minus_sign: | N/A | +| `FieldType` | [][operations.GetLibrarySectionsAllFieldType](../../models/operations/getlibrarysectionsallfieldtype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibrarymetadata.md b/docs/models/operations/getlibrarysectionsallmetadata.md similarity index 97% rename from docs/models/operations/getallmedialibrarymetadata.md rename to docs/models/operations/getlibrarysectionsallmetadata.md index b38e46f..8002869 100644 --- a/docs/models/operations/getallmedialibrarymetadata.md +++ b/docs/models/operations/getlibrarysectionsallmetadata.md @@ -1,4 +1,4 @@ -# GetAllMediaLibraryMetadata +# GetLibrarySectionsAllMetadata Unknown @@ -13,7 +13,7 @@ Unknown | `GUID` | *string* | :heavy_check_mark: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 | | `Slug` | *string* | :heavy_check_mark: | A URL‐friendly version of the media title. | 4-for-texas | | `Studio` | **string* | :heavy_minus_sign: | The studio that produced the media item. | 20th Century Studios | -| `Type` | [operations.GetAllMediaLibraryLibraryType](../../models/operations/getallmedialibrarylibrarytype.md) | :heavy_check_mark: | N/A | movie | +| `Type` | [operations.GetLibrarySectionsAllLibraryType](../../models/operations/getlibrarysectionsalllibrarytype.md) | :heavy_check_mark: | N/A | movie | | `Title` | *string* | :heavy_check_mark: | The title of the media item. | Avatar: The Way of Water | | `TitleSort` | *string* | :heavy_check_mark: | The sort title used for ordering media items. | Whale | | `ContentRating` | **string* | :heavy_minus_sign: | The content rating for the media item. | PG-13 | @@ -62,13 +62,13 @@ Unknown | `CreatedAtTZOffset` | **string* | :heavy_minus_sign: | The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. | 0 | | `LastViewedAt` | **int* | :heavy_minus_sign: | Unix timestamp for when the media item was last viewed. | 1682752242 | | `UserRating` | **float32* | :heavy_minus_sign: | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 | -| `Image` | [][operations.GetAllMediaLibraryImage](../../models/operations/getallmedialibraryimage.md) | :heavy_minus_sign: | N/A | | -| `UltraBlurColors` | [*operations.GetAllMediaLibraryUltraBlurColors](../../models/operations/getallmedialibraryultrablurcolors.md) | :heavy_minus_sign: | N/A | | -| `Media` | [][operations.GetAllMediaLibraryMedia](../../models/operations/getallmedialibrarymedia.md) | :heavy_minus_sign: | N/A | | -| `Genre` | [][operations.GetAllMediaLibraryGenre](../../models/operations/getallmedialibrarygenre.md) | :heavy_minus_sign: | N/A | | -| `Country` | [][operations.GetAllMediaLibraryCountry](../../models/operations/getallmedialibrarycountry.md) | :heavy_minus_sign: | N/A | | -| `Director` | [][operations.GetAllMediaLibraryDirector](../../models/operations/getallmedialibrarydirector.md) | :heavy_minus_sign: | N/A | | -| `Writer` | [][operations.GetAllMediaLibraryWriter](../../models/operations/getallmedialibrarywriter.md) | :heavy_minus_sign: | N/A | | -| `Role` | [][operations.GetAllMediaLibraryRole](../../models/operations/getallmedialibraryrole.md) | :heavy_minus_sign: | N/A | | -| `Guids` | [][operations.GetAllMediaLibraryGuids](../../models/operations/getallmedialibraryguids.md) | :heavy_minus_sign: | N/A | | -| `Collection` | [][operations.GetAllMediaLibraryCollection](../../models/operations/getallmedialibrarycollection.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `Image` | [][operations.GetLibrarySectionsAllImage](../../models/operations/getlibrarysectionsallimage.md) | :heavy_minus_sign: | N/A | | +| `UltraBlurColors` | [*operations.GetLibrarySectionsAllUltraBlurColors](../../models/operations/getlibrarysectionsallultrablurcolors.md) | :heavy_minus_sign: | N/A | | +| `Guids` | [][operations.GetLibrarySectionsAllGuids](../../models/operations/getlibrarysectionsallguids.md) | :heavy_minus_sign: | N/A | | +| `Media` | [][operations.GetLibrarySectionsAllMedia](../../models/operations/getlibrarysectionsallmedia.md) | :heavy_minus_sign: | N/A | | +| `Genre` | [][operations.GetLibrarySectionsAllGenre](../../models/operations/getlibrarysectionsallgenre.md) | :heavy_minus_sign: | N/A | | +| `Country` | [][operations.GetLibrarySectionsAllCountry](../../models/operations/getlibrarysectionsallcountry.md) | :heavy_minus_sign: | N/A | | +| `Director` | [][operations.GetLibrarySectionsAllDirector](../../models/operations/getlibrarysectionsalldirector.md) | :heavy_minus_sign: | N/A | | +| `Writer` | [][operations.GetLibrarySectionsAllWriter](../../models/operations/getlibrarysectionsallwriter.md) | :heavy_minus_sign: | N/A | | +| `Role` | [][operations.GetLibrarySectionsAllRole](../../models/operations/getlibrarysectionsallrole.md) | :heavy_minus_sign: | N/A | | +| `Collection` | [][operations.GetLibrarySectionsAllCollection](../../models/operations/getlibrarysectionsallcollection.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibraryoperator.md b/docs/models/operations/getlibrarysectionsalloperator.md similarity index 93% rename from docs/models/operations/getallmedialibraryoperator.md rename to docs/models/operations/getlibrarysectionsalloperator.md index f42bb21..36d9bad 100644 --- a/docs/models/operations/getallmedialibraryoperator.md +++ b/docs/models/operations/getlibrarysectionsalloperator.md @@ -1,4 +1,4 @@ -# GetAllMediaLibraryOperator +# GetLibrarySectionsAllOperator ## Fields diff --git a/docs/models/operations/getlibrarysectionsalloptimizedforstreaming.md b/docs/models/operations/getlibrarysectionsalloptimizedforstreaming.md new file mode 100644 index 0000000..43e8296 --- /dev/null +++ b/docs/models/operations/getlibrarysectionsalloptimizedforstreaming.md @@ -0,0 +1,19 @@ +# GetLibrarySectionsAllOptimizedForStreaming + +Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true + + +## Supported Types + +### OptimizedForStreaming1 + +```go +getLibrarySectionsAllOptimizedForStreaming := operations.CreateGetLibrarySectionsAllOptimizedForStreamingOptimizedForStreaming1(operations.OptimizedForStreaming1{/* values here */}) +``` + +### + +```go +getLibrarySectionsAllOptimizedForStreaming := operations.CreateGetLibrarySectionsAllOptimizedForStreamingBoolean(bool{/* values here */}) +``` + diff --git a/docs/models/operations/getlibrarysectionsalloptimizedforstreaming1.md b/docs/models/operations/getlibrarysectionsalloptimizedforstreaming1.md new file mode 100644 index 0000000..ef4e5e6 --- /dev/null +++ b/docs/models/operations/getlibrarysectionsalloptimizedforstreaming1.md @@ -0,0 +1,9 @@ +# GetLibrarySectionsAllOptimizedForStreaming1 + + +## Values + +| Name | Value | +| ------------------------------------------------- | ------------------------------------------------- | +| `GetLibrarySectionsAllOptimizedForStreaming1Zero` | 0 | +| `GetLibrarySectionsAllOptimizedForStreaming1One` | 1 | \ No newline at end of file diff --git a/docs/models/operations/getlibrarysectionsallpart.md b/docs/models/operations/getlibrarysectionsallpart.md new file mode 100644 index 0000000..9c67c1c --- /dev/null +++ b/docs/models/operations/getlibrarysectionsallpart.md @@ -0,0 +1,23 @@ +# GetLibrarySectionsAllPart + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `Accessible` | **bool* | :heavy_minus_sign: | Indicates if the part is accessible. | true | +| `Exists` | **bool* | :heavy_minus_sign: | Indicates if the part exists. | true | +| `ID` | *int64* | :heavy_check_mark: | Unique part identifier. | 418385 | +| `Key` | *string* | :heavy_check_mark: | Key to access this part. | /library/parts/418385/1735864239/file.mkv | +| `Indexes` | **string* | :heavy_minus_sign: | N/A | sd | +| `Duration` | **int* | :heavy_minus_sign: | Duration of the part in milliseconds. | 9610350 | +| `File` | *string* | :heavy_check_mark: | File path for the part. | /mnt/Movies_1/W/Wicked (2024).mkv | +| `Size` | *int64* | :heavy_check_mark: | File size in bytes. | 30649952104 | +| `PacketLength` | **int* | :heavy_minus_sign: | N/A | 188 | +| `Container` | **string* | :heavy_minus_sign: | Container format of the part. | mkv | +| `VideoProfile` | **string* | :heavy_minus_sign: | Video profile for the part. | main 10 | +| `AudioProfile` | **string* | :heavy_minus_sign: | The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). | dts | +| `Has64bitOffsets` | **bool* | :heavy_minus_sign: | N/A | false | +| `OptimizedForStreaming` | [*operations.GetLibrarySectionsAllLibraryOptimizedForStreaming](../../models/operations/getlibrarysectionsalllibraryoptimizedforstreaming.md) | :heavy_minus_sign: | Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true | | +| `HasThumbnail` | [*operations.GetLibrarySectionsAllHasThumbnail](../../models/operations/getlibrarysectionsallhasthumbnail.md) | :heavy_minus_sign: | N/A | 1 | +| `Stream` | [][operations.GetLibrarySectionsAllStream](../../models/operations/getlibrarysectionsallstream.md) | :heavy_minus_sign: | An array of streams for this part. | | \ No newline at end of file diff --git a/docs/models/operations/getlibrarysectionsallqueryparamincludemeta.md b/docs/models/operations/getlibrarysectionsallqueryparamincludemeta.md new file mode 100644 index 0000000..db650ef --- /dev/null +++ b/docs/models/operations/getlibrarysectionsallqueryparamincludemeta.md @@ -0,0 +1,12 @@ +# GetLibrarySectionsAllQueryParamIncludeMeta + +Adds the Meta object to the response + + + +## Values + +| Name | Value | +| --------------------------------------------------- | --------------------------------------------------- | +| `GetLibrarySectionsAllQueryParamIncludeMetaDisable` | 0 | +| `GetLibrarySectionsAllQueryParamIncludeMetaEnable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/getlibrarysectionsallqueryparamtype.md b/docs/models/operations/getlibrarysectionsallqueryparamtype.md new file mode 100644 index 0000000..0b765b1 --- /dev/null +++ b/docs/models/operations/getlibrarysectionsallqueryparamtype.md @@ -0,0 +1,24 @@ +# GetLibrarySectionsAllQueryParamType + +The type of media to retrieve or filter by. +1 = movie +2 = show +3 = season +4 = episode +E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + + + +## Values + +| Name | Value | +| ----------------------------------------------- | ----------------------------------------------- | +| `GetLibrarySectionsAllQueryParamTypeMovie` | 1 | +| `GetLibrarySectionsAllQueryParamTypeTvShow` | 2 | +| `GetLibrarySectionsAllQueryParamTypeSeason` | 3 | +| `GetLibrarySectionsAllQueryParamTypeEpisode` | 4 | +| `GetLibrarySectionsAllQueryParamTypeArtist` | 5 | +| `GetLibrarySectionsAllQueryParamTypeAlbum` | 6 | +| `GetLibrarySectionsAllQueryParamTypeTrack` | 7 | +| `GetLibrarySectionsAllQueryParamTypePhotoAlbum` | 8 | +| `GetLibrarySectionsAllQueryParamTypePhoto` | 9 | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibraryrequest.md b/docs/models/operations/getlibrarysectionsallrequest.md similarity index 97% rename from docs/models/operations/getallmedialibraryrequest.md rename to docs/models/operations/getlibrarysectionsallrequest.md index e55ba6f..f8a2b1f 100644 --- a/docs/models/operations/getallmedialibraryrequest.md +++ b/docs/models/operations/getlibrarysectionsallrequest.md @@ -1,4 +1,4 @@ -# GetAllMediaLibraryRequest +# GetLibrarySectionsAllRequest ## Fields @@ -6,8 +6,8 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `SectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
| 9518 | -| `Type` | [operations.GetAllMediaLibraryQueryParamType](../../models/operations/getallmedialibraryqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | -| `IncludeMeta` | [*operations.GetAllMediaLibraryQueryParamIncludeMeta](../../models/operations/getallmedialibraryqueryparamincludemeta.md) | :heavy_minus_sign: | Adds the Meta object to the response
| 1 | +| `Type` | [operations.GetLibrarySectionsAllQueryParamType](../../models/operations/getlibrarysectionsallqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | +| `IncludeMeta` | [*operations.GetLibrarySectionsAllQueryParamIncludeMeta](../../models/operations/getlibrarysectionsallqueryparamincludemeta.md) | :heavy_minus_sign: | Adds the Meta object to the response
| 1 | | `IncludeGuids` | [*operations.QueryParamIncludeGuids](../../models/operations/queryparamincludeguids.md) | :heavy_minus_sign: | Adds the Guid object to the response
| 1 | | `IncludeAdvanced` | [*operations.IncludeAdvanced](../../models/operations/includeadvanced.md) | :heavy_minus_sign: | N/A | 1 | | `IncludeCollections` | [*operations.QueryParamIncludeCollections](../../models/operations/queryparamincludecollections.md) | :heavy_minus_sign: | N/A | 1 | diff --git a/docs/models/operations/getlibrarysectionsallresponse.md b/docs/models/operations/getlibrarysectionsallresponse.md new file mode 100644 index 0000000..706151c --- /dev/null +++ b/docs/models/operations/getlibrarysectionsallresponse.md @@ -0,0 +1,11 @@ +# GetLibrarySectionsAllResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `Object` | [*operations.GetLibrarySectionsAllResponseBody](../../models/operations/getlibrarysectionsallresponsebody.md) | :heavy_minus_sign: | Successful response containing media container data. | \ No newline at end of file diff --git a/docs/models/operations/getlibrarysectionsallresponsebody.md b/docs/models/operations/getlibrarysectionsallresponsebody.md new file mode 100644 index 0000000..0e2c5dd --- /dev/null +++ b/docs/models/operations/getlibrarysectionsallresponsebody.md @@ -0,0 +1,10 @@ +# GetLibrarySectionsAllResponseBody + +Successful response containing media container data. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `MediaContainer` | [*operations.GetLibrarySectionsAllMediaContainer](../../models/operations/getlibrarysectionsallmediacontainer.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibraryrole.md b/docs/models/operations/getlibrarysectionsallrole.md similarity index 97% rename from docs/models/operations/getallmedialibraryrole.md rename to docs/models/operations/getlibrarysectionsallrole.md index d6837bb..10233d2 100644 --- a/docs/models/operations/getallmedialibraryrole.md +++ b/docs/models/operations/getlibrarysectionsallrole.md @@ -1,4 +1,4 @@ -# GetAllMediaLibraryRole +# GetLibrarySectionsAllRole ## Fields diff --git a/docs/models/operations/getlibrarysectionsallsort.md b/docs/models/operations/getlibrarysectionsallsort.md new file mode 100644 index 0000000..c31a464 --- /dev/null +++ b/docs/models/operations/getlibrarysectionsallsort.md @@ -0,0 +1,15 @@ +# GetLibrarySectionsAllSort + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `Default` | **string* | :heavy_minus_sign: | N/A | asc | +| `Active` | **bool* | :heavy_minus_sign: | N/A | false | +| `ActiveDirection` | [*operations.GetLibrarySectionsAllActiveDirection](../../models/operations/getlibrarysectionsallactivedirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | +| `DefaultDirection` | [*operations.GetLibrarySectionsAllDefaultDirection](../../models/operations/getlibrarysectionsalldefaultdirection.md) | :heavy_minus_sign: | The direction of the sort. Can be either `asc` or `desc`.
| asc | +| `DescKey` | **string* | :heavy_minus_sign: | N/A | titleSort:desc | +| `FirstCharacterKey` | **string* | :heavy_minus_sign: | N/A | /library/sections/2/firstCharacter | +| `Key` | *string* | :heavy_check_mark: | N/A | titleSort | +| `Title` | *string* | :heavy_check_mark: | N/A | Title | \ No newline at end of file diff --git a/docs/models/operations/getlibrarysectionsallstream.md b/docs/models/operations/getlibrarysectionsallstream.md new file mode 100644 index 0000000..29b2908 --- /dev/null +++ b/docs/models/operations/getlibrarysectionsallstream.md @@ -0,0 +1,58 @@ +# GetLibrarySectionsAllStream + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `ID` | *int64* | :heavy_check_mark: | Unique stream identifier. | 1002625 | +| `StreamType` | [operations.GetLibrarySectionsAllStreamType](../../models/operations/getlibrarysectionsallstreamtype.md) | :heavy_check_mark: | Stream type:
- 1 = video
- 2 = audio
- 3 = subtitle
| 1 | +| `Format` | **string* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt | +| `Default` | **bool* | :heavy_minus_sign: | Indicates if this stream is default. | true | +| `Codec` | *string* | :heavy_check_mark: | Codec used by the stream. | hevc | +| `Index` | **int* | :heavy_minus_sign: | Index of the stream. | 0 | +| `Bitrate` | **int* | :heavy_minus_sign: | Bitrate of the stream. | 24743 | +| `Language` | **string* | :heavy_minus_sign: | Language of the stream. | English | +| `LanguageTag` | **string* | :heavy_minus_sign: | Language tag (e.g., en). | en | +| `LanguageCode` | **string* | :heavy_minus_sign: | ISO language code. | eng | +| `HeaderCompression` | **bool* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true | +| `DOVIBLCompatID` | **int* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 | +| `DOVIBLPresent` | **bool* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true | +| `DOVIELPresent` | **bool* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false | +| `DOVILevel` | **int* | :heavy_minus_sign: | Dolby Vision level. | 6 | +| `DOVIPresent` | **bool* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true | +| `DOVIProfile` | **int* | :heavy_minus_sign: | Dolby Vision profile. | 8 | +| `DOVIRPUPresent` | **bool* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true | +| `DOVIVersion` | **string* | :heavy_minus_sign: | Dolby Vision version. | 1.0 | +| `BitDepth` | **int* | :heavy_minus_sign: | Bit depth of the video stream. | 10 | +| `ChromaLocation` | **string* | :heavy_minus_sign: | Chroma sample location. | topleft | +| `ChromaSubsampling` | **string* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 | +| `CodedHeight` | **int* | :heavy_minus_sign: | Coded video height. | 1608 | +| `CodedWidth` | **int* | :heavy_minus_sign: | Coded video width. | 3840 | +| `ClosedCaptions` | **bool* | :heavy_minus_sign: | N/A | true | +| `ColorPrimaries` | **string* | :heavy_minus_sign: | Color primaries used. | bt2020 | +| `ColorRange` | **string* | :heavy_minus_sign: | Color range (e.g., tv). | tv | +| `ColorSpace` | **string* | :heavy_minus_sign: | Color space. | bt2020nc | +| `ColorTrc` | **string* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 | +| `FrameRate` | **float32* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 | +| `Key` | **string* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 | +| `Height` | **int* | :heavy_minus_sign: | Height of the video stream. | 1602 | +| `Level` | **int* | :heavy_minus_sign: | Video level. | 150 | +| `Original` | **bool* | :heavy_minus_sign: | Indicates if this is the original stream. | true | +| `HasScalingMatrix` | **bool* | :heavy_minus_sign: | N/A | false | +| `Profile` | **string* | :heavy_minus_sign: | Video profile. | main 10 | +| `ScanType` | **string* | :heavy_minus_sign: | N/A | progressive | +| `EmbeddedInVideo` | **string* | :heavy_minus_sign: | N/A | progressive | +| `RefFrames` | **int* | :heavy_minus_sign: | Number of reference frames. | 1 | +| `Width` | **int* | :heavy_minus_sign: | Width of the video stream. | 3840 | +| `DisplayTitle` | *string* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | +| `ExtendedDisplayTitle` | *string* | :heavy_check_mark: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) | +| `Selected` | **bool* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true | +| `Forced` | **bool* | :heavy_minus_sign: | N/A | true | +| `Channels` | **int* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 | +| `AudioChannelLayout` | **string* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) | +| `SamplingRate` | **int* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 | +| `CanAutoSync` | **bool* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false | +| `HearingImpaired` | **bool* | :heavy_minus_sign: | Indicates if the stream is for the hearing impaired. | true | +| `Dub` | **bool* | :heavy_minus_sign: | Indicates if the stream is a dub. | true | +| `Title` | **string* | :heavy_minus_sign: | Optional title for the stream (e.g., language variant). | SDH | \ No newline at end of file diff --git a/docs/models/operations/getlibrarysectionsallstreamtype.md b/docs/models/operations/getlibrarysectionsallstreamtype.md new file mode 100644 index 0000000..8b9fdaa --- /dev/null +++ b/docs/models/operations/getlibrarysectionsallstreamtype.md @@ -0,0 +1,16 @@ +# GetLibrarySectionsAllStreamType + +Stream type: + - 1 = video + - 2 = audio + - 3 = subtitle + + + +## Values + +| Name | Value | +| ----------------------------------------- | ----------------------------------------- | +| `GetLibrarySectionsAllStreamTypeVideo` | 1 | +| `GetLibrarySectionsAllStreamTypeAudio` | 2 | +| `GetLibrarySectionsAllStreamTypeSubtitle` | 3 | \ No newline at end of file diff --git a/docs/models/operations/getlibrarysectionsalltype.md b/docs/models/operations/getlibrarysectionsalltype.md new file mode 100644 index 0000000..cff2a03 --- /dev/null +++ b/docs/models/operations/getlibrarysectionsalltype.md @@ -0,0 +1,15 @@ +# GetLibrarySectionsAllType + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `Key` | *string* | :heavy_check_mark: | N/A | /library/sections/2/all?type=2 | +| `Type` | *string* | :heavy_check_mark: | N/A | filter | +| `Subtype` | **string* | :heavy_minus_sign: | N/A | clip | +| `Title` | *string* | :heavy_check_mark: | N/A | TV Shows | +| `Active` | *bool* | :heavy_check_mark: | N/A | false | +| `Filter` | [][operations.GetLibrarySectionsAllFilter](../../models/operations/getlibrarysectionsallfilter.md) | :heavy_minus_sign: | N/A | | +| `Sort` | [][operations.GetLibrarySectionsAllSort](../../models/operations/getlibrarysectionsallsort.md) | :heavy_minus_sign: | N/A | | +| `Field` | [][operations.GetLibrarySectionsAllField](../../models/operations/getlibrarysectionsallfield.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getallmedialibraryultrablurcolors.md b/docs/models/operations/getlibrarysectionsallultrablurcolors.md similarity index 94% rename from docs/models/operations/getallmedialibraryultrablurcolors.md rename to docs/models/operations/getlibrarysectionsallultrablurcolors.md index b515745..ea42dca 100644 --- a/docs/models/operations/getallmedialibraryultrablurcolors.md +++ b/docs/models/operations/getlibrarysectionsallultrablurcolors.md @@ -1,4 +1,4 @@ -# GetAllMediaLibraryUltraBlurColors +# GetLibrarySectionsAllUltraBlurColors ## Fields diff --git a/docs/models/operations/getallmedialibrarywriter.md b/docs/models/operations/getlibrarysectionsallwriter.md similarity index 91% rename from docs/models/operations/getallmedialibrarywriter.md rename to docs/models/operations/getlibrarysectionsallwriter.md index 9c71fcb..b7e940d 100644 --- a/docs/models/operations/getallmedialibrarywriter.md +++ b/docs/models/operations/getlibrarysectionsallwriter.md @@ -1,4 +1,4 @@ -# GetAllMediaLibraryWriter +# GetLibrarySectionsAllWriter ## Fields diff --git a/docs/models/operations/getmediametadatacountry.md b/docs/models/operations/getmediametadatacountry.md index 8761ebe..45fb8db 100644 --- a/docs/models/operations/getmediametadatacountry.md +++ b/docs/models/operations/getmediametadatacountry.md @@ -5,8 +5,8 @@ The filter query string for country media items. ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `ID` | *int* | :heavy_check_mark: | N/A | 259 | -| `Tag` | *string* | :heavy_check_mark: | The country of origin of this media item | United States of America | -| `Filter` | **string* | :heavy_minus_sign: | N/A | country=19 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `ID` | *int* | :heavy_check_mark: | The unique identifier for the country.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | +| `Tag` | *string* | :heavy_check_mark: | The country of origin of this media item | United States of America | +| `Filter` | *string* | :heavy_check_mark: | N/A | country=19 | \ No newline at end of file diff --git a/docs/models/operations/getmediametadatadirector.md b/docs/models/operations/getmediametadatadirector.md index 2fc66cf..058aeb6 100644 --- a/docs/models/operations/getmediametadatadirector.md +++ b/docs/models/operations/getmediametadatadirector.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `ID` | *int* | :heavy_check_mark: | Unique identifier for the director. | 126522 | -| `Tag` | *string* | :heavy_check_mark: | The role of Director | Danny Boyle | -| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this director. | director=235876 | -| `TagKey` | **string* | :heavy_minus_sign: | A unique key associated with the director's tag, used for internal identification. | 5d776831151a60001f24d031 | -| `Thumb` | **string* | :heavy_minus_sign: | The URL of the thumbnail image for the director. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `ID` | *int* | :heavy_check_mark: | Unique identifier for the director. | 126522 | +| `Tag` | *string* | :heavy_check_mark: | The role of Director | Danny Boyle | +| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this director. | director=235876 | +| `TagKey` | *string* | :heavy_check_mark: | A unique 24-character hexadecimal key associated with the director's tag, used for internal identification. | 5d776831151a60001f24d031 | +| `Thumb` | **string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the director. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/models/operations/getmediametadatagenre.md b/docs/models/operations/getmediametadatagenre.md index 97a2e2f..991cc5c 100644 --- a/docs/models/operations/getmediametadatagenre.md +++ b/docs/models/operations/getmediametadatagenre.md @@ -5,8 +5,8 @@ The filter query string for similar items. ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `ID` | *int64* | :heavy_check_mark: | N/A | 259 | -| `Tag` | *string* | :heavy_check_mark: | The genre name of this media-item
| Crime | -| `Filter` | *string* | :heavy_check_mark: | N/A | genre=19 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `ID` | *int* | :heavy_check_mark: | The unique identifier for the genre.
NOTE: This is different for each Plex server and is not globally unique.
| 259 | +| `Tag` | *string* | :heavy_check_mark: | The genre name of this media-item
| Crime | +| `Filter` | *string* | :heavy_check_mark: | N/A | genre=19 | \ No newline at end of file diff --git a/docs/models/operations/getmediametadataguids.md b/docs/models/operations/getmediametadataguids.md index 1c52abf..26ae107 100644 --- a/docs/models/operations/getmediametadataguids.md +++ b/docs/models/operations/getmediametadataguids.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `ID` | *string* | :heavy_check_mark: | The GUID value. | imdb://tt3032476 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ID` | *string* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
| {
"imdbExample": {
"summary": "IMDB example",
"value": "imdb://tt13015952"
},
"tmdbExample": {
"summary": "TMDB example",
"value": "tmdb://2434012"
},
"tvdbExample": {
"summary": "TVDB example",
"value": "tvdb://7945991"
}
} | \ No newline at end of file diff --git a/docs/models/operations/getmediametadatametadata.md b/docs/models/operations/getmediametadatametadata.md index 4058722..83cd505 100644 --- a/docs/models/operations/getmediametadatametadata.md +++ b/docs/models/operations/getmediametadatametadata.md @@ -67,6 +67,7 @@ Unknown | `LibrarySectionID` | *int64* | :heavy_check_mark: | The identifier for the library section. | 1 | | `LibrarySectionTitle` | *string* | :heavy_check_mark: | The title of the library section. | Movies | | `LibrarySectionKey` | *string* | :heavy_check_mark: | The key corresponding to the library section. | /library/sections/1 | +| `Guids` | [][operations.GetMediaMetaDataGuids](../../models/operations/getmediametadataguids.md) | :heavy_minus_sign: | N/A | | | `Media` | [][operations.GetMediaMetaDataMedia](../../models/operations/getmediametadatamedia.md) | :heavy_minus_sign: | N/A | | | `Genre` | [][operations.GetMediaMetaDataGenre](../../models/operations/getmediametadatagenre.md) | :heavy_minus_sign: | N/A | | | `Country` | [][operations.GetMediaMetaDataCountry](../../models/operations/getmediametadatacountry.md) | :heavy_minus_sign: | N/A | | @@ -74,7 +75,6 @@ Unknown | `Writer` | [][operations.GetMediaMetaDataWriter](../../models/operations/getmediametadatawriter.md) | :heavy_minus_sign: | N/A | | | `Producer` | [][operations.GetMediaMetaDataProducer](../../models/operations/getmediametadataproducer.md) | :heavy_minus_sign: | N/A | | | `Role` | [][operations.GetMediaMetaDataRole](../../models/operations/getmediametadatarole.md) | :heavy_minus_sign: | N/A | | -| `Guids` | [][operations.GetMediaMetaDataGuids](../../models/operations/getmediametadataguids.md) | :heavy_minus_sign: | N/A | | | `Ratings` | [][operations.Ratings](../../models/operations/ratings.md) | :heavy_minus_sign: | N/A | | | `Similar` | [][operations.GetMediaMetaDataSimilar](../../models/operations/getmediametadatasimilar.md) | :heavy_minus_sign: | N/A | | | `Location` | [][operations.GetMediaMetaDataLocation](../../models/operations/getmediametadatalocation.md) | :heavy_minus_sign: | N/A | | diff --git a/docs/models/operations/getmediametadatarequest.md b/docs/models/operations/getmediametadatarequest.md index ed2d6be..639869d 100644 --- a/docs/models/operations/getmediametadatarequest.md +++ b/docs/models/operations/getmediametadatarequest.md @@ -3,19 +3,19 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `RatingKey` | *int64* | :heavy_check_mark: | the id of the library item to return the children of. | 9518 | -| `IncludeConcerts` | **bool* | :heavy_minus_sign: | Include concerts data if set to true. | true | -| `IncludeExtras` | **bool* | :heavy_minus_sign: | Include extra content (e.g. bonus features). | true | -| `IncludeOnDeck` | **bool* | :heavy_minus_sign: | Include on-deck items. | true | -| `IncludePopularLeaves` | **bool* | :heavy_minus_sign: | Include popular leaves (episodes/chapters). | true | -| `IncludePreferences` | **bool* | :heavy_minus_sign: | Include preferences information. | true | -| `IncludeReviews` | **bool* | :heavy_minus_sign: | Include reviews for the content. | true | -| `IncludeChapters` | **bool* | :heavy_minus_sign: | Include chapter details. | true | -| `IncludeStations` | **bool* | :heavy_minus_sign: | Include station data. | true | -| `IncludeExternalMedia` | **bool* | :heavy_minus_sign: | Include external media data. | true | -| `AsyncAugmentMetadata` | **bool* | :heavy_minus_sign: | Trigger asynchronous metadata augmentation. | true | -| `AsyncCheckFiles` | **bool* | :heavy_minus_sign: | Trigger asynchronous file checking. | true | -| `AsyncRefreshAnalysis` | **bool* | :heavy_minus_sign: | Trigger asynchronous refresh of analysis. | true | -| `AsyncRefreshLocalMediaAgent` | **bool* | :heavy_minus_sign: | Trigger asynchronous refresh of the local media agent. | true | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `RatingKey` | *string* | :heavy_check_mark: | The id(s) of the library item(s) to return metadata for. Can be a single ID or comma-separated list of IDs. | 21119,21617 | +| `IncludeConcerts` | **bool* | :heavy_minus_sign: | Include concerts data if set to true. | true | +| `IncludeExtras` | **bool* | :heavy_minus_sign: | Include extra content (e.g. bonus features). | true | +| `IncludeOnDeck` | **bool* | :heavy_minus_sign: | Include on-deck items. | true | +| `IncludePopularLeaves` | **bool* | :heavy_minus_sign: | Include popular leaves (episodes/chapters). | true | +| `IncludePreferences` | **bool* | :heavy_minus_sign: | Include preferences information. | true | +| `IncludeReviews` | **bool* | :heavy_minus_sign: | Include reviews for the content. | true | +| `IncludeChapters` | **bool* | :heavy_minus_sign: | Include chapter details. | true | +| `IncludeStations` | **bool* | :heavy_minus_sign: | Include station data. | true | +| `IncludeExternalMedia` | **bool* | :heavy_minus_sign: | Include external media data. | true | +| `AsyncAugmentMetadata` | **bool* | :heavy_minus_sign: | Trigger asynchronous metadata augmentation. | true | +| `AsyncCheckFiles` | **bool* | :heavy_minus_sign: | Trigger asynchronous file checking. | true | +| `AsyncRefreshAnalysis` | **bool* | :heavy_minus_sign: | Trigger asynchronous refresh of analysis. | true | +| `AsyncRefreshLocalMediaAgent` | **bool* | :heavy_minus_sign: | Trigger asynchronous refresh of the local media agent. | true | \ No newline at end of file diff --git a/docs/models/operations/getmediametadatarole.md b/docs/models/operations/getmediametadatarole.md index ba9daea..5438675 100644 --- a/docs/models/operations/getmediametadatarole.md +++ b/docs/models/operations/getmediametadatarole.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `ID` | *int64* | :heavy_check_mark: | Unique identifier for the actor or role. | 126522 | -| `Tag` | *string* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller | -| `Role` | **string* | :heavy_minus_sign: | The role played by the actor in the media item. | Self - Judge | -| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. | actor=126522 | -| `TagKey` | **string* | :heavy_minus_sign: | A unique key associated with the actor's tag, used for internal identification. | 5d77683d85719b001f3a535e | -| `Thumb` | **string* | :heavy_minus_sign: | The URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ID` | *int* | :heavy_check_mark: | The unique identifier for the role.
NOTE: This is different for each Plex server and is not globally unique.
| 126522 | +| `Tag` | *string* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller | +| `Role` | **string* | :heavy_minus_sign: | The role played by the actor in the media item. | Self - Judge | +| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. | actor=126522 | +| `TagKey` | *string* | :heavy_check_mark: | A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification.
NOTE: This is globally unique across all Plex Servers.
| 5d77683d85719b001f3a535e | +| `Thumb` | **string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file diff --git a/docs/models/operations/getmediametadatatype.md b/docs/models/operations/getmediametadatatype.md index b9df6bd..7282316 100644 --- a/docs/models/operations/getmediametadatatype.md +++ b/docs/models/operations/getmediametadatatype.md @@ -1,16 +1,20 @@ # GetMediaMetaDataType -The type of media content +The type of media content in the Plex library. This can represent videos, music, or photos. ## Values -| Name | Value | -| ----------------------------- | ----------------------------- | -| `GetMediaMetaDataTypeMovie` | movie | -| `GetMediaMetaDataTypeTvShow` | show | -| `GetMediaMetaDataTypeSeason` | season | -| `GetMediaMetaDataTypeEpisode` | episode | -| `GetMediaMetaDataTypeArtist` | artist | -| `GetMediaMetaDataTypeAlbum` | album | \ No newline at end of file +| Name | Value | +| -------------------------------- | -------------------------------- | +| `GetMediaMetaDataTypeMovie` | movie | +| `GetMediaMetaDataTypeTvShow` | show | +| `GetMediaMetaDataTypeSeason` | season | +| `GetMediaMetaDataTypeEpisode` | episode | +| `GetMediaMetaDataTypeArtist` | artist | +| `GetMediaMetaDataTypeAlbum` | album | +| `GetMediaMetaDataTypeTrack` | track | +| `GetMediaMetaDataTypePhotoAlbum` | photoalbum | +| `GetMediaMetaDataTypePhoto` | photo | +| `GetMediaMetaDataTypeCollection` | collection | \ No newline at end of file diff --git a/docs/models/operations/getmediametadatawriter.md b/docs/models/operations/getmediametadatawriter.md index 8c9934e..cb126b4 100644 --- a/docs/models/operations/getmediametadatawriter.md +++ b/docs/models/operations/getmediametadatawriter.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `ID` | *int* | :heavy_check_mark: | Unique identifier for the writer. | 126522 | -| `Tag` | *string* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson | -| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this writer. | writer=126522 | -| `Thumb` | **string* | :heavy_minus_sign: | The URL of the thumbnail image for the writer. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | -| `TagKey` | **string* | :heavy_minus_sign: | A unique key associated with the writers tag, used for internal identification. | 5d77683d85719b001f3a535e | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `ID` | *int* | :heavy_check_mark: | Unique identifier for the writer. | 126522 | +| `Tag` | *string* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson | +| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this writer. | writer=126522 | +| `Thumb` | **string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the writer. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | +| `TagKey` | **string* | :heavy_minus_sign: | A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. | 5d77683d85719b001f3a535e | \ No newline at end of file diff --git a/docs/models/operations/getplaylistcontentsqueryparamtype.md b/docs/models/operations/getplaylistcontentsqueryparamtype.md index 757e1e4..897b464 100644 --- a/docs/models/operations/getplaylistcontentsqueryparamtype.md +++ b/docs/models/operations/getplaylistcontentsqueryparamtype.md @@ -11,12 +11,14 @@ E.g. A movie library will not return anything with type 3 as there are no season ## Values -| Name | Value | -| ------------------------------------------ | ------------------------------------------ | -| `GetPlaylistContentsQueryParamTypeMovie` | 1 | -| `GetPlaylistContentsQueryParamTypeTvShow` | 2 | -| `GetPlaylistContentsQueryParamTypeSeason` | 3 | -| `GetPlaylistContentsQueryParamTypeEpisode` | 4 | -| `GetPlaylistContentsQueryParamTypeAudio` | 8 | -| `GetPlaylistContentsQueryParamTypeAlbum` | 9 | -| `GetPlaylistContentsQueryParamTypeTrack` | 10 | \ No newline at end of file +| Name | Value | +| --------------------------------------------- | --------------------------------------------- | +| `GetPlaylistContentsQueryParamTypeMovie` | 1 | +| `GetPlaylistContentsQueryParamTypeTvShow` | 2 | +| `GetPlaylistContentsQueryParamTypeSeason` | 3 | +| `GetPlaylistContentsQueryParamTypeEpisode` | 4 | +| `GetPlaylistContentsQueryParamTypeArtist` | 5 | +| `GetPlaylistContentsQueryParamTypeAlbum` | 6 | +| `GetPlaylistContentsQueryParamTypeTrack` | 7 | +| `GetPlaylistContentsQueryParamTypePhotoAlbum` | 8 | +| `GetPlaylistContentsQueryParamTypePhoto` | 9 | \ No newline at end of file diff --git a/docs/models/operations/getrecentlyaddedhubstype.md b/docs/models/operations/getrecentlyaddedhubstype.md index f8281e4..d0efe87 100644 --- a/docs/models/operations/getrecentlyaddedhubstype.md +++ b/docs/models/operations/getrecentlyaddedhubstype.md @@ -1,16 +1,20 @@ # GetRecentlyAddedHubsType -The type of media content +The type of media content in the Plex library. This can represent videos, music, or photos. ## Values -| Name | Value | -| --------------------------------- | --------------------------------- | -| `GetRecentlyAddedHubsTypeMovie` | movie | -| `GetRecentlyAddedHubsTypeTvShow` | show | -| `GetRecentlyAddedHubsTypeSeason` | season | -| `GetRecentlyAddedHubsTypeEpisode` | episode | -| `GetRecentlyAddedHubsTypeArtist` | artist | -| `GetRecentlyAddedHubsTypeAlbum` | album | \ No newline at end of file +| Name | Value | +| ------------------------------------ | ------------------------------------ | +| `GetRecentlyAddedHubsTypeMovie` | movie | +| `GetRecentlyAddedHubsTypeTvShow` | show | +| `GetRecentlyAddedHubsTypeSeason` | season | +| `GetRecentlyAddedHubsTypeEpisode` | episode | +| `GetRecentlyAddedHubsTypeArtist` | artist | +| `GetRecentlyAddedHubsTypeAlbum` | album | +| `GetRecentlyAddedHubsTypeTrack` | track | +| `GetRecentlyAddedHubsTypePhotoAlbum` | photoalbum | +| `GetRecentlyAddedHubsTypePhoto` | photo | +| `GetRecentlyAddedHubsTypeCollection` | collection | \ No newline at end of file diff --git a/docs/models/operations/getrecentlyaddedmetadata.md b/docs/models/operations/getrecentlyaddedmetadata.md index 3025000..068537b 100644 --- a/docs/models/operations/getrecentlyaddedmetadata.md +++ b/docs/models/operations/getrecentlyaddedmetadata.md @@ -71,6 +71,7 @@ Unknown | `Year` | **int* | :heavy_minus_sign: | The release year of the media item. | 2022 | | `Image` | [][operations.GetRecentlyAddedImage](../../models/operations/getrecentlyaddedimage.md) | :heavy_minus_sign: | N/A | | | `UltraBlurColors` | [*operations.UltraBlurColors](../../models/operations/ultrablurcolors.md) | :heavy_minus_sign: | N/A | | +| `Guids` | [][operations.Guids](../../models/operations/guids.md) | :heavy_minus_sign: | N/A | | | `Media` | [][operations.Media](../../models/operations/media.md) | :heavy_minus_sign: | N/A | | | `Genre` | [][operations.Genre](../../models/operations/genre.md) | :heavy_minus_sign: | N/A | | | `Country` | [][operations.Country](../../models/operations/country.md) | :heavy_minus_sign: | N/A | | @@ -81,5 +82,4 @@ Unknown | `Rating1` | [][operations.Rating](../../models/operations/rating.md) | :heavy_minus_sign: | N/A | | | `Similar` | [][operations.Similar](../../models/operations/similar.md) | :heavy_minus_sign: | N/A | | | `Location` | [][operations.Location](../../models/operations/location.md) | :heavy_minus_sign: | N/A | | -| `Guids` | [][operations.Guids](../../models/operations/guids.md) | :heavy_minus_sign: | N/A | | | `Collection` | [][operations.Collection](../../models/operations/collection.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getsearchalllibrariesmetadata.md b/docs/models/operations/getsearchalllibrariesmetadata.md index 55ae019..e0f78f2 100644 --- a/docs/models/operations/getsearchalllibrariesmetadata.md +++ b/docs/models/operations/getsearchalllibrariesmetadata.md @@ -13,7 +13,7 @@ | `LibrarySectionID` | **int64* | :heavy_minus_sign: | N/A | 1 | | `LibrarySectionTitle` | **string* | :heavy_minus_sign: | N/A | Movies | | `LibrarySectionKey` | **string* | :heavy_minus_sign: | N/A | /library/sections/1 | -| `Type` | [operations.GetSearchAllLibrariesType](../../models/operations/getsearchalllibrariestype.md) | :heavy_check_mark: | The type of media content
| movie | +| `Type` | [operations.GetSearchAllLibrariesType](../../models/operations/getsearchalllibrariestype.md) | :heavy_check_mark: | The type of media content in the Plex library. This can represent videos, music, or photos.
| movie | | `Title` | *string* | :heavy_check_mark: | N/A | Avatar: The Way of Water | | `Slug` | **string* | :heavy_minus_sign: | N/A | 4-for-texas | | `ContentRating` | **string* | :heavy_minus_sign: | N/A | PG-13 | diff --git a/docs/models/operations/getsearchalllibrariestype.md b/docs/models/operations/getsearchalllibrariestype.md index f68b45f..db506e3 100644 --- a/docs/models/operations/getsearchalllibrariestype.md +++ b/docs/models/operations/getsearchalllibrariestype.md @@ -1,16 +1,20 @@ # GetSearchAllLibrariesType -The type of media content +The type of media content in the Plex library. This can represent videos, music, or photos. ## Values -| Name | Value | -| ---------------------------------- | ---------------------------------- | -| `GetSearchAllLibrariesTypeMovie` | movie | -| `GetSearchAllLibrariesTypeTvShow` | show | -| `GetSearchAllLibrariesTypeSeason` | season | -| `GetSearchAllLibrariesTypeEpisode` | episode | -| `GetSearchAllLibrariesTypeArtist` | artist | -| `GetSearchAllLibrariesTypeAlbum` | album | \ No newline at end of file +| Name | Value | +| ------------------------------------- | ------------------------------------- | +| `GetSearchAllLibrariesTypeMovie` | movie | +| `GetSearchAllLibrariesTypeTvShow` | show | +| `GetSearchAllLibrariesTypeSeason` | season | +| `GetSearchAllLibrariesTypeEpisode` | episode | +| `GetSearchAllLibrariesTypeArtist` | artist | +| `GetSearchAllLibrariesTypeAlbum` | album | +| `GetSearchAllLibrariesTypeTrack` | track | +| `GetSearchAllLibrariesTypePhotoAlbum` | photoalbum | +| `GetSearchAllLibrariesTypePhoto` | photo | +| `GetSearchAllLibrariesTypeCollection` | collection | \ No newline at end of file diff --git a/docs/models/operations/getsearchlibraryqueryparamtype.md b/docs/models/operations/getsearchlibraryqueryparamtype.md index 9bf9311..20ab5a5 100644 --- a/docs/models/operations/getsearchlibraryqueryparamtype.md +++ b/docs/models/operations/getsearchlibraryqueryparamtype.md @@ -11,12 +11,14 @@ E.g. A movie library will not return anything with type 3 as there are no season ## Values -| Name | Value | -| --------------------------------------- | --------------------------------------- | -| `GetSearchLibraryQueryParamTypeMovie` | 1 | -| `GetSearchLibraryQueryParamTypeTvShow` | 2 | -| `GetSearchLibraryQueryParamTypeSeason` | 3 | -| `GetSearchLibraryQueryParamTypeEpisode` | 4 | -| `GetSearchLibraryQueryParamTypeAudio` | 8 | -| `GetSearchLibraryQueryParamTypeAlbum` | 9 | -| `GetSearchLibraryQueryParamTypeTrack` | 10 | \ No newline at end of file +| Name | Value | +| ------------------------------------------ | ------------------------------------------ | +| `GetSearchLibraryQueryParamTypeMovie` | 1 | +| `GetSearchLibraryQueryParamTypeTvShow` | 2 | +| `GetSearchLibraryQueryParamTypeSeason` | 3 | +| `GetSearchLibraryQueryParamTypeEpisode` | 4 | +| `GetSearchLibraryQueryParamTypeArtist` | 5 | +| `GetSearchLibraryQueryParamTypeAlbum` | 6 | +| `GetSearchLibraryQueryParamTypeTrack` | 7 | +| `GetSearchLibraryQueryParamTypePhotoAlbum` | 8 | +| `GetSearchLibraryQueryParamTypePhoto` | 9 | \ No newline at end of file diff --git a/docs/models/operations/gettopwatchedcontentmediacontainer.md b/docs/models/operations/gettopwatchedcontentmediacontainer.md index 671c66a..b4ff91a 100644 --- a/docs/models/operations/gettopwatchedcontentmediacontainer.md +++ b/docs/models/operations/gettopwatchedcontentmediacontainer.md @@ -5,9 +5,9 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `Size` | **int* | :heavy_minus_sign: | N/A | 1 | -| `AllowSync` | **bool* | :heavy_minus_sign: | N/A | true | -| `Identifier` | **string* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library | -| `MediaTagPrefix` | **string* | :heavy_minus_sign: | N/A | /system/bundle/media/flags/ | -| `MediaTagVersion` | **int* | :heavy_minus_sign: | N/A | 1698860922 | +| `Size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 | +| `AllowSync` | *bool* | :heavy_check_mark: | Indicates whether syncing is allowed. | false | +| `Identifier` | *string* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library | +| `MediaTagPrefix` | *string* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ | +| `MediaTagVersion` | *int64* | :heavy_check_mark: | The version number for media tags. | 1734362201 | | `Metadata` | [][operations.GetTopWatchedContentMetadata](../../models/operations/gettopwatchedcontentmetadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/gettopwatchedcontentqueryparamincludeguids.md b/docs/models/operations/gettopwatchedcontentqueryparamincludeguids.md new file mode 100644 index 0000000..964c3e6 --- /dev/null +++ b/docs/models/operations/gettopwatchedcontentqueryparamincludeguids.md @@ -0,0 +1,12 @@ +# GetTopWatchedContentQueryParamIncludeGuids + +Adds the Guid object to the response + + + +## Values + +| Name | Value | +| --------------------------------------------------- | --------------------------------------------------- | +| `GetTopWatchedContentQueryParamIncludeGuidsDisable` | 0 | +| `GetTopWatchedContentQueryParamIncludeGuidsEnable` | 1 | \ No newline at end of file diff --git a/docs/models/operations/gettopwatchedcontentqueryparamtype.md b/docs/models/operations/gettopwatchedcontentqueryparamtype.md index 2c68bbb..b068549 100644 --- a/docs/models/operations/gettopwatchedcontentqueryparamtype.md +++ b/docs/models/operations/gettopwatchedcontentqueryparamtype.md @@ -11,12 +11,14 @@ E.g. A movie library will not return anything with type 3 as there are no season ## Values -| Name | Value | -| ------------------------------------------- | ------------------------------------------- | -| `GetTopWatchedContentQueryParamTypeMovie` | 1 | -| `GetTopWatchedContentQueryParamTypeTvShow` | 2 | -| `GetTopWatchedContentQueryParamTypeSeason` | 3 | -| `GetTopWatchedContentQueryParamTypeEpisode` | 4 | -| `GetTopWatchedContentQueryParamTypeAudio` | 8 | -| `GetTopWatchedContentQueryParamTypeAlbum` | 9 | -| `GetTopWatchedContentQueryParamTypeTrack` | 10 | \ No newline at end of file +| Name | Value | +| ---------------------------------------------- | ---------------------------------------------- | +| `GetTopWatchedContentQueryParamTypeMovie` | 1 | +| `GetTopWatchedContentQueryParamTypeTvShow` | 2 | +| `GetTopWatchedContentQueryParamTypeSeason` | 3 | +| `GetTopWatchedContentQueryParamTypeEpisode` | 4 | +| `GetTopWatchedContentQueryParamTypeArtist` | 5 | +| `GetTopWatchedContentQueryParamTypeAlbum` | 6 | +| `GetTopWatchedContentQueryParamTypeTrack` | 7 | +| `GetTopWatchedContentQueryParamTypePhotoAlbum` | 8 | +| `GetTopWatchedContentQueryParamTypePhoto` | 9 | \ No newline at end of file diff --git a/docs/models/operations/gettopwatchedcontentrequest.md b/docs/models/operations/gettopwatchedcontentrequest.md index 61a27ac..9c26fb2 100644 --- a/docs/models/operations/gettopwatchedcontentrequest.md +++ b/docs/models/operations/gettopwatchedcontentrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `IncludeGuids` | **int64* | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | -| `Type` | [operations.GetTopWatchedContentQueryParamType](../../models/operations/gettopwatchedcontentqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | \ No newline at end of file +| `Type` | [operations.GetTopWatchedContentQueryParamType](../../models/operations/gettopwatchedcontentqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | +| `IncludeGuids` | [*operations.GetTopWatchedContentQueryParamIncludeGuids](../../models/operations/gettopwatchedcontentqueryparamincludeguids.md) | :heavy_minus_sign: | Adds the Guid object to the response
| 1 | \ No newline at end of file diff --git a/docs/models/operations/guids.md b/docs/models/operations/guids.md index e1162e8..00d6170 100644 --- a/docs/models/operations/guids.md +++ b/docs/models/operations/guids.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `ID` | **string* | :heavy_minus_sign: | The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337
| tvdb://2337 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ID` | *string* | :heavy_check_mark: | The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb://
| {
"imdbExample": {
"summary": "IMDB example",
"value": "imdb://tt13015952"
},
"tmdbExample": {
"summary": "TMDB example",
"value": "tmdb://2434012"
},
"tvdbExample": {
"summary": "TVDB example",
"value": "tvdb://7945991"
}
} | \ No newline at end of file diff --git a/docs/models/operations/producer.md b/docs/models/operations/producer.md index 1c94cea..d4ff29e 100644 --- a/docs/models/operations/producer.md +++ b/docs/models/operations/producer.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `ID` | *int* | :heavy_check_mark: | Unique identifier for the producer. | 126522 | -| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this producer. | producer=126522 | -| `Tag` | *string* | :heavy_check_mark: | The name of the producer | Amelia Knapp | -| `TagKey` | **string* | :heavy_minus_sign: | A unique key associated with the producer's tag, used for internal identification. | 5d77683d85719b001f3a535e | -| `Thumb` | **string* | :heavy_minus_sign: | The URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `ID` | *int* | :heavy_check_mark: | Unique identifier for the producer. | 126522 | +| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this producer. | producer=126522 | +| `Tag` | *string* | :heavy_check_mark: | The name of the producer | Amelia Knapp | +| `TagKey` | *string* | :heavy_check_mark: | A 24-character hexadecimal unique key associated with the producer's tag, used for internal identification.
| 5d77683d85719b001f3a535e | +| `Thumb` | **string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the producer. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file diff --git a/docs/models/operations/queryparamtype.md b/docs/models/operations/queryparamtype.md index 11e41b2..e70cdbe 100644 --- a/docs/models/operations/queryparamtype.md +++ b/docs/models/operations/queryparamtype.md @@ -11,12 +11,14 @@ E.g. A movie library will not return anything with type 3 as there are no season ## Values -| Name | Value | -| ----------------------- | ----------------------- | -| `QueryParamTypeMovie` | 1 | -| `QueryParamTypeTvShow` | 2 | -| `QueryParamTypeSeason` | 3 | -| `QueryParamTypeEpisode` | 4 | -| `QueryParamTypeAudio` | 8 | -| `QueryParamTypeAlbum` | 9 | -| `QueryParamTypeTrack` | 10 | \ No newline at end of file +| Name | Value | +| -------------------------- | -------------------------- | +| `QueryParamTypeMovie` | 1 | +| `QueryParamTypeTvShow` | 2 | +| `QueryParamTypeSeason` | 3 | +| `QueryParamTypeEpisode` | 4 | +| `QueryParamTypeArtist` | 5 | +| `QueryParamTypeAlbum` | 6 | +| `QueryParamTypeTrack` | 7 | +| `QueryParamTypePhotoAlbum` | 8 | +| `QueryParamTypePhoto` | 9 | \ No newline at end of file diff --git a/docs/models/operations/rating.md b/docs/models/operations/rating.md index 347c1f9..4a8b7da 100644 --- a/docs/models/operations/rating.md +++ b/docs/models/operations/rating.md @@ -5,8 +5,8 @@ The type of rating, for example 'audience' or 'critic'. ## Fields -| Field | Type | Required | Description | Example | -| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | -| `Image` | *string* | :heavy_check_mark: | N/A | imdb://image.rating | -| `Value` | *float64* | :heavy_check_mark: | N/A | 5.1 | -| `Type` | *string* | :heavy_check_mark: | N/A | audience | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `Image` | *string* | :heavy_check_mark: | The URL for the rating image, for example from IMDb. | imdb://image.rating | +| `Value` | *float32* | :heavy_check_mark: | N/A | 5.1 | +| `Type` | *string* | :heavy_check_mark: | N/A | audience | \ No newline at end of file diff --git a/docs/models/operations/role.md b/docs/models/operations/role.md index 71ea5a8..fbad285 100644 --- a/docs/models/operations/role.md +++ b/docs/models/operations/role.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `ID` | *int64* | :heavy_check_mark: | Unique identifier for the actor or role. | 126522 | -| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. | actor=126522 | -| `Tag` | *string* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller | -| `TagKey` | **string* | :heavy_minus_sign: | A unique key associated with the actor's tag, used for internal identification. | 5d77683d85719b001f3a535e | -| `Role` | **string* | :heavy_minus_sign: | The role played by the actor in the media item. | Self - Judge | -| `Thumb` | **string* | :heavy_minus_sign: | The URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ID` | *int* | :heavy_check_mark: | The unique identifier for the role.
NOTE: This is different for each Plex server and is not globally unique.
| 126522 | +| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. | actor=126522 | +| `Tag` | *string* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller | +| `TagKey` | *string* | :heavy_check_mark: | A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification.
NOTE: This is globally unique across all Plex Servers.
| 5d77683d85719b001f3a535e | +| `Role` | **string* | :heavy_minus_sign: | The role played by the actor in the media item. | Self - Judge | +| `Thumb` | **string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg | \ No newline at end of file diff --git a/docs/models/operations/similar.md b/docs/models/operations/similar.md index 5b57d2b..9c68315 100644 --- a/docs/models/operations/similar.md +++ b/docs/models/operations/similar.md @@ -7,6 +7,6 @@ The display tag for the similar item, typically the title. | Field | Type | Required | Description | Example | | --------------------- | --------------------- | --------------------- | --------------------- | --------------------- | -| `ID` | *int64* | :heavy_check_mark: | N/A | 259 | +| `ID` | *int* | :heavy_check_mark: | N/A | 259 | | `Filter` | *string* | :heavy_check_mark: | N/A | similar=259 | | `Tag` | *string* | :heavy_check_mark: | N/A | Criss Angel Mindfreak | \ No newline at end of file diff --git a/docs/models/operations/type.md b/docs/models/operations/type.md index 5687d81..555d352 100644 --- a/docs/models/operations/type.md +++ b/docs/models/operations/type.md @@ -11,12 +11,14 @@ E.g. A movie library will not return anything with type 3 as there are no season ## Values -| Name | Value | -| ------------- | ------------- | -| `TypeMovie` | 1 | -| `TypeTvShow` | 2 | -| `TypeSeason` | 3 | -| `TypeEpisode` | 4 | -| `TypeAudio` | 8 | -| `TypeAlbum` | 9 | -| `TypeTrack` | 10 | \ No newline at end of file +| Name | Value | +| ---------------- | ---------------- | +| `TypeMovie` | 1 | +| `TypeTvShow` | 2 | +| `TypeSeason` | 3 | +| `TypeEpisode` | 4 | +| `TypeArtist` | 5 | +| `TypeAlbum` | 6 | +| `TypeTrack` | 7 | +| `TypePhotoAlbum` | 8 | +| `TypePhoto` | 9 | \ No newline at end of file diff --git a/docs/models/operations/writer.md b/docs/models/operations/writer.md index 00e160a..01d00c9 100644 --- a/docs/models/operations/writer.md +++ b/docs/models/operations/writer.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `ID` | *int* | :heavy_check_mark: | Unique identifier for the writer. | 126522 | -| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this writer. | writer=126522 | -| `Tag` | *string* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson | -| `TagKey` | **string* | :heavy_minus_sign: | A unique key associated with the writers tag, used for internal identification. | 5d77683d85719b001f3a535e | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `ID` | *int* | :heavy_check_mark: | Unique identifier for the writer. | 126522 | +| `Filter` | *string* | :heavy_check_mark: | The filter string used to query this writer. | writer=126522 | +| `Tag` | *string* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson | +| `TagKey` | **string* | :heavy_minus_sign: | A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. | 5d77683d85719b001f3a535e | +| `Thumb` | **string* | :heavy_minus_sign: | The absolute URL of the thumbnail image for the writer. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg | \ No newline at end of file diff --git a/docs/models/sdkerrors/getallmedialibrarybadrequest.md b/docs/models/sdkerrors/getallmedialibrarybadrequest.md deleted file mode 100644 index 561777e..0000000 --- a/docs/models/sdkerrors/getallmedialibrarybadrequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetAllMediaLibraryBadRequest - -Bad Request - A parameter was not specified, or was specified incorrectly. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `Errors` | [][sdkerrors.GetAllMediaLibraryErrors](../../models/sdkerrors/getallmedialibraryerrors.md) | :heavy_minus_sign: | N/A | -| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/sdkerrors/getlibrarysectionsallbadrequest.md b/docs/models/sdkerrors/getlibrarysectionsallbadrequest.md new file mode 100644 index 0000000..6f2b3d0 --- /dev/null +++ b/docs/models/sdkerrors/getlibrarysectionsallbadrequest.md @@ -0,0 +1,11 @@ +# GetLibrarySectionsAllBadRequest + +Bad Request - A parameter was not specified, or was specified incorrectly. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `Errors` | [][sdkerrors.GetLibrarySectionsAllErrors](../../models/sdkerrors/getlibrarysectionsallerrors.md) | :heavy_minus_sign: | N/A | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/sdkerrors/getallmedialibraryerrors.md b/docs/models/sdkerrors/getlibrarysectionsallerrors.md similarity index 97% rename from docs/models/sdkerrors/getallmedialibraryerrors.md rename to docs/models/sdkerrors/getlibrarysectionsallerrors.md index 70d0fd9..31ededb 100644 --- a/docs/models/sdkerrors/getallmedialibraryerrors.md +++ b/docs/models/sdkerrors/getlibrarysectionsallerrors.md @@ -1,4 +1,4 @@ -# GetAllMediaLibraryErrors +# GetLibrarySectionsAllErrors ## Fields diff --git a/docs/models/sdkerrors/getallmedialibrarylibraryerrors.md b/docs/models/sdkerrors/getlibrarysectionsalllibraryerrors.md similarity index 95% rename from docs/models/sdkerrors/getallmedialibrarylibraryerrors.md rename to docs/models/sdkerrors/getlibrarysectionsalllibraryerrors.md index 9e40754..faad9ce 100644 --- a/docs/models/sdkerrors/getallmedialibrarylibraryerrors.md +++ b/docs/models/sdkerrors/getlibrarysectionsalllibraryerrors.md @@ -1,4 +1,4 @@ -# GetAllMediaLibraryLibraryErrors +# GetLibrarySectionsAllLibraryErrors ## Fields diff --git a/docs/models/sdkerrors/getlibrarysectionsallunauthorized.md b/docs/models/sdkerrors/getlibrarysectionsallunauthorized.md new file mode 100644 index 0000000..605a073 --- /dev/null +++ b/docs/models/sdkerrors/getlibrarysectionsallunauthorized.md @@ -0,0 +1,11 @@ +# GetLibrarySectionsAllUnauthorized + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `Errors` | [][sdkerrors.GetLibrarySectionsAllLibraryErrors](../../models/sdkerrors/getlibrarysectionsalllibraryerrors.md) | :heavy_minus_sign: | N/A | +| `RawResponse` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md index ee5e823..1604c5d 100644 --- a/docs/sdks/authentication/README.md +++ b/docs/sdks/authentication/README.md @@ -92,7 +92,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Authentication.GetSourceConnectionInformation(ctx, "provider://provider-identifier") + res, err := s.Authentication.GetSourceConnectionInformation(ctx, "server://client-identifier") if err != nil { log.Fatal(err) } diff --git a/docs/sdks/butler/README.md b/docs/sdks/butler/README.md index 4b5609d..bc4cc5a 100644 --- a/docs/sdks/butler/README.md +++ b/docs/sdks/butler/README.md @@ -201,7 +201,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Butler.StartTask(ctx, operations.TaskNameCleanOldBundles) + res, err := s.Butler.StartTask(ctx, operations.TaskNameRefreshPeriodicMetadata) if err != nil { log.Fatal(err) } @@ -255,7 +255,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Butler.StopTask(ctx, operations.PathParamTaskNameBackupDatabase) + res, err := s.Butler.StopTask(ctx, operations.PathParamTaskNameCleanOldCacheFiles) if err != nil { log.Fatal(err) } diff --git a/docs/sdks/hubs/README.md b/docs/sdks/hubs/README.md index 4dfcfc7..6df55ab 100644 --- a/docs/sdks/hubs/README.md +++ b/docs/sdks/hubs/README.md @@ -90,9 +90,10 @@ func main() { ) res, err := s.Hubs.GetRecentlyAdded(ctx, operations.GetRecentlyAddedRequest{ - ContentDirectoryID: 470161, + ContentDirectoryID: 39486, SectionID: plexgo.Int64(2), Type: operations.TypeTvShow, + IncludeMeta: operations.IncludeMetaEnable.ToPointer(), }) if err != nil { log.Fatal(err) @@ -144,7 +145,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Hubs.GetLibraryHubs(ctx, 6728.76, nil, nil) + res, err := s.Hubs.GetLibraryHubs(ctx, 492.74, nil, nil) if err != nil { log.Fatal(err) } diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index c3382c2..3806df6 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -14,7 +14,7 @@ API Calls interacting with Plex Media Server Libraries * [GetLibraryDetails](#getlibrarydetails) - Get Library Details * [DeleteLibrary](#deletelibrary) - Delete Library Section * [GetLibraryItems](#getlibraryitems) - Get Library Items -* [GetAllMediaLibrary](#getallmedialibrary) - Get all media of library +* [GetLibrarySectionsAll](#getlibrarysectionsall) - Get Library section media by tag ALL * [GetRefreshLibraryMetadata](#getrefreshlibrarymetadata) - Refresh Metadata Of The Library * [GetSearchLibrary](#getsearchlibrary) - Search Library * [GetGenresLibrary](#getgenreslibrary) - Get Genres of library media @@ -124,6 +124,7 @@ func main() { }, SectionID: plexgo.Int64(2), Type: operations.QueryParamTypeTvShow, + IncludeMeta: operations.QueryParamIncludeMetaEnable.ToPointer(), }) if err != nil { log.Fatal(err) @@ -262,6 +263,7 @@ package main import( "context" "github.com/LukeHagar/plexgo" + "github.com/LukeHagar/plexgo/models/operations" "log" ) @@ -272,7 +274,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Library.GetLibraryDetails(ctx, 9518, nil) + res, err := s.Library.GetLibraryDetails(ctx, 9518, operations.IncludeDetailsZero.ToPointer()) if err != nil { log.Fatal(err) } @@ -400,9 +402,11 @@ func main() { ) res, err := s.Library.GetLibraryItems(ctx, operations.GetLibraryItemsRequest{ - Tag: operations.TagEdition, + Tag: operations.TagNewest, + IncludeGuids: operations.IncludeGuidsEnable.ToPointer(), Type: operations.GetLibraryItemsQueryParamTypeTvShow, SectionKey: 9518, + IncludeMeta: operations.GetLibraryItemsQueryParamIncludeMetaEnable.ToPointer(), }) if err != nil { log.Fatal(err) @@ -433,7 +437,7 @@ func main() { | sdkerrors.GetLibraryItemsUnauthorized | 401 | application/json | | sdkerrors.SDKError | 4XX, 5XX | \*/\* | -## GetAllMediaLibrary +## GetLibrarySectionsAll Retrieves a list of all general media data for this library. @@ -457,9 +461,14 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Library.GetAllMediaLibrary(ctx, operations.GetAllMediaLibraryRequest{ + res, err := s.Library.GetLibrarySectionsAll(ctx, operations.GetLibrarySectionsAllRequest{ SectionKey: 9518, - Type: operations.GetAllMediaLibraryQueryParamTypeTvShow, + Type: operations.GetLibrarySectionsAllQueryParamTypeTvShow, + IncludeMeta: operations.GetLibrarySectionsAllQueryParamIncludeMetaEnable.ToPointer(), + IncludeGuids: operations.QueryParamIncludeGuidsEnable.ToPointer(), + IncludeAdvanced: operations.IncludeAdvancedEnable.ToPointer(), + IncludeCollections: operations.QueryParamIncludeCollectionsEnable.ToPointer(), + IncludeExternalMedia: operations.QueryParamIncludeExternalMediaEnable.ToPointer(), }) if err != nil { log.Fatal(err) @@ -472,23 +481,23 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `request` | [operations.GetAllMediaLibraryRequest](../../models/operations/getallmedialibraryrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [operations.GetLibrarySectionsAllRequest](../../models/operations/getlibrarysectionsallrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | ### Response -**[*operations.GetAllMediaLibraryResponse](../../models/operations/getallmedialibraryresponse.md), error** +**[*operations.GetLibrarySectionsAllResponse](../../models/operations/getlibrarysectionsallresponse.md), error** ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| sdkerrors.GetAllMediaLibraryBadRequest | 400 | application/json | -| sdkerrors.GetAllMediaLibraryUnauthorized | 401 | application/json | -| sdkerrors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| sdkerrors.GetLibrarySectionsAllBadRequest | 400 | application/json | +| sdkerrors.GetLibrarySectionsAllUnauthorized | 401 | application/json | +| sdkerrors.SDKError | 4XX, 5XX | \*/\* | ## GetRefreshLibraryMetadata @@ -514,7 +523,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Library.GetRefreshLibraryMetadata(ctx, 9518, operations.ForceOne.ToPointer()) + res, err := s.Library.GetRefreshLibraryMetadata(ctx, 9518, operations.ForceZero.ToPointer()) if err != nil { log.Fatal(err) } @@ -812,6 +821,8 @@ func main() { SearchTypes: []operations.SearchTypes{ operations.SearchTypesPeople, }, + IncludeCollections: operations.GetSearchAllLibrariesQueryParamIncludeCollectionsEnable.ToPointer(), + IncludeExternalMedia: operations.GetSearchAllLibrariesQueryParamIncludeExternalMediaEnable.ToPointer(), }) if err != nil { log.Fatal(err) @@ -844,7 +855,8 @@ func main() { ## GetMediaMetaData -This endpoint will return all the (meta)data of a library item specified with by the ratingKey. +This endpoint will return all the (meta)data of one or more library items specified by the ratingKey. +Multiple rating keys can be provided as a comma-separated list (e.g., "21119,21617"). ### Example Usage @@ -867,7 +879,7 @@ func main() { ) res, err := s.Library.GetMediaMetaData(ctx, operations.GetMediaMetaDataRequest{ - RatingKey: 9518, + RatingKey: "21119,21617", IncludeConcerts: plexgo.Bool(true), IncludeExtras: plexgo.Bool(true), IncludeOnDeck: plexgo.Bool(true), @@ -1138,7 +1150,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Library.GetMetadataChildren(ctx, 1539.14, plexgo.String("Stream")) + res, err := s.Library.GetMetadataChildren(ctx, 2403.67, plexgo.String("Stream")) if err != nil { log.Fatal(err) } @@ -1193,7 +1205,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Library.GetTopWatchedContent(ctx, operations.GetTopWatchedContentQueryParamTypeTvShow, plexgo.Int64(1)) + res, err := s.Library.GetTopWatchedContent(ctx, operations.GetTopWatchedContentQueryParamTypeTvShow, operations.GetTopWatchedContentQueryParamIncludeGuidsEnable.ToPointer()) if err != nil { log.Fatal(err) } @@ -1209,7 +1221,7 @@ func main() { | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | | | `type_` | [operations.GetTopWatchedContentQueryParamType](../../models/operations/gettopwatchedcontentqueryparamtype.md) | :heavy_check_mark: | The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
| 2 | -| `includeGuids` | **int64* | :heavy_minus_sign: | Adds the Guids object to the response
| 1 | +| `includeGuids` | [*operations.GetTopWatchedContentQueryParamIncludeGuids](../../models/operations/gettopwatchedcontentqueryparamincludeguids.md) | :heavy_minus_sign: | Adds the Guid object to the response
| 1 | | `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | | ### Response diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md index a4145b9..556f511 100644 --- a/docs/sdks/playlists/README.md +++ b/docs/sdks/playlists/README.md @@ -49,9 +49,9 @@ func main() { res, err := s.Playlists.CreatePlaylist(ctx, operations.CreatePlaylistRequest{ Title: "", - Type: operations.CreatePlaylistQueryParamTypePhoto, + Type: operations.CreatePlaylistQueryParamTypeAudio, Smart: operations.SmartOne, - URI: "https://hoarse-testing.info/", + URI: "https://short-term-disconnection.name/", }) if err != nil { log.Fatal(err) @@ -159,7 +159,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Playlists.GetPlaylist(ctx, 4109.48) + res, err := s.Playlists.GetPlaylist(ctx, 8419.53) if err != nil { log.Fatal(err) } @@ -212,7 +212,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Playlists.DeletePlaylist(ctx, 216.22) + res, err := s.Playlists.DeletePlaylist(ctx, 3432.93) if err != nil { log.Fatal(err) } @@ -265,7 +265,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Playlists.UpdatePlaylist(ctx, 3915, nil, nil) + res, err := s.Playlists.UpdatePlaylist(ctx, 1579.66, nil, nil) if err != nil { log.Fatal(err) } @@ -324,7 +324,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Playlists.GetPlaylistContents(ctx, 5004.46, operations.GetPlaylistContentsQueryParamTypeTvShow) + res, err := s.Playlists.GetPlaylistContents(ctx, 5535.42, operations.GetPlaylistContentsQueryParamTypeTvShow) if err != nil { log.Fatal(err) } @@ -378,7 +378,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Playlists.ClearPlaylistContents(ctx, 1893.18) + res, err := s.Playlists.ClearPlaylistContents(ctx, 4137.37) if err != nil { log.Fatal(err) } @@ -432,7 +432,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Playlists.AddPlaylistContents(ctx, 8502.01, "server://12345/com.plexapp.plugins.library/library/metadata/1", plexgo.Float64(123)) + res, err := s.Playlists.AddPlaylistContents(ctx, 7013.44, "server://12345/com.plexapp.plugins.library/library/metadata/1", plexgo.Float64(123)) if err != nil { log.Fatal(err) } @@ -488,7 +488,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Playlists.UploadPlaylist(ctx, "/home/barkley/playlist.m3u", operations.QueryParamForceZero, 1) + res, err := s.Playlists.UploadPlaylist(ctx, "/home/barkley/playlist.m3u", operations.QueryParamForceOne, 1) if err != nil { log.Fatal(err) } diff --git a/docs/sdks/plex/README.md b/docs/sdks/plex/README.md index c062c47..fa10b34 100644 --- a/docs/sdks/plex/README.md +++ b/docs/sdks/plex/README.md @@ -230,6 +230,7 @@ package main import( "context" "github.com/LukeHagar/plexgo" + "github.com/LukeHagar/plexgo/models/operations" "log" ) @@ -240,7 +241,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Plex.GetServerResources(ctx, "3381b62b-9ab7-4e37-827b-203e9809eb58", nil, nil, nil) + res, err := s.Plex.GetServerResources(ctx, "3381b62b-9ab7-4e37-827b-203e9809eb58", operations.IncludeHTTPSEnable.ToPointer(), operations.IncludeRelayEnable.ToPointer(), operations.IncludeIPv6Enable.ToPointer()) if err != nil { log.Fatal(err) } @@ -351,7 +352,7 @@ func main() { s := plexgo.New() res, err := s.Plex.GetTokenByPinID(ctx, operations.GetTokenByPinIDRequest{ - PinID: 408895, + PinID: 232248, ClientID: "3381b62b-9ab7-4e37-827b-203e9809eb58", ClientName: plexgo.String("Plex for Roku"), DeviceNickname: plexgo.String("Roku 3"), diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 0628771..6e85733 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -46,7 +46,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Search.PerformSearch(ctx, "dylan", nil, nil) + res, err := s.Search.PerformSearch(ctx, "arnold", nil, plexgo.Float64(5)) if err != nil { log.Fatal(err) } @@ -104,7 +104,7 @@ func main() { plexgo.WithSecurity(""), ) - res, err := s.Search.PerformVoiceSearch(ctx, "dead+poop", nil, nil) + res, err := s.Search.PerformVoiceSearch(ctx, "dead+poop", nil, plexgo.Float64(5)) if err != nil { log.Fatal(err) } diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index 9252237..dc10750 100644 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -348,10 +348,9 @@ func main() { res, err := s.Server.GetResizedPhoto(ctx, operations.GetResizedPhotoRequest{ Width: 110, Height: 165, - Opacity: 100, Blur: 0, - MinSize: operations.MinSizeOne, - Upscale: operations.UpscaleOne, + MinSize: operations.MinSizeZero, + Upscale: operations.UpscaleZero, URL: "/library/metadata/49564/thumb/1654258204", }) if err != nil { diff --git a/docs/sdks/watchlist/README.md b/docs/sdks/watchlist/README.md index 7879793..5b8b64d 100644 --- a/docs/sdks/watchlist/README.md +++ b/docs/sdks/watchlist/README.md @@ -34,7 +34,7 @@ func main() { ) res, err := s.Watchlist.GetWatchList(ctx, operations.GetWatchListRequest{ - Filter: operations.FilterAvailable, + Filter: operations.FilterReleased, XPlexToken: "CV5xoxjTpFKUzBTShsaf", }) if err != nil { diff --git a/hubs.go b/hubs.go index c1416ca..e9bf106 100644 --- a/hubs.go +++ b/hubs.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" @@ -17,12 +18,16 @@ import ( // Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows. type Hubs struct { - sdkConfiguration sdkConfiguration + rootSDK *PlexAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } -func newHubs(sdkConfig sdkConfiguration) *Hubs { +func newHubs(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Hubs { return &Hubs{ + rootSDK: rootSDK, sdkConfiguration: sdkConfig, + hooks: hooks, } } @@ -58,11 +63,13 @@ func (s *Hubs) GetGlobalHubs(ctx context.Context, count *float64, onlyTransient } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getGlobalHubs", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getGlobalHubs", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -115,15 +122,17 @@ func (s *Hubs) GetGlobalHubs(ctx context.Context, count *float64, onlyTransient "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -140,7 +149,7 @@ func (s *Hubs) GetGlobalHubs(ctx context.Context, count *float64, onlyTransient err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -148,13 +157,13 @@ func (s *Hubs) GetGlobalHubs(ctx context.Context, count *float64, onlyTransient if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -167,17 +176,17 @@ func (s *Hubs) GetGlobalHubs(ctx context.Context, count *float64, onlyTransient err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -307,11 +316,13 @@ func (s *Hubs) GetRecentlyAdded(ctx context.Context, request operations.GetRecen } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-recently-added", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-recently-added", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -364,15 +375,17 @@ func (s *Hubs) GetRecentlyAdded(ctx context.Context, request operations.GetRecen "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -389,7 +402,7 @@ func (s *Hubs) GetRecentlyAdded(ctx context.Context, request operations.GetRecen err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -397,13 +410,13 @@ func (s *Hubs) GetRecentlyAdded(ctx context.Context, request operations.GetRecen if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -416,17 +429,17 @@ func (s *Hubs) GetRecentlyAdded(ctx context.Context, request operations.GetRecen err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -522,11 +535,13 @@ func (s *Hubs) GetLibraryHubs(ctx context.Context, sectionID float64, count *flo } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getLibraryHubs", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getLibraryHubs", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -579,15 +594,17 @@ func (s *Hubs) GetLibraryHubs(ctx context.Context, sectionID float64, count *flo "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -604,7 +621,7 @@ func (s *Hubs) GetLibraryHubs(ctx context.Context, sectionID float64, count *flo err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -612,13 +629,13 @@ func (s *Hubs) GetLibraryHubs(ctx context.Context, sectionID float64, count *flo if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -631,17 +648,17 @@ func (s *Hubs) GetLibraryHubs(ctx context.Context, sectionID float64, count *flo err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/internal/config/sdkconfiguration.go b/internal/config/sdkconfiguration.go new file mode 100644 index 0000000..1a010c2 --- /dev/null +++ b/internal/config/sdkconfiguration.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package config + +import ( + "context" + "github.com/LukeHagar/plexgo/retry" + "net/http" + "time" +) + +type HTTPClient interface { + Do(req *http.Request) (*http.Response, error) +} + +type SDKConfiguration struct { + Client HTTPClient + Security func(context.Context) (interface{}, error) + ServerURL string + ServerIndex int + ServerList []string + ServerVariables []map[string]string + UserAgent string + RetryConfig *retry.Config + Timeout *time.Duration +} + +func (c *SDKConfiguration) GetServerDetails() (string, map[string]string) { + if c.ServerURL != "" { + return c.ServerURL, nil + } + + return c.ServerList[c.ServerIndex], c.ServerVariables[c.ServerIndex] +} diff --git a/internal/hooks/hooks.go b/internal/hooks/hooks.go index a0b49da..fbc73e4 100644 --- a/internal/hooks/hooks.go +++ b/internal/hooks/hooks.go @@ -5,6 +5,7 @@ package hooks import ( "context" "errors" + "github.com/LukeHagar/plexgo/internal/config" "net/http" ) @@ -24,11 +25,13 @@ type HTTPClient interface { } type HookContext struct { - BaseURL string - Context context.Context - OperationID string - OAuth2Scopes []string - SecuritySource func(context.Context) (interface{}, error) + SDK any + SDKConfiguration config.SDKConfiguration + BaseURL string + Context context.Context + OperationID string + OAuth2Scopes []string + SecuritySource func(context.Context) (interface{}, error) } type BeforeRequestContext struct { @@ -71,6 +74,11 @@ type Hooks struct { afterErrorHook []afterErrorHook } +var _ sdkInitHook = (*Hooks)(nil) +var _ beforeRequestHook = (*Hooks)(nil) +var _ afterSuccessHook = (*Hooks)(nil) +var _ afterErrorHook = (*Hooks)(nil) + func New() *Hooks { h := &Hooks{ sdkInitHooks: []sdkInitHook{}, diff --git a/library.go b/library.go index 30229ba..ad56373 100644 --- a/library.go +++ b/library.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" @@ -17,12 +18,16 @@ import ( // Library - API Calls interacting with Plex Media Server Libraries type Library struct { - sdkConfiguration sdkConfiguration + rootSDK *PlexAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } -func newLibrary(sdkConfig sdkConfiguration) *Library { +func newLibrary(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Library { return &Library{ + rootSDK: rootSDK, sdkConfiguration: sdkConfig, + hooks: hooks, } } @@ -58,11 +63,13 @@ func (s *Library) GetFileHash(ctx context.Context, url_ string, type_ *float64, } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getFileHash", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getFileHash", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -115,15 +122,17 @@ func (s *Library) GetFileHash(ctx context.Context, url_ string, type_ *float64, "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -140,7 +149,7 @@ func (s *Library) GetFileHash(ctx context.Context, url_ string, type_ *float64, err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -148,13 +157,13 @@ func (s *Library) GetFileHash(ctx context.Context, url_ string, type_ *float64, if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -167,17 +176,17 @@ func (s *Library) GetFileHash(ctx context.Context, url_ string, type_ *float64, err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -287,11 +296,13 @@ func (s *Library) GetRecentlyAddedLibrary(ctx context.Context, request operation } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-recently-added-library", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-recently-added-library", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -344,15 +355,17 @@ func (s *Library) GetRecentlyAddedLibrary(ctx context.Context, request operation "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -369,7 +382,7 @@ func (s *Library) GetRecentlyAddedLibrary(ctx context.Context, request operation err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -377,13 +390,13 @@ func (s *Library) GetRecentlyAddedLibrary(ctx context.Context, request operation if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -396,17 +409,17 @@ func (s *Library) GetRecentlyAddedLibrary(ctx context.Context, request operation err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -541,11 +554,13 @@ func (s *Library) GetAllLibraries(ctx context.Context, opts ...operations.Option } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-all-libraries", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-all-libraries", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -594,15 +609,17 @@ func (s *Library) GetAllLibraries(ctx context.Context, opts ...operations.Option "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -619,7 +636,7 @@ func (s *Library) GetAllLibraries(ctx context.Context, opts ...operations.Option err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -627,13 +644,13 @@ func (s *Library) GetAllLibraries(ctx context.Context, opts ...operations.Option if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -646,17 +663,17 @@ func (s *Library) GetAllLibraries(ctx context.Context, opts ...operations.Option err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -829,11 +846,13 @@ func (s *Library) GetLibraryDetails(ctx context.Context, sectionKey int, include } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-library-details", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-library-details", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -886,15 +905,17 @@ func (s *Library) GetLibraryDetails(ctx context.Context, sectionKey int, include "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -911,7 +932,7 @@ func (s *Library) GetLibraryDetails(ctx context.Context, sectionKey int, include err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -919,13 +940,13 @@ func (s *Library) GetLibraryDetails(ctx context.Context, sectionKey int, include if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -938,17 +959,17 @@ func (s *Library) GetLibraryDetails(ctx context.Context, sectionKey int, include err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1082,11 +1103,13 @@ func (s *Library) DeleteLibrary(ctx context.Context, sectionKey int, opts ...ope } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "deleteLibrary", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "deleteLibrary", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -1135,15 +1158,17 @@ func (s *Library) DeleteLibrary(ctx context.Context, sectionKey int, opts ...ope "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -1160,7 +1185,7 @@ func (s *Library) DeleteLibrary(ctx context.Context, sectionKey int, opts ...ope err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -1168,13 +1193,13 @@ func (s *Library) DeleteLibrary(ctx context.Context, sectionKey int, opts ...ope if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -1187,17 +1212,17 @@ func (s *Library) DeleteLibrary(ctx context.Context, sectionKey int, opts ...ope err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1327,11 +1352,13 @@ func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLib } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-library-items", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-library-items", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -1384,15 +1411,17 @@ func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLib "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -1409,7 +1438,7 @@ func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLib err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -1417,13 +1446,13 @@ func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLib if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -1436,17 +1465,17 @@ func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLib err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1549,9 +1578,9 @@ func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLib } -// GetAllMediaLibrary - Get all media of library +// GetLibrarySectionsAll - Get Library section media by tag ALL // Retrieves a list of all general media data for this library. -func (s *Library) GetAllMediaLibrary(ctx context.Context, request operations.GetAllMediaLibraryRequest, opts ...operations.Option) (*operations.GetAllMediaLibraryResponse, error) { +func (s *Library) GetLibrarySectionsAll(ctx context.Context, request operations.GetLibrarySectionsAllRequest, opts ...operations.Option) (*operations.GetLibrarySectionsAllResponse, error) { o := operations.Options{} supportedOptions := []string{ operations.SupportedOptionRetries, @@ -1576,11 +1605,13 @@ func (s *Library) GetAllMediaLibrary(ctx context.Context, request operations.Get } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-all-media-library", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-library-sections-all", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -1633,15 +1664,17 @@ func (s *Library) GetAllMediaLibrary(ctx context.Context, request operations.Get "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -1658,7 +1691,7 @@ func (s *Library) GetAllMediaLibrary(ctx context.Context, request operations.Get err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -1666,13 +1699,13 @@ func (s *Library) GetAllMediaLibrary(ctx context.Context, request operations.Get if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -1685,24 +1718,24 @@ func (s *Library) GetAllMediaLibrary(ctx context.Context, request operations.Get err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "404", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } - res := &operations.GetAllMediaLibraryResponse{ + res := &operations.GetLibrarySectionsAllResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -1717,7 +1750,7 @@ func (s *Library) GetAllMediaLibrary(ctx context.Context, request operations.Get return nil, err } - var out operations.GetAllMediaLibraryResponseBody + var out operations.GetLibrarySectionsAllResponseBody if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } @@ -1738,7 +1771,7 @@ func (s *Library) GetAllMediaLibrary(ctx context.Context, request operations.Get return nil, err } - var out sdkerrors.GetAllMediaLibraryBadRequest + var out sdkerrors.GetLibrarySectionsAllBadRequest if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } @@ -1760,7 +1793,7 @@ func (s *Library) GetAllMediaLibrary(ctx context.Context, request operations.Get return nil, err } - var out sdkerrors.GetAllMediaLibraryUnauthorized + var out sdkerrors.GetLibrarySectionsAllUnauthorized if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } @@ -1832,11 +1865,13 @@ func (s *Library) GetRefreshLibraryMetadata(ctx context.Context, sectionKey int, } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-refresh-library-metadata", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-refresh-library-metadata", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -1889,15 +1924,17 @@ func (s *Library) GetRefreshLibraryMetadata(ctx context.Context, sectionKey int, "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -1914,7 +1951,7 @@ func (s *Library) GetRefreshLibraryMetadata(ctx context.Context, sectionKey int, err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -1922,13 +1959,13 @@ func (s *Library) GetRefreshLibraryMetadata(ctx context.Context, sectionKey int, if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -1941,17 +1978,17 @@ func (s *Library) GetRefreshLibraryMetadata(ctx context.Context, sectionKey int, err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -2083,11 +2120,13 @@ func (s *Library) GetSearchLibrary(ctx context.Context, sectionKey int, type_ op } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-search-library", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-search-library", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -2140,15 +2179,17 @@ func (s *Library) GetSearchLibrary(ctx context.Context, sectionKey int, type_ op "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -2165,7 +2206,7 @@ func (s *Library) GetSearchLibrary(ctx context.Context, sectionKey int, type_ op err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -2173,13 +2214,13 @@ func (s *Library) GetSearchLibrary(ctx context.Context, sectionKey int, type_ op if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -2192,17 +2233,17 @@ func (s *Library) GetSearchLibrary(ctx context.Context, sectionKey int, type_ op err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -2337,11 +2378,13 @@ func (s *Library) GetGenresLibrary(ctx context.Context, sectionKey int, type_ op } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-genres-library", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-genres-library", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -2394,15 +2437,17 @@ func (s *Library) GetGenresLibrary(ctx context.Context, sectionKey int, type_ op "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -2419,7 +2464,7 @@ func (s *Library) GetGenresLibrary(ctx context.Context, sectionKey int, type_ op err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -2427,13 +2472,13 @@ func (s *Library) GetGenresLibrary(ctx context.Context, sectionKey int, type_ op if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -2446,17 +2491,17 @@ func (s *Library) GetGenresLibrary(ctx context.Context, sectionKey int, type_ op err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "404", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -2593,11 +2638,13 @@ func (s *Library) GetCountriesLibrary(ctx context.Context, sectionKey int, type_ } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-countries-library", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-countries-library", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -2650,15 +2697,17 @@ func (s *Library) GetCountriesLibrary(ctx context.Context, sectionKey int, type_ "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -2675,7 +2724,7 @@ func (s *Library) GetCountriesLibrary(ctx context.Context, sectionKey int, type_ err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -2683,13 +2732,13 @@ func (s *Library) GetCountriesLibrary(ctx context.Context, sectionKey int, type_ if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -2702,17 +2751,17 @@ func (s *Library) GetCountriesLibrary(ctx context.Context, sectionKey int, type_ err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "404", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -2849,11 +2898,13 @@ func (s *Library) GetActorsLibrary(ctx context.Context, sectionKey int, type_ op } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-actors-library", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-actors-library", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -2906,15 +2957,17 @@ func (s *Library) GetActorsLibrary(ctx context.Context, sectionKey int, type_ op "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -2931,7 +2984,7 @@ func (s *Library) GetActorsLibrary(ctx context.Context, sectionKey int, type_ op err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -2939,13 +2992,13 @@ func (s *Library) GetActorsLibrary(ctx context.Context, sectionKey int, type_ op if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -2958,17 +3011,17 @@ func (s *Library) GetActorsLibrary(ctx context.Context, sectionKey int, type_ op err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "404", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -3100,11 +3153,13 @@ func (s *Library) GetSearchAllLibraries(ctx context.Context, request operations. } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-search-all-libraries", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-search-all-libraries", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -3159,15 +3214,17 @@ func (s *Library) GetSearchAllLibraries(ctx context.Context, request operations. "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -3184,7 +3241,7 @@ func (s *Library) GetSearchAllLibraries(ctx context.Context, request operations. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -3192,13 +3249,13 @@ func (s *Library) GetSearchAllLibraries(ctx context.Context, request operations. if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -3211,17 +3268,17 @@ func (s *Library) GetSearchAllLibraries(ctx context.Context, request operations. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -3325,7 +3382,8 @@ func (s *Library) GetSearchAllLibraries(ctx context.Context, request operations. } // GetMediaMetaData - Get Media Metadata -// This endpoint will return all the (meta)data of a library item specified with by the ratingKey. +// This endpoint will return all the (meta)data of one or more library items specified by the ratingKey. +// Multiple rating keys can be provided as a comma-separated list (e.g., "21119,21617"). func (s *Library) GetMediaMetaData(ctx context.Context, request operations.GetMediaMetaDataRequest, opts ...operations.Option) (*operations.GetMediaMetaDataResponse, error) { o := operations.Options{} supportedOptions := []string{ @@ -3351,11 +3409,13 @@ func (s *Library) GetMediaMetaData(ctx context.Context, request operations.GetMe } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-media-meta-data", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-media-meta-data", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -3408,15 +3468,17 @@ func (s *Library) GetMediaMetaData(ctx context.Context, request operations.GetMe "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -3433,7 +3495,7 @@ func (s *Library) GetMediaMetaData(ctx context.Context, request operations.GetMe err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -3441,13 +3503,13 @@ func (s *Library) GetMediaMetaData(ctx context.Context, request operations.GetMe if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -3460,17 +3522,17 @@ func (s *Library) GetMediaMetaData(ctx context.Context, request operations.GetMe err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "404", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -3606,11 +3668,13 @@ func (s *Library) GetMediaArts(ctx context.Context, ratingKey int64, opts ...ope } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-media-arts", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-media-arts", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -3659,15 +3723,17 @@ func (s *Library) GetMediaArts(ctx context.Context, ratingKey int64, opts ...ope "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -3684,7 +3750,7 @@ func (s *Library) GetMediaArts(ctx context.Context, ratingKey int64, opts ...ope err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -3692,13 +3758,13 @@ func (s *Library) GetMediaArts(ctx context.Context, ratingKey int64, opts ...ope if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -3711,17 +3777,17 @@ func (s *Library) GetMediaArts(ctx context.Context, ratingKey int64, opts ...ope err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"404", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -3815,11 +3881,13 @@ func (s *Library) PostMediaArts(ctx context.Context, ratingKey int64, url_ *stri } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "post-media-arts", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "post-media-arts", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "raw", `request:"mediaType=image/*"`) if err != nil { @@ -3879,15 +3947,17 @@ func (s *Library) PostMediaArts(ctx context.Context, ratingKey int64, url_ *stri "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -3904,7 +3974,7 @@ func (s *Library) PostMediaArts(ctx context.Context, ratingKey int64, url_ *stri err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -3912,13 +3982,13 @@ func (s *Library) PostMediaArts(ctx context.Context, ratingKey int64, url_ *stri if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -3931,17 +4001,17 @@ func (s *Library) PostMediaArts(ctx context.Context, ratingKey int64, url_ *stri err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"404", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -4013,11 +4083,13 @@ func (s *Library) GetMediaPosters(ctx context.Context, ratingKey int64, opts ... } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-media-posters", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-media-posters", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -4066,15 +4138,17 @@ func (s *Library) GetMediaPosters(ctx context.Context, ratingKey int64, opts ... "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -4091,7 +4165,7 @@ func (s *Library) GetMediaPosters(ctx context.Context, ratingKey int64, opts ... err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -4099,13 +4173,13 @@ func (s *Library) GetMediaPosters(ctx context.Context, ratingKey int64, opts ... if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -4118,17 +4192,17 @@ func (s *Library) GetMediaPosters(ctx context.Context, ratingKey int64, opts ... err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"404", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -4222,11 +4296,13 @@ func (s *Library) PostMediaPoster(ctx context.Context, ratingKey int64, url_ *st } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "post-media-poster", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "post-media-poster", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "raw", `request:"mediaType=image/*"`) if err != nil { @@ -4286,15 +4362,17 @@ func (s *Library) PostMediaPoster(ctx context.Context, ratingKey int64, url_ *st "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -4311,7 +4389,7 @@ func (s *Library) PostMediaPoster(ctx context.Context, ratingKey int64, url_ *st err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -4319,13 +4397,13 @@ func (s *Library) PostMediaPoster(ctx context.Context, ratingKey int64, url_ *st if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -4338,17 +4416,17 @@ func (s *Library) PostMediaPoster(ctx context.Context, ratingKey int64, url_ *st err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"404", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -4421,11 +4499,13 @@ func (s *Library) GetMetadataChildren(ctx context.Context, ratingKey float64, in } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getMetadataChildren", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getMetadataChildren", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -4478,15 +4558,17 @@ func (s *Library) GetMetadataChildren(ctx context.Context, ratingKey float64, in "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -4503,7 +4585,7 @@ func (s *Library) GetMetadataChildren(ctx context.Context, ratingKey float64, in err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -4511,13 +4593,13 @@ func (s *Library) GetMetadataChildren(ctx context.Context, ratingKey float64, in if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -4530,17 +4612,17 @@ func (s *Library) GetMetadataChildren(ctx context.Context, ratingKey float64, in err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -4645,10 +4727,10 @@ func (s *Library) GetMetadataChildren(ctx context.Context, ratingKey float64, in // GetTopWatchedContent - Get Top Watched Content // This endpoint will return the top watched content from libraries of a certain type -func (s *Library) GetTopWatchedContent(ctx context.Context, type_ operations.GetTopWatchedContentQueryParamType, includeGuids *int64, opts ...operations.Option) (*operations.GetTopWatchedContentResponse, error) { +func (s *Library) GetTopWatchedContent(ctx context.Context, type_ operations.GetTopWatchedContentQueryParamType, includeGuids *operations.GetTopWatchedContentQueryParamIncludeGuids, opts ...operations.Option) (*operations.GetTopWatchedContentResponse, error) { request := operations.GetTopWatchedContentRequest{ - IncludeGuids: includeGuids, Type: type_, + IncludeGuids: includeGuids, } o := operations.Options{} @@ -4675,11 +4757,13 @@ func (s *Library) GetTopWatchedContent(ctx context.Context, type_ operations.Get } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getTopWatchedContent", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getTopWatchedContent", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -4732,15 +4816,17 @@ func (s *Library) GetTopWatchedContent(ctx context.Context, type_ operations.Get "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -4757,7 +4843,7 @@ func (s *Library) GetTopWatchedContent(ctx context.Context, type_ operations.Get err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -4765,13 +4851,13 @@ func (s *Library) GetTopWatchedContent(ctx context.Context, type_ operations.Get if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -4784,17 +4870,17 @@ func (s *Library) GetTopWatchedContent(ctx context.Context, type_ operations.Get err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/log.go b/log.go index ad891c7..0c967f6 100644 --- a/log.go +++ b/log.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" @@ -17,12 +18,16 @@ import ( // Log - Submit logs to the Log Handler for Plex Media Server type Log struct { - sdkConfiguration sdkConfiguration + rootSDK *PlexAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } -func newLog(sdkConfig sdkConfiguration) *Log { +func newLog(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Log { return &Log{ + rootSDK: rootSDK, sdkConfiguration: sdkConfig, + hooks: hooks, } } @@ -59,11 +64,13 @@ func (s *Log) LogLine(ctx context.Context, level operations.Level, message strin } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "logLine", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "logLine", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -116,15 +123,17 @@ func (s *Log) LogLine(ctx context.Context, level operations.Level, message strin "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -141,7 +150,7 @@ func (s *Log) LogLine(ctx context.Context, level operations.Level, message strin err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -149,13 +158,13 @@ func (s *Log) LogLine(ctx context.Context, level operations.Level, message strin if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -168,17 +177,17 @@ func (s *Log) LogLine(ctx context.Context, level operations.Level, message strin err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -308,11 +317,13 @@ func (s *Log) LogMultiLine(ctx context.Context, request string, opts ...operatio } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "logMultiLine", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "logMultiLine", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "string", `request:"mediaType=text/plain"`) if err != nil { @@ -368,15 +379,17 @@ func (s *Log) LogMultiLine(ctx context.Context, request string, opts ...operatio "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -393,7 +406,7 @@ func (s *Log) LogMultiLine(ctx context.Context, request string, opts ...operatio err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -401,13 +414,13 @@ func (s *Log) LogMultiLine(ctx context.Context, request string, opts ...operatio if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -420,17 +433,17 @@ func (s *Log) LogMultiLine(ctx context.Context, request string, opts ...operatio err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -540,11 +553,13 @@ func (s *Log) EnablePaperTrail(ctx context.Context, opts ...operations.Option) ( } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "enablePaperTrail", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "enablePaperTrail", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -593,15 +608,17 @@ func (s *Log) EnablePaperTrail(ctx context.Context, opts ...operations.Option) ( "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -618,7 +635,7 @@ func (s *Log) EnablePaperTrail(ctx context.Context, opts ...operations.Option) ( err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -626,13 +643,13 @@ func (s *Log) EnablePaperTrail(ctx context.Context, opts ...operations.Option) ( if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -645,17 +662,17 @@ func (s *Log) EnablePaperTrail(ctx context.Context, opts ...operations.Option) ( err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "403", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/media.go b/media.go index f95f936..2c56379 100644 --- a/media.go +++ b/media.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" @@ -17,12 +18,16 @@ import ( // Media - API Calls interacting with Plex Media Server Media type Media struct { - sdkConfiguration sdkConfiguration + rootSDK *PlexAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } -func newMedia(sdkConfig sdkConfiguration) *Media { +func newMedia(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Media { return &Media{ + rootSDK: rootSDK, sdkConfiguration: sdkConfig, + hooks: hooks, } } @@ -57,11 +62,13 @@ func (s *Media) MarkPlayed(ctx context.Context, key float64, opts ...operations. } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "markPlayed", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "markPlayed", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -114,15 +121,17 @@ func (s *Media) MarkPlayed(ctx context.Context, key float64, opts ...operations. "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -139,7 +148,7 @@ func (s *Media) MarkPlayed(ctx context.Context, key float64, opts ...operations. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -147,13 +156,13 @@ func (s *Media) MarkPlayed(ctx context.Context, key float64, opts ...operations. if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -166,17 +175,17 @@ func (s *Media) MarkPlayed(ctx context.Context, key float64, opts ...operations. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -290,11 +299,13 @@ func (s *Media) MarkUnplayed(ctx context.Context, key float64, opts ...operation } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "markUnplayed", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "markUnplayed", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -347,15 +358,17 @@ func (s *Media) MarkUnplayed(ctx context.Context, key float64, opts ...operation "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -372,7 +385,7 @@ func (s *Media) MarkUnplayed(ctx context.Context, key float64, opts ...operation err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -380,13 +393,13 @@ func (s *Media) MarkUnplayed(ctx context.Context, key float64, opts ...operation if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -399,17 +412,17 @@ func (s *Media) MarkUnplayed(ctx context.Context, key float64, opts ...operation err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -525,11 +538,13 @@ func (s *Media) UpdatePlayProgress(ctx context.Context, key string, time float64 } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "updatePlayProgress", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "updatePlayProgress", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -582,15 +597,17 @@ func (s *Media) UpdatePlayProgress(ctx context.Context, key string, time float64 "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -607,7 +624,7 @@ func (s *Media) UpdatePlayProgress(ctx context.Context, key string, time float64 err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -615,13 +632,13 @@ func (s *Media) UpdatePlayProgress(ctx context.Context, key string, time float64 if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -634,17 +651,17 @@ func (s *Media) UpdatePlayProgress(ctx context.Context, key string, time float64 err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -754,11 +771,13 @@ func (s *Media) GetBannerImage(ctx context.Context, request operations.GetBanner } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-banner-image", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-banner-image", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -813,15 +832,17 @@ func (s *Media) GetBannerImage(ctx context.Context, request operations.GetBanner "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -838,7 +859,7 @@ func (s *Media) GetBannerImage(ctx context.Context, request operations.GetBanner err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -846,13 +867,13 @@ func (s *Media) GetBannerImage(ctx context.Context, request operations.GetBanner if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -865,17 +886,17 @@ func (s *Media) GetBannerImage(ctx context.Context, request operations.GetBanner err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -999,11 +1020,13 @@ func (s *Media) GetThumbImage(ctx context.Context, request operations.GetThumbIm } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-thumb-image", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-thumb-image", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -1058,15 +1081,17 @@ func (s *Media) GetThumbImage(ctx context.Context, request operations.GetThumbIm "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -1083,7 +1108,7 @@ func (s *Media) GetThumbImage(ctx context.Context, request operations.GetThumbIm err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -1091,13 +1116,13 @@ func (s *Media) GetThumbImage(ctx context.Context, request operations.GetThumbIm if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -1110,17 +1135,17 @@ func (s *Media) GetThumbImage(ctx context.Context, request operations.GetThumbIm err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/models/operations/getactorslibrary.go b/models/operations/getactorslibrary.go index ebe3ff1..923c644 100644 --- a/models/operations/getactorslibrary.go +++ b/models/operations/getactorslibrary.go @@ -15,13 +15,15 @@ import ( type GetActorsLibraryQueryParamType int64 const ( - GetActorsLibraryQueryParamTypeMovie GetActorsLibraryQueryParamType = 1 - GetActorsLibraryQueryParamTypeTvShow GetActorsLibraryQueryParamType = 2 - GetActorsLibraryQueryParamTypeSeason GetActorsLibraryQueryParamType = 3 - GetActorsLibraryQueryParamTypeEpisode GetActorsLibraryQueryParamType = 4 - GetActorsLibraryQueryParamTypeAudio GetActorsLibraryQueryParamType = 8 - GetActorsLibraryQueryParamTypeAlbum GetActorsLibraryQueryParamType = 9 - GetActorsLibraryQueryParamTypeTrack GetActorsLibraryQueryParamType = 10 + GetActorsLibraryQueryParamTypeMovie GetActorsLibraryQueryParamType = 1 + GetActorsLibraryQueryParamTypeTvShow GetActorsLibraryQueryParamType = 2 + GetActorsLibraryQueryParamTypeSeason GetActorsLibraryQueryParamType = 3 + GetActorsLibraryQueryParamTypeEpisode GetActorsLibraryQueryParamType = 4 + GetActorsLibraryQueryParamTypeArtist GetActorsLibraryQueryParamType = 5 + GetActorsLibraryQueryParamTypeAlbum GetActorsLibraryQueryParamType = 6 + GetActorsLibraryQueryParamTypeTrack GetActorsLibraryQueryParamType = 7 + GetActorsLibraryQueryParamTypePhotoAlbum GetActorsLibraryQueryParamType = 8 + GetActorsLibraryQueryParamTypePhoto GetActorsLibraryQueryParamType = 9 ) func (e GetActorsLibraryQueryParamType) ToPointer() *GetActorsLibraryQueryParamType { diff --git a/models/operations/getalllibraries.go b/models/operations/getalllibraries.go index c56ae9e..072e648 100644 --- a/models/operations/getalllibraries.go +++ b/models/operations/getalllibraries.go @@ -13,12 +13,16 @@ import ( type GetAllLibrariesType string const ( - GetAllLibrariesTypeMovie GetAllLibrariesType = "movie" - GetAllLibrariesTypeTvShow GetAllLibrariesType = "show" - GetAllLibrariesTypeSeason GetAllLibrariesType = "season" - GetAllLibrariesTypeEpisode GetAllLibrariesType = "episode" - GetAllLibrariesTypeArtist GetAllLibrariesType = "artist" - GetAllLibrariesTypeAlbum GetAllLibrariesType = "album" + GetAllLibrariesTypeMovie GetAllLibrariesType = "movie" + GetAllLibrariesTypeTvShow GetAllLibrariesType = "show" + GetAllLibrariesTypeSeason GetAllLibrariesType = "season" + GetAllLibrariesTypeEpisode GetAllLibrariesType = "episode" + GetAllLibrariesTypeArtist GetAllLibrariesType = "artist" + GetAllLibrariesTypeAlbum GetAllLibrariesType = "album" + GetAllLibrariesTypeTrack GetAllLibrariesType = "track" + GetAllLibrariesTypePhotoAlbum GetAllLibrariesType = "photoalbum" + GetAllLibrariesTypePhoto GetAllLibrariesType = "photo" + GetAllLibrariesTypeCollection GetAllLibrariesType = "collection" ) func (e GetAllLibrariesType) ToPointer() *GetAllLibrariesType { diff --git a/models/operations/getcountrieslibrary.go b/models/operations/getcountrieslibrary.go index 7d02266..dcf8bfa 100644 --- a/models/operations/getcountrieslibrary.go +++ b/models/operations/getcountrieslibrary.go @@ -15,13 +15,15 @@ import ( type GetCountriesLibraryQueryParamType int64 const ( - GetCountriesLibraryQueryParamTypeMovie GetCountriesLibraryQueryParamType = 1 - GetCountriesLibraryQueryParamTypeTvShow GetCountriesLibraryQueryParamType = 2 - GetCountriesLibraryQueryParamTypeSeason GetCountriesLibraryQueryParamType = 3 - GetCountriesLibraryQueryParamTypeEpisode GetCountriesLibraryQueryParamType = 4 - GetCountriesLibraryQueryParamTypeAudio GetCountriesLibraryQueryParamType = 8 - GetCountriesLibraryQueryParamTypeAlbum GetCountriesLibraryQueryParamType = 9 - GetCountriesLibraryQueryParamTypeTrack GetCountriesLibraryQueryParamType = 10 + GetCountriesLibraryQueryParamTypeMovie GetCountriesLibraryQueryParamType = 1 + GetCountriesLibraryQueryParamTypeTvShow GetCountriesLibraryQueryParamType = 2 + GetCountriesLibraryQueryParamTypeSeason GetCountriesLibraryQueryParamType = 3 + GetCountriesLibraryQueryParamTypeEpisode GetCountriesLibraryQueryParamType = 4 + GetCountriesLibraryQueryParamTypeArtist GetCountriesLibraryQueryParamType = 5 + GetCountriesLibraryQueryParamTypeAlbum GetCountriesLibraryQueryParamType = 6 + GetCountriesLibraryQueryParamTypeTrack GetCountriesLibraryQueryParamType = 7 + GetCountriesLibraryQueryParamTypePhotoAlbum GetCountriesLibraryQueryParamType = 8 + GetCountriesLibraryQueryParamTypePhoto GetCountriesLibraryQueryParamType = 9 ) func (e GetCountriesLibraryQueryParamType) ToPointer() *GetCountriesLibraryQueryParamType { diff --git a/models/operations/getgenreslibrary.go b/models/operations/getgenreslibrary.go index 582c37e..e6d013a 100644 --- a/models/operations/getgenreslibrary.go +++ b/models/operations/getgenreslibrary.go @@ -15,13 +15,15 @@ import ( type GetGenresLibraryQueryParamType int64 const ( - GetGenresLibraryQueryParamTypeMovie GetGenresLibraryQueryParamType = 1 - GetGenresLibraryQueryParamTypeTvShow GetGenresLibraryQueryParamType = 2 - GetGenresLibraryQueryParamTypeSeason GetGenresLibraryQueryParamType = 3 - GetGenresLibraryQueryParamTypeEpisode GetGenresLibraryQueryParamType = 4 - GetGenresLibraryQueryParamTypeAudio GetGenresLibraryQueryParamType = 8 - GetGenresLibraryQueryParamTypeAlbum GetGenresLibraryQueryParamType = 9 - GetGenresLibraryQueryParamTypeTrack GetGenresLibraryQueryParamType = 10 + GetGenresLibraryQueryParamTypeMovie GetGenresLibraryQueryParamType = 1 + GetGenresLibraryQueryParamTypeTvShow GetGenresLibraryQueryParamType = 2 + GetGenresLibraryQueryParamTypeSeason GetGenresLibraryQueryParamType = 3 + GetGenresLibraryQueryParamTypeEpisode GetGenresLibraryQueryParamType = 4 + GetGenresLibraryQueryParamTypeArtist GetGenresLibraryQueryParamType = 5 + GetGenresLibraryQueryParamTypeAlbum GetGenresLibraryQueryParamType = 6 + GetGenresLibraryQueryParamTypeTrack GetGenresLibraryQueryParamType = 7 + GetGenresLibraryQueryParamTypePhotoAlbum GetGenresLibraryQueryParamType = 8 + GetGenresLibraryQueryParamTypePhoto GetGenresLibraryQueryParamType = 9 ) func (e GetGenresLibraryQueryParamType) ToPointer() *GetGenresLibraryQueryParamType { diff --git a/models/operations/getlibraryitems.go b/models/operations/getlibraryitems.go index 68721ae..50a3412 100644 --- a/models/operations/getlibraryitems.go +++ b/models/operations/getlibraryitems.go @@ -72,13 +72,15 @@ func (e *IncludeGuids) UnmarshalJSON(data []byte) error { type GetLibraryItemsQueryParamType int64 const ( - GetLibraryItemsQueryParamTypeMovie GetLibraryItemsQueryParamType = 1 - GetLibraryItemsQueryParamTypeTvShow GetLibraryItemsQueryParamType = 2 - GetLibraryItemsQueryParamTypeSeason GetLibraryItemsQueryParamType = 3 - GetLibraryItemsQueryParamTypeEpisode GetLibraryItemsQueryParamType = 4 - GetLibraryItemsQueryParamTypeAudio GetLibraryItemsQueryParamType = 8 - GetLibraryItemsQueryParamTypeAlbum GetLibraryItemsQueryParamType = 9 - GetLibraryItemsQueryParamTypeTrack GetLibraryItemsQueryParamType = 10 + GetLibraryItemsQueryParamTypeMovie GetLibraryItemsQueryParamType = 1 + GetLibraryItemsQueryParamTypeTvShow GetLibraryItemsQueryParamType = 2 + GetLibraryItemsQueryParamTypeSeason GetLibraryItemsQueryParamType = 3 + GetLibraryItemsQueryParamTypeEpisode GetLibraryItemsQueryParamType = 4 + GetLibraryItemsQueryParamTypeArtist GetLibraryItemsQueryParamType = 5 + GetLibraryItemsQueryParamTypeAlbum GetLibraryItemsQueryParamType = 6 + GetLibraryItemsQueryParamTypeTrack GetLibraryItemsQueryParamType = 7 + GetLibraryItemsQueryParamTypePhotoAlbum GetLibraryItemsQueryParamType = 8 + GetLibraryItemsQueryParamTypePhoto GetLibraryItemsQueryParamType = 9 ) func (e GetLibraryItemsQueryParamType) ToPointer() *GetLibraryItemsQueryParamType { @@ -532,16 +534,20 @@ func (o *GetLibraryItemsFieldType) GetOperator() []GetLibraryItemsOperator { return o.Operator } -// GetLibraryItemsLibraryType - The type of media content +// GetLibraryItemsLibraryType - The type of media content in the Plex library. This can represent videos, music, or photos. type GetLibraryItemsLibraryType string const ( - GetLibraryItemsLibraryTypeMovie GetLibraryItemsLibraryType = "movie" - GetLibraryItemsLibraryTypeTvShow GetLibraryItemsLibraryType = "show" - GetLibraryItemsLibraryTypeSeason GetLibraryItemsLibraryType = "season" - GetLibraryItemsLibraryTypeEpisode GetLibraryItemsLibraryType = "episode" - GetLibraryItemsLibraryTypeArtist GetLibraryItemsLibraryType = "artist" - GetLibraryItemsLibraryTypeAlbum GetLibraryItemsLibraryType = "album" + GetLibraryItemsLibraryTypeMovie GetLibraryItemsLibraryType = "movie" + GetLibraryItemsLibraryTypeTvShow GetLibraryItemsLibraryType = "show" + GetLibraryItemsLibraryTypeSeason GetLibraryItemsLibraryType = "season" + GetLibraryItemsLibraryTypeEpisode GetLibraryItemsLibraryType = "episode" + GetLibraryItemsLibraryTypeArtist GetLibraryItemsLibraryType = "artist" + GetLibraryItemsLibraryTypeAlbum GetLibraryItemsLibraryType = "album" + GetLibraryItemsLibraryTypeTrack GetLibraryItemsLibraryType = "track" + GetLibraryItemsLibraryTypePhotoAlbum GetLibraryItemsLibraryType = "photoalbum" + GetLibraryItemsLibraryTypePhoto GetLibraryItemsLibraryType = "photo" + GetLibraryItemsLibraryTypeCollection GetLibraryItemsLibraryType = "collection" ) func (e GetLibraryItemsLibraryType) ToPointer() *GetLibraryItemsLibraryType { @@ -1531,7 +1537,7 @@ type GetLibraryItemsMetadata struct { LibrarySectionID *int64 `json:"librarySectionID,omitempty"` LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"` LibrarySectionKey *string `json:"librarySectionKey,omitempty"` - // The type of media content + // The type of media content in the Plex library. This can represent videos, music, or photos. // Type GetLibraryItemsLibraryType `json:"type"` Title string `json:"title"` diff --git a/models/operations/getallmedialibrary.go b/models/operations/getlibrarysectionsall.go similarity index 53% rename from models/operations/getallmedialibrary.go rename to models/operations/getlibrarysectionsall.go index f8096b4..0b52403 100644 --- a/models/operations/getallmedialibrary.go +++ b/models/operations/getlibrarysectionsall.go @@ -11,40 +11,42 @@ import ( "net/http" ) -// GetAllMediaLibraryQueryParamType - The type of media to retrieve or filter by. +// GetLibrarySectionsAllQueryParamType - The type of media to retrieve or filter by. // 1 = movie // 2 = show // 3 = season // 4 = episode // E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries -type GetAllMediaLibraryQueryParamType int64 +type GetLibrarySectionsAllQueryParamType int64 const ( - GetAllMediaLibraryQueryParamTypeMovie GetAllMediaLibraryQueryParamType = 1 - GetAllMediaLibraryQueryParamTypeTvShow GetAllMediaLibraryQueryParamType = 2 - GetAllMediaLibraryQueryParamTypeSeason GetAllMediaLibraryQueryParamType = 3 - GetAllMediaLibraryQueryParamTypeEpisode GetAllMediaLibraryQueryParamType = 4 - GetAllMediaLibraryQueryParamTypeAudio GetAllMediaLibraryQueryParamType = 8 - GetAllMediaLibraryQueryParamTypeAlbum GetAllMediaLibraryQueryParamType = 9 - GetAllMediaLibraryQueryParamTypeTrack GetAllMediaLibraryQueryParamType = 10 + GetLibrarySectionsAllQueryParamTypeMovie GetLibrarySectionsAllQueryParamType = 1 + GetLibrarySectionsAllQueryParamTypeTvShow GetLibrarySectionsAllQueryParamType = 2 + GetLibrarySectionsAllQueryParamTypeSeason GetLibrarySectionsAllQueryParamType = 3 + GetLibrarySectionsAllQueryParamTypeEpisode GetLibrarySectionsAllQueryParamType = 4 + GetLibrarySectionsAllQueryParamTypeArtist GetLibrarySectionsAllQueryParamType = 5 + GetLibrarySectionsAllQueryParamTypeAlbum GetLibrarySectionsAllQueryParamType = 6 + GetLibrarySectionsAllQueryParamTypeTrack GetLibrarySectionsAllQueryParamType = 7 + GetLibrarySectionsAllQueryParamTypePhotoAlbum GetLibrarySectionsAllQueryParamType = 8 + GetLibrarySectionsAllQueryParamTypePhoto GetLibrarySectionsAllQueryParamType = 9 ) -func (e GetAllMediaLibraryQueryParamType) ToPointer() *GetAllMediaLibraryQueryParamType { +func (e GetLibrarySectionsAllQueryParamType) ToPointer() *GetLibrarySectionsAllQueryParamType { return &e } -// GetAllMediaLibraryQueryParamIncludeMeta - Adds the Meta object to the response -type GetAllMediaLibraryQueryParamIncludeMeta int +// GetLibrarySectionsAllQueryParamIncludeMeta - Adds the Meta object to the response +type GetLibrarySectionsAllQueryParamIncludeMeta int const ( - GetAllMediaLibraryQueryParamIncludeMetaDisable GetAllMediaLibraryQueryParamIncludeMeta = 0 - GetAllMediaLibraryQueryParamIncludeMetaEnable GetAllMediaLibraryQueryParamIncludeMeta = 1 + GetLibrarySectionsAllQueryParamIncludeMetaDisable GetLibrarySectionsAllQueryParamIncludeMeta = 0 + GetLibrarySectionsAllQueryParamIncludeMetaEnable GetLibrarySectionsAllQueryParamIncludeMeta = 1 ) -func (e GetAllMediaLibraryQueryParamIncludeMeta) ToPointer() *GetAllMediaLibraryQueryParamIncludeMeta { +func (e GetLibrarySectionsAllQueryParamIncludeMeta) ToPointer() *GetLibrarySectionsAllQueryParamIncludeMeta { return &e } -func (e *GetAllMediaLibraryQueryParamIncludeMeta) UnmarshalJSON(data []byte) error { +func (e *GetLibrarySectionsAllQueryParamIncludeMeta) UnmarshalJSON(data []byte) error { var v int if err := json.Unmarshal(data, &v); err != nil { return err @@ -53,10 +55,10 @@ func (e *GetAllMediaLibraryQueryParamIncludeMeta) UnmarshalJSON(data []byte) err case 0: fallthrough case 1: - *e = GetAllMediaLibraryQueryParamIncludeMeta(v) + *e = GetLibrarySectionsAllQueryParamIncludeMeta(v) return nil default: - return fmt.Errorf("invalid value for GetAllMediaLibraryQueryParamIncludeMeta: %v", v) + return fmt.Errorf("invalid value for GetLibrarySectionsAllQueryParamIncludeMeta: %v", v) } } @@ -165,7 +167,7 @@ func (e *QueryParamIncludeExternalMedia) UnmarshalJSON(data []byte) error { } } -type GetAllMediaLibraryRequest struct { +type GetLibrarySectionsAllRequest struct { // The unique key of the Plex library. // Note: This is unique in the context of the Plex server. // @@ -177,10 +179,10 @@ type GetAllMediaLibraryRequest struct { // 4 = episode // E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries // - Type GetAllMediaLibraryQueryParamType `queryParam:"style=form,explode=true,name=type"` + Type GetLibrarySectionsAllQueryParamType `queryParam:"style=form,explode=true,name=type"` // Adds the Meta object to the response // - IncludeMeta *GetAllMediaLibraryQueryParamIncludeMeta `default:"0" queryParam:"style=form,explode=true,name=includeMeta"` + IncludeMeta *GetLibrarySectionsAllQueryParamIncludeMeta `default:"0" queryParam:"style=form,explode=true,name=includeMeta"` // Adds the Guid object to the response // IncludeGuids *QueryParamIncludeGuids `default:"0" queryParam:"style=form,explode=true,name=includeGuids"` @@ -199,81 +201,81 @@ type GetAllMediaLibraryRequest struct { XPlexContainerSize *int `default:"50" queryParam:"style=form,explode=true,name=X-Plex-Container-Size"` } -func (g GetAllMediaLibraryRequest) MarshalJSON() ([]byte, error) { +func (g GetLibrarySectionsAllRequest) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } -func (g *GetAllMediaLibraryRequest) UnmarshalJSON(data []byte) error { +func (g *GetLibrarySectionsAllRequest) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { return err } return nil } -func (o *GetAllMediaLibraryRequest) GetSectionKey() int { +func (o *GetLibrarySectionsAllRequest) GetSectionKey() int { if o == nil { return 0 } return o.SectionKey } -func (o *GetAllMediaLibraryRequest) GetType() GetAllMediaLibraryQueryParamType { +func (o *GetLibrarySectionsAllRequest) GetType() GetLibrarySectionsAllQueryParamType { if o == nil { - return GetAllMediaLibraryQueryParamType(0) + return GetLibrarySectionsAllQueryParamType(0) } return o.Type } -func (o *GetAllMediaLibraryRequest) GetIncludeMeta() *GetAllMediaLibraryQueryParamIncludeMeta { +func (o *GetLibrarySectionsAllRequest) GetIncludeMeta() *GetLibrarySectionsAllQueryParamIncludeMeta { if o == nil { return nil } return o.IncludeMeta } -func (o *GetAllMediaLibraryRequest) GetIncludeGuids() *QueryParamIncludeGuids { +func (o *GetLibrarySectionsAllRequest) GetIncludeGuids() *QueryParamIncludeGuids { if o == nil { return nil } return o.IncludeGuids } -func (o *GetAllMediaLibraryRequest) GetIncludeAdvanced() *IncludeAdvanced { +func (o *GetLibrarySectionsAllRequest) GetIncludeAdvanced() *IncludeAdvanced { if o == nil { return nil } return o.IncludeAdvanced } -func (o *GetAllMediaLibraryRequest) GetIncludeCollections() *QueryParamIncludeCollections { +func (o *GetLibrarySectionsAllRequest) GetIncludeCollections() *QueryParamIncludeCollections { if o == nil { return nil } return o.IncludeCollections } -func (o *GetAllMediaLibraryRequest) GetIncludeExternalMedia() *QueryParamIncludeExternalMedia { +func (o *GetLibrarySectionsAllRequest) GetIncludeExternalMedia() *QueryParamIncludeExternalMedia { if o == nil { return nil } return o.IncludeExternalMedia } -func (o *GetAllMediaLibraryRequest) GetXPlexContainerStart() *int { +func (o *GetLibrarySectionsAllRequest) GetXPlexContainerStart() *int { if o == nil { return nil } return o.XPlexContainerStart } -func (o *GetAllMediaLibraryRequest) GetXPlexContainerSize() *int { +func (o *GetLibrarySectionsAllRequest) GetXPlexContainerSize() *int { if o == nil { return nil } return o.XPlexContainerSize } -type GetAllMediaLibraryFilter struct { +type GetLibrarySectionsAllFilter struct { Filter string `json:"filter"` FilterType string `json:"filterType"` Key string `json:"key"` @@ -282,60 +284,60 @@ type GetAllMediaLibraryFilter struct { Advanced *bool `json:"advanced,omitempty"` } -func (o *GetAllMediaLibraryFilter) GetFilter() string { +func (o *GetLibrarySectionsAllFilter) GetFilter() string { if o == nil { return "" } return o.Filter } -func (o *GetAllMediaLibraryFilter) GetFilterType() string { +func (o *GetLibrarySectionsAllFilter) GetFilterType() string { if o == nil { return "" } return o.FilterType } -func (o *GetAllMediaLibraryFilter) GetKey() string { +func (o *GetLibrarySectionsAllFilter) GetKey() string { if o == nil { return "" } return o.Key } -func (o *GetAllMediaLibraryFilter) GetTitle() string { +func (o *GetLibrarySectionsAllFilter) GetTitle() string { if o == nil { return "" } return o.Title } -func (o *GetAllMediaLibraryFilter) GetType() string { +func (o *GetLibrarySectionsAllFilter) GetType() string { if o == nil { return "" } return o.Type } -func (o *GetAllMediaLibraryFilter) GetAdvanced() *bool { +func (o *GetLibrarySectionsAllFilter) GetAdvanced() *bool { if o == nil { return nil } return o.Advanced } -// GetAllMediaLibraryActiveDirection - The direction of the sort. Can be either `asc` or `desc`. -type GetAllMediaLibraryActiveDirection string +// GetLibrarySectionsAllActiveDirection - The direction of the sort. Can be either `asc` or `desc`. +type GetLibrarySectionsAllActiveDirection string const ( - GetAllMediaLibraryActiveDirectionAscending GetAllMediaLibraryActiveDirection = "asc" - GetAllMediaLibraryActiveDirectionDescending GetAllMediaLibraryActiveDirection = "desc" + GetLibrarySectionsAllActiveDirectionAscending GetLibrarySectionsAllActiveDirection = "asc" + GetLibrarySectionsAllActiveDirectionDescending GetLibrarySectionsAllActiveDirection = "desc" ) -func (e GetAllMediaLibraryActiveDirection) ToPointer() *GetAllMediaLibraryActiveDirection { +func (e GetLibrarySectionsAllActiveDirection) ToPointer() *GetLibrarySectionsAllActiveDirection { return &e } -func (e *GetAllMediaLibraryActiveDirection) UnmarshalJSON(data []byte) error { +func (e *GetLibrarySectionsAllActiveDirection) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err @@ -344,25 +346,25 @@ func (e *GetAllMediaLibraryActiveDirection) UnmarshalJSON(data []byte) error { case "asc": fallthrough case "desc": - *e = GetAllMediaLibraryActiveDirection(v) + *e = GetLibrarySectionsAllActiveDirection(v) return nil default: - return fmt.Errorf("invalid value for GetAllMediaLibraryActiveDirection: %v", v) + return fmt.Errorf("invalid value for GetLibrarySectionsAllActiveDirection: %v", v) } } -// GetAllMediaLibraryDefaultDirection - The direction of the sort. Can be either `asc` or `desc`. -type GetAllMediaLibraryDefaultDirection string +// GetLibrarySectionsAllDefaultDirection - The direction of the sort. Can be either `asc` or `desc`. +type GetLibrarySectionsAllDefaultDirection string const ( - GetAllMediaLibraryDefaultDirectionAscending GetAllMediaLibraryDefaultDirection = "asc" - GetAllMediaLibraryDefaultDirectionDescending GetAllMediaLibraryDefaultDirection = "desc" + GetLibrarySectionsAllDefaultDirectionAscending GetLibrarySectionsAllDefaultDirection = "asc" + GetLibrarySectionsAllDefaultDirectionDescending GetLibrarySectionsAllDefaultDirection = "desc" ) -func (e GetAllMediaLibraryDefaultDirection) ToPointer() *GetAllMediaLibraryDefaultDirection { +func (e GetLibrarySectionsAllDefaultDirection) ToPointer() *GetLibrarySectionsAllDefaultDirection { return &e } -func (e *GetAllMediaLibraryDefaultDirection) UnmarshalJSON(data []byte) error { +func (e *GetLibrarySectionsAllDefaultDirection) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err @@ -371,346 +373,363 @@ func (e *GetAllMediaLibraryDefaultDirection) UnmarshalJSON(data []byte) error { case "asc": fallthrough case "desc": - *e = GetAllMediaLibraryDefaultDirection(v) + *e = GetLibrarySectionsAllDefaultDirection(v) return nil default: - return fmt.Errorf("invalid value for GetAllMediaLibraryDefaultDirection: %v", v) + return fmt.Errorf("invalid value for GetLibrarySectionsAllDefaultDirection: %v", v) } } -type GetAllMediaLibrarySort struct { +type GetLibrarySectionsAllSort struct { Default *string `json:"default,omitempty"` Active *bool `json:"active,omitempty"` // The direction of the sort. Can be either `asc` or `desc`. // - ActiveDirection *GetAllMediaLibraryActiveDirection `default:"asc" json:"activeDirection"` + ActiveDirection *GetLibrarySectionsAllActiveDirection `default:"asc" json:"activeDirection"` // The direction of the sort. Can be either `asc` or `desc`. // - DefaultDirection *GetAllMediaLibraryDefaultDirection `default:"asc" json:"defaultDirection"` - DescKey *string `json:"descKey,omitempty"` - FirstCharacterKey *string `json:"firstCharacterKey,omitempty"` - Key string `json:"key"` - Title string `json:"title"` + DefaultDirection *GetLibrarySectionsAllDefaultDirection `default:"asc" json:"defaultDirection"` + DescKey *string `json:"descKey,omitempty"` + FirstCharacterKey *string `json:"firstCharacterKey,omitempty"` + Key string `json:"key"` + Title string `json:"title"` } -func (g GetAllMediaLibrarySort) MarshalJSON() ([]byte, error) { +func (g GetLibrarySectionsAllSort) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } -func (g *GetAllMediaLibrarySort) UnmarshalJSON(data []byte) error { +func (g *GetLibrarySectionsAllSort) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { return err } return nil } -func (o *GetAllMediaLibrarySort) GetDefault() *string { +func (o *GetLibrarySectionsAllSort) GetDefault() *string { if o == nil { return nil } return o.Default } -func (o *GetAllMediaLibrarySort) GetActive() *bool { +func (o *GetLibrarySectionsAllSort) GetActive() *bool { if o == nil { return nil } return o.Active } -func (o *GetAllMediaLibrarySort) GetActiveDirection() *GetAllMediaLibraryActiveDirection { +func (o *GetLibrarySectionsAllSort) GetActiveDirection() *GetLibrarySectionsAllActiveDirection { if o == nil { return nil } return o.ActiveDirection } -func (o *GetAllMediaLibrarySort) GetDefaultDirection() *GetAllMediaLibraryDefaultDirection { +func (o *GetLibrarySectionsAllSort) GetDefaultDirection() *GetLibrarySectionsAllDefaultDirection { if o == nil { return nil } return o.DefaultDirection } -func (o *GetAllMediaLibrarySort) GetDescKey() *string { +func (o *GetLibrarySectionsAllSort) GetDescKey() *string { if o == nil { return nil } return o.DescKey } -func (o *GetAllMediaLibrarySort) GetFirstCharacterKey() *string { +func (o *GetLibrarySectionsAllSort) GetFirstCharacterKey() *string { if o == nil { return nil } return o.FirstCharacterKey } -func (o *GetAllMediaLibrarySort) GetKey() string { +func (o *GetLibrarySectionsAllSort) GetKey() string { if o == nil { return "" } return o.Key } -func (o *GetAllMediaLibrarySort) GetTitle() string { +func (o *GetLibrarySectionsAllSort) GetTitle() string { if o == nil { return "" } return o.Title } -type GetAllMediaLibraryField struct { +type GetLibrarySectionsAllField struct { Key string `json:"key"` Title string `json:"title"` Type string `json:"type"` SubType *string `json:"subType,omitempty"` } -func (o *GetAllMediaLibraryField) GetKey() string { +func (o *GetLibrarySectionsAllField) GetKey() string { if o == nil { return "" } return o.Key } -func (o *GetAllMediaLibraryField) GetTitle() string { +func (o *GetLibrarySectionsAllField) GetTitle() string { if o == nil { return "" } return o.Title } -func (o *GetAllMediaLibraryField) GetType() string { +func (o *GetLibrarySectionsAllField) GetType() string { if o == nil { return "" } return o.Type } -func (o *GetAllMediaLibraryField) GetSubType() *string { +func (o *GetLibrarySectionsAllField) GetSubType() *string { if o == nil { return nil } return o.SubType } -type GetAllMediaLibraryType struct { - Key string `json:"key"` - Type string `json:"type"` - Subtype *string `json:"subtype,omitempty"` - Title string `json:"title"` - Active bool `json:"active"` - Filter []GetAllMediaLibraryFilter `json:"Filter,omitempty"` - Sort []GetAllMediaLibrarySort `json:"Sort,omitempty"` - Field []GetAllMediaLibraryField `json:"Field,omitempty"` +type GetLibrarySectionsAllType struct { + Key string `json:"key"` + Type string `json:"type"` + Subtype *string `json:"subtype,omitempty"` + Title string `json:"title"` + Active bool `json:"active"` + Filter []GetLibrarySectionsAllFilter `json:"Filter,omitempty"` + Sort []GetLibrarySectionsAllSort `json:"Sort,omitempty"` + Field []GetLibrarySectionsAllField `json:"Field,omitempty"` } -func (o *GetAllMediaLibraryType) GetKey() string { +func (o *GetLibrarySectionsAllType) GetKey() string { if o == nil { return "" } return o.Key } -func (o *GetAllMediaLibraryType) GetType() string { +func (o *GetLibrarySectionsAllType) GetType() string { if o == nil { return "" } return o.Type } -func (o *GetAllMediaLibraryType) GetSubtype() *string { +func (o *GetLibrarySectionsAllType) GetSubtype() *string { if o == nil { return nil } return o.Subtype } -func (o *GetAllMediaLibraryType) GetTitle() string { +func (o *GetLibrarySectionsAllType) GetTitle() string { if o == nil { return "" } return o.Title } -func (o *GetAllMediaLibraryType) GetActive() bool { +func (o *GetLibrarySectionsAllType) GetActive() bool { if o == nil { return false } return o.Active } -func (o *GetAllMediaLibraryType) GetFilter() []GetAllMediaLibraryFilter { +func (o *GetLibrarySectionsAllType) GetFilter() []GetLibrarySectionsAllFilter { if o == nil { return nil } return o.Filter } -func (o *GetAllMediaLibraryType) GetSort() []GetAllMediaLibrarySort { +func (o *GetLibrarySectionsAllType) GetSort() []GetLibrarySectionsAllSort { if o == nil { return nil } return o.Sort } -func (o *GetAllMediaLibraryType) GetField() []GetAllMediaLibraryField { +func (o *GetLibrarySectionsAllType) GetField() []GetLibrarySectionsAllField { if o == nil { return nil } return o.Field } -type GetAllMediaLibraryOperator struct { +type GetLibrarySectionsAllOperator struct { Key string `json:"key"` Title string `json:"title"` } -func (o *GetAllMediaLibraryOperator) GetKey() string { +func (o *GetLibrarySectionsAllOperator) GetKey() string { if o == nil { return "" } return o.Key } -func (o *GetAllMediaLibraryOperator) GetTitle() string { +func (o *GetLibrarySectionsAllOperator) GetTitle() string { if o == nil { return "" } return o.Title } -type GetAllMediaLibraryFieldType struct { - Type string `json:"type"` - Operator []GetAllMediaLibraryOperator `json:"Operator"` +type GetLibrarySectionsAllFieldType struct { + Type string `json:"type"` + Operator []GetLibrarySectionsAllOperator `json:"Operator"` } -func (o *GetAllMediaLibraryFieldType) GetType() string { +func (o *GetLibrarySectionsAllFieldType) GetType() string { if o == nil { return "" } return o.Type } -func (o *GetAllMediaLibraryFieldType) GetOperator() []GetAllMediaLibraryOperator { +func (o *GetLibrarySectionsAllFieldType) GetOperator() []GetLibrarySectionsAllOperator { if o == nil { - return []GetAllMediaLibraryOperator{} + return []GetLibrarySectionsAllOperator{} } return o.Operator } -// GetAllMediaLibraryMeta - The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. -type GetAllMediaLibraryMeta struct { - Type []GetAllMediaLibraryType `json:"Type,omitempty"` - FieldType []GetAllMediaLibraryFieldType `json:"FieldType,omitempty"` +// GetLibrarySectionsAllMeta - The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. +type GetLibrarySectionsAllMeta struct { + Type []GetLibrarySectionsAllType `json:"Type,omitempty"` + FieldType []GetLibrarySectionsAllFieldType `json:"FieldType,omitempty"` } -func (o *GetAllMediaLibraryMeta) GetType() []GetAllMediaLibraryType { +func (o *GetLibrarySectionsAllMeta) GetType() []GetLibrarySectionsAllType { if o == nil { return nil } return o.Type } -func (o *GetAllMediaLibraryMeta) GetFieldType() []GetAllMediaLibraryFieldType { +func (o *GetLibrarySectionsAllMeta) GetFieldType() []GetLibrarySectionsAllFieldType { if o == nil { return nil } return o.FieldType } -// GetAllMediaLibraryLibraryType - The type of media content -type GetAllMediaLibraryLibraryType string +// GetLibrarySectionsAllLibraryType - The type of media content in the Plex library. This can represent videos, music, or photos. +type GetLibrarySectionsAllLibraryType string const ( - GetAllMediaLibraryLibraryTypeMovie GetAllMediaLibraryLibraryType = "movie" - GetAllMediaLibraryLibraryTypeTvShow GetAllMediaLibraryLibraryType = "show" - GetAllMediaLibraryLibraryTypeSeason GetAllMediaLibraryLibraryType = "season" - GetAllMediaLibraryLibraryTypeEpisode GetAllMediaLibraryLibraryType = "episode" - GetAllMediaLibraryLibraryTypeArtist GetAllMediaLibraryLibraryType = "artist" - GetAllMediaLibraryLibraryTypeAlbum GetAllMediaLibraryLibraryType = "album" + GetLibrarySectionsAllLibraryTypeMovie GetLibrarySectionsAllLibraryType = "movie" + GetLibrarySectionsAllLibraryTypeTvShow GetLibrarySectionsAllLibraryType = "show" + GetLibrarySectionsAllLibraryTypeSeason GetLibrarySectionsAllLibraryType = "season" + GetLibrarySectionsAllLibraryTypeEpisode GetLibrarySectionsAllLibraryType = "episode" + GetLibrarySectionsAllLibraryTypeArtist GetLibrarySectionsAllLibraryType = "artist" + GetLibrarySectionsAllLibraryTypeAlbum GetLibrarySectionsAllLibraryType = "album" + GetLibrarySectionsAllLibraryTypeTrack GetLibrarySectionsAllLibraryType = "track" + GetLibrarySectionsAllLibraryTypePhotoAlbum GetLibrarySectionsAllLibraryType = "photoalbum" + GetLibrarySectionsAllLibraryTypePhoto GetLibrarySectionsAllLibraryType = "photo" + GetLibrarySectionsAllLibraryTypeCollection GetLibrarySectionsAllLibraryType = "collection" ) -func (e GetAllMediaLibraryLibraryType) ToPointer() *GetAllMediaLibraryLibraryType { +func (e GetLibrarySectionsAllLibraryType) ToPointer() *GetLibrarySectionsAllLibraryType { return &e } -type GetAllMediaLibraryLibraryResponseType string +type GetLibrarySectionsAllLibraryResponseType string const ( - GetAllMediaLibraryLibraryResponseTypeCoverPoster GetAllMediaLibraryLibraryResponseType = "coverPoster" - GetAllMediaLibraryLibraryResponseTypeBackground GetAllMediaLibraryLibraryResponseType = "background" - GetAllMediaLibraryLibraryResponseTypeSnapshot GetAllMediaLibraryLibraryResponseType = "snapshot" - GetAllMediaLibraryLibraryResponseTypeClearLogo GetAllMediaLibraryLibraryResponseType = "clearLogo" + GetLibrarySectionsAllLibraryResponseTypeCoverPoster GetLibrarySectionsAllLibraryResponseType = "coverPoster" + GetLibrarySectionsAllLibraryResponseTypeBackground GetLibrarySectionsAllLibraryResponseType = "background" + GetLibrarySectionsAllLibraryResponseTypeSnapshot GetLibrarySectionsAllLibraryResponseType = "snapshot" + GetLibrarySectionsAllLibraryResponseTypeClearLogo GetLibrarySectionsAllLibraryResponseType = "clearLogo" ) -func (e GetAllMediaLibraryLibraryResponseType) ToPointer() *GetAllMediaLibraryLibraryResponseType { +func (e GetLibrarySectionsAllLibraryResponseType) ToPointer() *GetLibrarySectionsAllLibraryResponseType { return &e } -type GetAllMediaLibraryImage struct { - Alt string `json:"alt"` - Type GetAllMediaLibraryLibraryResponseType `json:"type"` - URL string `json:"url"` +type GetLibrarySectionsAllImage struct { + Alt string `json:"alt"` + Type GetLibrarySectionsAllLibraryResponseType `json:"type"` + URL string `json:"url"` } -func (o *GetAllMediaLibraryImage) GetAlt() string { +func (o *GetLibrarySectionsAllImage) GetAlt() string { if o == nil { return "" } return o.Alt } -func (o *GetAllMediaLibraryImage) GetType() GetAllMediaLibraryLibraryResponseType { +func (o *GetLibrarySectionsAllImage) GetType() GetLibrarySectionsAllLibraryResponseType { if o == nil { - return GetAllMediaLibraryLibraryResponseType("") + return GetLibrarySectionsAllLibraryResponseType("") } return o.Type } -func (o *GetAllMediaLibraryImage) GetURL() string { +func (o *GetLibrarySectionsAllImage) GetURL() string { if o == nil { return "" } return o.URL } -type GetAllMediaLibraryUltraBlurColors struct { +type GetLibrarySectionsAllUltraBlurColors struct { TopLeft string `json:"topLeft"` TopRight string `json:"topRight"` BottomRight string `json:"bottomRight"` BottomLeft string `json:"bottomLeft"` } -func (o *GetAllMediaLibraryUltraBlurColors) GetTopLeft() string { +func (o *GetLibrarySectionsAllUltraBlurColors) GetTopLeft() string { if o == nil { return "" } return o.TopLeft } -func (o *GetAllMediaLibraryUltraBlurColors) GetTopRight() string { +func (o *GetLibrarySectionsAllUltraBlurColors) GetTopRight() string { if o == nil { return "" } return o.TopRight } -func (o *GetAllMediaLibraryUltraBlurColors) GetBottomRight() string { +func (o *GetLibrarySectionsAllUltraBlurColors) GetBottomRight() string { if o == nil { return "" } return o.BottomRight } -func (o *GetAllMediaLibraryUltraBlurColors) GetBottomLeft() string { +func (o *GetLibrarySectionsAllUltraBlurColors) GetBottomLeft() string { if o == nil { return "" } return o.BottomLeft } +type GetLibrarySectionsAllGuids struct { + // The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// + // + ID string `json:"id"` +} + +func (o *GetLibrarySectionsAllGuids) GetID() string { + if o == nil { + return "" + } + return o.ID +} + type OptimizedForStreaming1 int const ( @@ -737,59 +756,59 @@ func (e *OptimizedForStreaming1) UnmarshalJSON(data []byte) error { } } -type GetAllMediaLibraryOptimizedForStreamingType string +type GetLibrarySectionsAllOptimizedForStreamingType string const ( - GetAllMediaLibraryOptimizedForStreamingTypeOptimizedForStreaming1 GetAllMediaLibraryOptimizedForStreamingType = "optimizedForStreaming_1" - GetAllMediaLibraryOptimizedForStreamingTypeBoolean GetAllMediaLibraryOptimizedForStreamingType = "boolean" + GetLibrarySectionsAllOptimizedForStreamingTypeOptimizedForStreaming1 GetLibrarySectionsAllOptimizedForStreamingType = "optimizedForStreaming_1" + GetLibrarySectionsAllOptimizedForStreamingTypeBoolean GetLibrarySectionsAllOptimizedForStreamingType = "boolean" ) -// GetAllMediaLibraryOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true -type GetAllMediaLibraryOptimizedForStreaming struct { +// GetLibrarySectionsAllOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true +type GetLibrarySectionsAllOptimizedForStreaming struct { OptimizedForStreaming1 *OptimizedForStreaming1 `queryParam:"inline"` Boolean *bool `queryParam:"inline"` - Type GetAllMediaLibraryOptimizedForStreamingType + Type GetLibrarySectionsAllOptimizedForStreamingType } -func CreateGetAllMediaLibraryOptimizedForStreamingOptimizedForStreaming1(optimizedForStreaming1 OptimizedForStreaming1) GetAllMediaLibraryOptimizedForStreaming { - typ := GetAllMediaLibraryOptimizedForStreamingTypeOptimizedForStreaming1 +func CreateGetLibrarySectionsAllOptimizedForStreamingOptimizedForStreaming1(optimizedForStreaming1 OptimizedForStreaming1) GetLibrarySectionsAllOptimizedForStreaming { + typ := GetLibrarySectionsAllOptimizedForStreamingTypeOptimizedForStreaming1 - return GetAllMediaLibraryOptimizedForStreaming{ + return GetLibrarySectionsAllOptimizedForStreaming{ OptimizedForStreaming1: &optimizedForStreaming1, Type: typ, } } -func CreateGetAllMediaLibraryOptimizedForStreamingBoolean(boolean bool) GetAllMediaLibraryOptimizedForStreaming { - typ := GetAllMediaLibraryOptimizedForStreamingTypeBoolean +func CreateGetLibrarySectionsAllOptimizedForStreamingBoolean(boolean bool) GetLibrarySectionsAllOptimizedForStreaming { + typ := GetLibrarySectionsAllOptimizedForStreamingTypeBoolean - return GetAllMediaLibraryOptimizedForStreaming{ + return GetLibrarySectionsAllOptimizedForStreaming{ Boolean: &boolean, Type: typ, } } -func (u *GetAllMediaLibraryOptimizedForStreaming) UnmarshalJSON(data []byte) error { +func (u *GetLibrarySectionsAllOptimizedForStreaming) UnmarshalJSON(data []byte) error { var optimizedForStreaming1 OptimizedForStreaming1 = OptimizedForStreaming1(0) if err := utils.UnmarshalJSON(data, &optimizedForStreaming1, "", true, true); err == nil { u.OptimizedForStreaming1 = &optimizedForStreaming1 - u.Type = GetAllMediaLibraryOptimizedForStreamingTypeOptimizedForStreaming1 + u.Type = GetLibrarySectionsAllOptimizedForStreamingTypeOptimizedForStreaming1 return nil } var boolean bool = false if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { u.Boolean = &boolean - u.Type = GetAllMediaLibraryOptimizedForStreamingTypeBoolean + u.Type = GetLibrarySectionsAllOptimizedForStreamingTypeBoolean return nil } - return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetAllMediaLibraryOptimizedForStreaming", string(data)) + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetLibrarySectionsAllOptimizedForStreaming", string(data)) } -func (u GetAllMediaLibraryOptimizedForStreaming) MarshalJSON() ([]byte, error) { +func (u GetLibrarySectionsAllOptimizedForStreaming) MarshalJSON() ([]byte, error) { if u.OptimizedForStreaming1 != nil { return utils.MarshalJSON(u.OptimizedForStreaming1, "", true) } @@ -798,20 +817,20 @@ func (u GetAllMediaLibraryOptimizedForStreaming) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(u.Boolean, "", true) } - return nil, errors.New("could not marshal union type GetAllMediaLibraryOptimizedForStreaming: all fields are null") + return nil, errors.New("could not marshal union type GetLibrarySectionsAllOptimizedForStreaming: all fields are null") } -type GetAllMediaLibraryOptimizedForStreaming1 int +type GetLibrarySectionsAllOptimizedForStreaming1 int const ( - GetAllMediaLibraryOptimizedForStreaming1Zero GetAllMediaLibraryOptimizedForStreaming1 = 0 - GetAllMediaLibraryOptimizedForStreaming1One GetAllMediaLibraryOptimizedForStreaming1 = 1 + GetLibrarySectionsAllOptimizedForStreaming1Zero GetLibrarySectionsAllOptimizedForStreaming1 = 0 + GetLibrarySectionsAllOptimizedForStreaming1One GetLibrarySectionsAllOptimizedForStreaming1 = 1 ) -func (e GetAllMediaLibraryOptimizedForStreaming1) ToPointer() *GetAllMediaLibraryOptimizedForStreaming1 { +func (e GetLibrarySectionsAllOptimizedForStreaming1) ToPointer() *GetLibrarySectionsAllOptimizedForStreaming1 { return &e } -func (e *GetAllMediaLibraryOptimizedForStreaming1) UnmarshalJSON(data []byte) error { +func (e *GetLibrarySectionsAllOptimizedForStreaming1) UnmarshalJSON(data []byte) error { var v int if err := json.Unmarshal(data, &v); err != nil { return err @@ -820,89 +839,89 @@ func (e *GetAllMediaLibraryOptimizedForStreaming1) UnmarshalJSON(data []byte) er case 0: fallthrough case 1: - *e = GetAllMediaLibraryOptimizedForStreaming1(v) + *e = GetLibrarySectionsAllOptimizedForStreaming1(v) return nil default: - return fmt.Errorf("invalid value for GetAllMediaLibraryOptimizedForStreaming1: %v", v) + return fmt.Errorf("invalid value for GetLibrarySectionsAllOptimizedForStreaming1: %v", v) } } -type GetAllMediaLibraryLibraryOptimizedForStreamingType string +type GetLibrarySectionsAllLibraryOptimizedForStreamingType string const ( - GetAllMediaLibraryLibraryOptimizedForStreamingTypeGetAllMediaLibraryOptimizedForStreaming1 GetAllMediaLibraryLibraryOptimizedForStreamingType = "get-all-media-library_optimizedForStreaming_1" - GetAllMediaLibraryLibraryOptimizedForStreamingTypeBoolean GetAllMediaLibraryLibraryOptimizedForStreamingType = "boolean" + GetLibrarySectionsAllLibraryOptimizedForStreamingTypeGetLibrarySectionsAllOptimizedForStreaming1 GetLibrarySectionsAllLibraryOptimizedForStreamingType = "get-library-sections-all_optimizedForStreaming_1" + GetLibrarySectionsAllLibraryOptimizedForStreamingTypeBoolean GetLibrarySectionsAllLibraryOptimizedForStreamingType = "boolean" ) -// GetAllMediaLibraryLibraryOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true -type GetAllMediaLibraryLibraryOptimizedForStreaming struct { - GetAllMediaLibraryOptimizedForStreaming1 *GetAllMediaLibraryOptimizedForStreaming1 `queryParam:"inline"` - Boolean *bool `queryParam:"inline"` +// GetLibrarySectionsAllLibraryOptimizedForStreaming - Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true +type GetLibrarySectionsAllLibraryOptimizedForStreaming struct { + GetLibrarySectionsAllOptimizedForStreaming1 *GetLibrarySectionsAllOptimizedForStreaming1 `queryParam:"inline"` + Boolean *bool `queryParam:"inline"` - Type GetAllMediaLibraryLibraryOptimizedForStreamingType + Type GetLibrarySectionsAllLibraryOptimizedForStreamingType } -func CreateGetAllMediaLibraryLibraryOptimizedForStreamingGetAllMediaLibraryOptimizedForStreaming1(getAllMediaLibraryOptimizedForStreaming1 GetAllMediaLibraryOptimizedForStreaming1) GetAllMediaLibraryLibraryOptimizedForStreaming { - typ := GetAllMediaLibraryLibraryOptimizedForStreamingTypeGetAllMediaLibraryOptimizedForStreaming1 +func CreateGetLibrarySectionsAllLibraryOptimizedForStreamingGetLibrarySectionsAllOptimizedForStreaming1(getLibrarySectionsAllOptimizedForStreaming1 GetLibrarySectionsAllOptimizedForStreaming1) GetLibrarySectionsAllLibraryOptimizedForStreaming { + typ := GetLibrarySectionsAllLibraryOptimizedForStreamingTypeGetLibrarySectionsAllOptimizedForStreaming1 - return GetAllMediaLibraryLibraryOptimizedForStreaming{ - GetAllMediaLibraryOptimizedForStreaming1: &getAllMediaLibraryOptimizedForStreaming1, - Type: typ, + return GetLibrarySectionsAllLibraryOptimizedForStreaming{ + GetLibrarySectionsAllOptimizedForStreaming1: &getLibrarySectionsAllOptimizedForStreaming1, + Type: typ, } } -func CreateGetAllMediaLibraryLibraryOptimizedForStreamingBoolean(boolean bool) GetAllMediaLibraryLibraryOptimizedForStreaming { - typ := GetAllMediaLibraryLibraryOptimizedForStreamingTypeBoolean +func CreateGetLibrarySectionsAllLibraryOptimizedForStreamingBoolean(boolean bool) GetLibrarySectionsAllLibraryOptimizedForStreaming { + typ := GetLibrarySectionsAllLibraryOptimizedForStreamingTypeBoolean - return GetAllMediaLibraryLibraryOptimizedForStreaming{ + return GetLibrarySectionsAllLibraryOptimizedForStreaming{ Boolean: &boolean, Type: typ, } } -func (u *GetAllMediaLibraryLibraryOptimizedForStreaming) UnmarshalJSON(data []byte) error { +func (u *GetLibrarySectionsAllLibraryOptimizedForStreaming) UnmarshalJSON(data []byte) error { - var getAllMediaLibraryOptimizedForStreaming1 GetAllMediaLibraryOptimizedForStreaming1 = GetAllMediaLibraryOptimizedForStreaming1(0) - if err := utils.UnmarshalJSON(data, &getAllMediaLibraryOptimizedForStreaming1, "", true, true); err == nil { - u.GetAllMediaLibraryOptimizedForStreaming1 = &getAllMediaLibraryOptimizedForStreaming1 - u.Type = GetAllMediaLibraryLibraryOptimizedForStreamingTypeGetAllMediaLibraryOptimizedForStreaming1 + var getLibrarySectionsAllOptimizedForStreaming1 GetLibrarySectionsAllOptimizedForStreaming1 = GetLibrarySectionsAllOptimizedForStreaming1(0) + if err := utils.UnmarshalJSON(data, &getLibrarySectionsAllOptimizedForStreaming1, "", true, true); err == nil { + u.GetLibrarySectionsAllOptimizedForStreaming1 = &getLibrarySectionsAllOptimizedForStreaming1 + u.Type = GetLibrarySectionsAllLibraryOptimizedForStreamingTypeGetLibrarySectionsAllOptimizedForStreaming1 return nil } var boolean bool = false if err := utils.UnmarshalJSON(data, &boolean, "", true, true); err == nil { u.Boolean = &boolean - u.Type = GetAllMediaLibraryLibraryOptimizedForStreamingTypeBoolean + u.Type = GetLibrarySectionsAllLibraryOptimizedForStreamingTypeBoolean return nil } - return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetAllMediaLibraryLibraryOptimizedForStreaming", string(data)) + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetLibrarySectionsAllLibraryOptimizedForStreaming", string(data)) } -func (u GetAllMediaLibraryLibraryOptimizedForStreaming) MarshalJSON() ([]byte, error) { - if u.GetAllMediaLibraryOptimizedForStreaming1 != nil { - return utils.MarshalJSON(u.GetAllMediaLibraryOptimizedForStreaming1, "", true) +func (u GetLibrarySectionsAllLibraryOptimizedForStreaming) MarshalJSON() ([]byte, error) { + if u.GetLibrarySectionsAllOptimizedForStreaming1 != nil { + return utils.MarshalJSON(u.GetLibrarySectionsAllOptimizedForStreaming1, "", true) } if u.Boolean != nil { return utils.MarshalJSON(u.Boolean, "", true) } - return nil, errors.New("could not marshal union type GetAllMediaLibraryLibraryOptimizedForStreaming: all fields are null") + return nil, errors.New("could not marshal union type GetLibrarySectionsAllLibraryOptimizedForStreaming: all fields are null") } -// GetAllMediaLibraryHasThumbnail - Indicates if the part has a thumbnail. -type GetAllMediaLibraryHasThumbnail string +// GetLibrarySectionsAllHasThumbnail - Indicates if the part has a thumbnail. +type GetLibrarySectionsAllHasThumbnail string const ( - GetAllMediaLibraryHasThumbnailFalse GetAllMediaLibraryHasThumbnail = "0" - GetAllMediaLibraryHasThumbnailTrue GetAllMediaLibraryHasThumbnail = "1" + GetLibrarySectionsAllHasThumbnailFalse GetLibrarySectionsAllHasThumbnail = "0" + GetLibrarySectionsAllHasThumbnailTrue GetLibrarySectionsAllHasThumbnail = "1" ) -func (e GetAllMediaLibraryHasThumbnail) ToPointer() *GetAllMediaLibraryHasThumbnail { +func (e GetLibrarySectionsAllHasThumbnail) ToPointer() *GetLibrarySectionsAllHasThumbnail { return &e } -func (e *GetAllMediaLibraryHasThumbnail) UnmarshalJSON(data []byte) error { +func (e *GetLibrarySectionsAllHasThumbnail) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err @@ -911,30 +930,30 @@ func (e *GetAllMediaLibraryHasThumbnail) UnmarshalJSON(data []byte) error { case "0": fallthrough case "1": - *e = GetAllMediaLibraryHasThumbnail(v) + *e = GetLibrarySectionsAllHasThumbnail(v) return nil default: - return fmt.Errorf("invalid value for GetAllMediaLibraryHasThumbnail: %v", v) + return fmt.Errorf("invalid value for GetLibrarySectionsAllHasThumbnail: %v", v) } } -// GetAllMediaLibraryStreamType - Stream type: +// GetLibrarySectionsAllStreamType - Stream type: // - 1 = video // - 2 = audio // - 3 = subtitle -type GetAllMediaLibraryStreamType int +type GetLibrarySectionsAllStreamType int const ( - GetAllMediaLibraryStreamTypeVideo GetAllMediaLibraryStreamType = 1 - GetAllMediaLibraryStreamTypeAudio GetAllMediaLibraryStreamType = 2 - GetAllMediaLibraryStreamTypeSubtitle GetAllMediaLibraryStreamType = 3 + GetLibrarySectionsAllStreamTypeVideo GetLibrarySectionsAllStreamType = 1 + GetLibrarySectionsAllStreamTypeAudio GetLibrarySectionsAllStreamType = 2 + GetLibrarySectionsAllStreamTypeSubtitle GetLibrarySectionsAllStreamType = 3 ) -func (e GetAllMediaLibraryStreamType) ToPointer() *GetAllMediaLibraryStreamType { +func (e GetLibrarySectionsAllStreamType) ToPointer() *GetLibrarySectionsAllStreamType { return &e } -type GetAllMediaLibraryStream struct { +type GetLibrarySectionsAllStream struct { // Unique stream identifier. ID int64 `json:"id"` // Stream type: @@ -942,7 +961,7 @@ type GetAllMediaLibraryStream struct { // - 2 = audio // - 3 = subtitle // - StreamType GetAllMediaLibraryStreamType `json:"streamType"` + StreamType GetLibrarySectionsAllStreamType `json:"streamType"` // Format of the stream (e.g., srt). Format *string `json:"format,omitempty"` // Indicates if this stream is default. @@ -1038,364 +1057,364 @@ type GetAllMediaLibraryStream struct { Title *string `json:"title,omitempty"` } -func (o *GetAllMediaLibraryStream) GetID() int64 { +func (o *GetLibrarySectionsAllStream) GetID() int64 { if o == nil { return 0 } return o.ID } -func (o *GetAllMediaLibraryStream) GetStreamType() GetAllMediaLibraryStreamType { +func (o *GetLibrarySectionsAllStream) GetStreamType() GetLibrarySectionsAllStreamType { if o == nil { - return GetAllMediaLibraryStreamType(0) + return GetLibrarySectionsAllStreamType(0) } return o.StreamType } -func (o *GetAllMediaLibraryStream) GetFormat() *string { +func (o *GetLibrarySectionsAllStream) GetFormat() *string { if o == nil { return nil } return o.Format } -func (o *GetAllMediaLibraryStream) GetDefault() *bool { +func (o *GetLibrarySectionsAllStream) GetDefault() *bool { if o == nil { return nil } return o.Default } -func (o *GetAllMediaLibraryStream) GetCodec() string { +func (o *GetLibrarySectionsAllStream) GetCodec() string { if o == nil { return "" } return o.Codec } -func (o *GetAllMediaLibraryStream) GetIndex() *int { +func (o *GetLibrarySectionsAllStream) GetIndex() *int { if o == nil { return nil } return o.Index } -func (o *GetAllMediaLibraryStream) GetBitrate() *int { +func (o *GetLibrarySectionsAllStream) GetBitrate() *int { if o == nil { return nil } return o.Bitrate } -func (o *GetAllMediaLibraryStream) GetLanguage() *string { +func (o *GetLibrarySectionsAllStream) GetLanguage() *string { if o == nil { return nil } return o.Language } -func (o *GetAllMediaLibraryStream) GetLanguageTag() *string { +func (o *GetLibrarySectionsAllStream) GetLanguageTag() *string { if o == nil { return nil } return o.LanguageTag } -func (o *GetAllMediaLibraryStream) GetLanguageCode() *string { +func (o *GetLibrarySectionsAllStream) GetLanguageCode() *string { if o == nil { return nil } return o.LanguageCode } -func (o *GetAllMediaLibraryStream) GetHeaderCompression() *bool { +func (o *GetLibrarySectionsAllStream) GetHeaderCompression() *bool { if o == nil { return nil } return o.HeaderCompression } -func (o *GetAllMediaLibraryStream) GetDOVIBLCompatID() *int { +func (o *GetLibrarySectionsAllStream) GetDOVIBLCompatID() *int { if o == nil { return nil } return o.DOVIBLCompatID } -func (o *GetAllMediaLibraryStream) GetDOVIBLPresent() *bool { +func (o *GetLibrarySectionsAllStream) GetDOVIBLPresent() *bool { if o == nil { return nil } return o.DOVIBLPresent } -func (o *GetAllMediaLibraryStream) GetDOVIELPresent() *bool { +func (o *GetLibrarySectionsAllStream) GetDOVIELPresent() *bool { if o == nil { return nil } return o.DOVIELPresent } -func (o *GetAllMediaLibraryStream) GetDOVILevel() *int { +func (o *GetLibrarySectionsAllStream) GetDOVILevel() *int { if o == nil { return nil } return o.DOVILevel } -func (o *GetAllMediaLibraryStream) GetDOVIPresent() *bool { +func (o *GetLibrarySectionsAllStream) GetDOVIPresent() *bool { if o == nil { return nil } return o.DOVIPresent } -func (o *GetAllMediaLibraryStream) GetDOVIProfile() *int { +func (o *GetLibrarySectionsAllStream) GetDOVIProfile() *int { if o == nil { return nil } return o.DOVIProfile } -func (o *GetAllMediaLibraryStream) GetDOVIRPUPresent() *bool { +func (o *GetLibrarySectionsAllStream) GetDOVIRPUPresent() *bool { if o == nil { return nil } return o.DOVIRPUPresent } -func (o *GetAllMediaLibraryStream) GetDOVIVersion() *string { +func (o *GetLibrarySectionsAllStream) GetDOVIVersion() *string { if o == nil { return nil } return o.DOVIVersion } -func (o *GetAllMediaLibraryStream) GetBitDepth() *int { +func (o *GetLibrarySectionsAllStream) GetBitDepth() *int { if o == nil { return nil } return o.BitDepth } -func (o *GetAllMediaLibraryStream) GetChromaLocation() *string { +func (o *GetLibrarySectionsAllStream) GetChromaLocation() *string { if o == nil { return nil } return o.ChromaLocation } -func (o *GetAllMediaLibraryStream) GetChromaSubsampling() *string { +func (o *GetLibrarySectionsAllStream) GetChromaSubsampling() *string { if o == nil { return nil } return o.ChromaSubsampling } -func (o *GetAllMediaLibraryStream) GetCodedHeight() *int { +func (o *GetLibrarySectionsAllStream) GetCodedHeight() *int { if o == nil { return nil } return o.CodedHeight } -func (o *GetAllMediaLibraryStream) GetCodedWidth() *int { +func (o *GetLibrarySectionsAllStream) GetCodedWidth() *int { if o == nil { return nil } return o.CodedWidth } -func (o *GetAllMediaLibraryStream) GetClosedCaptions() *bool { +func (o *GetLibrarySectionsAllStream) GetClosedCaptions() *bool { if o == nil { return nil } return o.ClosedCaptions } -func (o *GetAllMediaLibraryStream) GetColorPrimaries() *string { +func (o *GetLibrarySectionsAllStream) GetColorPrimaries() *string { if o == nil { return nil } return o.ColorPrimaries } -func (o *GetAllMediaLibraryStream) GetColorRange() *string { +func (o *GetLibrarySectionsAllStream) GetColorRange() *string { if o == nil { return nil } return o.ColorRange } -func (o *GetAllMediaLibraryStream) GetColorSpace() *string { +func (o *GetLibrarySectionsAllStream) GetColorSpace() *string { if o == nil { return nil } return o.ColorSpace } -func (o *GetAllMediaLibraryStream) GetColorTrc() *string { +func (o *GetLibrarySectionsAllStream) GetColorTrc() *string { if o == nil { return nil } return o.ColorTrc } -func (o *GetAllMediaLibraryStream) GetFrameRate() *float32 { +func (o *GetLibrarySectionsAllStream) GetFrameRate() *float32 { if o == nil { return nil } return o.FrameRate } -func (o *GetAllMediaLibraryStream) GetKey() *string { +func (o *GetLibrarySectionsAllStream) GetKey() *string { if o == nil { return nil } return o.Key } -func (o *GetAllMediaLibraryStream) GetHeight() *int { +func (o *GetLibrarySectionsAllStream) GetHeight() *int { if o == nil { return nil } return o.Height } -func (o *GetAllMediaLibraryStream) GetLevel() *int { +func (o *GetLibrarySectionsAllStream) GetLevel() *int { if o == nil { return nil } return o.Level } -func (o *GetAllMediaLibraryStream) GetOriginal() *bool { +func (o *GetLibrarySectionsAllStream) GetOriginal() *bool { if o == nil { return nil } return o.Original } -func (o *GetAllMediaLibraryStream) GetHasScalingMatrix() *bool { +func (o *GetLibrarySectionsAllStream) GetHasScalingMatrix() *bool { if o == nil { return nil } return o.HasScalingMatrix } -func (o *GetAllMediaLibraryStream) GetProfile() *string { +func (o *GetLibrarySectionsAllStream) GetProfile() *string { if o == nil { return nil } return o.Profile } -func (o *GetAllMediaLibraryStream) GetScanType() *string { +func (o *GetLibrarySectionsAllStream) GetScanType() *string { if o == nil { return nil } return o.ScanType } -func (o *GetAllMediaLibraryStream) GetEmbeddedInVideo() *string { +func (o *GetLibrarySectionsAllStream) GetEmbeddedInVideo() *string { if o == nil { return nil } return o.EmbeddedInVideo } -func (o *GetAllMediaLibraryStream) GetRefFrames() *int { +func (o *GetLibrarySectionsAllStream) GetRefFrames() *int { if o == nil { return nil } return o.RefFrames } -func (o *GetAllMediaLibraryStream) GetWidth() *int { +func (o *GetLibrarySectionsAllStream) GetWidth() *int { if o == nil { return nil } return o.Width } -func (o *GetAllMediaLibraryStream) GetDisplayTitle() string { +func (o *GetLibrarySectionsAllStream) GetDisplayTitle() string { if o == nil { return "" } return o.DisplayTitle } -func (o *GetAllMediaLibraryStream) GetExtendedDisplayTitle() string { +func (o *GetLibrarySectionsAllStream) GetExtendedDisplayTitle() string { if o == nil { return "" } return o.ExtendedDisplayTitle } -func (o *GetAllMediaLibraryStream) GetSelected() *bool { +func (o *GetLibrarySectionsAllStream) GetSelected() *bool { if o == nil { return nil } return o.Selected } -func (o *GetAllMediaLibraryStream) GetForced() *bool { +func (o *GetLibrarySectionsAllStream) GetForced() *bool { if o == nil { return nil } return o.Forced } -func (o *GetAllMediaLibraryStream) GetChannels() *int { +func (o *GetLibrarySectionsAllStream) GetChannels() *int { if o == nil { return nil } return o.Channels } -func (o *GetAllMediaLibraryStream) GetAudioChannelLayout() *string { +func (o *GetLibrarySectionsAllStream) GetAudioChannelLayout() *string { if o == nil { return nil } return o.AudioChannelLayout } -func (o *GetAllMediaLibraryStream) GetSamplingRate() *int { +func (o *GetLibrarySectionsAllStream) GetSamplingRate() *int { if o == nil { return nil } return o.SamplingRate } -func (o *GetAllMediaLibraryStream) GetCanAutoSync() *bool { +func (o *GetLibrarySectionsAllStream) GetCanAutoSync() *bool { if o == nil { return nil } return o.CanAutoSync } -func (o *GetAllMediaLibraryStream) GetHearingImpaired() *bool { +func (o *GetLibrarySectionsAllStream) GetHearingImpaired() *bool { if o == nil { return nil } return o.HearingImpaired } -func (o *GetAllMediaLibraryStream) GetDub() *bool { +func (o *GetLibrarySectionsAllStream) GetDub() *bool { if o == nil { return nil } return o.Dub } -func (o *GetAllMediaLibraryStream) GetTitle() *string { +func (o *GetLibrarySectionsAllStream) GetTitle() *string { if o == nil { return nil } return o.Title } -type GetAllMediaLibraryPart struct { +type GetLibrarySectionsAllPart struct { // Indicates if the part is accessible. Accessible *bool `json:"accessible,omitempty"` // Indicates if the part exists. @@ -1420,136 +1439,136 @@ type GetAllMediaLibraryPart struct { AudioProfile *string `json:"audioProfile,omitempty"` Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"` // Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - OptimizedForStreaming *GetAllMediaLibraryLibraryOptimizedForStreaming `json:"optimizedForStreaming,omitempty"` - HasThumbnail *GetAllMediaLibraryHasThumbnail `default:"0" json:"hasThumbnail"` + OptimizedForStreaming *GetLibrarySectionsAllLibraryOptimizedForStreaming `json:"optimizedForStreaming,omitempty"` + HasThumbnail *GetLibrarySectionsAllHasThumbnail `default:"0" json:"hasThumbnail"` // An array of streams for this part. - Stream []GetAllMediaLibraryStream `json:"Stream,omitempty"` + Stream []GetLibrarySectionsAllStream `json:"Stream,omitempty"` } -func (g GetAllMediaLibraryPart) MarshalJSON() ([]byte, error) { +func (g GetLibrarySectionsAllPart) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } -func (g *GetAllMediaLibraryPart) UnmarshalJSON(data []byte) error { +func (g *GetLibrarySectionsAllPart) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { return err } return nil } -func (o *GetAllMediaLibraryPart) GetAccessible() *bool { +func (o *GetLibrarySectionsAllPart) GetAccessible() *bool { if o == nil { return nil } return o.Accessible } -func (o *GetAllMediaLibraryPart) GetExists() *bool { +func (o *GetLibrarySectionsAllPart) GetExists() *bool { if o == nil { return nil } return o.Exists } -func (o *GetAllMediaLibraryPart) GetID() int64 { +func (o *GetLibrarySectionsAllPart) GetID() int64 { if o == nil { return 0 } return o.ID } -func (o *GetAllMediaLibraryPart) GetKey() string { +func (o *GetLibrarySectionsAllPart) GetKey() string { if o == nil { return "" } return o.Key } -func (o *GetAllMediaLibraryPart) GetIndexes() *string { +func (o *GetLibrarySectionsAllPart) GetIndexes() *string { if o == nil { return nil } return o.Indexes } -func (o *GetAllMediaLibraryPart) GetDuration() *int { +func (o *GetLibrarySectionsAllPart) GetDuration() *int { if o == nil { return nil } return o.Duration } -func (o *GetAllMediaLibraryPart) GetFile() string { +func (o *GetLibrarySectionsAllPart) GetFile() string { if o == nil { return "" } return o.File } -func (o *GetAllMediaLibraryPart) GetSize() int64 { +func (o *GetLibrarySectionsAllPart) GetSize() int64 { if o == nil { return 0 } return o.Size } -func (o *GetAllMediaLibraryPart) GetPacketLength() *int { +func (o *GetLibrarySectionsAllPart) GetPacketLength() *int { if o == nil { return nil } return o.PacketLength } -func (o *GetAllMediaLibraryPart) GetContainer() *string { +func (o *GetLibrarySectionsAllPart) GetContainer() *string { if o == nil { return nil } return o.Container } -func (o *GetAllMediaLibraryPart) GetVideoProfile() *string { +func (o *GetLibrarySectionsAllPart) GetVideoProfile() *string { if o == nil { return nil } return o.VideoProfile } -func (o *GetAllMediaLibraryPart) GetAudioProfile() *string { +func (o *GetLibrarySectionsAllPart) GetAudioProfile() *string { if o == nil { return nil } return o.AudioProfile } -func (o *GetAllMediaLibraryPart) GetHas64bitOffsets() *bool { +func (o *GetLibrarySectionsAllPart) GetHas64bitOffsets() *bool { if o == nil { return nil } return o.Has64bitOffsets } -func (o *GetAllMediaLibraryPart) GetOptimizedForStreaming() *GetAllMediaLibraryLibraryOptimizedForStreaming { +func (o *GetLibrarySectionsAllPart) GetOptimizedForStreaming() *GetLibrarySectionsAllLibraryOptimizedForStreaming { if o == nil { return nil } return o.OptimizedForStreaming } -func (o *GetAllMediaLibraryPart) GetHasThumbnail() *GetAllMediaLibraryHasThumbnail { +func (o *GetLibrarySectionsAllPart) GetHasThumbnail() *GetLibrarySectionsAllHasThumbnail { if o == nil { return nil } return o.HasThumbnail } -func (o *GetAllMediaLibraryPart) GetStream() []GetAllMediaLibraryStream { +func (o *GetLibrarySectionsAllPart) GetStream() []GetLibrarySectionsAllStream { if o == nil { return nil } return o.Stream } -type GetAllMediaLibraryMedia struct { +type GetLibrarySectionsAllMedia struct { // Unique media identifier. ID int64 `json:"id"` // Duration of the media in milliseconds. @@ -1583,233 +1602,220 @@ type GetAllMediaLibraryMedia struct { // The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). AudioProfile *string `json:"audioProfile,omitempty"` // Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true - OptimizedForStreaming *GetAllMediaLibraryOptimizedForStreaming `json:"optimizedForStreaming,omitempty"` - Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"` + OptimizedForStreaming *GetLibrarySectionsAllOptimizedForStreaming `json:"optimizedForStreaming,omitempty"` + Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"` // An array of parts for this media item. - Part []GetAllMediaLibraryPart `json:"Part,omitempty"` + Part []GetLibrarySectionsAllPart `json:"Part,omitempty"` } -func (o *GetAllMediaLibraryMedia) GetID() int64 { +func (o *GetLibrarySectionsAllMedia) GetID() int64 { if o == nil { return 0 } return o.ID } -func (o *GetAllMediaLibraryMedia) GetDuration() *int { +func (o *GetLibrarySectionsAllMedia) GetDuration() *int { if o == nil { return nil } return o.Duration } -func (o *GetAllMediaLibraryMedia) GetBitrate() *int { +func (o *GetLibrarySectionsAllMedia) GetBitrate() *int { if o == nil { return nil } return o.Bitrate } -func (o *GetAllMediaLibraryMedia) GetWidth() *int { +func (o *GetLibrarySectionsAllMedia) GetWidth() *int { if o == nil { return nil } return o.Width } -func (o *GetAllMediaLibraryMedia) GetHeight() *int { +func (o *GetLibrarySectionsAllMedia) GetHeight() *int { if o == nil { return nil } return o.Height } -func (o *GetAllMediaLibraryMedia) GetAspectRatio() *float32 { +func (o *GetLibrarySectionsAllMedia) GetAspectRatio() *float32 { if o == nil { return nil } return o.AspectRatio } -func (o *GetAllMediaLibraryMedia) GetAudioChannels() *int { +func (o *GetLibrarySectionsAllMedia) GetAudioChannels() *int { if o == nil { return nil } return o.AudioChannels } -func (o *GetAllMediaLibraryMedia) GetDisplayOffset() *int { +func (o *GetLibrarySectionsAllMedia) GetDisplayOffset() *int { if o == nil { return nil } return o.DisplayOffset } -func (o *GetAllMediaLibraryMedia) GetAudioCodec() *string { +func (o *GetLibrarySectionsAllMedia) GetAudioCodec() *string { if o == nil { return nil } return o.AudioCodec } -func (o *GetAllMediaLibraryMedia) GetVideoCodec() *string { +func (o *GetLibrarySectionsAllMedia) GetVideoCodec() *string { if o == nil { return nil } return o.VideoCodec } -func (o *GetAllMediaLibraryMedia) GetVideoResolution() *string { +func (o *GetLibrarySectionsAllMedia) GetVideoResolution() *string { if o == nil { return nil } return o.VideoResolution } -func (o *GetAllMediaLibraryMedia) GetContainer() *string { +func (o *GetLibrarySectionsAllMedia) GetContainer() *string { if o == nil { return nil } return o.Container } -func (o *GetAllMediaLibraryMedia) GetVideoFrameRate() *string { +func (o *GetLibrarySectionsAllMedia) GetVideoFrameRate() *string { if o == nil { return nil } return o.VideoFrameRate } -func (o *GetAllMediaLibraryMedia) GetVideoProfile() *string { +func (o *GetLibrarySectionsAllMedia) GetVideoProfile() *string { if o == nil { return nil } return o.VideoProfile } -func (o *GetAllMediaLibraryMedia) GetHasVoiceActivity() *bool { +func (o *GetLibrarySectionsAllMedia) GetHasVoiceActivity() *bool { if o == nil { return nil } return o.HasVoiceActivity } -func (o *GetAllMediaLibraryMedia) GetAudioProfile() *string { +func (o *GetLibrarySectionsAllMedia) GetAudioProfile() *string { if o == nil { return nil } return o.AudioProfile } -func (o *GetAllMediaLibraryMedia) GetOptimizedForStreaming() *GetAllMediaLibraryOptimizedForStreaming { +func (o *GetLibrarySectionsAllMedia) GetOptimizedForStreaming() *GetLibrarySectionsAllOptimizedForStreaming { if o == nil { return nil } return o.OptimizedForStreaming } -func (o *GetAllMediaLibraryMedia) GetHas64bitOffsets() *bool { +func (o *GetLibrarySectionsAllMedia) GetHas64bitOffsets() *bool { if o == nil { return nil } return o.Has64bitOffsets } -func (o *GetAllMediaLibraryMedia) GetPart() []GetAllMediaLibraryPart { +func (o *GetLibrarySectionsAllMedia) GetPart() []GetLibrarySectionsAllPart { if o == nil { return nil } return o.Part } -type GetAllMediaLibraryGenre struct { +type GetLibrarySectionsAllGenre struct { // The genre name of this media-item // Tag string `json:"tag"` } -func (o *GetAllMediaLibraryGenre) GetTag() string { +func (o *GetLibrarySectionsAllGenre) GetTag() string { if o == nil { return "" } return o.Tag } -type GetAllMediaLibraryCountry struct { +type GetLibrarySectionsAllCountry struct { // The country of origin of this media item Tag string `json:"tag"` } -func (o *GetAllMediaLibraryCountry) GetTag() string { +func (o *GetLibrarySectionsAllCountry) GetTag() string { if o == nil { return "" } return o.Tag } -type GetAllMediaLibraryDirector struct { +type GetLibrarySectionsAllDirector struct { // The role of Director Tag string `json:"tag"` } -func (o *GetAllMediaLibraryDirector) GetTag() string { +func (o *GetLibrarySectionsAllDirector) GetTag() string { if o == nil { return "" } return o.Tag } -type GetAllMediaLibraryWriter struct { +type GetLibrarySectionsAllWriter struct { // The role of Writer Tag string `json:"tag"` } -func (o *GetAllMediaLibraryWriter) GetTag() string { +func (o *GetLibrarySectionsAllWriter) GetTag() string { if o == nil { return "" } return o.Tag } -type GetAllMediaLibraryRole struct { +type GetLibrarySectionsAllRole struct { // The display tag for the actor (typically the actor's name). Tag string `json:"tag"` } -func (o *GetAllMediaLibraryRole) GetTag() string { +func (o *GetLibrarySectionsAllRole) GetTag() string { if o == nil { return "" } return o.Tag } -type GetAllMediaLibraryGuids struct { - // The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337 - // - ID *string `json:"id,omitempty"` -} - -func (o *GetAllMediaLibraryGuids) GetID() *string { - if o == nil { - return nil - } - return o.ID -} - -type GetAllMediaLibraryCollection struct { +type GetLibrarySectionsAllCollection struct { // The user-made collection this media item belongs to Tag string `json:"tag"` } -func (o *GetAllMediaLibraryCollection) GetTag() string { +func (o *GetLibrarySectionsAllCollection) GetTag() string { if o == nil { return "" } return o.Tag } -// GetAllMediaLibraryMetadata - Unknown -type GetAllMediaLibraryMetadata struct { +// GetLibrarySectionsAllMetadata - Unknown +type GetLibrarySectionsAllMetadata struct { // The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. RatingKey string `json:"ratingKey"` // The unique key for the media item. @@ -1819,8 +1825,8 @@ type GetAllMediaLibraryMetadata struct { // A URL‐friendly version of the media title. Slug string `json:"slug"` // The studio that produced the media item. - Studio *string `json:"studio,omitempty"` - Type GetAllMediaLibraryLibraryType `json:"type"` + Studio *string `json:"studio,omitempty"` + Type GetLibrarySectionsAllLibraryType `json:"type"` // The title of the media item. Title string `json:"title"` // The sort title used for ordering media items. @@ -1915,479 +1921,479 @@ type GetAllMediaLibraryMetadata struct { // Unix timestamp for when the media item was last viewed. LastViewedAt *int `json:"lastViewedAt,omitempty"` // The rating provided by a user for the item. This value is expressed as a decimal number. - UserRating *float32 `json:"userRating,omitempty"` - Image []GetAllMediaLibraryImage `json:"Image,omitempty"` - UltraBlurColors *GetAllMediaLibraryUltraBlurColors `json:"UltraBlurColors,omitempty"` - Media []GetAllMediaLibraryMedia `json:"Media,omitempty"` - Genre []GetAllMediaLibraryGenre `json:"Genre,omitempty"` - Country []GetAllMediaLibraryCountry `json:"Country,omitempty"` - Director []GetAllMediaLibraryDirector `json:"Director,omitempty"` - Writer []GetAllMediaLibraryWriter `json:"Writer,omitempty"` - Role []GetAllMediaLibraryRole `json:"Role,omitempty"` - Guids []GetAllMediaLibraryGuids `json:"Guid,omitempty"` - Collection []GetAllMediaLibraryCollection `json:"Collection,omitempty"` + UserRating *float32 `json:"userRating,omitempty"` + Image []GetLibrarySectionsAllImage `json:"Image,omitempty"` + UltraBlurColors *GetLibrarySectionsAllUltraBlurColors `json:"UltraBlurColors,omitempty"` + Guids []GetLibrarySectionsAllGuids `json:"Guid,omitempty"` + Media []GetLibrarySectionsAllMedia `json:"Media,omitempty"` + Genre []GetLibrarySectionsAllGenre `json:"Genre,omitempty"` + Country []GetLibrarySectionsAllCountry `json:"Country,omitempty"` + Director []GetLibrarySectionsAllDirector `json:"Director,omitempty"` + Writer []GetLibrarySectionsAllWriter `json:"Writer,omitempty"` + Role []GetLibrarySectionsAllRole `json:"Role,omitempty"` + Collection []GetLibrarySectionsAllCollection `json:"Collection,omitempty"` } -func (g GetAllMediaLibraryMetadata) MarshalJSON() ([]byte, error) { +func (g GetLibrarySectionsAllMetadata) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } -func (g *GetAllMediaLibraryMetadata) UnmarshalJSON(data []byte) error { +func (g *GetLibrarySectionsAllMetadata) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { return err } return nil } -func (o *GetAllMediaLibraryMetadata) GetRatingKey() string { +func (o *GetLibrarySectionsAllMetadata) GetRatingKey() string { if o == nil { return "" } return o.RatingKey } -func (o *GetAllMediaLibraryMetadata) GetKey() string { +func (o *GetLibrarySectionsAllMetadata) GetKey() string { if o == nil { return "" } return o.Key } -func (o *GetAllMediaLibraryMetadata) GetGUID() string { +func (o *GetLibrarySectionsAllMetadata) GetGUID() string { if o == nil { return "" } return o.GUID } -func (o *GetAllMediaLibraryMetadata) GetSlug() string { +func (o *GetLibrarySectionsAllMetadata) GetSlug() string { if o == nil { return "" } return o.Slug } -func (o *GetAllMediaLibraryMetadata) GetStudio() *string { +func (o *GetLibrarySectionsAllMetadata) GetStudio() *string { if o == nil { return nil } return o.Studio } -func (o *GetAllMediaLibraryMetadata) GetType() GetAllMediaLibraryLibraryType { +func (o *GetLibrarySectionsAllMetadata) GetType() GetLibrarySectionsAllLibraryType { if o == nil { - return GetAllMediaLibraryLibraryType("") + return GetLibrarySectionsAllLibraryType("") } return o.Type } -func (o *GetAllMediaLibraryMetadata) GetTitle() string { +func (o *GetLibrarySectionsAllMetadata) GetTitle() string { if o == nil { return "" } return o.Title } -func (o *GetAllMediaLibraryMetadata) GetTitleSort() string { +func (o *GetLibrarySectionsAllMetadata) GetTitleSort() string { if o == nil { return "" } return o.TitleSort } -func (o *GetAllMediaLibraryMetadata) GetContentRating() *string { +func (o *GetLibrarySectionsAllMetadata) GetContentRating() *string { if o == nil { return nil } return o.ContentRating } -func (o *GetAllMediaLibraryMetadata) GetSummary() string { +func (o *GetLibrarySectionsAllMetadata) GetSummary() string { if o == nil { return "" } return o.Summary } -func (o *GetAllMediaLibraryMetadata) GetRating() float32 { +func (o *GetLibrarySectionsAllMetadata) GetRating() float32 { if o == nil { return 0.0 } return o.Rating } -func (o *GetAllMediaLibraryMetadata) GetAudienceRating() float64 { +func (o *GetLibrarySectionsAllMetadata) GetAudienceRating() float64 { if o == nil { return 0.0 } return o.AudienceRating } -func (o *GetAllMediaLibraryMetadata) GetYear() *int { +func (o *GetLibrarySectionsAllMetadata) GetYear() *int { if o == nil { return nil } return o.Year } -func (o *GetAllMediaLibraryMetadata) GetTagline() string { +func (o *GetLibrarySectionsAllMetadata) GetTagline() string { if o == nil { return "" } return o.Tagline } -func (o *GetAllMediaLibraryMetadata) GetThumb() string { +func (o *GetLibrarySectionsAllMetadata) GetThumb() string { if o == nil { return "" } return o.Thumb } -func (o *GetAllMediaLibraryMetadata) GetArt() string { +func (o *GetLibrarySectionsAllMetadata) GetArt() string { if o == nil { return "" } return o.Art } -func (o *GetAllMediaLibraryMetadata) GetTheme() string { +func (o *GetLibrarySectionsAllMetadata) GetTheme() string { if o == nil { return "" } return o.Theme } -func (o *GetAllMediaLibraryMetadata) GetIndex() int { +func (o *GetLibrarySectionsAllMetadata) GetIndex() int { if o == nil { return 0 } return o.Index } -func (o *GetAllMediaLibraryMetadata) GetLeafCount() *int { +func (o *GetLibrarySectionsAllMetadata) GetLeafCount() *int { if o == nil { return nil } return o.LeafCount } -func (o *GetAllMediaLibraryMetadata) GetViewedLeafCount() *int { +func (o *GetLibrarySectionsAllMetadata) GetViewedLeafCount() *int { if o == nil { return nil } return o.ViewedLeafCount } -func (o *GetAllMediaLibraryMetadata) GetChildCount() int { +func (o *GetLibrarySectionsAllMetadata) GetChildCount() int { if o == nil { return 0 } return o.ChildCount } -func (o *GetAllMediaLibraryMetadata) GetSeasonCount() int { +func (o *GetLibrarySectionsAllMetadata) GetSeasonCount() int { if o == nil { return 0 } return o.SeasonCount } -func (o *GetAllMediaLibraryMetadata) GetDuration() int { +func (o *GetLibrarySectionsAllMetadata) GetDuration() int { if o == nil { return 0 } return o.Duration } -func (o *GetAllMediaLibraryMetadata) GetOriginallyAvailableAt() types.Date { +func (o *GetLibrarySectionsAllMetadata) GetOriginallyAvailableAt() types.Date { if o == nil { return types.Date{} } return o.OriginallyAvailableAt } -func (o *GetAllMediaLibraryMetadata) GetAddedAt() int64 { +func (o *GetLibrarySectionsAllMetadata) GetAddedAt() int64 { if o == nil { return 0 } return o.AddedAt } -func (o *GetAllMediaLibraryMetadata) GetUpdatedAt() *int64 { +func (o *GetLibrarySectionsAllMetadata) GetUpdatedAt() *int64 { if o == nil { return nil } return o.UpdatedAt } -func (o *GetAllMediaLibraryMetadata) GetAudienceRatingImage() *string { +func (o *GetLibrarySectionsAllMetadata) GetAudienceRatingImage() *string { if o == nil { return nil } return o.AudienceRatingImage } -func (o *GetAllMediaLibraryMetadata) GetChapterSource() *string { +func (o *GetLibrarySectionsAllMetadata) GetChapterSource() *string { if o == nil { return nil } return o.ChapterSource } -func (o *GetAllMediaLibraryMetadata) GetPrimaryExtraKey() *string { +func (o *GetLibrarySectionsAllMetadata) GetPrimaryExtraKey() *string { if o == nil { return nil } return o.PrimaryExtraKey } -func (o *GetAllMediaLibraryMetadata) GetOriginalTitle() *string { +func (o *GetLibrarySectionsAllMetadata) GetOriginalTitle() *string { if o == nil { return nil } return o.OriginalTitle } -func (o *GetAllMediaLibraryMetadata) GetParentRatingKey() *string { +func (o *GetLibrarySectionsAllMetadata) GetParentRatingKey() *string { if o == nil { return nil } return o.ParentRatingKey } -func (o *GetAllMediaLibraryMetadata) GetGrandparentRatingKey() *string { +func (o *GetLibrarySectionsAllMetadata) GetGrandparentRatingKey() *string { if o == nil { return nil } return o.GrandparentRatingKey } -func (o *GetAllMediaLibraryMetadata) GetParentGUID() *string { +func (o *GetLibrarySectionsAllMetadata) GetParentGUID() *string { if o == nil { return nil } return o.ParentGUID } -func (o *GetAllMediaLibraryMetadata) GetGrandparentGUID() *string { +func (o *GetLibrarySectionsAllMetadata) GetGrandparentGUID() *string { if o == nil { return nil } return o.GrandparentGUID } -func (o *GetAllMediaLibraryMetadata) GetGrandparentSlug() *string { +func (o *GetLibrarySectionsAllMetadata) GetGrandparentSlug() *string { if o == nil { return nil } return o.GrandparentSlug } -func (o *GetAllMediaLibraryMetadata) GetGrandparentKey() *string { +func (o *GetLibrarySectionsAllMetadata) GetGrandparentKey() *string { if o == nil { return nil } return o.GrandparentKey } -func (o *GetAllMediaLibraryMetadata) GetParentKey() *string { +func (o *GetLibrarySectionsAllMetadata) GetParentKey() *string { if o == nil { return nil } return o.ParentKey } -func (o *GetAllMediaLibraryMetadata) GetGrandparentTitle() *string { +func (o *GetLibrarySectionsAllMetadata) GetGrandparentTitle() *string { if o == nil { return nil } return o.GrandparentTitle } -func (o *GetAllMediaLibraryMetadata) GetGrandparentThumb() *string { +func (o *GetLibrarySectionsAllMetadata) GetGrandparentThumb() *string { if o == nil { return nil } return o.GrandparentThumb } -func (o *GetAllMediaLibraryMetadata) GetGrandparentTheme() *string { +func (o *GetLibrarySectionsAllMetadata) GetGrandparentTheme() *string { if o == nil { return nil } return o.GrandparentTheme } -func (o *GetAllMediaLibraryMetadata) GetGrandparentArt() *string { +func (o *GetLibrarySectionsAllMetadata) GetGrandparentArt() *string { if o == nil { return nil } return o.GrandparentArt } -func (o *GetAllMediaLibraryMetadata) GetParentTitle() *string { +func (o *GetLibrarySectionsAllMetadata) GetParentTitle() *string { if o == nil { return nil } return o.ParentTitle } -func (o *GetAllMediaLibraryMetadata) GetParentIndex() *int { +func (o *GetLibrarySectionsAllMetadata) GetParentIndex() *int { if o == nil { return nil } return o.ParentIndex } -func (o *GetAllMediaLibraryMetadata) GetParentThumb() *string { +func (o *GetLibrarySectionsAllMetadata) GetParentThumb() *string { if o == nil { return nil } return o.ParentThumb } -func (o *GetAllMediaLibraryMetadata) GetRatingImage() *string { +func (o *GetLibrarySectionsAllMetadata) GetRatingImage() *string { if o == nil { return nil } return o.RatingImage } -func (o *GetAllMediaLibraryMetadata) GetViewCount() *int { +func (o *GetLibrarySectionsAllMetadata) GetViewCount() *int { if o == nil { return nil } return o.ViewCount } -func (o *GetAllMediaLibraryMetadata) GetViewOffset() *int { +func (o *GetLibrarySectionsAllMetadata) GetViewOffset() *int { if o == nil { return nil } return o.ViewOffset } -func (o *GetAllMediaLibraryMetadata) GetSkipCount() *int { +func (o *GetLibrarySectionsAllMetadata) GetSkipCount() *int { if o == nil { return nil } return o.SkipCount } -func (o *GetAllMediaLibraryMetadata) GetSubtype() *string { +func (o *GetLibrarySectionsAllMetadata) GetSubtype() *string { if o == nil { return nil } return o.Subtype } -func (o *GetAllMediaLibraryMetadata) GetLastRatedAt() *int64 { +func (o *GetLibrarySectionsAllMetadata) GetLastRatedAt() *int64 { if o == nil { return nil } return o.LastRatedAt } -func (o *GetAllMediaLibraryMetadata) GetCreatedAtAccuracy() *string { +func (o *GetLibrarySectionsAllMetadata) GetCreatedAtAccuracy() *string { if o == nil { return nil } return o.CreatedAtAccuracy } -func (o *GetAllMediaLibraryMetadata) GetCreatedAtTZOffset() *string { +func (o *GetLibrarySectionsAllMetadata) GetCreatedAtTZOffset() *string { if o == nil { return nil } return o.CreatedAtTZOffset } -func (o *GetAllMediaLibraryMetadata) GetLastViewedAt() *int { +func (o *GetLibrarySectionsAllMetadata) GetLastViewedAt() *int { if o == nil { return nil } return o.LastViewedAt } -func (o *GetAllMediaLibraryMetadata) GetUserRating() *float32 { +func (o *GetLibrarySectionsAllMetadata) GetUserRating() *float32 { if o == nil { return nil } return o.UserRating } -func (o *GetAllMediaLibraryMetadata) GetImage() []GetAllMediaLibraryImage { +func (o *GetLibrarySectionsAllMetadata) GetImage() []GetLibrarySectionsAllImage { if o == nil { return nil } return o.Image } -func (o *GetAllMediaLibraryMetadata) GetUltraBlurColors() *GetAllMediaLibraryUltraBlurColors { +func (o *GetLibrarySectionsAllMetadata) GetUltraBlurColors() *GetLibrarySectionsAllUltraBlurColors { if o == nil { return nil } return o.UltraBlurColors } -func (o *GetAllMediaLibraryMetadata) GetMedia() []GetAllMediaLibraryMedia { - if o == nil { - return nil - } - return o.Media -} - -func (o *GetAllMediaLibraryMetadata) GetGenre() []GetAllMediaLibraryGenre { - if o == nil { - return nil - } - return o.Genre -} - -func (o *GetAllMediaLibraryMetadata) GetCountry() []GetAllMediaLibraryCountry { - if o == nil { - return nil - } - return o.Country -} - -func (o *GetAllMediaLibraryMetadata) GetDirector() []GetAllMediaLibraryDirector { - if o == nil { - return nil - } - return o.Director -} - -func (o *GetAllMediaLibraryMetadata) GetWriter() []GetAllMediaLibraryWriter { - if o == nil { - return nil - } - return o.Writer -} - -func (o *GetAllMediaLibraryMetadata) GetRole() []GetAllMediaLibraryRole { - if o == nil { - return nil - } - return o.Role -} - -func (o *GetAllMediaLibraryMetadata) GetGuids() []GetAllMediaLibraryGuids { +func (o *GetLibrarySectionsAllMetadata) GetGuids() []GetLibrarySectionsAllGuids { if o == nil { return nil } return o.Guids } -func (o *GetAllMediaLibraryMetadata) GetCollection() []GetAllMediaLibraryCollection { +func (o *GetLibrarySectionsAllMetadata) GetMedia() []GetLibrarySectionsAllMedia { + if o == nil { + return nil + } + return o.Media +} + +func (o *GetLibrarySectionsAllMetadata) GetGenre() []GetLibrarySectionsAllGenre { + if o == nil { + return nil + } + return o.Genre +} + +func (o *GetLibrarySectionsAllMetadata) GetCountry() []GetLibrarySectionsAllCountry { + if o == nil { + return nil + } + return o.Country +} + +func (o *GetLibrarySectionsAllMetadata) GetDirector() []GetLibrarySectionsAllDirector { + if o == nil { + return nil + } + return o.Director +} + +func (o *GetLibrarySectionsAllMetadata) GetWriter() []GetLibrarySectionsAllWriter { + if o == nil { + return nil + } + return o.Writer +} + +func (o *GetLibrarySectionsAllMetadata) GetRole() []GetLibrarySectionsAllRole { + if o == nil { + return nil + } + return o.Role +} + +func (o *GetLibrarySectionsAllMetadata) GetCollection() []GetLibrarySectionsAllCollection { if o == nil { return nil } return o.Collection } -type GetAllMediaLibraryMediaContainer struct { +type GetLibrarySectionsAllMediaContainer struct { // Number of media items returned in this response. Size int `json:"size"` // Total number of media items in the library. @@ -2424,157 +2430,157 @@ type GetAllMediaLibraryMediaContainer struct { ViewGroup string `json:"viewGroup"` // The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. // - Meta *GetAllMediaLibraryMeta `json:"Meta,omitempty"` + Meta *GetLibrarySectionsAllMeta `json:"Meta,omitempty"` // An array of metadata items. - Metadata []GetAllMediaLibraryMetadata `json:"Metadata,omitempty"` + Metadata []GetLibrarySectionsAllMetadata `json:"Metadata,omitempty"` } -func (o *GetAllMediaLibraryMediaContainer) GetSize() int { +func (o *GetLibrarySectionsAllMediaContainer) GetSize() int { if o == nil { return 0 } return o.Size } -func (o *GetAllMediaLibraryMediaContainer) GetTotalSize() int { +func (o *GetLibrarySectionsAllMediaContainer) GetTotalSize() int { if o == nil { return 0 } return o.TotalSize } -func (o *GetAllMediaLibraryMediaContainer) GetOffset() int64 { +func (o *GetLibrarySectionsAllMediaContainer) GetOffset() int64 { if o == nil { return 0 } return o.Offset } -func (o *GetAllMediaLibraryMediaContainer) GetAllowSync() bool { +func (o *GetLibrarySectionsAllMediaContainer) GetAllowSync() bool { if o == nil { return false } return o.AllowSync } -func (o *GetAllMediaLibraryMediaContainer) GetArt() string { +func (o *GetLibrarySectionsAllMediaContainer) GetArt() string { if o == nil { return "" } return o.Art } -func (o *GetAllMediaLibraryMediaContainer) GetContent() string { +func (o *GetLibrarySectionsAllMediaContainer) GetContent() string { if o == nil { return "" } return o.Content } -func (o *GetAllMediaLibraryMediaContainer) GetIdentifier() string { +func (o *GetLibrarySectionsAllMediaContainer) GetIdentifier() string { if o == nil { return "" } return o.Identifier } -func (o *GetAllMediaLibraryMediaContainer) GetLibrarySectionID() int64 { +func (o *GetLibrarySectionsAllMediaContainer) GetLibrarySectionID() int64 { if o == nil { return 0 } return o.LibrarySectionID } -func (o *GetAllMediaLibraryMediaContainer) GetLibrarySectionTitle() string { +func (o *GetLibrarySectionsAllMediaContainer) GetLibrarySectionTitle() string { if o == nil { return "" } return o.LibrarySectionTitle } -func (o *GetAllMediaLibraryMediaContainer) GetLibrarySectionUUID() *string { +func (o *GetLibrarySectionsAllMediaContainer) GetLibrarySectionUUID() *string { if o == nil { return nil } return o.LibrarySectionUUID } -func (o *GetAllMediaLibraryMediaContainer) GetMediaTagPrefix() string { +func (o *GetLibrarySectionsAllMediaContainer) GetMediaTagPrefix() string { if o == nil { return "" } return o.MediaTagPrefix } -func (o *GetAllMediaLibraryMediaContainer) GetMediaTagVersion() int64 { +func (o *GetLibrarySectionsAllMediaContainer) GetMediaTagVersion() int64 { if o == nil { return 0 } return o.MediaTagVersion } -func (o *GetAllMediaLibraryMediaContainer) GetThumb() string { +func (o *GetLibrarySectionsAllMediaContainer) GetThumb() string { if o == nil { return "" } return o.Thumb } -func (o *GetAllMediaLibraryMediaContainer) GetNocache() bool { +func (o *GetLibrarySectionsAllMediaContainer) GetNocache() bool { if o == nil { return false } return o.Nocache } -func (o *GetAllMediaLibraryMediaContainer) GetTitle1() string { +func (o *GetLibrarySectionsAllMediaContainer) GetTitle1() string { if o == nil { return "" } return o.Title1 } -func (o *GetAllMediaLibraryMediaContainer) GetTitle2() string { +func (o *GetLibrarySectionsAllMediaContainer) GetTitle2() string { if o == nil { return "" } return o.Title2 } -func (o *GetAllMediaLibraryMediaContainer) GetViewGroup() string { +func (o *GetLibrarySectionsAllMediaContainer) GetViewGroup() string { if o == nil { return "" } return o.ViewGroup } -func (o *GetAllMediaLibraryMediaContainer) GetMeta() *GetAllMediaLibraryMeta { +func (o *GetLibrarySectionsAllMediaContainer) GetMeta() *GetLibrarySectionsAllMeta { if o == nil { return nil } return o.Meta } -func (o *GetAllMediaLibraryMediaContainer) GetMetadata() []GetAllMediaLibraryMetadata { +func (o *GetLibrarySectionsAllMediaContainer) GetMetadata() []GetLibrarySectionsAllMetadata { if o == nil { return nil } return o.Metadata } -// GetAllMediaLibraryResponseBody - Successful response containing media container data. -type GetAllMediaLibraryResponseBody struct { - MediaContainer *GetAllMediaLibraryMediaContainer `json:"MediaContainer,omitempty"` +// GetLibrarySectionsAllResponseBody - Successful response containing media container data. +type GetLibrarySectionsAllResponseBody struct { + MediaContainer *GetLibrarySectionsAllMediaContainer `json:"MediaContainer,omitempty"` } -func (o *GetAllMediaLibraryResponseBody) GetMediaContainer() *GetAllMediaLibraryMediaContainer { +func (o *GetLibrarySectionsAllResponseBody) GetMediaContainer() *GetLibrarySectionsAllMediaContainer { if o == nil { return nil } return o.MediaContainer } -type GetAllMediaLibraryResponse struct { +type GetLibrarySectionsAllResponse struct { // HTTP response content type for this operation ContentType string // HTTP response status code for this operation @@ -2582,31 +2588,31 @@ type GetAllMediaLibraryResponse struct { // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response // Successful response containing media container data. - Object *GetAllMediaLibraryResponseBody + Object *GetLibrarySectionsAllResponseBody } -func (o *GetAllMediaLibraryResponse) GetContentType() string { +func (o *GetLibrarySectionsAllResponse) GetContentType() string { if o == nil { return "" } return o.ContentType } -func (o *GetAllMediaLibraryResponse) GetStatusCode() int { +func (o *GetLibrarySectionsAllResponse) GetStatusCode() int { if o == nil { return 0 } return o.StatusCode } -func (o *GetAllMediaLibraryResponse) GetRawResponse() *http.Response { +func (o *GetLibrarySectionsAllResponse) GetRawResponse() *http.Response { if o == nil { return nil } return o.RawResponse } -func (o *GetAllMediaLibraryResponse) GetObject() *GetAllMediaLibraryResponseBody { +func (o *GetLibrarySectionsAllResponse) GetObject() *GetLibrarySectionsAllResponseBody { if o == nil { return nil } diff --git a/models/operations/getmediametadata.go b/models/operations/getmediametadata.go index 7dcbdf0..08c6718 100644 --- a/models/operations/getmediametadata.go +++ b/models/operations/getmediametadata.go @@ -12,8 +12,8 @@ import ( ) type GetMediaMetaDataRequest struct { - // the id of the library item to return the children of. - RatingKey int64 `pathParam:"style=simple,explode=false,name=ratingKey"` + // The id(s) of the library item(s) to return metadata for. Can be a single ID or comma-separated list of IDs. + RatingKey string `pathParam:"style=simple,explode=false,name=ratingKey"` // Include concerts data if set to true. IncludeConcerts *bool `queryParam:"style=form,explode=true,name=includeConcerts"` // Include extra content (e.g. bonus features). @@ -42,9 +42,9 @@ type GetMediaMetaDataRequest struct { AsyncRefreshLocalMediaAgent *bool `queryParam:"style=form,explode=true,name=asyncRefreshLocalMediaAgent"` } -func (o *GetMediaMetaDataRequest) GetRatingKey() int64 { +func (o *GetMediaMetaDataRequest) GetRatingKey() string { if o == nil { - return 0 + return "" } return o.RatingKey } @@ -140,16 +140,20 @@ func (o *GetMediaMetaDataRequest) GetAsyncRefreshLocalMediaAgent() *bool { return o.AsyncRefreshLocalMediaAgent } -// GetMediaMetaDataType - The type of media content +// GetMediaMetaDataType - The type of media content in the Plex library. This can represent videos, music, or photos. type GetMediaMetaDataType string const ( - GetMediaMetaDataTypeMovie GetMediaMetaDataType = "movie" - GetMediaMetaDataTypeTvShow GetMediaMetaDataType = "show" - GetMediaMetaDataTypeSeason GetMediaMetaDataType = "season" - GetMediaMetaDataTypeEpisode GetMediaMetaDataType = "episode" - GetMediaMetaDataTypeArtist GetMediaMetaDataType = "artist" - GetMediaMetaDataTypeAlbum GetMediaMetaDataType = "album" + GetMediaMetaDataTypeMovie GetMediaMetaDataType = "movie" + GetMediaMetaDataTypeTvShow GetMediaMetaDataType = "show" + GetMediaMetaDataTypeSeason GetMediaMetaDataType = "season" + GetMediaMetaDataTypeEpisode GetMediaMetaDataType = "episode" + GetMediaMetaDataTypeArtist GetMediaMetaDataType = "artist" + GetMediaMetaDataTypeAlbum GetMediaMetaDataType = "album" + GetMediaMetaDataTypeTrack GetMediaMetaDataType = "track" + GetMediaMetaDataTypePhotoAlbum GetMediaMetaDataType = "photoalbum" + GetMediaMetaDataTypePhoto GetMediaMetaDataType = "photo" + GetMediaMetaDataTypeCollection GetMediaMetaDataType = "collection" ) func (e GetMediaMetaDataType) ToPointer() *GetMediaMetaDataType { @@ -231,6 +235,19 @@ func (o *GetMediaMetaDataUltraBlurColors) GetBottomLeft() string { return o.BottomLeft } +type GetMediaMetaDataGuids struct { + // The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// + // + ID string `json:"id"` +} + +func (o *GetMediaMetaDataGuids) GetID() string { + if o == nil { + return "" + } + return o.ID +} + type GetMediaMetaDataOptimizedForStreaming1 int const ( @@ -1244,14 +1261,17 @@ func (o *GetMediaMetaDataMedia) GetPart() []GetMediaMetaDataPart { // GetMediaMetaDataGenre - The filter query string for similar items. type GetMediaMetaDataGenre struct { - ID int64 `json:"id"` + // The unique identifier for the genre. + // NOTE: This is different for each Plex server and is not globally unique. + // + ID int `json:"id"` // The genre name of this media-item // Tag string `json:"tag"` Filter string `json:"filter"` } -func (o *GetMediaMetaDataGenre) GetID() int64 { +func (o *GetMediaMetaDataGenre) GetID() int { if o == nil { return 0 } @@ -1274,10 +1294,13 @@ func (o *GetMediaMetaDataGenre) GetFilter() string { // GetMediaMetaDataCountry - The filter query string for country media items. type GetMediaMetaDataCountry struct { + // The unique identifier for the country. + // NOTE: This is different for each Plex server and is not globally unique. + // ID int `json:"id"` // The country of origin of this media item - Tag string `json:"tag"` - Filter *string `json:"filter,omitempty"` + Tag string `json:"tag"` + Filter string `json:"filter"` } func (o *GetMediaMetaDataCountry) GetID() int { @@ -1294,9 +1317,9 @@ func (o *GetMediaMetaDataCountry) GetTag() string { return o.Tag } -func (o *GetMediaMetaDataCountry) GetFilter() *string { +func (o *GetMediaMetaDataCountry) GetFilter() string { if o == nil { - return nil + return "" } return o.Filter } @@ -1308,9 +1331,9 @@ type GetMediaMetaDataDirector struct { Tag string `json:"tag"` // The filter string used to query this director. Filter string `json:"filter"` - // A unique key associated with the director's tag, used for internal identification. - TagKey *string `json:"tagKey,omitempty"` - // The URL of the thumbnail image for the director. + // A unique 24-character hexadecimal key associated with the director's tag, used for internal identification. + TagKey string `json:"tagKey"` + // The absolute URL of the thumbnail image for the director. Thumb *string `json:"thumb,omitempty"` } @@ -1335,9 +1358,9 @@ func (o *GetMediaMetaDataDirector) GetFilter() string { return o.Filter } -func (o *GetMediaMetaDataDirector) GetTagKey() *string { +func (o *GetMediaMetaDataDirector) GetTagKey() string { if o == nil { - return nil + return "" } return o.TagKey } @@ -1356,9 +1379,9 @@ type GetMediaMetaDataWriter struct { Tag string `json:"tag"` // The filter string used to query this writer. Filter string `json:"filter"` - // The URL of the thumbnail image for the writer. + // The absolute URL of the thumbnail image for the writer. Thumb *string `json:"thumb,omitempty"` - // A unique key associated with the writers tag, used for internal identification. + // A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. TagKey *string `json:"tagKey,omitempty"` } @@ -1455,21 +1478,25 @@ func (o *GetMediaMetaDataProducer) GetThumb() *string { } type GetMediaMetaDataRole struct { - // Unique identifier for the actor or role. - ID int64 `json:"id"` + // The unique identifier for the role. + // NOTE: This is different for each Plex server and is not globally unique. + // + ID int `json:"id"` // The display tag for the actor (typically the actor's name). Tag string `json:"tag"` // The role played by the actor in the media item. Role *string `json:"role,omitempty"` // The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. Filter string `json:"filter"` - // A unique key associated with the actor's tag, used for internal identification. - TagKey *string `json:"tagKey,omitempty"` - // The URL of the thumbnail image for the actor. + // A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification. + // NOTE: This is globally unique across all Plex Servers. + // + TagKey string `json:"tagKey"` + // The absolute URL of the thumbnail image for the actor. Thumb *string `json:"thumb,omitempty"` } -func (o *GetMediaMetaDataRole) GetID() int64 { +func (o *GetMediaMetaDataRole) GetID() int { if o == nil { return 0 } @@ -1497,9 +1524,9 @@ func (o *GetMediaMetaDataRole) GetFilter() string { return o.Filter } -func (o *GetMediaMetaDataRole) GetTagKey() *string { +func (o *GetMediaMetaDataRole) GetTagKey() string { if o == nil { - return nil + return "" } return o.TagKey } @@ -1511,18 +1538,6 @@ func (o *GetMediaMetaDataRole) GetThumb() *string { return o.Thumb } -type GetMediaMetaDataGuids struct { - // The GUID value. - ID string `json:"id"` -} - -func (o *GetMediaMetaDataGuids) GetID() string { - if o == nil { - return "" - } - return o.ID -} - type Ratings struct { // The image or reference for the rating. Image string `json:"image"` @@ -1850,6 +1865,7 @@ type GetMediaMetaDataMetadata struct { LibrarySectionTitle string `json:"librarySectionTitle"` // The key corresponding to the library section. LibrarySectionKey string `json:"librarySectionKey"` + Guids []GetMediaMetaDataGuids `json:"Guid,omitempty"` Media []GetMediaMetaDataMedia `json:"Media,omitempty"` Genre []GetMediaMetaDataGenre `json:"Genre,omitempty"` Country []GetMediaMetaDataCountry `json:"Country,omitempty"` @@ -1857,7 +1873,6 @@ type GetMediaMetaDataMetadata struct { Writer []GetMediaMetaDataWriter `json:"Writer,omitempty"` Producer []GetMediaMetaDataProducer `json:"Producer,omitempty"` Role []GetMediaMetaDataRole `json:"Role,omitempty"` - Guids []GetMediaMetaDataGuids `json:"Guid,omitempty"` Ratings []Ratings `json:"Rating,omitempty"` Similar []GetMediaMetaDataSimilar `json:"Similar,omitempty"` Location []GetMediaMetaDataLocation `json:"Location,omitempty"` @@ -2290,6 +2305,13 @@ func (o *GetMediaMetaDataMetadata) GetLibrarySectionKey() string { return o.LibrarySectionKey } +func (o *GetMediaMetaDataMetadata) GetGuids() []GetMediaMetaDataGuids { + if o == nil { + return nil + } + return o.Guids +} + func (o *GetMediaMetaDataMetadata) GetMedia() []GetMediaMetaDataMedia { if o == nil { return nil @@ -2339,13 +2361,6 @@ func (o *GetMediaMetaDataMetadata) GetRole() []GetMediaMetaDataRole { return o.Role } -func (o *GetMediaMetaDataMetadata) GetGuids() []GetMediaMetaDataGuids { - if o == nil { - return nil - } - return o.Guids -} - func (o *GetMediaMetaDataMetadata) GetRatings() []Ratings { if o == nil { return nil diff --git a/models/operations/getplaylistcontents.go b/models/operations/getplaylistcontents.go index 29bf4c7..3a37acb 100644 --- a/models/operations/getplaylistcontents.go +++ b/models/operations/getplaylistcontents.go @@ -17,13 +17,15 @@ import ( type GetPlaylistContentsQueryParamType int64 const ( - GetPlaylistContentsQueryParamTypeMovie GetPlaylistContentsQueryParamType = 1 - GetPlaylistContentsQueryParamTypeTvShow GetPlaylistContentsQueryParamType = 2 - GetPlaylistContentsQueryParamTypeSeason GetPlaylistContentsQueryParamType = 3 - GetPlaylistContentsQueryParamTypeEpisode GetPlaylistContentsQueryParamType = 4 - GetPlaylistContentsQueryParamTypeAudio GetPlaylistContentsQueryParamType = 8 - GetPlaylistContentsQueryParamTypeAlbum GetPlaylistContentsQueryParamType = 9 - GetPlaylistContentsQueryParamTypeTrack GetPlaylistContentsQueryParamType = 10 + GetPlaylistContentsQueryParamTypeMovie GetPlaylistContentsQueryParamType = 1 + GetPlaylistContentsQueryParamTypeTvShow GetPlaylistContentsQueryParamType = 2 + GetPlaylistContentsQueryParamTypeSeason GetPlaylistContentsQueryParamType = 3 + GetPlaylistContentsQueryParamTypeEpisode GetPlaylistContentsQueryParamType = 4 + GetPlaylistContentsQueryParamTypeArtist GetPlaylistContentsQueryParamType = 5 + GetPlaylistContentsQueryParamTypeAlbum GetPlaylistContentsQueryParamType = 6 + GetPlaylistContentsQueryParamTypeTrack GetPlaylistContentsQueryParamType = 7 + GetPlaylistContentsQueryParamTypePhotoAlbum GetPlaylistContentsQueryParamType = 8 + GetPlaylistContentsQueryParamTypePhoto GetPlaylistContentsQueryParamType = 9 ) func (e GetPlaylistContentsQueryParamType) ToPointer() *GetPlaylistContentsQueryParamType { diff --git a/models/operations/getrecentlyadded.go b/models/operations/getrecentlyadded.go index 686b7e1..d264f17 100644 --- a/models/operations/getrecentlyadded.go +++ b/models/operations/getrecentlyadded.go @@ -20,13 +20,15 @@ import ( type Type int64 const ( - TypeMovie Type = 1 - TypeTvShow Type = 2 - TypeSeason Type = 3 - TypeEpisode Type = 4 - TypeAudio Type = 8 - TypeAlbum Type = 9 - TypeTrack Type = 10 + TypeMovie Type = 1 + TypeTvShow Type = 2 + TypeSeason Type = 3 + TypeEpisode Type = 4 + TypeArtist Type = 5 + TypeAlbum Type = 6 + TypeTrack Type = 7 + TypePhotoAlbum Type = 8 + TypePhoto Type = 9 ) func (e Type) ToPointer() *Type { @@ -497,16 +499,20 @@ func (o *Meta) GetFieldType() []GetRecentlyAddedFieldType { return o.FieldType } -// GetRecentlyAddedHubsType - The type of media content +// GetRecentlyAddedHubsType - The type of media content in the Plex library. This can represent videos, music, or photos. type GetRecentlyAddedHubsType string const ( - GetRecentlyAddedHubsTypeMovie GetRecentlyAddedHubsType = "movie" - GetRecentlyAddedHubsTypeTvShow GetRecentlyAddedHubsType = "show" - GetRecentlyAddedHubsTypeSeason GetRecentlyAddedHubsType = "season" - GetRecentlyAddedHubsTypeEpisode GetRecentlyAddedHubsType = "episode" - GetRecentlyAddedHubsTypeArtist GetRecentlyAddedHubsType = "artist" - GetRecentlyAddedHubsTypeAlbum GetRecentlyAddedHubsType = "album" + GetRecentlyAddedHubsTypeMovie GetRecentlyAddedHubsType = "movie" + GetRecentlyAddedHubsTypeTvShow GetRecentlyAddedHubsType = "show" + GetRecentlyAddedHubsTypeSeason GetRecentlyAddedHubsType = "season" + GetRecentlyAddedHubsTypeEpisode GetRecentlyAddedHubsType = "episode" + GetRecentlyAddedHubsTypeArtist GetRecentlyAddedHubsType = "artist" + GetRecentlyAddedHubsTypeAlbum GetRecentlyAddedHubsType = "album" + GetRecentlyAddedHubsTypeTrack GetRecentlyAddedHubsType = "track" + GetRecentlyAddedHubsTypePhotoAlbum GetRecentlyAddedHubsType = "photoalbum" + GetRecentlyAddedHubsTypePhoto GetRecentlyAddedHubsType = "photo" + GetRecentlyAddedHubsTypeCollection GetRecentlyAddedHubsType = "collection" ) func (e GetRecentlyAddedHubsType) ToPointer() *GetRecentlyAddedHubsType { @@ -588,6 +594,19 @@ func (o *UltraBlurColors) GetBottomLeft() string { return o.BottomLeft } +type Guids struct { + // The unique identifier for the Guid. Can be prefixed with imdb://, tmdb://, tvdb:// + // + ID string `json:"id"` +} + +func (o *Guids) GetID() string { + if o == nil { + return "" + } + return o.ID +} + type One int const ( @@ -1601,14 +1620,17 @@ func (o *Media) GetPart() []Part { // Genre - The filter query string for similar items. type Genre struct { - ID int64 `json:"id"` + // The unique identifier for the genre. + // NOTE: This is different for each Plex server and is not globally unique. + // + ID int `json:"id"` Filter string `json:"filter"` // The genre name of this media-item // Tag string `json:"tag"` } -func (o *Genre) GetID() int64 { +func (o *Genre) GetID() int { if o == nil { return 0 } @@ -1631,10 +1653,13 @@ func (o *Genre) GetTag() string { // Country - The filter query string for country media items. type Country struct { + // The unique identifier for the country. + // NOTE: This is different for each Plex server and is not globally unique. + // ID int `json:"id"` // The country of origin of this media item - Tag string `json:"tag"` - Filter *string `json:"filter,omitempty"` + Tag string `json:"tag"` + Filter string `json:"filter"` } func (o *Country) GetID() int { @@ -1651,16 +1676,38 @@ func (o *Country) GetTag() string { return o.Tag } -func (o *Country) GetFilter() *string { +func (o *Country) GetFilter() string { if o == nil { - return nil + return "" } return o.Filter } type Director struct { + // Unique identifier for the director. + ID int `json:"id"` + // The filter string used to query this director. + Filter string `json:"filter"` // The role of Director Tag string `json:"tag"` + // A unique 24-character hexadecimal key associated with the director's tag, used for internal identification. + TagKey string `json:"tagKey"` + // The absolute URL of the thumbnail image for the director. + Thumb *string `json:"thumb,omitempty"` +} + +func (o *Director) GetID() int { + if o == nil { + return 0 + } + return o.ID +} + +func (o *Director) GetFilter() string { + if o == nil { + return "" + } + return o.Filter } func (o *Director) GetTag() string { @@ -1670,6 +1717,20 @@ func (o *Director) GetTag() string { return o.Tag } +func (o *Director) GetTagKey() string { + if o == nil { + return "" + } + return o.TagKey +} + +func (o *Director) GetThumb() *string { + if o == nil { + return nil + } + return o.Thumb +} + type Writer struct { // Unique identifier for the writer. ID int `json:"id"` @@ -1677,8 +1738,10 @@ type Writer struct { Filter string `json:"filter"` // The role of Writer Tag string `json:"tag"` - // A unique key associated with the writers tag, used for internal identification. + // A 24-character hexadecimal unique key associated with the writer’s tag, used for internal identification. TagKey *string `json:"tagKey,omitempty"` + // The absolute URL of the thumbnail image for the writer. + Thumb *string `json:"thumb,omitempty"` } func (o *Writer) GetID() int { @@ -1709,22 +1772,33 @@ func (o *Writer) GetTagKey() *string { return o.TagKey } +func (o *Writer) GetThumb() *string { + if o == nil { + return nil + } + return o.Thumb +} + type Role struct { - // Unique identifier for the actor or role. - ID int64 `json:"id"` + // The unique identifier for the role. + // NOTE: This is different for each Plex server and is not globally unique. + // + ID int `json:"id"` // The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. Filter string `json:"filter"` // The display tag for the actor (typically the actor's name). Tag string `json:"tag"` - // A unique key associated with the actor's tag, used for internal identification. - TagKey *string `json:"tagKey,omitempty"` + // A 24-character hexadecimal unique key associated with the actor's tag, used for internal identification. + // NOTE: This is globally unique across all Plex Servers. + // + TagKey string `json:"tagKey"` // The role played by the actor in the media item. Role *string `json:"role,omitempty"` - // The URL of the thumbnail image for the actor. + // The absolute URL of the thumbnail image for the actor. Thumb *string `json:"thumb,omitempty"` } -func (o *Role) GetID() int64 { +func (o *Role) GetID() int { if o == nil { return 0 } @@ -1745,9 +1819,9 @@ func (o *Role) GetTag() string { return o.Tag } -func (o *Role) GetTagKey() *string { +func (o *Role) GetTagKey() string { if o == nil { - return nil + return "" } return o.TagKey } @@ -1773,9 +1847,10 @@ type Producer struct { Filter string `json:"filter"` // The name of the producer Tag string `json:"tag"` - // A unique key associated with the producer's tag, used for internal identification. - TagKey *string `json:"tagKey,omitempty"` - // The URL of the thumbnail image for the actor. + // A 24-character hexadecimal unique key associated with the producer's tag, used for internal identification. + // + TagKey string `json:"tagKey"` + // The absolute URL of the thumbnail image for the producer. Thumb *string `json:"thumb,omitempty"` } @@ -1800,9 +1875,9 @@ func (o *Producer) GetTag() string { return o.Tag } -func (o *Producer) GetTagKey() *string { +func (o *Producer) GetTagKey() string { if o == nil { - return nil + return "" } return o.TagKey } @@ -1816,8 +1891,9 @@ func (o *Producer) GetThumb() *string { // Rating - The type of rating, for example 'audience' or 'critic'. type Rating struct { + // The URL for the rating image, for example from IMDb. Image string `json:"image"` - Value float64 `json:"value"` + Value float32 `json:"value"` Type string `json:"type"` } @@ -1828,7 +1904,7 @@ func (o *Rating) GetImage() string { return o.Image } -func (o *Rating) GetValue() float64 { +func (o *Rating) GetValue() float32 { if o == nil { return 0.0 } @@ -1844,12 +1920,12 @@ func (o *Rating) GetType() string { // Similar - The display tag for the similar item, typically the title. type Similar struct { - ID int64 `json:"id"` + ID int `json:"id"` Filter string `json:"filter"` Tag string `json:"tag"` } -func (o *Similar) GetID() int64 { +func (o *Similar) GetID() int { if o == nil { return 0 } @@ -1882,19 +1958,6 @@ func (o *Location) GetPath() string { return o.Path } -type Guids struct { - // The unique identifier for the Guid. Can be imdb://tt0286347, tmdb://1763, tvdb://2337 - // - ID *string `json:"id,omitempty"` -} - -func (o *Guids) GetID() *string { - if o == nil { - return nil - } - return o.ID -} - type Collection struct { // The user-made collection this media item belongs to Tag string `json:"tag"` @@ -2031,6 +2094,7 @@ type GetRecentlyAddedMetadata struct { Year *int `json:"year,omitempty"` Image []GetRecentlyAddedImage `json:"Image,omitempty"` UltraBlurColors *UltraBlurColors `json:"UltraBlurColors,omitempty"` + Guids []Guids `json:"Guid,omitempty"` Media []Media `json:"Media,omitempty"` Genre []Genre `json:"Genre,omitempty"` Country []Country `json:"Country,omitempty"` @@ -2041,7 +2105,6 @@ type GetRecentlyAddedMetadata struct { Rating1 []Rating `json:"Rating,omitempty"` Similar []Similar `json:"Similar,omitempty"` Location []Location `json:"Location,omitempty"` - Guids []Guids `json:"Guid,omitempty"` Collection []Collection `json:"Collection,omitempty"` } @@ -2497,6 +2560,13 @@ func (o *GetRecentlyAddedMetadata) GetUltraBlurColors() *UltraBlurColors { return o.UltraBlurColors } +func (o *GetRecentlyAddedMetadata) GetGuids() []Guids { + if o == nil { + return nil + } + return o.Guids +} + func (o *GetRecentlyAddedMetadata) GetMedia() []Media { if o == nil { return nil @@ -2567,13 +2637,6 @@ func (o *GetRecentlyAddedMetadata) GetLocation() []Location { return o.Location } -func (o *GetRecentlyAddedMetadata) GetGuids() []Guids { - if o == nil { - return nil - } - return o.Guids -} - func (o *GetRecentlyAddedMetadata) GetCollection() []Collection { if o == nil { return nil diff --git a/models/operations/getrecentlyaddedlibrary.go b/models/operations/getrecentlyaddedlibrary.go index 41b652c..055ab13 100644 --- a/models/operations/getrecentlyaddedlibrary.go +++ b/models/operations/getrecentlyaddedlibrary.go @@ -19,13 +19,15 @@ import ( type QueryParamType int64 const ( - QueryParamTypeMovie QueryParamType = 1 - QueryParamTypeTvShow QueryParamType = 2 - QueryParamTypeSeason QueryParamType = 3 - QueryParamTypeEpisode QueryParamType = 4 - QueryParamTypeAudio QueryParamType = 8 - QueryParamTypeAlbum QueryParamType = 9 - QueryParamTypeTrack QueryParamType = 10 + QueryParamTypeMovie QueryParamType = 1 + QueryParamTypeTvShow QueryParamType = 2 + QueryParamTypeSeason QueryParamType = 3 + QueryParamTypeEpisode QueryParamType = 4 + QueryParamTypeArtist QueryParamType = 5 + QueryParamTypeAlbum QueryParamType = 6 + QueryParamTypeTrack QueryParamType = 7 + QueryParamTypePhotoAlbum QueryParamType = 8 + QueryParamTypePhoto QueryParamType = 9 ) func (e QueryParamType) ToPointer() *QueryParamType { diff --git a/models/operations/getsearchalllibraries.go b/models/operations/getsearchalllibraries.go index 7b022a0..9d316cd 100644 --- a/models/operations/getsearchalllibraries.go +++ b/models/operations/getsearchalllibraries.go @@ -147,16 +147,20 @@ func (o *GetSearchAllLibrariesRequest) GetIncludeExternalMedia() *GetSearchAllLi return o.IncludeExternalMedia } -// GetSearchAllLibrariesType - The type of media content +// GetSearchAllLibrariesType - The type of media content in the Plex library. This can represent videos, music, or photos. type GetSearchAllLibrariesType string const ( - GetSearchAllLibrariesTypeMovie GetSearchAllLibrariesType = "movie" - GetSearchAllLibrariesTypeTvShow GetSearchAllLibrariesType = "show" - GetSearchAllLibrariesTypeSeason GetSearchAllLibrariesType = "season" - GetSearchAllLibrariesTypeEpisode GetSearchAllLibrariesType = "episode" - GetSearchAllLibrariesTypeArtist GetSearchAllLibrariesType = "artist" - GetSearchAllLibrariesTypeAlbum GetSearchAllLibrariesType = "album" + GetSearchAllLibrariesTypeMovie GetSearchAllLibrariesType = "movie" + GetSearchAllLibrariesTypeTvShow GetSearchAllLibrariesType = "show" + GetSearchAllLibrariesTypeSeason GetSearchAllLibrariesType = "season" + GetSearchAllLibrariesTypeEpisode GetSearchAllLibrariesType = "episode" + GetSearchAllLibrariesTypeArtist GetSearchAllLibrariesType = "artist" + GetSearchAllLibrariesTypeAlbum GetSearchAllLibrariesType = "album" + GetSearchAllLibrariesTypeTrack GetSearchAllLibrariesType = "track" + GetSearchAllLibrariesTypePhotoAlbum GetSearchAllLibrariesType = "photoalbum" + GetSearchAllLibrariesTypePhoto GetSearchAllLibrariesType = "photo" + GetSearchAllLibrariesTypeCollection GetSearchAllLibrariesType = "collection" ) func (e GetSearchAllLibrariesType) ToPointer() *GetSearchAllLibrariesType { @@ -1146,7 +1150,7 @@ type GetSearchAllLibrariesMetadata struct { LibrarySectionID *int64 `json:"librarySectionID,omitempty"` LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"` LibrarySectionKey *string `json:"librarySectionKey,omitempty"` - // The type of media content + // The type of media content in the Plex library. This can represent videos, music, or photos. // Type GetSearchAllLibrariesType `json:"type"` Title string `json:"title"` diff --git a/models/operations/getsearchlibrary.go b/models/operations/getsearchlibrary.go index f042f36..9f96777 100644 --- a/models/operations/getsearchlibrary.go +++ b/models/operations/getsearchlibrary.go @@ -15,13 +15,15 @@ import ( type GetSearchLibraryQueryParamType int64 const ( - GetSearchLibraryQueryParamTypeMovie GetSearchLibraryQueryParamType = 1 - GetSearchLibraryQueryParamTypeTvShow GetSearchLibraryQueryParamType = 2 - GetSearchLibraryQueryParamTypeSeason GetSearchLibraryQueryParamType = 3 - GetSearchLibraryQueryParamTypeEpisode GetSearchLibraryQueryParamType = 4 - GetSearchLibraryQueryParamTypeAudio GetSearchLibraryQueryParamType = 8 - GetSearchLibraryQueryParamTypeAlbum GetSearchLibraryQueryParamType = 9 - GetSearchLibraryQueryParamTypeTrack GetSearchLibraryQueryParamType = 10 + GetSearchLibraryQueryParamTypeMovie GetSearchLibraryQueryParamType = 1 + GetSearchLibraryQueryParamTypeTvShow GetSearchLibraryQueryParamType = 2 + GetSearchLibraryQueryParamTypeSeason GetSearchLibraryQueryParamType = 3 + GetSearchLibraryQueryParamTypeEpisode GetSearchLibraryQueryParamType = 4 + GetSearchLibraryQueryParamTypeArtist GetSearchLibraryQueryParamType = 5 + GetSearchLibraryQueryParamTypeAlbum GetSearchLibraryQueryParamType = 6 + GetSearchLibraryQueryParamTypeTrack GetSearchLibraryQueryParamType = 7 + GetSearchLibraryQueryParamTypePhotoAlbum GetSearchLibraryQueryParamType = 8 + GetSearchLibraryQueryParamTypePhoto GetSearchLibraryQueryParamType = 9 ) func (e GetSearchLibraryQueryParamType) ToPointer() *GetSearchLibraryQueryParamType { diff --git a/models/operations/gettopwatchedcontent.go b/models/operations/gettopwatchedcontent.go index eea3cf7..fd31b3f 100644 --- a/models/operations/gettopwatchedcontent.go +++ b/models/operations/gettopwatchedcontent.go @@ -3,6 +3,8 @@ package operations import ( + "encoding/json" + "fmt" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/types" "net/http" @@ -17,23 +19,49 @@ import ( type GetTopWatchedContentQueryParamType int64 const ( - GetTopWatchedContentQueryParamTypeMovie GetTopWatchedContentQueryParamType = 1 - GetTopWatchedContentQueryParamTypeTvShow GetTopWatchedContentQueryParamType = 2 - GetTopWatchedContentQueryParamTypeSeason GetTopWatchedContentQueryParamType = 3 - GetTopWatchedContentQueryParamTypeEpisode GetTopWatchedContentQueryParamType = 4 - GetTopWatchedContentQueryParamTypeAudio GetTopWatchedContentQueryParamType = 8 - GetTopWatchedContentQueryParamTypeAlbum GetTopWatchedContentQueryParamType = 9 - GetTopWatchedContentQueryParamTypeTrack GetTopWatchedContentQueryParamType = 10 + GetTopWatchedContentQueryParamTypeMovie GetTopWatchedContentQueryParamType = 1 + GetTopWatchedContentQueryParamTypeTvShow GetTopWatchedContentQueryParamType = 2 + GetTopWatchedContentQueryParamTypeSeason GetTopWatchedContentQueryParamType = 3 + GetTopWatchedContentQueryParamTypeEpisode GetTopWatchedContentQueryParamType = 4 + GetTopWatchedContentQueryParamTypeArtist GetTopWatchedContentQueryParamType = 5 + GetTopWatchedContentQueryParamTypeAlbum GetTopWatchedContentQueryParamType = 6 + GetTopWatchedContentQueryParamTypeTrack GetTopWatchedContentQueryParamType = 7 + GetTopWatchedContentQueryParamTypePhotoAlbum GetTopWatchedContentQueryParamType = 8 + GetTopWatchedContentQueryParamTypePhoto GetTopWatchedContentQueryParamType = 9 ) func (e GetTopWatchedContentQueryParamType) ToPointer() *GetTopWatchedContentQueryParamType { return &e } +// GetTopWatchedContentQueryParamIncludeGuids - Adds the Guid object to the response +type GetTopWatchedContentQueryParamIncludeGuids int + +const ( + GetTopWatchedContentQueryParamIncludeGuidsDisable GetTopWatchedContentQueryParamIncludeGuids = 0 + GetTopWatchedContentQueryParamIncludeGuidsEnable GetTopWatchedContentQueryParamIncludeGuids = 1 +) + +func (e GetTopWatchedContentQueryParamIncludeGuids) ToPointer() *GetTopWatchedContentQueryParamIncludeGuids { + return &e +} +func (e *GetTopWatchedContentQueryParamIncludeGuids) UnmarshalJSON(data []byte) error { + var v int + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case 0: + fallthrough + case 1: + *e = GetTopWatchedContentQueryParamIncludeGuids(v) + return nil + default: + return fmt.Errorf("invalid value for GetTopWatchedContentQueryParamIncludeGuids: %v", v) + } +} + type GetTopWatchedContentRequest struct { - // Adds the Guids object to the response - // - IncludeGuids *int64 `queryParam:"style=form,explode=true,name=includeGuids"` // The type of media to retrieve or filter by. // 1 = movie // 2 = show @@ -42,13 +70,20 @@ type GetTopWatchedContentRequest struct { // E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries // Type GetTopWatchedContentQueryParamType `queryParam:"style=form,explode=true,name=type"` + // Adds the Guid object to the response + // + IncludeGuids *GetTopWatchedContentQueryParamIncludeGuids `default:"0" queryParam:"style=form,explode=true,name=includeGuids"` } -func (o *GetTopWatchedContentRequest) GetIncludeGuids() *int64 { - if o == nil { - return nil +func (g GetTopWatchedContentRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(g, "", false) +} + +func (g *GetTopWatchedContentRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil { + return err } - return o.IncludeGuids + return nil } func (o *GetTopWatchedContentRequest) GetType() GetTopWatchedContentQueryParamType { @@ -58,6 +93,13 @@ func (o *GetTopWatchedContentRequest) GetType() GetTopWatchedContentQueryParamTy return o.Type } +func (o *GetTopWatchedContentRequest) GetIncludeGuids() *GetTopWatchedContentQueryParamIncludeGuids { + if o == nil { + return nil + } + return o.IncludeGuids +} + type GetTopWatchedContentGenre struct { ID *int `json:"id,omitempty"` Filter *string `json:"filter,omitempty"` @@ -456,45 +498,50 @@ func (o *GetTopWatchedContentMetadata) GetUser() []GetTopWatchedContentUser { } type GetTopWatchedContentMediaContainer struct { - Size *int `json:"size,omitempty"` - AllowSync *bool `json:"allowSync,omitempty"` - Identifier *string `json:"identifier,omitempty"` - MediaTagPrefix *string `json:"mediaTagPrefix,omitempty"` - MediaTagVersion *int `json:"mediaTagVersion,omitempty"` + // Number of media items returned in this response. + Size int `json:"size"` + // Indicates whether syncing is allowed. + AllowSync bool `json:"allowSync"` + // An plugin identifier for the media container. + Identifier string `json:"identifier"` + // The prefix used for media tag resource paths. + MediaTagPrefix string `json:"mediaTagPrefix"` + // The version number for media tags. + MediaTagVersion int64 `json:"mediaTagVersion"` Metadata []GetTopWatchedContentMetadata `json:"Metadata,omitempty"` } -func (o *GetTopWatchedContentMediaContainer) GetSize() *int { +func (o *GetTopWatchedContentMediaContainer) GetSize() int { if o == nil { - return nil + return 0 } return o.Size } -func (o *GetTopWatchedContentMediaContainer) GetAllowSync() *bool { +func (o *GetTopWatchedContentMediaContainer) GetAllowSync() bool { if o == nil { - return nil + return false } return o.AllowSync } -func (o *GetTopWatchedContentMediaContainer) GetIdentifier() *string { +func (o *GetTopWatchedContentMediaContainer) GetIdentifier() string { if o == nil { - return nil + return "" } return o.Identifier } -func (o *GetTopWatchedContentMediaContainer) GetMediaTagPrefix() *string { +func (o *GetTopWatchedContentMediaContainer) GetMediaTagPrefix() string { if o == nil { - return nil + return "" } return o.MediaTagPrefix } -func (o *GetTopWatchedContentMediaContainer) GetMediaTagVersion() *int { +func (o *GetTopWatchedContentMediaContainer) GetMediaTagVersion() int64 { if o == nil { - return nil + return 0 } return o.MediaTagVersion } diff --git a/models/sdkerrors/getallmedialibrary.go b/models/sdkerrors/getallmedialibrary.go deleted file mode 100644 index 3896a7b..0000000 --- a/models/sdkerrors/getallmedialibrary.go +++ /dev/null @@ -1,90 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package sdkerrors - -import ( - "encoding/json" - "net/http" -) - -type GetAllMediaLibraryLibraryErrors struct { - Code *int `json:"code,omitempty"` - Message *string `json:"message,omitempty"` - Status *int `json:"status,omitempty"` -} - -func (o *GetAllMediaLibraryLibraryErrors) GetCode() *int { - if o == nil { - return nil - } - return o.Code -} - -func (o *GetAllMediaLibraryLibraryErrors) GetMessage() *string { - if o == nil { - return nil - } - return o.Message -} - -func (o *GetAllMediaLibraryLibraryErrors) GetStatus() *int { - if o == nil { - return nil - } - return o.Status -} - -// GetAllMediaLibraryUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. -type GetAllMediaLibraryUnauthorized struct { - Errors []GetAllMediaLibraryLibraryErrors `json:"errors,omitempty"` - // Raw HTTP response; suitable for custom response parsing - RawResponse *http.Response `json:"-"` -} - -var _ error = &GetAllMediaLibraryUnauthorized{} - -func (e *GetAllMediaLibraryUnauthorized) Error() string { - data, _ := json.Marshal(e) - return string(data) -} - -type GetAllMediaLibraryErrors struct { - Code *int `json:"code,omitempty"` - Message *string `json:"message,omitempty"` - Status *int `json:"status,omitempty"` -} - -func (o *GetAllMediaLibraryErrors) GetCode() *int { - if o == nil { - return nil - } - return o.Code -} - -func (o *GetAllMediaLibraryErrors) GetMessage() *string { - if o == nil { - return nil - } - return o.Message -} - -func (o *GetAllMediaLibraryErrors) GetStatus() *int { - if o == nil { - return nil - } - return o.Status -} - -// GetAllMediaLibraryBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. -type GetAllMediaLibraryBadRequest struct { - Errors []GetAllMediaLibraryErrors `json:"errors,omitempty"` - // Raw HTTP response; suitable for custom response parsing - RawResponse *http.Response `json:"-"` -} - -var _ error = &GetAllMediaLibraryBadRequest{} - -func (e *GetAllMediaLibraryBadRequest) Error() string { - data, _ := json.Marshal(e) - return string(data) -} diff --git a/models/sdkerrors/getlibrarysectionsall.go b/models/sdkerrors/getlibrarysectionsall.go new file mode 100644 index 0000000..9f58474 --- /dev/null +++ b/models/sdkerrors/getlibrarysectionsall.go @@ -0,0 +1,90 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package sdkerrors + +import ( + "encoding/json" + "net/http" +) + +type GetLibrarySectionsAllLibraryErrors struct { + Code *int `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Status *int `json:"status,omitempty"` +} + +func (o *GetLibrarySectionsAllLibraryErrors) GetCode() *int { + if o == nil { + return nil + } + return o.Code +} + +func (o *GetLibrarySectionsAllLibraryErrors) GetMessage() *string { + if o == nil { + return nil + } + return o.Message +} + +func (o *GetLibrarySectionsAllLibraryErrors) GetStatus() *int { + if o == nil { + return nil + } + return o.Status +} + +// GetLibrarySectionsAllUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. +type GetLibrarySectionsAllUnauthorized struct { + Errors []GetLibrarySectionsAllLibraryErrors `json:"errors,omitempty"` + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response `json:"-"` +} + +var _ error = &GetLibrarySectionsAllUnauthorized{} + +func (e *GetLibrarySectionsAllUnauthorized) Error() string { + data, _ := json.Marshal(e) + return string(data) +} + +type GetLibrarySectionsAllErrors struct { + Code *int `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Status *int `json:"status,omitempty"` +} + +func (o *GetLibrarySectionsAllErrors) GetCode() *int { + if o == nil { + return nil + } + return o.Code +} + +func (o *GetLibrarySectionsAllErrors) GetMessage() *string { + if o == nil { + return nil + } + return o.Message +} + +func (o *GetLibrarySectionsAllErrors) GetStatus() *int { + if o == nil { + return nil + } + return o.Status +} + +// GetLibrarySectionsAllBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly. +type GetLibrarySectionsAllBadRequest struct { + Errors []GetLibrarySectionsAllErrors `json:"errors,omitempty"` + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response `json:"-"` +} + +var _ error = &GetLibrarySectionsAllBadRequest{} + +func (e *GetLibrarySectionsAllBadRequest) Error() string { + data, _ := json.Marshal(e) + return string(data) +} diff --git a/playlists.go b/playlists.go index ab256ef..5832390 100644 --- a/playlists.go +++ b/playlists.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" @@ -20,12 +21,16 @@ import ( // Retrieving a playlist, or its items, will trigger a refresh of its metadata. // This may cause the duration and number of items to change. type Playlists struct { - sdkConfiguration sdkConfiguration + rootSDK *PlexAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } -func newPlaylists(sdkConfig sdkConfiguration) *Playlists { +func newPlaylists(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Playlists { return &Playlists{ + rootSDK: rootSDK, sdkConfiguration: sdkConfig, + hooks: hooks, } } @@ -58,11 +63,13 @@ func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.Creat } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "createPlaylist", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "createPlaylist", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -115,15 +122,17 @@ func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.Creat "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -140,7 +149,7 @@ func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.Creat err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -148,13 +157,13 @@ func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.Creat if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -167,17 +176,17 @@ func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.Creat err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -312,11 +321,13 @@ func (s *Playlists) GetPlaylists(ctx context.Context, playlistType *operations.P } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getPlaylists", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getPlaylists", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -369,15 +380,17 @@ func (s *Playlists) GetPlaylists(ctx context.Context, playlistType *operations.P "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -394,7 +407,7 @@ func (s *Playlists) GetPlaylists(ctx context.Context, playlistType *operations.P err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -402,13 +415,13 @@ func (s *Playlists) GetPlaylists(ctx context.Context, playlistType *operations.P if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -421,17 +434,17 @@ func (s *Playlists) GetPlaylists(ctx context.Context, playlistType *operations.P err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -566,11 +579,13 @@ func (s *Playlists) GetPlaylist(ctx context.Context, playlistID float64, opts .. } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getPlaylist", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getPlaylist", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -619,15 +634,17 @@ func (s *Playlists) GetPlaylist(ctx context.Context, playlistID float64, opts .. "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -644,7 +661,7 @@ func (s *Playlists) GetPlaylist(ctx context.Context, playlistID float64, opts .. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -652,13 +669,13 @@ func (s *Playlists) GetPlaylist(ctx context.Context, playlistID float64, opts .. if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -671,17 +688,17 @@ func (s *Playlists) GetPlaylist(ctx context.Context, playlistID float64, opts .. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -815,11 +832,13 @@ func (s *Playlists) DeletePlaylist(ctx context.Context, playlistID float64, opts } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "deletePlaylist", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "deletePlaylist", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -868,15 +887,17 @@ func (s *Playlists) DeletePlaylist(ctx context.Context, playlistID float64, opts "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -893,7 +914,7 @@ func (s *Playlists) DeletePlaylist(ctx context.Context, playlistID float64, opts err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -901,13 +922,13 @@ func (s *Playlists) DeletePlaylist(ctx context.Context, playlistID float64, opts if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -920,17 +941,17 @@ func (s *Playlists) DeletePlaylist(ctx context.Context, playlistID float64, opts err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1046,11 +1067,13 @@ func (s *Playlists) UpdatePlaylist(ctx context.Context, playlistID float64, titl } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "updatePlaylist", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "updatePlaylist", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -1103,15 +1126,17 @@ func (s *Playlists) UpdatePlaylist(ctx context.Context, playlistID float64, titl "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -1128,7 +1153,7 @@ func (s *Playlists) UpdatePlaylist(ctx context.Context, playlistID float64, titl err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -1136,13 +1161,13 @@ func (s *Playlists) UpdatePlaylist(ctx context.Context, playlistID float64, titl if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -1155,17 +1180,17 @@ func (s *Playlists) UpdatePlaylist(ctx context.Context, playlistID float64, titl err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1283,11 +1308,13 @@ func (s *Playlists) GetPlaylistContents(ctx context.Context, playlistID float64, } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getPlaylistContents", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getPlaylistContents", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -1340,15 +1367,17 @@ func (s *Playlists) GetPlaylistContents(ctx context.Context, playlistID float64, "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -1365,7 +1394,7 @@ func (s *Playlists) GetPlaylistContents(ctx context.Context, playlistID float64, err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -1373,13 +1402,13 @@ func (s *Playlists) GetPlaylistContents(ctx context.Context, playlistID float64, if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -1392,17 +1421,17 @@ func (s *Playlists) GetPlaylistContents(ctx context.Context, playlistID float64, err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1536,11 +1565,13 @@ func (s *Playlists) ClearPlaylistContents(ctx context.Context, playlistID float6 } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "clearPlaylistContents", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "clearPlaylistContents", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -1589,15 +1620,17 @@ func (s *Playlists) ClearPlaylistContents(ctx context.Context, playlistID float6 "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -1614,7 +1647,7 @@ func (s *Playlists) ClearPlaylistContents(ctx context.Context, playlistID float6 err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -1622,13 +1655,13 @@ func (s *Playlists) ClearPlaylistContents(ctx context.Context, playlistID float6 if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -1641,17 +1674,17 @@ func (s *Playlists) ClearPlaylistContents(ctx context.Context, playlistID float6 err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1768,11 +1801,13 @@ func (s *Playlists) AddPlaylistContents(ctx context.Context, playlistID float64, } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "addPlaylistContents", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "addPlaylistContents", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -1825,15 +1860,17 @@ func (s *Playlists) AddPlaylistContents(ctx context.Context, playlistID float64, "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -1850,7 +1887,7 @@ func (s *Playlists) AddPlaylistContents(ctx context.Context, playlistID float64, err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -1858,13 +1895,13 @@ func (s *Playlists) AddPlaylistContents(ctx context.Context, playlistID float64, if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -1877,17 +1914,17 @@ func (s *Playlists) AddPlaylistContents(ctx context.Context, playlistID float64, err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -2023,11 +2060,13 @@ func (s *Playlists) UploadPlaylist(ctx context.Context, path string, force opera } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "uploadPlaylist", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "uploadPlaylist", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -2080,15 +2119,17 @@ func (s *Playlists) UploadPlaylist(ctx context.Context, path string, force opera "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -2105,7 +2146,7 @@ func (s *Playlists) UploadPlaylist(ctx context.Context, path string, force opera err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -2113,13 +2154,13 @@ func (s *Playlists) UploadPlaylist(ctx context.Context, path string, force opera if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -2132,17 +2173,17 @@ func (s *Playlists) UploadPlaylist(ctx context.Context, path string, force opera err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/plex.go b/plex.go index 5504e92..ce5a109 100644 --- a/plex.go +++ b/plex.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" @@ -17,12 +18,16 @@ import ( // Plex - API Calls that perform operations directly against https://Plex.tv type Plex struct { - sdkConfiguration sdkConfiguration + rootSDK *PlexAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } -func newPlex(sdkConfig sdkConfiguration) *Plex { +func newPlex(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Plex { return &Plex{ + rootSDK: rootSDK, sdkConfiguration: sdkConfig, + hooks: hooks, } } @@ -52,11 +57,13 @@ func (s *Plex) GetCompanionsData(ctx context.Context, opts ...operations.Option) } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getCompanionsData", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getCompanionsData", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -105,15 +112,17 @@ func (s *Plex) GetCompanionsData(ctx context.Context, opts ...operations.Option) "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -130,7 +139,7 @@ func (s *Plex) GetCompanionsData(ctx context.Context, opts ...operations.Option) err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -138,13 +147,13 @@ func (s *Plex) GetCompanionsData(ctx context.Context, opts ...operations.Option) if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -157,17 +166,17 @@ func (s *Plex) GetCompanionsData(ctx context.Context, opts ...operations.Option) err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -296,11 +305,13 @@ func (s *Plex) GetUserFriends(ctx context.Context, opts ...operations.Option) (* } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getUserFriends", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getUserFriends", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -349,15 +360,17 @@ func (s *Plex) GetUserFriends(ctx context.Context, opts ...operations.Option) (* "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -374,7 +387,7 @@ func (s *Plex) GetUserFriends(ctx context.Context, opts ...operations.Option) (* err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -382,13 +395,13 @@ func (s *Plex) GetUserFriends(ctx context.Context, opts ...operations.Option) (* if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -401,17 +414,17 @@ func (s *Plex) GetUserFriends(ctx context.Context, opts ...operations.Option) (* err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -540,11 +553,13 @@ func (s *Plex) GetGeoData(ctx context.Context, opts ...operations.Option) (*oper } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getGeoData", - OAuth2Scopes: []string{}, - SecuritySource: nil, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getGeoData", + OAuth2Scopes: []string{}, + SecuritySource: nil, } timeout := o.Timeout @@ -589,15 +604,17 @@ func (s *Plex) GetGeoData(ctx context.Context, opts ...operations.Option) (*oper "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -614,7 +631,7 @@ func (s *Plex) GetGeoData(ctx context.Context, opts ...operations.Option) (*oper err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -622,13 +639,13 @@ func (s *Plex) GetGeoData(ctx context.Context, opts ...operations.Option) (*oper if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -641,17 +658,17 @@ func (s *Plex) GetGeoData(ctx context.Context, opts ...operations.Option) (*oper err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -781,11 +798,13 @@ func (s *Plex) GetHomeData(ctx context.Context, opts ...operations.Option) (*ope } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getHomeData", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getHomeData", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -834,15 +853,17 @@ func (s *Plex) GetHomeData(ctx context.Context, opts ...operations.Option) (*ope "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -859,7 +880,7 @@ func (s *Plex) GetHomeData(ctx context.Context, opts ...operations.Option) (*ope err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -867,13 +888,13 @@ func (s *Plex) GetHomeData(ctx context.Context, opts ...operations.Option) (*ope if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -886,17 +907,17 @@ func (s *Plex) GetHomeData(ctx context.Context, opts ...operations.Option) (*ope err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1032,11 +1053,13 @@ func (s *Plex) GetServerResources(ctx context.Context, clientID string, includeH } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-server-resources", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-server-resources", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -1091,15 +1114,17 @@ func (s *Plex) GetServerResources(ctx context.Context, clientID string, includeH "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -1116,7 +1141,7 @@ func (s *Plex) GetServerResources(ctx context.Context, clientID string, includeH err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -1124,13 +1149,13 @@ func (s *Plex) GetServerResources(ctx context.Context, clientID string, includeH if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -1143,17 +1168,17 @@ func (s *Plex) GetServerResources(ctx context.Context, clientID string, includeH err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1282,11 +1307,13 @@ func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opt } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getPin", - OAuth2Scopes: []string{}, - SecuritySource: nil, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getPin", + OAuth2Scopes: []string{}, + SecuritySource: nil, } timeout := o.Timeout @@ -1337,15 +1364,17 @@ func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opt "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -1362,7 +1391,7 @@ func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opt err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -1370,13 +1399,13 @@ func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opt if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -1389,17 +1418,17 @@ func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opt err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1506,11 +1535,13 @@ func (s *Plex) GetTokenByPinID(ctx context.Context, request operations.GetTokenB } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getTokenByPinId", - OAuth2Scopes: []string{}, - SecuritySource: nil, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getTokenByPinId", + OAuth2Scopes: []string{}, + SecuritySource: nil, } timeout := o.Timeout @@ -1557,15 +1588,17 @@ func (s *Plex) GetTokenByPinID(ctx context.Context, request operations.GetTokenB "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -1582,7 +1615,7 @@ func (s *Plex) GetTokenByPinID(ctx context.Context, request operations.GetTokenB err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -1590,13 +1623,13 @@ func (s *Plex) GetTokenByPinID(ctx context.Context, request operations.GetTokenB if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -1609,17 +1642,17 @@ func (s *Plex) GetTokenByPinID(ctx context.Context, request operations.GetTokenB err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "404", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/plexapi.go b/plexapi.go index afbdb47..63d567e 100644 --- a/plexapi.go +++ b/plexapi.go @@ -2,10 +2,13 @@ package plexgo +// Generated from OpenAPI doc version 0.0.3 and generator version 2.620.2 + import ( "context" "encoding/json" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/components" @@ -20,7 +23,7 @@ var ServerList = []string{ "{protocol}://{ip}:{port}", } -// HTTPClient provides an interface for suplying the SDK with a custom HTTP client +// HTTPClient provides an interface for supplying the SDK with a custom HTTP client type HTTPClient interface { Do(req *http.Request) (*http.Response, error) } @@ -46,30 +49,6 @@ func Float64(f float64) *float64 { return &f } // Pointer provides a helper function to return a pointer to a type func Pointer[T any](v T) *T { return &v } -type sdkConfiguration struct { - Client HTTPClient - Security func(context.Context) (interface{}, error) - ServerURL string - ServerIndex int - ServerDefaults []map[string]string - Language string - OpenAPIDocVersion string - SDKVersion string - GenVersion string - UserAgent string - RetryConfig *retry.Config - Hooks *hooks.Hooks - Timeout *time.Duration -} - -func (c *sdkConfiguration) GetServerDetails() (string, map[string]string) { - if c.ServerURL != "" { - return c.ServerURL, nil - } - - return ServerList[c.ServerIndex], c.ServerDefaults[c.ServerIndex] -} - // PlexAPI - Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server // # Plex Media Server OpenAPI Specification // @@ -96,6 +75,7 @@ func (c *sdkConfiguration) GetServerDetails() (string, map[string]string) { // | Java | [GitHub](https://github.com/LukeHagar/plexjava) | [Releases](https://github.com/LukeHagar/plexjava/releases) | - | // | C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | - type PlexAPI struct { + SDKVersion string // Operations against the Plex Media Server System. // Server *Server @@ -156,7 +136,8 @@ type PlexAPI struct { Updater *Updater Users *Users - sdkConfiguration sdkConfiguration + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } type SDKOption func(*PlexAPI) @@ -220,12 +201,12 @@ func (e *ServerProtocol) UnmarshalJSON(data []byte) error { // WithProtocol allows setting the protocol variable for url substitution func WithProtocol(protocol ServerProtocol) SDKOption { return func(sdk *PlexAPI) { - for idx := range sdk.sdkConfiguration.ServerDefaults { - if _, ok := sdk.sdkConfiguration.ServerDefaults[idx]["protocol"]; !ok { + for idx := range sdk.sdkConfiguration.ServerVariables { + if _, ok := sdk.sdkConfiguration.ServerVariables[idx]["protocol"]; !ok { continue } - sdk.sdkConfiguration.ServerDefaults[idx]["protocol"] = fmt.Sprintf("%v", protocol) + sdk.sdkConfiguration.ServerVariables[idx]["protocol"] = fmt.Sprintf("%v", protocol) } } } @@ -233,12 +214,12 @@ func WithProtocol(protocol ServerProtocol) SDKOption { // WithIP allows setting the ip variable for url substitution func WithIP(ip string) SDKOption { return func(sdk *PlexAPI) { - for idx := range sdk.sdkConfiguration.ServerDefaults { - if _, ok := sdk.sdkConfiguration.ServerDefaults[idx]["ip"]; !ok { + for idx := range sdk.sdkConfiguration.ServerVariables { + if _, ok := sdk.sdkConfiguration.ServerVariables[idx]["ip"]; !ok { continue } - sdk.sdkConfiguration.ServerDefaults[idx]["ip"] = fmt.Sprintf("%v", ip) + sdk.sdkConfiguration.ServerVariables[idx]["ip"] = fmt.Sprintf("%v", ip) } } } @@ -246,12 +227,12 @@ func WithIP(ip string) SDKOption { // WithPort allows setting the port variable for url substitution func WithPort(port string) SDKOption { return func(sdk *PlexAPI) { - for idx := range sdk.sdkConfiguration.ServerDefaults { - if _, ok := sdk.sdkConfiguration.ServerDefaults[idx]["port"]; !ok { + for idx := range sdk.sdkConfiguration.ServerVariables { + if _, ok := sdk.sdkConfiguration.ServerVariables[idx]["port"]; !ok { continue } - sdk.sdkConfiguration.ServerDefaults[idx]["port"] = fmt.Sprintf("%v", port) + sdk.sdkConfiguration.ServerVariables[idx]["port"] = fmt.Sprintf("%v", port) } } } @@ -296,21 +277,19 @@ func WithTimeout(timeout time.Duration) SDKOption { // New creates a new instance of the SDK with the provided options func New(opts ...SDKOption) *PlexAPI { sdk := &PlexAPI{ - sdkConfiguration: sdkConfiguration{ - Language: "go", - OpenAPIDocVersion: "0.0.3", - SDKVersion: "0.21.2", - GenVersion: "2.597.9", - UserAgent: "speakeasy-sdk/go 0.21.2 2.597.9 0.0.3 github.com/LukeHagar/plexgo", - ServerDefaults: []map[string]string{ + SDKVersion: "0.22.0", + sdkConfiguration: config.SDKConfiguration{ + UserAgent: "speakeasy-sdk/go 0.22.0 2.620.2 0.0.3 github.com/LukeHagar/plexgo", + ServerList: ServerList, + ServerVariables: []map[string]string{ { "protocol": "https", "ip": "10.10.10.47", "port": "32400", }, }, - Hooks: hooks.New(), }, + hooks: hooks.New(), } for _, opt := range opts { opt(sdk) @@ -323,44 +302,28 @@ func New(opts ...SDKOption) *PlexAPI { currentServerURL, _ := sdk.sdkConfiguration.GetServerDetails() serverURL := currentServerURL - serverURL, sdk.sdkConfiguration.Client = sdk.sdkConfiguration.Hooks.SDKInit(currentServerURL, sdk.sdkConfiguration.Client) - if serverURL != currentServerURL { + serverURL, sdk.sdkConfiguration.Client = sdk.hooks.SDKInit(currentServerURL, sdk.sdkConfiguration.Client) + if currentServerURL != serverURL { sdk.sdkConfiguration.ServerURL = serverURL } - sdk.Server = newServer(sdk.sdkConfiguration) - - sdk.Media = newMedia(sdk.sdkConfiguration) - - sdk.Video = newVideo(sdk.sdkConfiguration) - - sdk.Activities = newActivities(sdk.sdkConfiguration) - - sdk.Butler = newButler(sdk.sdkConfiguration) - - sdk.Plex = newPlex(sdk.sdkConfiguration) - - sdk.Hubs = newHubs(sdk.sdkConfiguration) - - sdk.Search = newSearch(sdk.sdkConfiguration) - - sdk.Library = newLibrary(sdk.sdkConfiguration) - - sdk.Watchlist = newWatchlist(sdk.sdkConfiguration) - - sdk.Log = newLog(sdk.sdkConfiguration) - - sdk.Playlists = newPlaylists(sdk.sdkConfiguration) - - sdk.Authentication = newAuthentication(sdk.sdkConfiguration) - - sdk.Statistics = newStatistics(sdk.sdkConfiguration) - - sdk.Sessions = newSessions(sdk.sdkConfiguration) - - sdk.Updater = newUpdater(sdk.sdkConfiguration) - - sdk.Users = newUsers(sdk.sdkConfiguration) + sdk.Server = newServer(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Media = newMedia(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Video = newVideo(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Activities = newActivities(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Butler = newButler(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Plex = newPlex(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Hubs = newHubs(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Search = newSearch(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Library = newLibrary(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Watchlist = newWatchlist(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Log = newLog(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Playlists = newPlaylists(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Authentication = newAuthentication(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Statistics = newStatistics(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Sessions = newSessions(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Updater = newUpdater(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Users = newUsers(sdk, sdk.sdkConfiguration, sdk.hooks) return sdk } diff --git a/search.go b/search.go index 74edd08..d98e3fa 100644 --- a/search.go +++ b/search.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" @@ -17,12 +18,16 @@ import ( // Search - API Calls that perform search operations with Plex Media Server type Search struct { - sdkConfiguration sdkConfiguration + rootSDK *PlexAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } -func newSearch(sdkConfig sdkConfiguration) *Search { +func newSearch(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Search { return &Search{ + rootSDK: rootSDK, sdkConfiguration: sdkConfig, + hooks: hooks, } } @@ -71,11 +76,13 @@ func (s *Search) PerformSearch(ctx context.Context, query string, sectionID *flo } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "performSearch", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "performSearch", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -128,15 +135,17 @@ func (s *Search) PerformSearch(ctx context.Context, query string, sectionID *flo "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -153,7 +162,7 @@ func (s *Search) PerformSearch(ctx context.Context, query string, sectionID *flo err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -161,13 +170,13 @@ func (s *Search) PerformSearch(ctx context.Context, query string, sectionID *flo if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -180,17 +189,17 @@ func (s *Search) PerformSearch(ctx context.Context, query string, sectionID *flo err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -309,11 +318,13 @@ func (s *Search) PerformVoiceSearch(ctx context.Context, query string, sectionID } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "performVoiceSearch", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "performVoiceSearch", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -366,15 +377,17 @@ func (s *Search) PerformVoiceSearch(ctx context.Context, query string, sectionID "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -391,7 +404,7 @@ func (s *Search) PerformVoiceSearch(ctx context.Context, query string, sectionID err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -399,13 +412,13 @@ func (s *Search) PerformVoiceSearch(ctx context.Context, query string, sectionID if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -418,17 +431,17 @@ func (s *Search) PerformVoiceSearch(ctx context.Context, query string, sectionID err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -542,11 +555,13 @@ func (s *Search) GetSearchResults(ctx context.Context, query string, opts ...ope } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getSearchResults", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getSearchResults", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -599,15 +614,17 @@ func (s *Search) GetSearchResults(ctx context.Context, query string, opts ...ope "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -624,7 +641,7 @@ func (s *Search) GetSearchResults(ctx context.Context, query string, opts ...ope err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -632,13 +649,13 @@ func (s *Search) GetSearchResults(ctx context.Context, query string, opts ...ope if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -651,17 +668,17 @@ func (s *Search) GetSearchResults(ctx context.Context, query string, opts ...ope err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/server.go b/server.go index 12925fd..695fd5b 100644 --- a/server.go +++ b/server.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" @@ -17,12 +18,16 @@ import ( // Server - Operations against the Plex Media Server System. type Server struct { - sdkConfiguration sdkConfiguration + rootSDK *PlexAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } -func newServer(sdkConfig sdkConfiguration) *Server { +func newServer(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Server { return &Server{ + rootSDK: rootSDK, sdkConfiguration: sdkConfig, + hooks: hooks, } } @@ -53,11 +58,13 @@ func (s *Server) GetServerCapabilities(ctx context.Context, opts ...operations.O } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getServerCapabilities", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getServerCapabilities", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -106,15 +113,17 @@ func (s *Server) GetServerCapabilities(ctx context.Context, opts ...operations.O "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -131,7 +140,7 @@ func (s *Server) GetServerCapabilities(ctx context.Context, opts ...operations.O err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -139,13 +148,13 @@ func (s *Server) GetServerCapabilities(ctx context.Context, opts ...operations.O if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -158,17 +167,17 @@ func (s *Server) GetServerCapabilities(ctx context.Context, opts ...operations.O err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -298,11 +307,13 @@ func (s *Server) GetServerPreferences(ctx context.Context, opts ...operations.Op } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getServerPreferences", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getServerPreferences", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -351,15 +362,17 @@ func (s *Server) GetServerPreferences(ctx context.Context, opts ...operations.Op "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -376,7 +389,7 @@ func (s *Server) GetServerPreferences(ctx context.Context, opts ...operations.Op err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -384,13 +397,13 @@ func (s *Server) GetServerPreferences(ctx context.Context, opts ...operations.Op if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -403,17 +416,17 @@ func (s *Server) GetServerPreferences(ctx context.Context, opts ...operations.Op err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -543,11 +556,13 @@ func (s *Server) GetAvailableClients(ctx context.Context, opts ...operations.Opt } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getAvailableClients", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getAvailableClients", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -596,15 +611,17 @@ func (s *Server) GetAvailableClients(ctx context.Context, opts ...operations.Opt "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -621,7 +638,7 @@ func (s *Server) GetAvailableClients(ctx context.Context, opts ...operations.Opt err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -629,13 +646,13 @@ func (s *Server) GetAvailableClients(ctx context.Context, opts ...operations.Opt if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -648,17 +665,17 @@ func (s *Server) GetAvailableClients(ctx context.Context, opts ...operations.Opt err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -788,11 +805,13 @@ func (s *Server) GetDevices(ctx context.Context, opts ...operations.Option) (*op } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getDevices", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getDevices", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -841,15 +860,17 @@ func (s *Server) GetDevices(ctx context.Context, opts ...operations.Option) (*op "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -866,7 +887,7 @@ func (s *Server) GetDevices(ctx context.Context, opts ...operations.Option) (*op err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -874,13 +895,13 @@ func (s *Server) GetDevices(ctx context.Context, opts ...operations.Option) (*op if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -893,17 +914,17 @@ func (s *Server) GetDevices(ctx context.Context, opts ...operations.Option) (*op err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1033,11 +1054,13 @@ func (s *Server) GetServerIdentity(ctx context.Context, opts ...operations.Optio } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-server-identity", - OAuth2Scopes: []string{}, - SecuritySource: nil, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-server-identity", + OAuth2Scopes: []string{}, + SecuritySource: nil, } timeout := o.Timeout @@ -1082,15 +1105,17 @@ func (s *Server) GetServerIdentity(ctx context.Context, opts ...operations.Optio "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -1107,7 +1132,7 @@ func (s *Server) GetServerIdentity(ctx context.Context, opts ...operations.Optio err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -1115,13 +1140,13 @@ func (s *Server) GetServerIdentity(ctx context.Context, opts ...operations.Optio if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -1134,17 +1159,17 @@ func (s *Server) GetServerIdentity(ctx context.Context, opts ...operations.Optio err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"408", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1252,11 +1277,13 @@ func (s *Server) GetMyPlexAccount(ctx context.Context, opts ...operations.Option } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getMyPlexAccount", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getMyPlexAccount", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -1305,15 +1332,17 @@ func (s *Server) GetMyPlexAccount(ctx context.Context, opts ...operations.Option "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -1330,7 +1359,7 @@ func (s *Server) GetMyPlexAccount(ctx context.Context, opts ...operations.Option err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -1338,13 +1367,13 @@ func (s *Server) GetMyPlexAccount(ctx context.Context, opts ...operations.Option if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -1357,17 +1386,17 @@ func (s *Server) GetMyPlexAccount(ctx context.Context, opts ...operations.Option err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1497,11 +1526,13 @@ func (s *Server) GetResizedPhoto(ctx context.Context, request operations.GetResi } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getResizedPhoto", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getResizedPhoto", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -1554,15 +1585,17 @@ func (s *Server) GetResizedPhoto(ctx context.Context, request operations.GetResi "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -1579,7 +1612,7 @@ func (s *Server) GetResizedPhoto(ctx context.Context, request operations.GetResi err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -1587,13 +1620,13 @@ func (s *Server) GetResizedPhoto(ctx context.Context, request operations.GetResi if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -1606,17 +1639,17 @@ func (s *Server) GetResizedPhoto(ctx context.Context, request operations.GetResi err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1730,11 +1763,13 @@ func (s *Server) GetMediaProviders(ctx context.Context, xPlexToken string, opts } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-media-providers", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-media-providers", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -1785,15 +1820,17 @@ func (s *Server) GetMediaProviders(ctx context.Context, xPlexToken string, opts "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -1810,7 +1847,7 @@ func (s *Server) GetMediaProviders(ctx context.Context, xPlexToken string, opts err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -1818,13 +1855,13 @@ func (s *Server) GetMediaProviders(ctx context.Context, xPlexToken string, opts if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -1837,17 +1874,17 @@ func (s *Server) GetMediaProviders(ctx context.Context, xPlexToken string, opts err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -1977,11 +2014,13 @@ func (s *Server) GetServerList(ctx context.Context, opts ...operations.Option) ( } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getServerList", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getServerList", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -2030,15 +2069,17 @@ func (s *Server) GetServerList(ctx context.Context, opts ...operations.Option) ( "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -2055,7 +2096,7 @@ func (s *Server) GetServerList(ctx context.Context, opts ...operations.Option) ( err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -2063,13 +2104,13 @@ func (s *Server) GetServerList(ctx context.Context, opts ...operations.Option) ( if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -2082,17 +2123,17 @@ func (s *Server) GetServerList(ctx context.Context, opts ...operations.Option) ( err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/sessions.go b/sessions.go index e189448..23d0626 100644 --- a/sessions.go +++ b/sessions.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" @@ -17,12 +18,16 @@ import ( // Sessions - API Calls that perform search operations with Plex Media Server Sessions type Sessions struct { - sdkConfiguration sdkConfiguration + rootSDK *PlexAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } -func newSessions(sdkConfig sdkConfiguration) *Sessions { +func newSessions(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Sessions { return &Sessions{ + rootSDK: rootSDK, sdkConfiguration: sdkConfig, + hooks: hooks, } } @@ -53,11 +58,13 @@ func (s *Sessions) GetSessions(ctx context.Context, opts ...operations.Option) ( } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getSessions", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getSessions", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -106,15 +113,17 @@ func (s *Sessions) GetSessions(ctx context.Context, opts ...operations.Option) ( "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -131,7 +140,7 @@ func (s *Sessions) GetSessions(ctx context.Context, opts ...operations.Option) ( err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -139,13 +148,13 @@ func (s *Sessions) GetSessions(ctx context.Context, opts ...operations.Option) ( if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -158,17 +167,17 @@ func (s *Sessions) GetSessions(ctx context.Context, opts ...operations.Option) ( err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -305,11 +314,13 @@ func (s *Sessions) GetSessionHistory(ctx context.Context, sort *string, accountI } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getSessionHistory", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getSessionHistory", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -362,15 +373,17 @@ func (s *Sessions) GetSessionHistory(ctx context.Context, sort *string, accountI "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -387,7 +400,7 @@ func (s *Sessions) GetSessionHistory(ctx context.Context, sort *string, accountI err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -395,13 +408,13 @@ func (s *Sessions) GetSessionHistory(ctx context.Context, sort *string, accountI if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -414,17 +427,17 @@ func (s *Sessions) GetSessionHistory(ctx context.Context, sort *string, accountI err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -554,11 +567,13 @@ func (s *Sessions) GetTranscodeSessions(ctx context.Context, opts ...operations. } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getTranscodeSessions", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getTranscodeSessions", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -607,15 +622,17 @@ func (s *Sessions) GetTranscodeSessions(ctx context.Context, opts ...operations. "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -632,7 +649,7 @@ func (s *Sessions) GetTranscodeSessions(ctx context.Context, opts ...operations. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -640,13 +657,13 @@ func (s *Sessions) GetTranscodeSessions(ctx context.Context, opts ...operations. if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -659,17 +676,17 @@ func (s *Sessions) GetTranscodeSessions(ctx context.Context, opts ...operations. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -803,11 +820,13 @@ func (s *Sessions) StopTranscodeSession(ctx context.Context, sessionKey string, } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "stopTranscodeSession", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "stopTranscodeSession", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -856,15 +875,17 @@ func (s *Sessions) StopTranscodeSession(ctx context.Context, sessionKey string, "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -881,7 +902,7 @@ func (s *Sessions) StopTranscodeSession(ctx context.Context, sessionKey string, err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -889,13 +910,13 @@ func (s *Sessions) StopTranscodeSession(ctx context.Context, sessionKey string, if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -908,17 +929,17 @@ func (s *Sessions) StopTranscodeSession(ctx context.Context, sessionKey string, err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/statistics.go b/statistics.go index 48db285..3c9dcfe 100644 --- a/statistics.go +++ b/statistics.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" @@ -17,12 +18,16 @@ import ( // Statistics - API Calls that perform operations with Plex Media Server Statistics type Statistics struct { - sdkConfiguration sdkConfiguration + rootSDK *PlexAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } -func newStatistics(sdkConfig sdkConfiguration) *Statistics { +func newStatistics(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Statistics { return &Statistics{ + rootSDK: rootSDK, sdkConfiguration: sdkConfig, + hooks: hooks, } } @@ -57,11 +62,13 @@ func (s *Statistics) GetStatistics(ctx context.Context, timespan *int64, opts .. } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getStatistics", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getStatistics", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -114,15 +121,17 @@ func (s *Statistics) GetStatistics(ctx context.Context, timespan *int64, opts .. "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -139,7 +148,7 @@ func (s *Statistics) GetStatistics(ctx context.Context, timespan *int64, opts .. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -147,13 +156,13 @@ func (s *Statistics) GetStatistics(ctx context.Context, timespan *int64, opts .. if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -166,17 +175,17 @@ func (s *Statistics) GetStatistics(ctx context.Context, timespan *int64, opts .. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -310,11 +319,13 @@ func (s *Statistics) GetResourcesStatistics(ctx context.Context, timespan *int64 } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getResourcesStatistics", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getResourcesStatistics", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -367,15 +378,17 @@ func (s *Statistics) GetResourcesStatistics(ctx context.Context, timespan *int64 "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -392,7 +405,7 @@ func (s *Statistics) GetResourcesStatistics(ctx context.Context, timespan *int64 err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -400,13 +413,13 @@ func (s *Statistics) GetResourcesStatistics(ctx context.Context, timespan *int64 if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -419,17 +432,17 @@ func (s *Statistics) GetResourcesStatistics(ctx context.Context, timespan *int64 err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -563,11 +576,13 @@ func (s *Statistics) GetBandwidthStatistics(ctx context.Context, timespan *int64 } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getBandwidthStatistics", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getBandwidthStatistics", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -620,15 +635,17 @@ func (s *Statistics) GetBandwidthStatistics(ctx context.Context, timespan *int64 "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -645,7 +662,7 @@ func (s *Statistics) GetBandwidthStatistics(ctx context.Context, timespan *int64 err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -653,13 +670,13 @@ func (s *Statistics) GetBandwidthStatistics(ctx context.Context, timespan *int64 if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -672,17 +689,17 @@ func (s *Statistics) GetBandwidthStatistics(ctx context.Context, timespan *int64 err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/updater.go b/updater.go index e68e153..bf85d36 100644 --- a/updater.go +++ b/updater.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" @@ -18,12 +19,16 @@ import ( // Updater - This describes the API for searching and applying updates to the Plex Media Server. // Updates to the status can be observed via the Event API. type Updater struct { - sdkConfiguration sdkConfiguration + rootSDK *PlexAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } -func newUpdater(sdkConfig sdkConfiguration) *Updater { +func newUpdater(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Updater { return &Updater{ + rootSDK: rootSDK, sdkConfiguration: sdkConfig, + hooks: hooks, } } @@ -54,11 +59,13 @@ func (s *Updater) GetUpdateStatus(ctx context.Context, opts ...operations.Option } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getUpdateStatus", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getUpdateStatus", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -107,15 +114,17 @@ func (s *Updater) GetUpdateStatus(ctx context.Context, opts ...operations.Option "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -132,7 +141,7 @@ func (s *Updater) GetUpdateStatus(ctx context.Context, opts ...operations.Option err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -140,13 +149,13 @@ func (s *Updater) GetUpdateStatus(ctx context.Context, opts ...operations.Option if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -159,17 +168,17 @@ func (s *Updater) GetUpdateStatus(ctx context.Context, opts ...operations.Option err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -303,11 +312,13 @@ func (s *Updater) CheckForUpdates(ctx context.Context, download *operations.Down } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "checkForUpdates", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "checkForUpdates", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -360,15 +371,17 @@ func (s *Updater) CheckForUpdates(ctx context.Context, download *operations.Down "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -385,7 +398,7 @@ func (s *Updater) CheckForUpdates(ctx context.Context, download *operations.Down err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -393,13 +406,13 @@ func (s *Updater) CheckForUpdates(ctx context.Context, download *operations.Down if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -412,17 +425,17 @@ func (s *Updater) CheckForUpdates(ctx context.Context, download *operations.Down err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -537,11 +550,13 @@ func (s *Updater) ApplyUpdates(ctx context.Context, tonight *operations.Tonight, } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "applyUpdates", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "applyUpdates", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -594,15 +609,17 @@ func (s *Updater) ApplyUpdates(ctx context.Context, tonight *operations.Tonight, "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -619,7 +636,7 @@ func (s *Updater) ApplyUpdates(ctx context.Context, tonight *operations.Tonight, err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -627,13 +644,13 @@ func (s *Updater) ApplyUpdates(ctx context.Context, tonight *operations.Tonight, if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -646,17 +663,17 @@ func (s *Updater) ApplyUpdates(ctx context.Context, tonight *operations.Tonight, err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "500", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/users.go b/users.go index 67ba894..7dff7df 100644 --- a/users.go +++ b/users.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" @@ -16,12 +17,16 @@ import ( ) type Users struct { - sdkConfiguration sdkConfiguration + rootSDK *PlexAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } -func newUsers(sdkConfig sdkConfiguration) *Users { +func newUsers(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Users { return &Users{ + rootSDK: rootSDK, sdkConfiguration: sdkConfig, + hooks: hooks, } } @@ -51,11 +56,13 @@ func (s *Users) GetUsers(ctx context.Context, request operations.GetUsersRequest } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-users", - OAuth2Scopes: []string{}, - SecuritySource: nil, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-users", + OAuth2Scopes: []string{}, + SecuritySource: nil, } timeout := o.Timeout @@ -102,15 +109,17 @@ func (s *Users) GetUsers(ctx context.Context, request operations.GetUsersRequest "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -127,7 +136,7 @@ func (s *Users) GetUsers(ctx context.Context, request operations.GetUsersRequest err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -135,13 +144,13 @@ func (s *Users) GetUsers(ctx context.Context, request operations.GetUsersRequest if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -154,17 +163,17 @@ func (s *Users) GetUsers(ctx context.Context, request operations.GetUsersRequest err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/video.go b/video.go index 7ccc264..17c4b38 100644 --- a/video.go +++ b/video.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" @@ -17,12 +18,16 @@ import ( // Video - API Calls that perform operations with Plex Media Server Videos type Video struct { - sdkConfiguration sdkConfiguration + rootSDK *PlexAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } -func newVideo(sdkConfig sdkConfiguration) *Video { +func newVideo(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Video { return &Video{ + rootSDK: rootSDK, sdkConfiguration: sdkConfig, + hooks: hooks, } } @@ -53,11 +58,13 @@ func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineR } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "getTimeline", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getTimeline", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -110,15 +117,17 @@ func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineR "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -135,7 +144,7 @@ func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineR err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -143,13 +152,13 @@ func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineR if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -162,17 +171,17 @@ func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineR err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } @@ -282,11 +291,13 @@ func (s *Video) StartUniversalTranscode(ctx context.Context, request operations. } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "startUniversalTranscode", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "startUniversalTranscode", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -339,15 +350,17 @@ func (s *Video) StartUniversalTranscode(ctx context.Context, request operations. "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -364,7 +377,7 @@ func (s *Video) StartUniversalTranscode(ctx context.Context, request operations. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -372,13 +385,13 @@ func (s *Video) StartUniversalTranscode(ctx context.Context, request operations. if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -391,17 +404,17 @@ func (s *Video) StartUniversalTranscode(ctx context.Context, request operations. err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } diff --git a/watchlist.go b/watchlist.go index 3e53692..c63455e 100644 --- a/watchlist.go +++ b/watchlist.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/LukeHagar/plexgo/internal/config" "github.com/LukeHagar/plexgo/internal/hooks" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/operations" @@ -16,12 +17,16 @@ import ( // Watchlist - API Calls that perform operations with Plex Media Server Watchlists type Watchlist struct { - sdkConfiguration sdkConfiguration + rootSDK *PlexAPI + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks } -func newWatchlist(sdkConfig sdkConfiguration) *Watchlist { +func newWatchlist(rootSDK *PlexAPI, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Watchlist { return &Watchlist{ + rootSDK: rootSDK, sdkConfiguration: sdkConfig, + hooks: hooks, } } @@ -51,11 +56,13 @@ func (s *Watchlist) GetWatchList(ctx context.Context, request operations.GetWatc } hookCtx := hooks.HookContext{ - BaseURL: baseURL, - Context: ctx, - OperationID: "get-watch-list", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-watch-list", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, } timeout := o.Timeout @@ -110,15 +117,17 @@ func (s *Watchlist) GetWatchList(ctx context.Context, request operations.GetWatc "504", }, }, func() (*http.Response, error) { - if req.Body != nil { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { copyBody, err := req.GetBody() + if err != nil { return nil, err } + req.Body = copyBody } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { return nil, err @@ -135,7 +144,7 @@ func (s *Watchlist) GetWatchList(ctx context.Context, request operations.GetWatc err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) } return httpRes, err }) @@ -143,13 +152,13 @@ func (s *Watchlist) GetWatchList(ctx context.Context, request operations.GetWatc if err != nil { return nil, err } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err } } } else { - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { return nil, err } @@ -162,17 +171,17 @@ func (s *Watchlist) GetWatchList(ctx context.Context, request operations.GetWatc err = fmt.Errorf("error sending request: no response") } - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) return nil, err } else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) if err != nil { return nil, err } else if _httpRes != nil { httpRes = _httpRes } } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) if err != nil { return nil, err }