From c2d8f6790d6dd5a3ec46c237123b166307b9142d Mon Sep 17 00:00:00 2001 From: Nate Harris Date: Thu, 28 Mar 2024 02:34:44 -0600 Subject: [PATCH] [chore] Update dependencies, drop legacy Python support (#44) - Update dependencies - Use Pydantic v2 - Drop Python 3.7 support - Fix `docs` response JSON - Fix model naming for Pydantic V2 compatibility (model can't have same name as field) - Fix invalid types --- Makefile | 2 +- requirements.txt | 8 +- setup.cfg | 2 +- tautulli/PYTHON_VERSIONS.json | 1 - tautulli/api/json_api.py | 5 +- tautulli/models/__init__.py | 122 +- tautulli/models/activity.py | 480 +++--- tautulli/models/children_metadata.py | 103 +- tautulli/models/collections_table.py | 67 +- tautulli/models/date_formats.py | 16 +- tautulli/models/docs.py | 252 ++- tautulli/models/export_fields.py | 30 +- tautulli/models/exports_table.py | 69 +- tautulli/models/geo_ip_lookup.py | 35 +- .../models/get_plays_or_stream_types_by.py | 19 +- tautulli/models/history.py | 105 +- tautulli/models/home_stats.py | 19 +- tautulli/models/item_user_stats.py | 21 +- tautulli/models/item_watch_time_stats.py | 15 +- tautulli/models/libraries.py | 25 +- tautulli/models/libraries_table.py | 91 +- tautulli/models/library.py | 45 +- tautulli/models/library_media_info.py | 81 +- tautulli/models/library_names.py | 20 +- tautulli/models/library_user_stats.py | 19 +- tautulli/models/library_watch_time_stats.py | 15 +- tautulli/models/logs.py | 17 +- tautulli/models/metadata.py | 195 ++- tautulli/models/new_rating_keys.py | 15 +- tautulli/models/newsletter.py | 26 +- tautulli/models/newsletter_config.py | 153 +- tautulli/models/newsletter_log.py | 53 +- tautulli/models/newsletter_notification.py | 11 +- tautulli/models/notification.py | 11 +- tautulli/models/notification_log.py | 55 +- tautulli/models/notifier_config.py | 65 +- tautulli/models/notifier_parameters.py | 18 +- tautulli/models/notifiers.py | 21 +- tautulli/models/old_rating_keys.py | 15 +- tautulli/models/playlists_table.py | 57 +- tautulli/models/plex_log.py | 11 +- tautulli/models/pms_update.py | 36 +- tautulli/models/recently_added.py | 13 +- tautulli/models/registered_device.py | 61 +- tautulli/models/search_results.py | 479 +++--- tautulli/models/server_id.py | 11 +- tautulli/models/server_identity.py | 16 +- tautulli/models/server_info.py | 37 +- tautulli/models/server_list.py | 30 +- tautulli/models/server_status.py | 13 +- tautulli/models/servers_info.py | 24 +- tautulli/models/settings.py | 1472 ++++++++--------- tautulli/models/status.py | 10 +- tautulli/models/stream_data.py | 105 +- tautulli/models/synced_items.py | 61 +- tautulli/models/tautulli_info.py | 28 +- tautulli/models/update_check.py | 16 +- tautulli/models/user.py | 47 +- tautulli/models/user_ips.py | 71 +- tautulli/models/user_logins.py | 49 +- tautulli/models/user_player_stats.py | 19 +- tautulli/models/user_watch_time_stats.py | 15 +- tautulli/models/usernames.py | 13 +- tautulli/models/users.py | 55 +- tautulli/models/users_table.py | 89 +- tautulli/models/whois_lookup.py | 51 +- tautulli/tools/api_helper.py | 2 +- tests/test_json_api.py | 5 +- 68 files changed, 2384 insertions(+), 2834 deletions(-) diff --git a/Makefile b/Makefile index 60ac5a8..99b0f8c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ PYTHON_BINARY := python3 -VIRTUAL_ENV := venv +VIRTUAL_ENV := .venv VIRTUAL_BIN := $(VIRTUAL_ENV)/bin PROJECT_NAME := tautulli TEST_DIR := tests diff --git a/requirements.txt b/requirements.txt index 7ba542c..91bb948 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ objectrest==2.0.* -pydantic==1.10.* -pytz==2022.1.* -python-dotenv==0.20.* -packaging==21.3.* +pydantic==2.6.* +pytz==2024.* +python-dotenv==1.0.* +packaging==24.* typing-extensions diff --git a/setup.cfg b/setup.cfg index 224a779..08aedd7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,2 @@ [metadata] -description-file = README.md \ No newline at end of file +description_file = README.md diff --git a/tautulli/PYTHON_VERSIONS.json b/tautulli/PYTHON_VERSIONS.json index aeab800..1b62e1c 100644 --- a/tautulli/PYTHON_VERSIONS.json +++ b/tautulli/PYTHON_VERSIONS.json @@ -1,5 +1,4 @@ [ -"3.7", "3.8", "3.9", "3.10", diff --git a/tautulli/api/json_api.py b/tautulli/api/json_api.py index 2a944b2..92084b8 100644 --- a/tautulli/api/json_api.py +++ b/tautulli/api/json_api.py @@ -493,7 +493,10 @@ def docs(self) -> dict: :returns: Dict of data :rtype: dict """ - return self._get_json(command='docs') + json_data = self._get_json(command='docs') + if _success_result(json_data=json_data): + return _get_response_data(json_data=json_data) + return static.empty_dict @property def docs_md(self) -> str: diff --git a/tautulli/models/__init__.py b/tautulli/models/__init__.py index cff9494..c5a03bc 100644 --- a/tautulli/models/__init__.py +++ b/tautulli/models/__init__.py @@ -1,62 +1,62 @@ -from tautulli.models.activity import Activity -from tautulli.models.docs import Docs -from tautulli.models.date_formats import DateFormats -from tautulli.models.library_names import LibraryName -from tautulli.models.newsletter import Newsletter -from tautulli.models.notifier_parameters import NotifierParameter -from tautulli.models.pms_update import PMSUpdate -from tautulli.models.server_identity import ServerIdentity -from tautulli.models.server_list import ServerListEntry -from tautulli.models.servers_info import ServersInfoEntry -from tautulli.models.server_info import ServerInfo -from tautulli.models.usernames import UserName -from tautulli.models.users import User -from tautulli.models.update_check import UpdateCheck -from tautulli.models.collections_table import CollectionsTable -from tautulli.models.export_fields import ExportFields -from tautulli.models.exports_table import ExportsTable -from tautulli.models.geo_ip_lookup import GeoIPLookup -from tautulli.models.history import History -from tautulli.models.home_stats import HomeStat -from tautulli.models.library import Library -from tautulli.models.libraries import LibrariesEntry -from tautulli.models.libraries_table import LibrariesTable -from tautulli.models.library_media_info import LibraryMediaInfo -from tautulli.models.library_user_stats import LibraryUserStats -from tautulli.models.library_watch_time_stats import LibraryWatchTimeStats -from tautulli.models.logs import LogEntry -from tautulli.models.item_user_stats import ItemUserStat -from tautulli.models.item_watch_time_stats import ItemWatchTimeStat -from tautulli.models.get_plays_or_stream_types_by import PlaysOrStreamTypesBy -from tautulli.models.metadata import Metadata -from tautulli.models.new_rating_keys import NewRatingKeys -from tautulli.models.newsletter_config import NewsletterConfig -from tautulli.models.newsletter_log import NewsletterLog -from tautulli.models.newsletter_notification import NewsletterNotification -from tautulli.models.notification import Notification -from tautulli.models.notification_log import NotificationLog -from tautulli.models.notifier_config import NotifierConfig -from tautulli.models.notifiers import Notifier -from tautulli.models.old_rating_keys import OldRatingKeys -from tautulli.models.playlists_table import PlaylistsTable -from tautulli.models.plex_log import PlexLog -from tautulli.models.recently_added import RecentlyAdded -from tautulli.models.server_id import ServerID -from tautulli.models.settings import Settings -from tautulli.models.stream_data import StreamData -from tautulli.models.synced_items import SyncedItems -from tautulli.models.user import User -from tautulli.models.user_ips import UserIPs -from tautulli.models.user_logins import UserLogins -from tautulli.models.user_player_stats import UserPlayerStats -from tautulli.models.user_watch_time_stats import UserWatchTimeStats -from tautulli.models.users_table import UsersTable -from tautulli.models.whois_lookup import WHOISLookup -from tautulli.models.registered_device import RegisteredDevice -from tautulli.models.search_results import SearchResults +from tautulli.models.activity import ActivityModel as Activity +from tautulli.models.docs import DocsModel as Docs +from tautulli.models.date_formats import DateFormatsModel as DateFormats +from tautulli.models.library_names import LibraryNameModel as LibraryName +from tautulli.models.newsletter import NewsletterModel as Newsletter +from tautulli.models.notifier_parameters import NotifierParameterModel as NotifierParameter +from tautulli.models.pms_update import PMSUpdateModel as PMSUpdate +from tautulli.models.server_identity import ServerIdentityModel as ServerIdentity +from tautulli.models.server_list import ServerListEntryModel as ServerListEntry +from tautulli.models.servers_info import ServersInfoEntryModel as ServersInfoEntry +from tautulli.models.server_info import ServerInfoModel as ServerInfo +from tautulli.models.usernames import UserNameModel as UserName +from tautulli.models.users import UserModel as Users +from tautulli.models.update_check import UpdateCheckModel as UpdateCheck +from tautulli.models.collections_table import CollectionsTableModel as CollectionsTable +from tautulli.models.export_fields import ExportFieldsModel as ExportFields +from tautulli.models.exports_table import ExportsTableModel as ExportsTable +from tautulli.models.geo_ip_lookup import GeoIPLookupModel as GeoIPLookup +from tautulli.models.history import HistoryModel as History +from tautulli.models.home_stats import HomeStatModel as HomeStat +from tautulli.models.library import LibraryModel as Library +from tautulli.models.libraries import LibrariesEntryModel as LibrariesEntry +from tautulli.models.libraries_table import LibrariesTableModel as LibrariesTable +from tautulli.models.library_media_info import LibraryMediaInfoModel as LibraryMediaInfo +from tautulli.models.library_user_stats import LibraryUserStatsModel as LibraryUserStats +from tautulli.models.library_watch_time_stats import LibraryWatchTimeStatsModel as LibraryWatchTimeStats +from tautulli.models.logs import LogEntryModel as LogEntry +from tautulli.models.item_user_stats import ItemUserStatModel as ItemUserStat +from tautulli.models.item_watch_time_stats import ItemWatchTimeStatModel as ItemWatchTimeStat +from tautulli.models.get_plays_or_stream_types_by import PlaysOrStreamTypesByModel as PlaysOrStreamTypesBy +from tautulli.models.metadata import MetadataModel as Metadata +from tautulli.models.new_rating_keys import NewRatingKeysModel as NewRatingKeys +from tautulli.models.newsletter_config import NewsletterConfigModel as NewsletterConfig +from tautulli.models.newsletter_log import NewsletterLogModel as NewsletterLog +from tautulli.models.newsletter_notification import NewsletterNotificationModel as NewsletterNotification +from tautulli.models.notification import NotificationModel as Notification +from tautulli.models.notification_log import NotificationLogModel as NotificationLog +from tautulli.models.notifier_config import NotifierConfigModel as NotifierConfig +from tautulli.models.notifiers import NotifierModel as Notifier +from tautulli.models.old_rating_keys import OldRatingKeysModel as OldRatingKeys +from tautulli.models.playlists_table import PlaylistsTableModel as PlaylistsTable +from tautulli.models.plex_log import PlexLogModel as PlexLog +from tautulli.models.recently_added import RecentlyAddedModel as RecentlyAdded +from tautulli.models.server_id import ServerIDModel as ServerID +from tautulli.models.settings import SettingsModel as Settings +from tautulli.models.stream_data import StreamDataModel as StreamData +from tautulli.models.synced_items import SyncedItemsModel as SyncedItems +from tautulli.models.user import UserModel as User +from tautulli.models.user_ips import UserIPsModel as UserIPs +from tautulli.models.user_logins import UserLoginsModel as UserLogins +from tautulli.models.user_player_stats import UserPlayerStatsModel as UserPlayerStats +from tautulli.models.user_watch_time_stats import UserWatchTimeStatsModel as UserWatchTimeStats +from tautulli.models.users_table import UsersTableModel as UsersTable +from tautulli.models.whois_lookup import WHOISLookupModel as WHOISLookup +from tautulli.models.registered_device import RegisteredDeviceModel as RegisteredDevice +from tautulli.models.search_results import SearchResultsModel as SearchResults # TODO: Need to implement SQLResults -from tautulli.models.tautulli_info import TautulliInfo -from tautulli.models.status import Status -from tautulli.models.server_status import ServerStatus -from tautulli.models.children_metadata import ChildrenMetadata -from tautulli.models.get_plays_or_stream_types_by import PlaysOrStreamTypesBy +from tautulli.models.tautulli_info import TautulliInfoModel as TautulliInfo +from tautulli.models.status import StatusModel as Status +from tautulli.models.server_status import ServerStatusModel as ServerStatus +from tautulli.models.children_metadata import ChildrenMetadataModel as ChildrenMetadata +from tautulli.models.get_plays_or_stream_types_by import PlaysOrStreamTypesByModel as PlaysOrStreamTypesBy diff --git a/tautulli/models/activity.py b/tautulli/models/activity.py index b19b17d..0258dc2 100644 --- a/tautulli/models/activity.py +++ b/tautulli/models/activity.py @@ -12,223 +12,223 @@ from tautulli.tools.utils import to_human_bitrate -class Session(BaseModel): - session_key: Optional[str] - media_type: Optional[str] - view_offset: Optional[str] - progress_percent: Optional[str] - quality_profile: Optional[str] - synced_version_profile: Optional[str] - optimized_version_profile: Optional[str] - user: Optional[str] - channel_stream: Optional[int] - section_id: Optional[str] - library_name: Optional[str] - rating_key: Optional[str] - parent_rating_key: Optional[str] - grandparent_rating_key: Optional[str] - title: Optional[str] - parent_title: Optional[str] - grandparent_title: Optional[str] - original_title: Optional[str] - sort_title: Optional[str] - media_index: Optional[str] - parent_media_index: Optional[str] - studio: Optional[str] - content_rating: Optional[str] - summary: Optional[str] - tagline: Optional[str] - rating: Optional[str] - rating_image: Optional[str] - audience_rating: Optional[str] - audience_rating_image: Optional[str] - user_rating: Optional[str] - duration: Optional[str] - year: Optional[str] - thumb: Optional[str] - parent_thumb: Optional[str] - grandparent_thumb: Optional[str] - art: Optional[str] - banner: Optional[str] - originally_available_at: Optional[str] - added_at: Optional[str] - updated_at: Optional[str] - last_viewed_at: Optional[str] - guid: Optional[str] - parent_guid: Optional[str] - grandparent_guid: Optional[str] - directors: Optional[List] - writers: Optional[List] - actors: Optional[List] - genres: Optional[List[str]] - labels: Optional[List] - collections: Optional[List] - guids: Optional[List] - full_title: Optional[str] - children_count: Optional[int] - live: Optional[int] - id: Optional[str] - container: Optional[str] - bitrate: Optional[str] - height: Optional[str] - width: Optional[str] - aspect_ratio: Optional[str] - video_codec: Optional[str] - video_resolution: Optional[str] - video_full_resolution: Optional[str] - video_framerate: Optional[str] - video_profile: Optional[str] - audio_codec: Optional[str] - audio_channels: Optional[str] - audio_channel_layout: Optional[str] - audio_profile: Optional[str] - optimized_version: Optional[int] - channel_call_sign: Optional[str] - channel_identifier: Optional[str] - channel_thumb: Optional[str] - file: Optional[str] - file_size: Optional[str] - indexes: Optional[int] - selected: Optional[int] - type: Optional[str] - video_codec_level: Optional[str] - video_bitrate: Optional[str] - video_bit_depth: Optional[str] - video_chroma_subsampling: Optional[str] - video_color_primaries: Optional[str] - video_color_range: Optional[str] - video_color_space: Optional[str] - video_color_trc: Optional[str] - video_frame_rate: Optional[str] - video_ref_frames: Optional[str] - video_height: Optional[str] - video_width: Optional[str] - video_language: Optional[str] - video_language_code: Optional[str] - video_scan_type: Optional[str] - audio_bitrate: Optional[str] - audio_bitrate_mode: Optional[str] - audio_sample_rate: Optional[str] - audio_language: Optional[str] - audio_language_code: Optional[str] - subtitle_codec: Optional[str] - subtitle_container: Optional[str] - subtitle_format: Optional[str] - subtitle_forced: Optional[int] - subtitle_location: Optional[str] - subtitle_language: Optional[str] - subtitle_language_code: Optional[str] - row_id: Optional[int] - user_id: Optional[int] - username: Optional[str] - friendly_name: Optional[str] - user_thumb: Optional[str] - email: Optional[str] - is_active: Optional[int] - is_admin: Optional[int] - is_home_user: Optional[int] - is_allow_sync: Optional[int] - is_restricted: Optional[int] - do_notify: Optional[int] - keep_history: Optional[int] - deleted_user: Optional[int] - allow_guest: Optional[int] - shared_libraries: Optional[List[str]] - ip_address: Optional[str] - ip_address_public: Optional[str] - device: Optional[str] - platform: Optional[str] - platform_name: Optional[str] - platform_version: Optional[str] - product: Optional[str] - product_version: Optional[str] - profile: Optional[str] - player: Optional[str] - machine_id: Optional[str] - state: Optional[str] - local: Optional[int] - relayed: Optional[int] - secure: Optional[int] - session_id: Optional[str] - bandwidth: Optional[str] - location: Optional[str] - transcode_key: Optional[str] - transcode_throttled: Optional[int] - transcode_progress: Optional[int] - transcode_speed: Optional[str] - transcode_audio_channels: Optional[str] - transcode_audio_codec: Optional[str] - transcode_video_codec: Optional[str] - transcode_width: Optional[str] - transcode_height: Optional[str] - transcode_container: Optional[str] - transcode_protocol: Optional[str] - transcode_hw_requested: Optional[int] - transcode_hw_decode: Optional[str] - transcode_hw_decode_title: Optional[str] - transcode_hw_encode: Optional[str] - transcode_hw_encode_title: Optional[str] - transcode_hw_full_pipeline: Optional[int] - transcode_max_offset_available: Optional[int] - transcode_min_offset_available: Optional[int] - audio_decision: Optional[str] - video_decision: Optional[str] - subtitle_decision: Optional[str] - throttled: Optional[str] - transcode_hw_decoding: Optional[int] - transcode_hw_encoding: Optional[int] - stream_container: Optional[str] - stream_bitrate: Optional[str] - stream_aspect_ratio: Optional[str] - stream_audio_codec: Optional[str] - stream_audio_channels: Optional[str] - stream_audio_channel_layout: Optional[str] - stream_video_codec: Optional[str] - stream_video_framerate: Optional[str] - stream_video_resolution: Optional[str] - stream_video_height: Optional[str] - stream_video_width: Optional[str] - stream_duration: Optional[str] - stream_container_decision: Optional[str] - optimized_version_title: Optional[str] - synced_version: Optional[int] - live_uuid: Optional[str] - bif_thumb: Optional[str] - subtitles: Optional[int] - transcode_decision: Optional[str] - container_decision: Optional[str] +class SessionModel(BaseModel): + session_key: Optional[str] = None + media_type: Optional[str] = None + view_offset: Optional[str] = None + progress_percent: Optional[str] = None + quality_profile: Optional[str] = None + synced_version_profile: Optional[str] = None + optimized_version_profile: Optional[str] = None + user: Optional[str] = None + channel_stream: Optional[int] = None + section_id: Optional[str] = None + library_name: Optional[str] = None + rating_key: Optional[str] = None + parent_rating_key: Optional[str] = None + grandparent_rating_key: Optional[str] = None + title: Optional[str] = None + parent_title: Optional[str] = None + grandparent_title: Optional[str] = None + original_title: Optional[str] = None + sort_title: Optional[str] = None + media_index: Optional[str] = None + parent_media_index: Optional[str] = None + studio: Optional[str] = None + content_rating: Optional[str] = None + summary: Optional[str] = None + tagline: Optional[str] = None + rating: Optional[str] = None + rating_image: Optional[str] = None + audience_rating: Optional[str] = None + audience_rating_image: Optional[str] = None + user_rating: Optional[str] = None + duration: Optional[str] = None + year: Optional[str] = None + thumb: Optional[str] = None + parent_thumb: Optional[str] = None + grandparent_thumb: Optional[str] = None + art: Optional[str] = None + banner: Optional[str] = None + originally_available_at: Optional[str] = None + added_at: Optional[str] = None + updated_at: Optional[str] = None + last_viewed_at: Optional[str] = None + guid: Optional[str] = None + parent_guid: Optional[str] = None + grandparent_guid: Optional[str] = None + directors: Optional[List] = None + writers: Optional[List] = None + actors: Optional[List] = None + genres: Optional[List[str]] = None + labels: Optional[List] = None + collections: Optional[List] = None + guids: Optional[List] = None + full_title: Optional[str] = None + children_count: Optional[int] = None + live: Optional[int] = None + id: Optional[str] = None + container: Optional[str] = None + bitrate: Optional[str] = None + height: Optional[str] = None + width: Optional[str] = None + aspect_ratio: Optional[str] = None + video_codec: Optional[str] = None + video_resolution: Optional[str] = None + video_full_resolution: Optional[str] = None + video_framerate: Optional[str] = None + video_profile: Optional[str] = None + audio_codec: Optional[str] = None + audio_channels: Optional[str] = None + audio_channel_layout: Optional[str] = None + audio_profile: Optional[str] = None + optimized_version: Optional[int] = None + channel_call_sign: Optional[str] = None + channel_identifier: Optional[str] = None + channel_thumb: Optional[str] = None + file: Optional[str] = None + file_size: Optional[str] = None + indexes: Optional[int] = None + selected: Optional[int] = None + type: Optional[str] = None + video_codec_level: Optional[str] = None + video_bitrate: Optional[str] = None + video_bit_depth: Optional[str] = None + video_chroma_subsampling: Optional[str] = None + video_color_primaries: Optional[str] = None + video_color_range: Optional[str] = None + video_color_space: Optional[str] = None + video_color_trc: Optional[str] = None + video_frame_rate: Optional[str] = None + video_ref_frames: Optional[str] = None + video_height: Optional[str] = None + video_width: Optional[str] = None + video_language: Optional[str] = None + video_language_code: Optional[str] = None + video_scan_type: Optional[str] = None + audio_bitrate: Optional[str] = None + audio_bitrate_mode: Optional[str] = None + audio_sample_rate: Optional[str] = None + audio_language: Optional[str] = None + audio_language_code: Optional[str] = None + subtitle_codec: Optional[str] = None + subtitle_container: Optional[str] = None + subtitle_format: Optional[str] = None + subtitle_forced: Optional[int] = None + subtitle_location: Optional[str] = None + subtitle_language: Optional[str] = None + subtitle_language_code: Optional[str] = None + row_id: Optional[int] = None + user_id: Optional[int] = None + username: Optional[str] = None + friendly_name: Optional[str] = None + user_thumb: Optional[str] = None + email: Optional[str] = None + is_active: Optional[int] = None + is_admin: Optional[int] = None + is_home_user: Optional[int] = None + is_allow_sync: Optional[int] = None + is_restricted: Optional[int] = None + do_notify: Optional[int] = None + keep_history: Optional[int] = None + deleted_user: Optional[int] = None + allow_guest: Optional[int] = None + shared_libraries: Optional[List[str]] = None + ip_address: Optional[str] = None + ip_address_public: Optional[str] = None + device: Optional[str] = None + platform: Optional[str] = None + platform_name: Optional[str] = None + platform_version: Optional[str] = None + product: Optional[str] = None + product_version: Optional[str] = None + profile: Optional[str] = None + player: Optional[str] = None + machine_id: Optional[str] = None + state: Optional[str] = None + local: Optional[int] = None + relayed: Optional[int] = None + secure: Optional[int] = None + session_id: Optional[str] = None + bandwidth: Optional[str] = None + location: Optional[str] = None + transcode_key: Optional[str] = None + transcode_throttled: Optional[int] = None + transcode_progress: Optional[int] = None + transcode_speed: Optional[str] = None + transcode_audio_channels: Optional[str] = None + transcode_audio_codec: Optional[str] = None + transcode_video_codec: Optional[str] = None + transcode_width: Optional[str] = None + transcode_height: Optional[str] = None + transcode_container: Optional[str] = None + transcode_protocol: Optional[str] = None + transcode_hw_requested: Optional[int] = None + transcode_hw_decode: Optional[str] = None + transcode_hw_decode_title: Optional[str] = None + transcode_hw_encode: Optional[str] = None + transcode_hw_encode_title: Optional[str] = None + transcode_hw_full_pipeline: Optional[int] = None + transcode_max_offset_available: Optional[int] = None + transcode_min_offset_available: Optional[int] = None + audio_decision: Optional[str] = None + video_decision: Optional[str] = None + subtitle_decision: Optional[str] = None + throttled: Optional[str] = None + transcode_hw_decoding: Optional[int] = None + transcode_hw_encoding: Optional[int] = None + stream_container: Optional[str] = None + stream_bitrate: Optional[str] = None + stream_aspect_ratio: Optional[str] = None + stream_audio_codec: Optional[str] = None + stream_audio_channels: Optional[str] = None + stream_audio_channel_layout: Optional[str] = None + stream_video_codec: Optional[str] = None + stream_video_framerate: Optional[str] = None + stream_video_resolution: Optional[str] = None + stream_video_height: Optional[str] = None + stream_video_width: Optional[str] = None + stream_duration: Optional[str] = None + stream_container_decision: Optional[str] = None + optimized_version_title: Optional[str] = None + synced_version: Optional[int] = None + live_uuid: Optional[str] = None + bif_thumb: Optional[str] = None + subtitles: Optional[int] = None + transcode_decision: Optional[str] = None + container_decision: Optional[str] = None stream_video_full_resolution: Optional[str] = None - video_dynamic_range: Optional[str] - stream_video_dynamic_range: Optional[str] - stream_video_bitrate: Optional[str] - stream_video_bit_depth: Optional[str] - stream_video_chroma_subsampling: Optional[str] - stream_video_color_primaries: Optional[str] - stream_video_color_range: Optional[str] - stream_video_color_space: Optional[str] - stream_video_color_trc: Optional[str] - stream_video_codec_level: Optional[str] - stream_video_ref_frames: Optional[str] - stream_video_language: Optional[str] - stream_video_language_code: Optional[str] - stream_video_scan_type: Optional[str] - stream_video_decision: Optional[str] - stream_audio_bitrate: Optional[str] - stream_audio_bitrate_mode: Optional[str] - stream_audio_sample_rate: Optional[str] - stream_audio_channel_layout_: Optional[str] - stream_audio_language: Optional[str] - stream_audio_language_code: Optional[str] - stream_audio_decision: Optional[str] - stream_subtitle_codec: Optional[str] - stream_subtitle_container: Optional[str] - stream_subtitle_format: Optional[str] - stream_subtitle_forced: Optional[int] - stream_subtitle_location: Optional[str] - stream_subtitle_language: Optional[str] - stream_subtitle_language_code: Optional[str] - stream_subtitle_decision: Optional[str] - stream_subtitle_transient: Optional[int] + video_dynamic_range: Optional[str] = None + stream_video_dynamic_range: Optional[str] = None + stream_video_bitrate: Optional[str] = None + stream_video_bit_depth: Optional[str] = None + stream_video_chroma_subsampling: Optional[str] = None + stream_video_color_primaries: Optional[str] = None + stream_video_color_range: Optional[str] = None + stream_video_color_space: Optional[str] = None + stream_video_color_trc: Optional[str] = None + stream_video_codec_level: Optional[str] = None + stream_video_ref_frames: Optional[str] = None + stream_video_language: Optional[str] = None + stream_video_language_code: Optional[str] = None + stream_video_scan_type: Optional[str] = None + stream_video_decision: Optional[str] = None + stream_audio_bitrate: Optional[str] = None + stream_audio_bitrate_mode: Optional[str] = None + stream_audio_sample_rate: Optional[str] = None + stream_audio_channel_layout_: Optional[str] = None + stream_audio_language: Optional[str] = None + stream_audio_language_code: Optional[str] = None + stream_audio_decision: Optional[str] = None + stream_subtitle_codec: Optional[str] = None + stream_subtitle_container: Optional[str] = None + stream_subtitle_format: Optional[str] = None + stream_subtitle_forced: Optional[int] = None + stream_subtitle_location: Optional[str] = None + stream_subtitle_language: Optional[str] = None + stream_subtitle_language_code: Optional[str] = None + stream_subtitle_decision: Optional[str] = None + stream_subtitle_transient: Optional[int] = None @property def duration_milliseconds(self): @@ -305,32 +305,22 @@ def summary(self) -> str: f"{static.session_progress_message.format(progress=self.progress_marker, eta=self.eta)}" -class Activity(BaseModel): - stream_count: Optional[str] - sessions: Optional[List[Session]] - stream_count_direct_play: Optional[int] - stream_count_direct_stream: Optional[int] - stream_count_transcode: Optional[int] - total_bandwidth: Optional[int] - lan_bandwidth: Optional[int] - wan_bandwidth: Optional[int] +class ActivityModel(BaseModel): + stream_count: Optional[str] = None + sessions: Optional[List[SessionModel]] = None + stream_count_direct_play: Optional[int] = None + stream_count_direct_stream: Optional[int] = None + stream_count_transcode: Optional[int] = None + total_bandwidth: Optional[int] = None + lan_bandwidth: Optional[int] = None + wan_bandwidth: Optional[int] = None @property - def summary(self) -> ActivitySummary: + def summary(self) -> ActivitySummaryModel: return build_summary_from_activity_object(activity=self) -class Response(BaseModel): - result: Optional[str] - message: Any - data: Activity - - -class Model(BaseModel): - response: Response - - -class ActivitySummary(BaseModel): +class ActivitySummaryModel(BaseModel): stream_count: Optional[str] = "0" transcode_count: Optional[int] = 0 total_bandwidth: Optional[int] = 0 @@ -366,16 +356,16 @@ def message(self): return overview_message -def build_summary_from_activity_object(activity: Activity) -> ActivitySummary: +def build_summary_from_activity_object(activity: ActivityModel) -> ActivitySummaryModel: """ Create an ActivitySummary using an Activity object :param activity: Activity object to use for Overview :type activity: Activity - :returns: ActivitySummary object - :rtype: ActivitySummary + :returns: ActivitySummaryModel object + :rtype: ActivitySummaryModel """ - overview = ActivitySummary() + overview = ActivitySummaryModel() overview.stream_count = activity.stream_count overview.transcode_count = activity.stream_count_transcode overview.total_bandwidth = activity.total_bandwidth @@ -384,13 +374,13 @@ def build_summary_from_activity_object(activity: Activity) -> ActivitySummary: return overview -def build_summary_from_activity_json(activity_data: dict) -> ActivitySummary: +def build_summary_from_activity_json(activity_data: dict) -> ActivitySummaryModel: """ Create an ActivitySummary using Activity JSON data :param activity_data: Activity JSON data to use for Overview :type activity_data: dict - :returns: ActivitySummary object - :rtype: ActivitySummary + :returns: ActivitySummaryModel object + :rtype: ActivitySummaryModel """ - return ActivitySummary(**activity_data) + return ActivitySummaryModel(**activity_data) diff --git a/tautulli/models/children_metadata.py b/tautulli/models/children_metadata.py index 512fc59..8202f6c 100644 --- a/tautulli/models/children_metadata.py +++ b/tautulli/models/children_metadata.py @@ -9,63 +9,56 @@ from pydantic import BaseModel -class ChildrenListItem(BaseModel): - actors: Optional[List] - added_at: Optional[str] - art: Optional[str] - audience_rating: Optional[str] - audience_rating_image: Optional[str] - banner: Optional[str] - content_rating: Optional[str] - directors: Optional[List] - duration: Optional[str] - full_title: Optional[str] - collections: Optional[List] - genres: Optional[List] - grandparent_rating_key: Optional[str] - grandparent_thumb: Optional[str] - grandparent_title: Optional[str] - guid: Optional[str] - labels: Optional[List] - last_viewed_at: Optional[str] - library_name: Optional[str] - media_index: Optional[str] - media_type: Optional[str] - original_title: Optional[str] - originally_available_at: Optional[str] - parent_media_index: Optional[str] - parent_rating_key: Optional[str] - parent_thumb: Optional[str] - parent_title: Optional[str] - rating: Optional[str] - rating_image: Optional[str] - rating_key: Optional[str] - section_id: Optional[str] - sort_title: Optional[str] - studio: Optional[str] - summary: Optional[str] - tagline: Optional[str] - thumb: Optional[str] - title: Optional[str] - updated_at: Optional[str] - user_rating: Optional[str] - writers: Optional[List] - year: Optional[str] - collections: Optional[List] +class ChildrenListItemModel(BaseModel): + actors: Optional[List] = None + added_at: Optional[str] = None + art: Optional[str] = None + audience_rating: Optional[str] = None + audience_rating_image: Optional[str] = None + banner: Optional[str] = None + content_rating: Optional[str] = None + directors: Optional[List] = None + duration: Optional[str] = None + full_title: Optional[str] = None + collections: Optional[List] = None + genres: Optional[List] = None + grandparent_rating_key: Optional[str] = None + grandparent_thumb: Optional[str] = None + grandparent_title: Optional[str] = None + guid: Optional[str] = None + labels: Optional[List] = None + last_viewed_at: Optional[str] = None + library_name: Optional[str] = None + media_index: Optional[str] = None + media_type: Optional[str] = None + original_title: Optional[str] = None + originally_available_at: Optional[str] = None + parent_media_index: Optional[str] = None + parent_rating_key: Optional[str] = None + parent_thumb: Optional[str] = None + parent_title: Optional[str] = None + rating: Optional[str] = None + rating_image: Optional[str] = None + rating_key: Optional[str] = None + section_id: Optional[str] = None + sort_title: Optional[str] = None + studio: Optional[str] = None + summary: Optional[str] = None + tagline: Optional[str] = None + thumb: Optional[str] = None + title: Optional[str] = None + updated_at: Optional[str] = None + user_rating: Optional[str] = None + writers: Optional[List] = None + year: Optional[str] = None + collections: Optional[List] = None -class ChildrenMetadata(BaseModel): - children_count: Optional[int] - children_type: Optional[str] - title: Optional[str] - children_list: Optional[List[ChildrenListItem]] +class ChildrenMetadataModel(BaseModel): + children_count: Optional[int] = None + children_type: Optional[str] = None + title: Optional[str] = None + children_list: Optional[List[ChildrenListItemModel]] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: ChildrenMetadata - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/collections_table.py b/tautulli/models/collections_table.py index bd42246..e423100 100644 --- a/tautulli/models/collections_table.py +++ b/tautulli/models/collections_table.py @@ -9,40 +9,33 @@ from pydantic import BaseModel -class Datum(BaseModel): - addedAt: Optional[str] - art: Optional[Any] - childCount: Optional[int] - collectionMode: Optional[int] - collectionSort: Optional[int] - contentRating: Optional[str] - guid: Optional[str] - librarySectionID: Optional[str] - librarySectionTitle: Optional[str] - maxYear: Optional[int] - minYear: Optional[int] - ratingKey: Optional[int] - subtype: Optional[str] - summary: Optional[str] - thumb: Optional[str] - title: Optional[str] - titleSort: Optional[str] - type: Optional[str] - updatedAt: Optional[str] - - -class CollectionsTable(BaseModel): - recordsFiltered: Optional[int] - recordsTotal: Optional[int] - data: Optional[List[Datum]] - draw: Optional[int] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: CollectionsTable - - -class Model(BaseModel): - response: Response +class DatumModel(BaseModel): + addedAt: Optional[str] = None + art: Optional[Any] = None + childCount: Optional[int] = None + collectionMode: Optional[int] = None + collectionSort: Optional[int] = None + contentRating: Optional[str] = None + guid: Optional[str] = None + librarySectionID: Optional[str] = None + librarySectionTitle: Optional[str] = None + maxYear: Optional[int] = None + minYear: Optional[int] = None + ratingKey: Optional[int] = None + subtype: Optional[str] = None + summary: Optional[str] = None + thumb: Optional[str] = None + title: Optional[str] = None + titleSort: Optional[str] = None + type: Optional[str] = None + updatedAt: Optional[str] = None + + +class CollectionsTableModel(BaseModel): + recordsFiltered: Optional[int] = None + recordsTotal: Optional[int] = None + data: Optional[List[DatumModel]] = None + draw: Optional[int] = None + + + diff --git a/tautulli/models/date_formats.py b/tautulli/models/date_formats.py index 4c817e6..77236c5 100644 --- a/tautulli/models/date_formats.py +++ b/tautulli/models/date_formats.py @@ -9,16 +9,6 @@ from pydantic import BaseModel -class DateFormats(BaseModel): - date_format: Optional[str] - time_format: Optional[str] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: DateFormats - - -class Model(BaseModel): - response: Response +class DateFormatsModel(BaseModel): + date_format: Optional[str] = None + time_format: Optional[str] = None diff --git a/tautulli/models/docs.py b/tautulli/models/docs.py index 89d6105..6ce9c7a 100644 --- a/tautulli/models/docs.py +++ b/tautulli/models/docs.py @@ -9,134 +9,124 @@ from pydantic import BaseModel -class Docs(BaseModel): - add_newsletter_config: Optional[str] - add_notifier_config: Optional[str] - arnold: Optional[str] - backup_config: Optional[str] - backup_db: Optional[str] - delete_all_library_history: Optional[str] - delete_all_user_history: Optional[str] - delete_cache: Optional[str] - delete_export: Optional[str] - delete_history: Optional[str] - delete_hosted_images: Optional[str] - delete_image_cache: Optional[str] - delete_library: Optional[str] - delete_login_log: Optional[str] - delete_lookup_info: Optional[str] - delete_media_info_cache: Optional[str] - delete_mobile_device: Optional[str] - delete_newsletter: Optional[str] - delete_newsletter_log: Optional[str] - delete_notification_log: Optional[str] - delete_notifier: Optional[str] - delete_recently_added: Optional[str] - delete_synced_item: Optional[str] - delete_temp_sessions: Optional[str] - delete_user: Optional[str] - docs: Optional[str] - docs_md: Optional[str] - download_config: Optional[str] - download_database: Optional[str] - download_export: Optional[str] - download_log: Optional[str] - download_plex_log: Optional[str] - edit_library: Optional[str] - edit_user: Optional[str] - export_metadata: Optional[str] - get_activity: Optional[str] - get_apikey: Optional[str] - get_collections_table: Optional[str] - get_date_formats: Optional[str] - get_export_fields: Optional[str] - get_exports_table: Optional[str] - get_geoip_lookup: Optional[str] - get_history: Optional[str] - get_home_stats: Optional[str] - get_libraries: Optional[str] - get_libraries_table: Optional[str] - get_library: Optional[str] - get_library_media_info: Optional[str] - get_library_names: Optional[str] - get_library_user_stats: Optional[str] - get_library_watch_time_stats: Optional[str] - get_logs: Optional[str] - get_metadata: Optional[str] - get_new_rating_keys: Optional[str] - get_newsletter_config: Optional[str] - get_newsletter_log: Optional[str] - get_newsletters: Optional[str] - get_notification_log: Optional[str] - get_notifier_config: Optional[str] - get_notifier_parameters: Optional[str] - get_notifiers: Optional[str] - get_old_rating_keys: Optional[str] - get_playlists_table: Optional[str] - get_plays_by_date: Optional[str] - get_plays_by_dayofweek: Optional[str] - get_plays_by_hourofday: Optional[str] - get_plays_by_source_resolution: Optional[str] - get_plays_by_stream_resolution: Optional[str] - get_plays_by_stream_type: Optional[str] - get_plays_by_top_10_platforms: Optional[str] - get_plays_by_top_10_users: Optional[str] - get_plays_per_month: Optional[str] - get_plex_log: Optional[str] - get_pms_update: Optional[str] - get_recently_added: Optional[str] - get_server_friendly_name: Optional[str] - get_server_id: Optional[str] - get_server_identity: Optional[str] - get_server_info: Optional[str] - get_server_list: Optional[str] - get_server_pref: Optional[str] - get_servers_info: Optional[str] - get_settings: Optional[str] - get_stream_data: Optional[str] - get_stream_type_by_top_10_platforms: Optional[str] - get_stream_type_by_top_10_users: Optional[str] - get_synced_items: Optional[str] - get_user: Optional[str] - get_user_ips: Optional[str] - get_user_logins: Optional[str] - get_user_names: Optional[str] - get_user_player_stats: Optional[str] - get_user_watch_time_stats: Optional[str] - get_users: Optional[str] - get_users_table: Optional[str] - get_whois_lookup: Optional[str] - import_config: Optional[str] - import_database: Optional[str] - logout_user_session: Optional[str] - notify: Optional[str] - notify_newsletter: Optional[str] - notify_recently_added: Optional[str] - pms_image_proxy: Optional[str] - refresh_libraries_list: Optional[str] - refresh_users_list: Optional[str] - register_device: Optional[str] - restart: Optional[str] - search: Optional[str] - server_status: Optional[str] - set_mobile_device_config: Optional[str] - set_newsletter_config: Optional[str] - set_notifier_config: Optional[str] - sql: Optional[str] - status: Optional[str] - terminate_session: Optional[str] - undelete_library: Optional[str] - undelete_user: Optional[str] - update: Optional[str] - update_check: Optional[str] - update_metadata_details: Optional[str] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: Docs - - -class Model(BaseModel): - response: Response +class DocsModel(BaseModel): + add_newsletter_config: Optional[str] = None + add_notifier_config: Optional[str] = None + arnold: Optional[str] = None + backup_config: Optional[str] = None + backup_db: Optional[str] = None + delete_all_library_history: Optional[str] = None + delete_all_user_history: Optional[str] = None + delete_cache: Optional[str] = None + delete_export: Optional[str] = None + delete_history: Optional[str] = None + delete_hosted_images: Optional[str] = None + delete_image_cache: Optional[str] = None + delete_library: Optional[str] = None + delete_login_log: Optional[str] = None + delete_lookup_info: Optional[str] = None + delete_media_info_cache: Optional[str] = None + delete_mobile_device: Optional[str] = None + delete_newsletter: Optional[str] = None + delete_newsletter_log: Optional[str] = None + delete_notification_log: Optional[str] = None + delete_notifier: Optional[str] = None + delete_recently_added: Optional[str] = None + delete_synced_item: Optional[str] = None + delete_temp_sessions: Optional[str] = None + delete_user: Optional[str] = None + docs: Optional[str] = None + docs_md: Optional[str] = None + download_config: Optional[str] = None + download_database: Optional[str] = None + download_export: Optional[str] = None + download_log: Optional[str] = None + download_plex_log: Optional[str] = None + edit_library: Optional[str] = None + edit_user: Optional[str] = None + export_metadata: Optional[str] = None + get_activity: Optional[str] = None + get_apikey: Optional[str] = None + get_collections_table: Optional[str] = None + get_date_formats: Optional[str] = None + get_export_fields: Optional[str] = None + get_exports_table: Optional[str] = None + get_geoip_lookup: Optional[str] = None + get_history: Optional[str] = None + get_home_stats: Optional[str] = None + get_libraries: Optional[str] = None + get_libraries_table: Optional[str] = None + get_library: Optional[str] = None + get_library_media_info: Optional[str] = None + get_library_names: Optional[str] = None + get_library_user_stats: Optional[str] = None + get_library_watch_time_stats: Optional[str] = None + get_logs: Optional[str] = None + get_metadata: Optional[str] = None + get_new_rating_keys: Optional[str] = None + get_newsletter_config: Optional[str] = None + get_newsletter_log: Optional[str] = None + get_newsletters: Optional[str] = None + get_notification_log: Optional[str] = None + get_notifier_config: Optional[str] = None + get_notifier_parameters: Optional[str] = None + get_notifiers: Optional[str] = None + get_old_rating_keys: Optional[str] = None + get_playlists_table: Optional[str] = None + get_plays_by_date: Optional[str] = None + get_plays_by_dayofweek: Optional[str] = None + get_plays_by_hourofday: Optional[str] = None + get_plays_by_source_resolution: Optional[str] = None + get_plays_by_stream_resolution: Optional[str] = None + get_plays_by_stream_type: Optional[str] = None + get_plays_by_top_10_platforms: Optional[str] = None + get_plays_by_top_10_users: Optional[str] = None + get_plays_per_month: Optional[str] = None + get_plex_log: Optional[str] = None + get_pms_update: Optional[str] = None + get_recently_added: Optional[str] = None + get_server_friendly_name: Optional[str] = None + get_server_id: Optional[str] = None + get_server_identity: Optional[str] = None + get_server_info: Optional[str] = None + get_server_list: Optional[str] = None + get_server_pref: Optional[str] = None + get_servers_info: Optional[str] = None + get_settings: Optional[str] = None + get_stream_data: Optional[str] = None + get_stream_type_by_top_10_platforms: Optional[str] = None + get_stream_type_by_top_10_users: Optional[str] = None + get_synced_items: Optional[str] = None + get_user: Optional[str] = None + get_user_ips: Optional[str] = None + get_user_logins: Optional[str] = None + get_user_names: Optional[str] = None + get_user_player_stats: Optional[str] = None + get_user_watch_time_stats: Optional[str] = None + get_users: Optional[str] = None + get_users_table: Optional[str] = None + get_whois_lookup: Optional[str] = None + import_config: Optional[str] = None + import_database: Optional[str] = None + logout_user_session: Optional[str] = None + notify: Optional[str] = None + notify_newsletter: Optional[str] = None + notify_recently_added: Optional[str] = None + pms_image_proxy: Optional[str] = None + refresh_libraries_list: Optional[str] = None + refresh_users_list: Optional[str] = None + register_device: Optional[str] = None + restart: Optional[str] = None + search: Optional[str] = None + server_status: Optional[str] = None + set_mobile_device_config: Optional[str] = None + set_newsletter_config: Optional[str] = None + set_notifier_config: Optional[str] = None + sql: Optional[str] = None + status: Optional[str] = None + terminate_session: Optional[str] = None + undelete_library: Optional[str] = None + undelete_user: Optional[str] = None + update: Optional[str] = None + update_check: Optional[str] = None + update_metadata_details: Optional[str] = None diff --git a/tautulli/models/export_fields.py b/tautulli/models/export_fields.py index 7113fa7..e8306d6 100644 --- a/tautulli/models/export_fields.py +++ b/tautulli/models/export_fields.py @@ -4,31 +4,21 @@ from __future__ import annotations -from typing import Any, List, Optional +from typing import List, Optional from pydantic import BaseModel -class MetadataField(BaseModel): - field: Optional[str] - level: Optional[int] +class MetadataFieldModel(BaseModel): + field: Optional[str] = None + level: Optional[int] = None -class MediaInfoField(BaseModel): - field: Optional[str] - level: Optional[int] +class MediaInfoFieldModel(BaseModel): + field: Optional[str] = None + level: Optional[int] = None -class ExportFields(BaseModel): - metadata_fields: Optional[List[MetadataField]] - media_info_fields: Optional[List[MediaInfoField]] - - -class Response(BaseModel): - result: str - message: Any - data: ExportFields - - -class Model(BaseModel): - response: Response +class ExportFieldsModel(BaseModel): + metadata_fields: Optional[List[MetadataFieldModel]] = None + media_info_fields: Optional[List[MediaInfoFieldModel]] = None diff --git a/tautulli/models/exports_table.py b/tautulli/models/exports_table.py index 262ae5a..ee8b117 100644 --- a/tautulli/models/exports_table.py +++ b/tautulli/models/exports_table.py @@ -9,42 +9,35 @@ from pydantic import BaseModel -class Datum(BaseModel): - timestamp: Optional[int] - art_level: Optional[int] - complete: Optional[int] +class DatumModel(BaseModel): + timestamp: Optional[int] = None + art_level: Optional[int] = None + complete: Optional[int] = None custom_fields: str - exists: Optional[bool] - export_id: Optional[int] - exported_items: Optional[int] - file_format: Optional[str] - file_size: Optional[int] - filename: Optional[Any] - individual_files: Optional[int] - media_info_level: Optional[int] - media_type: Optional[str] - media_type_title: Optional[str] - metadata_level: Optional[int] - rating_key: Optional[Any] - section_id: Optional[int] - thumb_level: Optional[int] - title: Optional[str] - total_items: Optional[int] - user_id: Optional[Any] - - -class ExportsTable(BaseModel): - draw: Optional[int] - recordsTotal: Optional[int] - recordsFiltered: Optional[int] - data: Optional[List[Datum]] - - -class Response(BaseModel): - result: str - message: Any - data: ExportsTable - - -class Model(BaseModel): - response: Response + exists: Optional[bool] = None + export_id: Optional[int] = None + exported_items: Optional[int] = None + file_format: Optional[str] = None + file_size: Optional[int] = None + filename: Optional[Any] = None + individual_files: Optional[int] = None + media_info_level: Optional[int] = None + media_type: Optional[str] = None + media_type_title: Optional[str] = None + metadata_level: Optional[int] = None + rating_key: Optional[Any] = None + section_id: Optional[int] = None + thumb_level: Optional[int] = None + title: Optional[str] = None + total_items: Optional[int] = None + user_id: Optional[Any] = None + + +class ExportsTableModel(BaseModel): + draw: Optional[int] = None + recordsTotal: Optional[int] = None + recordsFiltered: Optional[int] = None + data: Optional[List[DatumModel]] = None + + + diff --git a/tautulli/models/geo_ip_lookup.py b/tautulli/models/geo_ip_lookup.py index d8868c7..ed13250 100644 --- a/tautulli/models/geo_ip_lookup.py +++ b/tautulli/models/geo_ip_lookup.py @@ -9,24 +9,17 @@ from pydantic import BaseModel -class GeoIPLookup(BaseModel): - city: Optional[str] - code: Optional[str] - continent: Optional[str] - country: Optional[str] - latitude: Optional[Union[float, None]] - longitude: Optional[Union[float, None]] - postal_code: Optional[str] - region: Optional[str] - timezone: Optional[str] - accuracy: Optional[Any] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: GeoIPLookup - - -class Model(BaseModel): - response: Response +class GeoIPLookupModel(BaseModel): + city: Optional[str] = None + code: Optional[str] = None + continent: Optional[str] = None + country: Optional[str] = None + latitude: Optional[Union[float, None]] = None + longitude: Optional[Union[float, None]] = None + postal_code: Optional[str] = None + region: Optional[str] = None + timezone: Optional[str] = None + accuracy: Optional[Any] = None + + + diff --git a/tautulli/models/get_plays_or_stream_types_by.py b/tautulli/models/get_plays_or_stream_types_by.py index 5659872..5732db3 100644 --- a/tautulli/models/get_plays_or_stream_types_by.py +++ b/tautulli/models/get_plays_or_stream_types_by.py @@ -9,21 +9,14 @@ from pydantic import BaseModel -class Series(BaseModel): - name: Optional[str] - data: Optional[List] +class SeriesModel(BaseModel): + name: Optional[str] = None + data: Optional[List] = None -class PlaysOrStreamTypesBy(BaseModel): - categories: Optional[List[str]] - series: Optional[List[Series]] +class PlaysOrStreamTypesByModel(BaseModel): + categories: Optional[List[str]] = None + series: Optional[List[SeriesModel]] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: PlaysOrStreamTypesBy - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/history.py b/tautulli/models/history.py index 1898b5c..db0949d 100644 --- a/tautulli/models/history.py +++ b/tautulli/models/history.py @@ -9,64 +9,57 @@ from pydantic import BaseModel -class Datum(BaseModel): - reference_id: Optional[int] - row_id: Optional[int] - id: Optional[int] - date: Optional[int] - started: Optional[int] - stopped: Optional[int] - duration: Optional[int] # Keep for backwards compatibility - play_duration: Optional[int] - paused_counter: Optional[int] - user_id: Optional[int] - user: Optional[str] - friendly_name: Optional[str] - user_thumb: Optional[str] - platform: Optional[str] - product: Optional[str] - player: Optional[str] - ip_address: Optional[str] - live: Optional[int] - machine_id: Optional[str] - media_type: Optional[str] - rating_key: Optional[int] - parent_rating_key: Optional[Union[int, str]] - grandparent_rating_key: Optional[Union[int, str]] - full_title: Optional[str] - title: Optional[str] - parent_title: Optional[str] - grandparent_title: Optional[str] - original_title: Optional[str] - year: Optional[Union[int, str]] - media_index: Optional[Union[int, str]] - parent_media_index: Optional[Union[int, str]] - thumb: Optional[str] - originally_available_at: Optional[str] - guid: Optional[str] - transcode_decision: Optional[str] - percent_complete: Optional[int] - watched_status: Optional[float] - group_count: Optional[int] - group_ids: Optional[str] - state: Optional[Any] - session_key: Optional[Any] +class DatumModel(BaseModel): + reference_id: Optional[int] = None + row_id: Optional[int] = None + id: Optional[int] = None + date: Optional[int] = None + started: Optional[int] = None + stopped: Optional[int] = None + duration: Optional[int] = None # Keep for backwards compatibility + play_duration: Optional[int] = None + paused_counter: Optional[int] = None + user_id: Optional[int] = None + user: Optional[str] = None + friendly_name: Optional[str] = None + user_thumb: Optional[str] = None + platform: Optional[str] = None + product: Optional[str] = None + player: Optional[str] = None + ip_address: Optional[str] = None + live: Optional[int] = None + machine_id: Optional[str] = None + media_type: Optional[str] = None + rating_key: Optional[int] = None + parent_rating_key: Optional[Union[int, str]] = None + grandparent_rating_key: Optional[Union[int, str]] = None + full_title: Optional[str] = None + title: Optional[str] = None + parent_title: Optional[str] = None + grandparent_title: Optional[str] = None + original_title: Optional[str] = None + year: Optional[Union[int, str]] = None + media_index: Optional[Union[int, str]] = None + parent_media_index: Optional[Union[int, str]] = None + thumb: Optional[str] = None + originally_available_at: Optional[str] = None + guid: Optional[str] = None + transcode_decision: Optional[str] = None + percent_complete: Optional[int] = None + watched_status: Optional[float] = None + group_count: Optional[int] = None + group_ids: Optional[str] = None + state: Optional[Any] = None + session_key: Optional[Any] = None -class History(BaseModel): - recordsFiltered: Optional[int] - recordsTotal: Optional[int] - data: Optional[List[Datum]] - draw: Optional[int] - filter_duration: Optional[str] - total_duration: Optional[str] +class HistoryModel(BaseModel): + recordsFiltered: Optional[int] = None + recordsTotal: Optional[int] = None + data: Optional[List[DatumModel]] = None + draw: Optional[int] = None + filter_duration: Optional[str] = None + total_duration: Optional[str] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: History - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/home_stats.py b/tautulli/models/home_stats.py index f084816..b773ffd 100644 --- a/tautulli/models/home_stats.py +++ b/tautulli/models/home_stats.py @@ -9,8 +9,8 @@ from pydantic import BaseModel -class Row(BaseModel): - title: Optional[str] +class RowModel(BaseModel): + title: Optional[str] = None users_watched: Optional[Union[int, str]] = None rating_key: Optional[Union[int, str]] = None last_play: Optional[int] = None @@ -39,18 +39,11 @@ class Row(BaseModel): player: Optional[str] = None -class HomeStat(BaseModel): - stat_id: Optional[str] - stat_title: Optional[str] - rows: Optional[List[Row]] +class HomeStatModel(BaseModel): + stat_id: Optional[str] = None + stat_title: Optional[str] = None + rows: Optional[List[RowModel]] = None stat_type: Optional[str] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[HomeStat] - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/item_user_stats.py b/tautulli/models/item_user_stats.py index a34409b..b7664f4 100644 --- a/tautulli/models/item_user_stats.py +++ b/tautulli/models/item_user_stats.py @@ -9,20 +9,13 @@ from pydantic import BaseModel -class ItemUserStat(BaseModel): - friendly_name: Optional[str] - user_id: Optional[int] - user_thumb: Optional[str] - username: Optional[str] - total_plays: Optional[int] - total_time: Optional[int] +class ItemUserStatModel(BaseModel): + friendly_name: Optional[str] = None + user_id: Optional[int] = None + user_thumb: Optional[str] = None + username: Optional[str] = None + total_plays: Optional[int] = None + total_time: Optional[int] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[ItemUserStat] - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/item_watch_time_stats.py b/tautulli/models/item_watch_time_stats.py index e778e7a..af60862 100644 --- a/tautulli/models/item_watch_time_stats.py +++ b/tautulli/models/item_watch_time_stats.py @@ -9,17 +9,10 @@ from pydantic import BaseModel -class ItemWatchTimeStat(BaseModel): - query_days: Optional[int] - total_time: Optional[int] - total_plays: Optional[int] +class ItemWatchTimeStatModel(BaseModel): + query_days: Optional[int] = None + total_time: Optional[int] = None + total_plays: Optional[int] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[ItemWatchTimeStat] - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/libraries.py b/tautulli/models/libraries.py index 4ff22cb..7b99909 100644 --- a/tautulli/models/libraries.py +++ b/tautulli/models/libraries.py @@ -9,24 +9,17 @@ from pydantic import BaseModel -class LibrariesEntry(BaseModel): - section_id: Optional[str] - section_name: Optional[str] - section_type: Optional[str] - agent: Optional[str] - thumb: Optional[str] - art: Optional[str] - count: Optional[str] - is_active: Optional[int] +class LibrariesEntryModel(BaseModel): + section_id: Optional[str] = None + section_name: Optional[str] = None + section_type: Optional[str] = None + agent: Optional[str] = None + thumb: Optional[str] = None + art: Optional[str] = None + count: Optional[str] = None + is_active: Optional[int] = None parent_count: Optional[str] = None child_count: Optional[str] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[LibrariesEntry] - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/libraries_table.py b/tautulli/models/libraries_table.py index f2c6a5c..289dc9d 100644 --- a/tautulli/models/libraries_table.py +++ b/tautulli/models/libraries_table.py @@ -9,52 +9,45 @@ from pydantic import BaseModel -class Datum(BaseModel): - row_id: Optional[int] - server_id: Optional[str] - section_id: Optional[int] - section_name: Optional[str] - section_type: Optional[str] - count: Optional[int] - parent_count: Optional[int] - child_count: Optional[int] - library_thumb: Optional[str] - library_art: Optional[str] - plays: Optional[int] - duration: Optional[int] - last_accessed: Optional[int] - history_row_id: Optional[int] - last_played: Optional[str] - rating_key: Optional[int] - media_type: Optional[str] - thumb: Optional[str] - parent_title: Optional[str] - year: Optional[Union[int, str]] - media_index: Optional[Union[int, str]] - parent_media_index: Optional[Union[int, str]] - content_rating: Optional[str] - labels: Optional[List] - live: Optional[int] - originally_available_at: Optional[str] - guid: Optional[str] - do_notify: Optional[int] - do_notify_created: Optional[int] - keep_history: Optional[int] - is_active: Optional[int] - - -class LibrariesTable(BaseModel): - recordsFiltered: Optional[int] - recordsTotal: Optional[int] - data: Optional[List[Datum]] - draw: Optional[int] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: LibrariesTable - - -class Model(BaseModel): - response: Response +class DatumModel(BaseModel): + row_id: Optional[int] = None + server_id: Optional[str] = None + section_id: Optional[int] = None + section_name: Optional[str] = None + section_type: Optional[str] = None + count: Optional[int] = None + parent_count: Optional[int] = None + child_count: Optional[int] = None + library_thumb: Optional[str] = None + library_art: Optional[str] = None + plays: Optional[int] = None + duration: Optional[int] = None + last_accessed: Optional[int] = None + history_row_id: Optional[int] = None + last_played: Optional[str] = None + rating_key: Optional[int] = None + media_type: Optional[str] = None + thumb: Optional[str] = None + parent_title: Optional[str] = None + year: Optional[Union[int, str]] = None + media_index: Optional[Union[int, str]] = None + parent_media_index: Optional[Union[int, str]] = None + content_rating: Optional[str] = None + labels: Optional[List] = None + live: Optional[int] = None + originally_available_at: Optional[str] = None + guid: Optional[str] = None + do_notify: Optional[int] = None + do_notify_created: Optional[int] = None + keep_history: Optional[int] = None + is_active: Optional[int] = None + + +class LibrariesTableModel(BaseModel): + recordsFiltered: Optional[int] = None + recordsTotal: Optional[int] = None + data: Optional[List[DatumModel]] = None + draw: Optional[int] = None + + + diff --git a/tautulli/models/library.py b/tautulli/models/library.py index 6de5f7c..e3865aa 100644 --- a/tautulli/models/library.py +++ b/tautulli/models/library.py @@ -9,29 +9,22 @@ from pydantic import BaseModel -class Library(BaseModel): - row_id: Optional[int] - server_id: Optional[str] - section_id: Optional[int] - section_name: Optional[str] - section_type: Optional[str] - library_thumb: Optional[str] - library_art: Optional[str] - count: Optional[int] - parent_count: Optional[Any] - child_count: Optional[Any] - is_active: Optional[int] - do_notify: Optional[int] - do_notify_created: Optional[int] - keep_history: Optional[int] - deleted_section: Optional[int] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: Library - - -class Model(BaseModel): - response: Response +class LibraryModel(BaseModel): + row_id: Optional[int] = None + server_id: Optional[str] = None + section_id: Optional[int] = None + section_name: Optional[str] = None + section_type: Optional[str] = None + library_thumb: Optional[str] = None + library_art: Optional[str] = None + count: Optional[int] = None + parent_count: Optional[Any] = None + child_count: Optional[Any] = None + is_active: Optional[int] = None + do_notify: Optional[int] = None + do_notify_created: Optional[int] = None + keep_history: Optional[int] = None + deleted_section: Optional[int] = None + + + diff --git a/tautulli/models/library_media_info.py b/tautulli/models/library_media_info.py index e2e92a4..302c138 100644 --- a/tautulli/models/library_media_info.py +++ b/tautulli/models/library_media_info.py @@ -9,47 +9,40 @@ from pydantic import BaseModel -class Datum(BaseModel): - video_resolution: Optional[str] - audio_channels: Optional[str] - container: Optional[str] - thumb: Optional[str] - media_index: Optional[str] - title: Optional[str] - bitrate: Optional[str] - video_codec: Optional[str] - section_type: Optional[str] - section_id: Optional[int] - added_at: Optional[str] - sort_title: Optional[str] - file_size: Optional[str] - parent_rating_key: Optional[str] - audio_codec: Optional[str] - year: Optional[str] - media_type: Optional[str] - parent_media_index: Optional[str] - grandparent_rating_key: Optional[str] - rating_key: Optional[str] - video_framerate: Optional[str] - last_played: Optional[int] - play_count: Optional[int] - - -class LibraryMediaInfo(BaseModel): - recordsFiltered: Optional[int] - recordsTotal: Optional[int] - data: Optional[List[Datum]] - draw: Optional[int] - last_refreshed: Optional[int] - filtered_file_size: Optional[int] - total_file_size: Optional[int] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: LibraryMediaInfo - - -class Model(BaseModel): - response: Response +class DatumModel(BaseModel): + video_resolution: Optional[str] = None + audio_channels: Optional[str] = None + container: Optional[str] = None + thumb: Optional[str] = None + media_index: Optional[str] = None + title: Optional[str] = None + bitrate: Optional[str] = None + video_codec: Optional[str] = None + section_type: Optional[str] = None + section_id: Optional[int] = None + added_at: Optional[str] = None + sort_title: Optional[str] = None + file_size: Optional[str] = None + parent_rating_key: Optional[str] = None + audio_codec: Optional[str] = None + year: Optional[str] = None + media_type: Optional[str] = None + parent_media_index: Optional[str] = None + grandparent_rating_key: Optional[str] = None + rating_key: Optional[str] = None + video_framerate: Optional[str] = None + last_played: Optional[int] = None + play_count: Optional[int] = None + + +class LibraryMediaInfoModel(BaseModel): + recordsFiltered: Optional[int] = None + recordsTotal: Optional[int] = None + data: Optional[List[DatumModel]] = None + draw: Optional[int] = None + last_refreshed: Optional[int] = None + filtered_file_size: Optional[int] = None + total_file_size: Optional[int] = None + + + diff --git a/tautulli/models/library_names.py b/tautulli/models/library_names.py index fdc52ff..5eb8a2f 100644 --- a/tautulli/models/library_names.py +++ b/tautulli/models/library_names.py @@ -9,18 +9,8 @@ from pydantic import BaseModel -class LibraryName(BaseModel): - section_id: Optional[int] - section_name: Optional[str] - section_type: Optional[str] - agent: Optional[str] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[LibraryName] - - -class Model(BaseModel): - response: Response +class LibraryNameModel(BaseModel): + section_id: Optional[int] = None + section_name: Optional[str] = None + section_type: Optional[str] = None + agent: Optional[str] = None diff --git a/tautulli/models/library_user_stats.py b/tautulli/models/library_user_stats.py index 3a370c2..7533398 100644 --- a/tautulli/models/library_user_stats.py +++ b/tautulli/models/library_user_stats.py @@ -9,19 +9,12 @@ from pydantic import BaseModel -class LibraryUserStats(BaseModel): - friendly_name: Optional[str] - user_id: Optional[int] - user_thumb: Optional[str] - username: Optional[str] - total_plays: Optional[int] +class LibraryUserStatsModel(BaseModel): + friendly_name: Optional[str] = None + user_id: Optional[int] = None + user_thumb: Optional[str] = None + username: Optional[str] = None + total_plays: Optional[int] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[LibraryUserStats] - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/library_watch_time_stats.py b/tautulli/models/library_watch_time_stats.py index c35ca37..62432f9 100644 --- a/tautulli/models/library_watch_time_stats.py +++ b/tautulli/models/library_watch_time_stats.py @@ -9,17 +9,10 @@ from pydantic import BaseModel -class LibraryWatchTimeStats(BaseModel): - query_days: Optional[int] - total_time: Optional[int] - total_plays: Optional[int] +class LibraryWatchTimeStatsModel(BaseModel): + query_days: Optional[int] = None + total_time: Optional[int] = None + total_plays: Optional[int] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[LibraryWatchTimeStats] - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/logs.py b/tautulli/models/logs.py index 9619564..612c23d 100644 --- a/tautulli/models/logs.py +++ b/tautulli/models/logs.py @@ -9,18 +9,11 @@ from pydantic import BaseModel -class LogEntry(BaseModel): - time: Optional[str] - loglevel: Optional[str] - msg: Optional[str] - thread: Optional[str] +class LogEntryModel(BaseModel): + time: Optional[str] = None + loglevel: Optional[str] = None + msg: Optional[str] = None + thread: Optional[str] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[LogEntry] - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/metadata.py b/tautulli/models/metadata.py index c99373f..d531b15 100644 --- a/tautulli/models/metadata.py +++ b/tautulli/models/metadata.py @@ -9,9 +9,9 @@ from pydantic import BaseModel -class Stream(BaseModel): - id: Optional[str] - type: Optional[str] +class StreamModel(BaseModel): + id: Optional[str] = None + type: Optional[str] = None video_codec: Optional[str] = None video_codec_level: Optional[str] = None video_bitrate: Optional[str] = None @@ -30,7 +30,7 @@ class Stream(BaseModel): video_language_code: Optional[str] = None video_profile: Optional[str] = None video_scan_type: Optional[str] = None - selected: Optional[int] + selected: Optional[int] = None audio_codec: Optional[str] = None audio_bitrate: Optional[str] = None audio_bitrate_mode: Optional[str] = None @@ -42,107 +42,100 @@ class Stream(BaseModel): audio_profile: Optional[str] = None -class Part(BaseModel): - id: Optional[str] - file: Optional[str] - file_size: Optional[str] - indexes: Optional[int] - streams: Optional[List[Stream]] - selected: Optional[int] +class PartModel(BaseModel): + id: Optional[str] = None + file: Optional[str] = None + file_size: Optional[str] = None + indexes: Optional[int] = None + streams: Optional[List[StreamModel]] = None + selected: Optional[int] = None -class MediaInfoItem(BaseModel): - id: Optional[str] - container: Optional[str] - bitrate: Optional[str] - height: Optional[str] - width: Optional[str] - aspect_ratio: Optional[str] - video_codec: Optional[str] - video_resolution: Optional[str] - video_full_resolution: Optional[str] - video_framerate: Optional[str] - video_profile: Optional[str] - audio_codec: Optional[str] - audio_channels: Optional[str] - audio_channel_layout: Optional[str] - audio_profile: Optional[str] - optimized_version: Optional[int] - channel_call_sign: Optional[str] - channel_identifier: Optional[str] - channel_thumb: Optional[str] - parts: Optional[List[Part]] - -class Marker(BaseModel): - id: Optional[int] - type: Optional[str] - start_time_offset: Optional[int] - end_time_offset: Optional[int] - first: Optional[bool] - final: Optional[bool] +class MediaInfoItemModel(BaseModel): + id: Optional[str] = None + container: Optional[str] = None + bitrate: Optional[str] = None + height: Optional[str] = None + width: Optional[str] = None + aspect_ratio: Optional[str] = None + video_codec: Optional[str] = None + video_resolution: Optional[str] = None + video_full_resolution: Optional[str] = None + video_framerate: Optional[str] = None + video_profile: Optional[str] = None + audio_codec: Optional[str] = None + audio_channels: Optional[str] = None + audio_channel_layout: Optional[str] = None + audio_profile: Optional[str] = None + optimized_version: Optional[int] = None + channel_call_sign: Optional[str] = None + channel_identifier: Optional[str] = None + channel_thumb: Optional[str] = None + parts: Optional[List[PartModel]] = None -class Metadata(BaseModel): - media_type: Optional[str] - section_id: Optional[str] - library_name: Optional[str] - rating_key: Optional[str] - parent_rating_key: Optional[str] - grandparent_rating_key: Optional[str] - title: Optional[str] - parent_title: Optional[str] - grandparent_title: Optional[str] - original_title: Optional[str] - sort_title: Optional[str] - edition_title: Optional[str] - media_index: Optional[str] - parent_media_index: Optional[str] - studio: Optional[str] - content_rating: Optional[str] - summary: Optional[str] - tagline: Optional[str] - rating: Optional[str] - rating_image: Optional[str] - audience_rating: Optional[str] - audience_rating_image: Optional[str] - user_rating: Optional[str] - duration: Optional[str] - year: Optional[str] - parent_year: Optional[str] - grandparent_year: Optional[str] - thumb: Optional[str] - parent_thumb: Optional[str] - grandparent_thumb: Optional[str] - art: Optional[str] - banner: Optional[str] - originally_available_at: Optional[str] - added_at: Optional[str] - updated_at: Optional[str] - last_viewed_at: Optional[str] - guid: Optional[str] - parent_guid: Optional[str] - parent_guids: Optional[List[str]] - grandparent_guid: Optional[str] - grandparent_guids: Optional[List[str]] - directors: Optional[List[str]] - writers: Optional[List[str]] - actors: Optional[List[str]] - genres: Optional[List[str]] - labels: Optional[List] - collections: Optional[List] - guids: Optional[List[str]] - full_title: Optional[str] - children_count: Optional[int] - live: Optional[int] - media_info: Optional[List[MediaInfoItem]] - edition_title: Optional[str] - markers: Optional[Marker] +class MarkerModel(BaseModel): + id: Optional[int] = None + type: Optional[str] = None + start_time_offset: Optional[int] = None + end_time_offset: Optional[int] = None + first: Optional[bool] = None + final: Optional[bool] = None +class MetadataModel(BaseModel): + media_type: Optional[str] = None + section_id: Optional[str] = None + library_name: Optional[str] = None + rating_key: Optional[str] = None + parent_rating_key: Optional[str] = None + grandparent_rating_key: Optional[str] = None + title: Optional[str] = None + parent_title: Optional[str] = None + grandparent_title: Optional[str] = None + original_title: Optional[str] = None + sort_title: Optional[str] = None + edition_title: Optional[str] = None + media_index: Optional[str] = None + parent_media_index: Optional[str] = None + studio: Optional[str] = None + content_rating: Optional[str] = None + summary: Optional[str] = None + tagline: Optional[str] = None + rating: Optional[str] = None + rating_image: Optional[str] = None + audience_rating: Optional[str] = None + audience_rating_image: Optional[str] = None + user_rating: Optional[str] = None + duration: Optional[str] = None + year: Optional[str] = None + parent_year: Optional[str] = None + grandparent_year: Optional[str] = None + thumb: Optional[str] = None + parent_thumb: Optional[str] = None + grandparent_thumb: Optional[str] = None + art: Optional[str] = None + banner: Optional[str] = None + originally_available_at: Optional[str] = None + added_at: Optional[str] = None + updated_at: Optional[str] = None + last_viewed_at: Optional[str] = None + guid: Optional[str] = None + parent_guid: Optional[str] = None + parent_guids: Optional[List[str]] = None + grandparent_guid: Optional[str] = None + grandparent_guids: Optional[List[str]] = None + directors: Optional[List[str]] = None + writers: Optional[List[str]] = None + actors: Optional[List[str]] = None + genres: Optional[List[str]] = None + labels: Optional[List] = None + collections: Optional[List] = None + guids: Optional[List[str]] = None + full_title: Optional[str] = None + children_count: Optional[int] = None + live: Optional[int] = None + media_info: Optional[List[MediaInfoItemModel]] = None + edition_title: Optional[str] = None + markers: Optional[MarkerModel] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: Metadata -class Model(BaseModel): - response: Response diff --git a/tautulli/models/new_rating_keys.py b/tautulli/models/new_rating_keys.py index 2e4925b..d043a9b 100644 --- a/tautulli/models/new_rating_keys.py +++ b/tautulli/models/new_rating_keys.py @@ -9,19 +9,12 @@ from pydantic import BaseModel, Field -class Field0(BaseModel): - rating_key: Optional[int] +class Field0Model(BaseModel): + rating_key: Optional[int] = None -class NewRatingKeys(BaseModel): - field_0: Optional[Field0] = Field(..., alias='0') +class NewRatingKeysModel(BaseModel): + field_0: Optional[Field0Model] = Field(..., alias='0') -class Response(BaseModel): - result: Optional[str] - message: Any - data: NewRatingKeys - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/newsletter.py b/tautulli/models/newsletter.py index ccf25dc..54e5353 100644 --- a/tautulli/models/newsletter.py +++ b/tautulli/models/newsletter.py @@ -9,21 +9,11 @@ from pydantic import BaseModel -class Newsletter(BaseModel): - id: Optional[int] - agent_id: Optional[int] - agent_name: Optional[str] - agent_label: Optional[str] - friendly_name: Optional[str] - cron: Optional[str] - active: Optional[int] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[Newsletter] - - -class Model(BaseModel): - response: Response +class NewsletterModel(BaseModel): + id: Optional[int] = None + agent_id: Optional[int] = None + agent_name: Optional[str] = None + agent_label: Optional[str] = None + friendly_name: Optional[str] = None + cron: Optional[str] = None + active: Optional[int] = None diff --git a/tautulli/models/newsletter_config.py b/tautulli/models/newsletter_config.py index 7b36f3f..8d6a460 100644 --- a/tautulli/models/newsletter_config.py +++ b/tautulli/models/newsletter_config.py @@ -9,107 +9,100 @@ from pydantic import BaseModel, Field -class Config(BaseModel): - custom_cron: Optional[int] - time_frame: Optional[int] - time_frame_units: Optional[str] - formatted: Optional[int] - threaded: Optional[int] - notifier_id: Optional[int] - filename: Optional[str] - save_only: Optional[int] - incl_libraries: Optional[List[str]] - - -class EmailConfig(BaseModel): - from_name: Optional[str] +class ConfigModel(BaseModel): + custom_cron: Optional[int] = None + time_frame: Optional[int] = None + time_frame_units: Optional[str] = None + formatted: Optional[int] = None + threaded: Optional[int] = None + notifier_id: Optional[int] = None + filename: Optional[str] = None + save_only: Optional[int] = None + incl_libraries: Optional[List[str]] = None + + +class EmailConfigModel(BaseModel): + from_name: Optional[str] = None from_: Optional[str] = Field(..., alias='from') - to: Optional[List[str]] - cc: Optional[List] - bcc: Optional[List] - smtp_server: Optional[str] - smtp_port: Optional[int] - smtp_user: Optional[str] - smtp_password: Optional[str] - tls: Optional[int] - html_support: Optional[int] - notifier_id: Optional[int] + to: Optional[List[str]] = None + cc: Optional[List] = None + bcc: Optional[List] = None + smtp_server: Optional[str] = None + smtp_port: Optional[int] = None + smtp_user: Optional[str] = None + smtp_password: Optional[str] = None + tls: Optional[int] = None + html_support: Optional[int] = None + notifier_id: Optional[int] = None -class MovieLibrary(BaseModel): - value: Optional[int] - text: Optional[str] +class MovieLibraryModel(BaseModel): + value: Optional[int] = None + text: Optional[str] = None -class TVShowLibrary(BaseModel): - value: Optional[int] - text: Optional[str] +class TVShowLibraryModel(BaseModel): + value: Optional[int] = None + text: Optional[str] = None -class MusicLibrary(BaseModel): - value: Optional[int] - text: Optional[str] +class MusicLibraryModel(BaseModel): + value: Optional[int] = None + text: Optional[str] = None -class OtherVideoLibrary(BaseModel): - value: Optional[int] - text: Optional[str] +class OtherVideoLibraryModel(BaseModel): + value: Optional[int] = None + text: Optional[str] = None -class SelectOptions(BaseModel): - Movie_Libraries: Optional[List[MovieLibrary]] = Field(..., alias='Movie Libraries') - TV_Show_Libraries: Optional[List[TVShowLibrary]] = Field(..., alias='TV Show Libraries') - Music_Libraries: Optional[List[MusicLibrary]] = Field(..., alias='Music Libraries') - Other_Video_Libraries: Optional[List[OtherVideoLibrary]] = Field( +class SelectOptionsModel(BaseModel): + Movie_Libraries: Optional[List[MovieLibraryModel]] = Field(..., alias='Movie Libraries') + TV_Show_Libraries: Optional[List[TVShowLibraryModel]] = Field(..., alias='TV Show Libraries') + Music_Libraries: Optional[List[MusicLibraryModel]] = Field(..., alias='Music Libraries') + Other_Video_Libraries: Optional[List[OtherVideoLibraryModel]] = Field( ..., alias='Other Video Libraries' ) -class ConfigOption(BaseModel): - label: Optional[str] - value: Optional[List[str]] - description: Optional[str] - name: Optional[str] - input_type: Optional[str] - select_options: Optional[SelectOptions] +class ConfigOptionModel(BaseModel): + label: Optional[str] = None + value: Optional[List[str]] = None + description: Optional[str] = None + name: Optional[str] = None + input_type: Optional[str] = None + select_options: Optional[SelectOptionsModel] = None -class SelectOption(BaseModel): - value: Optional[str] - text: Optional[str] +class SelectOptionModel(BaseModel): + value: Optional[str] = None + text: Optional[str] = None -class EmailConfigOption(BaseModel): - label: Optional[str] - value: Optional[Union[Union[int, str], List[str]]] - name: Optional[str] - description: Optional[str] - input_type: Optional[str] - select_options: Optional[List[SelectOption]] = None +class EmailConfigOptionModel(BaseModel): + label: Optional[str] = None + value: Optional[Union[Union[int, str], List[str]]] = None + name: Optional[str] = None + description: Optional[str] = None + input_type: Optional[str] = None + select_options: Optional[List[SelectOptionModel]] = None -class NewsletterConfig(BaseModel): - id: Optional[int] - agent_id: Optional[int] - agent_name: Optional[str] - agent_label: Optional[str] - friendly_name: Optional[str] - cron: Optional[str] - active: Optional[int] - id_name: Optional[str] - subject: Optional[str] - body: Optional[str] - config: Optional[Config] - email_config: Optional[EmailConfig] - config_options: Optional[List[ConfigOption]] - email_config_options: Optional[List[EmailConfigOption]] +class NewsletterConfigModel(BaseModel): + id: Optional[int] = None + agent_id: Optional[int] = None + agent_name: Optional[str] = None + agent_label: Optional[str] = None + friendly_name: Optional[str] = None + cron: Optional[str] = None + active: Optional[int] = None + id_name: Optional[str] = None + subject: Optional[str] = None + body: Optional[str] = None + config: Optional[ConfigModel] = None + email_config: Optional[EmailConfigModel] = None + config_options: Optional[List[ConfigOptionModel]] = None + email_config_options: Optional[List[EmailConfigOptionModel]] = None -class Response(BaseModel): - result: Optional[str] - message: Optional[str] - data: NewsletterConfig - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/newsletter_log.py b/tautulli/models/newsletter_log.py index 31d18e5..3c075b3 100644 --- a/tautulli/models/newsletter_log.py +++ b/tautulli/models/newsletter_log.py @@ -9,33 +9,26 @@ from pydantic import BaseModel -class Datum(BaseModel): - id: Optional[int] - timestamp: Optional[int] - newsletter_id: Optional[int] - agent_id: Optional[int] - agent_name: Optional[str] - notify_action: Optional[str] - subject_text: Optional[str] - body_text: Optional[str] - start_date: Optional[str] - end_date: Optional[str] - uuid: Optional[str] - success: Optional[int] - - -class NewsletterLog(BaseModel): - recordsFiltered: Optional[int] - recordsTotal: Optional[int] - data: Optional[List[Datum]] - draw: Optional[int] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: NewsletterLog - - -class Model(BaseModel): - response: Response +class DatumModel(BaseModel): + id: Optional[int] = None + timestamp: Optional[int] = None + newsletter_id: Optional[int] = None + agent_id: Optional[int] = None + agent_name: Optional[str] = None + notify_action: Optional[str] = None + subject_text: Optional[str] = None + body_text: Optional[str] = None + start_date: Optional[str] = None + end_date: Optional[str] = None + uuid: Optional[str] = None + success: Optional[int] = None + + +class NewsletterLogModel(BaseModel): + recordsFiltered: Optional[int] = None + recordsTotal: Optional[int] = None + data: Optional[List[DatumModel]] = None + draw: Optional[int] = None + + + diff --git a/tautulli/models/newsletter_notification.py b/tautulli/models/newsletter_notification.py index 4d9eab5..37beb1c 100644 --- a/tautulli/models/newsletter_notification.py +++ b/tautulli/models/newsletter_notification.py @@ -9,15 +9,8 @@ from pydantic import BaseModel -class NewsletterNotification(BaseModel): - newsletter_notification_id: Optional[int] +class NewsletterNotificationModel(BaseModel): + newsletter_notification_id: Optional[int] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: NewsletterNotification - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/notification.py b/tautulli/models/notification.py index aaae039..b93e172 100644 --- a/tautulli/models/notification.py +++ b/tautulli/models/notification.py @@ -9,15 +9,8 @@ from pydantic import BaseModel -class Notification(BaseModel): - notification_id: Optional[int] +class NotificationModel(BaseModel): + notification_id: Optional[int] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: Notification - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/notification_log.py b/tautulli/models/notification_log.py index 2b54bdc..df6e983 100644 --- a/tautulli/models/notification_log.py +++ b/tautulli/models/notification_log.py @@ -9,34 +9,27 @@ from pydantic import BaseModel -class Datum(BaseModel): - id: Optional[int] - timestamp: Optional[int] - session_key: Optional[int] - rating_key: Optional[int] - user_id: Optional[int] - user: Optional[str] - notifier_id: Optional[int] - agent_id: Optional[int] - agent_name: Optional[str] - notify_action: Optional[str] - subject_text: Optional[str] - body_text: Optional[str] - success: Optional[int] - - -class NotificationLog(BaseModel): - recordsFiltered: Optional[int] - recordsTotal: Optional[int] - data: Optional[List[Datum]] - draw: Optional[int] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: NotificationLog - - -class Model(BaseModel): - response: Response +class DatumModel(BaseModel): + id: Optional[int] = None + timestamp: Optional[int] = None + session_key: Optional[int] = None + rating_key: Optional[int] = None + user_id: Optional[int] = None + user: Optional[str] = None + notifier_id: Optional[int] = None + agent_id: Optional[int] = None + agent_name: Optional[str] = None + notify_action: Optional[str] = None + subject_text: Optional[str] = None + body_text: Optional[str] = None + success: Optional[int] = None + + +class NotificationLogModel(BaseModel): + recordsFiltered: Optional[int] = None + recordsTotal: Optional[int] = None + data: Optional[List[DatumModel]] = None + draw: Optional[int] = None + + + diff --git a/tautulli/models/notifier_config.py b/tautulli/models/notifier_config.py index e708365..8dd291c 100644 --- a/tautulli/models/notifier_config.py +++ b/tautulli/models/notifier_config.py @@ -9,52 +9,45 @@ from pydantic import BaseModel -class Config(BaseModel): - incl_poster: Optional[int] - html_support: Optional[int] - chat_id: Optional[str] - bot_token: Optional[str] - incl_subject: Optional[int] - disable_web_preview: Optional[int] +class ConfigModel(BaseModel): + incl_poster: Optional[int] = None + html_support: Optional[int] = None + chat_id: Optional[str] = None + bot_token: Optional[str] = None + incl_subject: Optional[int] = None + disable_web_preview: Optional[int] = None -class Actions(BaseModel): - on_play: Optional[int] - on_stop: Optional[int] +class ActionsModel(BaseModel): + on_play: Optional[int] = None + on_stop: Optional[int] = None -class OnPlay(BaseModel): - subject: Optional[str] - body: Optional[str] +class OnPlayModel(BaseModel): + subject: Optional[str] = None + body: Optional[str] = None -class OnStop(BaseModel): - subject: Optional[str] - body: Optional[str] +class OnStopModel(BaseModel): + subject: Optional[str] = None + body: Optional[str] = None -class NotifyText(BaseModel): - on_play: Optional[OnPlay] - on_stop: Optional[OnStop] +class NotifyTextModel(BaseModel): + on_play: Optional[OnPlayModel] = None + on_stop: Optional[OnStopModel] = None -class NotifierConfig(BaseModel): - id: Optional[int] - agent_id: Optional[int] - agent_name: Optional[str] - agent_label: Optional[str] - friendly_name: Optional[str] - config: Optional[Config] - config_options: Optional[List[Union[Dict[str, Any], str]]] - actions: Optional[Actions] - notify_text: Optional[NotifyText] +class NotifierConfigModel(BaseModel): + id: Optional[int] = None + agent_id: Optional[int] = None + agent_name: Optional[str] = None + agent_label: Optional[str] = None + friendly_name: Optional[str] = None + config: Optional[ConfigModel] = None + config_options: Optional[List[Union[Dict[str, Any], str]]] = None + actions: Optional[ActionsModel] = None + notify_text: Optional[NotifyTextModel] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: NotifierConfig - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/notifier_parameters.py b/tautulli/models/notifier_parameters.py index c106185..d14e10b 100644 --- a/tautulli/models/notifier_parameters.py +++ b/tautulli/models/notifier_parameters.py @@ -9,17 +9,7 @@ from pydantic import BaseModel -class NotifierParameter(BaseModel): - name: Optional[str] - type: Optional[str] - value: Optional[str] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[NotifierParameter] - - -class Model(BaseModel): - response: Response +class NotifierParameterModel(BaseModel): + name: Optional[str] = None + type: Optional[str] = None + value: Optional[str] = None diff --git a/tautulli/models/notifiers.py b/tautulli/models/notifiers.py index aa33984..4b90032 100644 --- a/tautulli/models/notifiers.py +++ b/tautulli/models/notifiers.py @@ -9,20 +9,13 @@ from pydantic import BaseModel -class Notifier(BaseModel): - id: Optional[int] - agent_id: Optional[int] - agent_name: Optional[str] - agent_label: Optional[str] - friendly_name: Optional[str] - active: Optional[int] +class NotifierModel(BaseModel): + id: Optional[int] = None + agent_id: Optional[int] = None + agent_name: Optional[str] = None + agent_label: Optional[str] = None + friendly_name: Optional[str] = None + active: Optional[int] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[Notifier] - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/old_rating_keys.py b/tautulli/models/old_rating_keys.py index 92d812c..4b34fd2 100644 --- a/tautulli/models/old_rating_keys.py +++ b/tautulli/models/old_rating_keys.py @@ -9,19 +9,12 @@ from pydantic import BaseModel, Field -class Field0(BaseModel): - rating_key: Optional[int] +class Field0Model(BaseModel): + rating_key: Optional[int] = None -class OldRatingKeys(BaseModel): - field_0: Optional[Field0] = Field(..., alias='0') +class OldRatingKeysModel(BaseModel): + field_0: Optional[Field0Model] = Field(..., alias='0') -class Response(BaseModel): - result: Optional[str] - message: Any - data: OldRatingKeys - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/playlists_table.py b/tautulli/models/playlists_table.py index 5057cea..829e215 100644 --- a/tautulli/models/playlists_table.py +++ b/tautulli/models/playlists_table.py @@ -9,35 +9,28 @@ from pydantic import BaseModel -class Datum(BaseModel): - addedAt: Optional[str] - composite: Optional[str] - duration: Optional[int] - guid: Optional[str] - leafCount: Optional[int] - librarySectionID: Optional[str] - playlistType: Optional[str] - ratingKey: Optional[int] - smart: Optional[bool] - summary: Optional[str] - title: Optional[str] - type: Optional[str] - updatedAt: Optional[str] - userID: Optional[Any] - - -class PlaylistsTable(BaseModel): - recordsFiltered: Optional[int] - recordsTotal: Optional[int] - data: Optional[List[Datum]] - draw: Optional[int] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: PlaylistsTable - - -class Model(BaseModel): - response: Response +class DatumModel(BaseModel): + addedAt: Optional[str] = None + composite: Optional[str] = None + duration: Optional[int] = None + guid: Optional[str] = None + leafCount: Optional[int] = None + librarySectionID: Optional[str] = None + playlistType: Optional[str] = None + ratingKey: Optional[int] = None + smart: Optional[bool] = None + summary: Optional[str] = None + title: Optional[str] = None + type: Optional[str] = None + updatedAt: Optional[str] = None + userID: Optional[Any] = None + + +class PlaylistsTableModel(BaseModel): + recordsFiltered: Optional[int] = None + recordsTotal: Optional[int] = None + data: Optional[List[DatumModel]] = None + draw: Optional[int] = None + + + diff --git a/tautulli/models/plex_log.py b/tautulli/models/plex_log.py index 9c53b0d..691c0b5 100644 --- a/tautulli/models/plex_log.py +++ b/tautulli/models/plex_log.py @@ -9,15 +9,8 @@ from pydantic import BaseModel -class PlexLog(BaseModel): - data: Optional[List] +class PlexLogModel(BaseModel): + data: Optional[List] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: PlexLog - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/pms_update.py b/tautulli/models/pms_update.py index eb254c6..72b73c6 100644 --- a/tautulli/models/pms_update.py +++ b/tautulli/models/pms_update.py @@ -9,26 +9,16 @@ from pydantic import BaseModel -class PMSUpdate(BaseModel): - update_available: Optional[bool] - platform: Optional[str] - release_date: Optional[int] - version: Optional[str] - requirements: Optional[str] - extra_info: Optional[str] - changelog_added: Optional[str] - changelog_fixed: Optional[str] - label: Optional[str] - distro: Optional[str] - distro_build: Optional[str] - download_url: Optional[str] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: PMSUpdate - - -class Model(BaseModel): - response: Response +class PMSUpdateModel(BaseModel): + update_available: Optional[bool] = None + platform: Optional[str] = None + release_date: Optional[int] = None + version: Optional[str] = None + requirements: Optional[str] = None + extra_info: Optional[str] = None + changelog_added: Optional[str] = None + changelog_fixed: Optional[str] = None + label: Optional[str] = None + distro: Optional[str] = None + distro_build: Optional[str] = None + download_url: Optional[str] = None diff --git a/tautulli/models/recently_added.py b/tautulli/models/recently_added.py index 27ee691..089b44e 100644 --- a/tautulli/models/recently_added.py +++ b/tautulli/models/recently_added.py @@ -9,7 +9,7 @@ from pydantic import BaseModel -class RecentlyAddedItem(BaseModel): +class RecentlyAddedItemModel(BaseModel): media_type: str section_id: str library_name: str @@ -55,15 +55,8 @@ class RecentlyAddedItem(BaseModel): child_count: str -class RecentlyAdded(BaseModel): - recently_added: Optional[List[RecentlyAddedItem]] +class RecentlyAddedModel(BaseModel): + recently_added: Optional[List[RecentlyAddedItemModel]] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: RecentlyAdded - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/registered_device.py b/tautulli/models/registered_device.py index 60e11ae..1c35dff 100644 --- a/tautulli/models/registered_device.py +++ b/tautulli/models/registered_device.py @@ -9,37 +9,30 @@ from pydantic import BaseModel -class RegisteredDevice(BaseModel): - server_id: Optional[str] - pms_name: Optional[str] - pms_version: Optional[str] - pms_platform: Optional[str] - pms_ip: Optional[str] - pms_port: Optional[int] - pms_ssl: Optional[int] - pms_is_remote: Optional[int] - pms_is_cloud: Optional[int] - pms_url: Optional[str] - pms_url_manual: Optional[int] - pms_identifier: Optional[str] - pms_plexpass: Optional[int] - tautulli_install_type: Optional[str] - tautulli_version: Optional[str] - tautulli_branch: Optional[str] - tautulli_commit: Optional[str] - tautulli_platform: Optional[str] - tautulli_platform_release: Optional[str] - tautulli_platform_version: Optional[str] - tautulli_platform_linux_distro: Optional[str] - tautulli_platform_device_name: Optional[str] - tautulli_python_version: Optional[str] - - -class Response(BaseModel): - result: Optional[str] - message: Optional[str] - data: RegisteredDevice - - -class Model(BaseModel): - response: Response +class RegisteredDeviceModel(BaseModel): + server_id: Optional[str] = None + pms_name: Optional[str] = None + pms_version: Optional[str] = None + pms_platform: Optional[str] = None + pms_ip: Optional[str] = None + pms_port: Optional[int] = None + pms_ssl: Optional[int] = None + pms_is_remote: Optional[int] = None + pms_is_cloud: Optional[int] = None + pms_url: Optional[str] = None + pms_url_manual: Optional[int] = None + pms_identifier: Optional[str] = None + pms_plexpass: Optional[int] = None + tautulli_install_type: Optional[str] = None + tautulli_version: Optional[str] = None + tautulli_branch: Optional[str] = None + tautulli_commit: Optional[str] = None + tautulli_platform: Optional[str] = None + tautulli_platform_release: Optional[str] = None + tautulli_platform_version: Optional[str] = None + tautulli_platform_linux_distro: Optional[str] = None + tautulli_platform_device_name: Optional[str] = None + tautulli_python_version: Optional[str] = None + + + diff --git a/tautulli/models/search_results.py b/tautulli/models/search_results.py index bbbc20f..b109b05 100644 --- a/tautulli/models/search_results.py +++ b/tautulli/models/search_results.py @@ -9,9 +9,9 @@ from pydantic import BaseModel -class Stream(BaseModel): - id: Optional[str] - type: Optional[str] +class StreamModel(BaseModel): + id: Optional[str] = None + type: Optional[str] = None video_codec: Optional[str] = None video_codec_level: Optional[str] = None video_bitrate: Optional[str] = None @@ -29,7 +29,7 @@ class Stream(BaseModel): video_language_code: Optional[str] = None video_profile: Optional[str] = None video_scan_type: Optional[str] = None - selected: Optional[int] + selected: Optional[int] = None audio_codec: Optional[str] = None audio_bitrate: Optional[str] = None audio_bitrate_mode: Optional[str] = None @@ -48,259 +48,252 @@ class Stream(BaseModel): subtitle_language_code: Optional[str] = None -class Part(BaseModel): - id: Optional[str] - file: Optional[str] - file_size: Optional[str] - indexes: Optional[int] - streams: Optional[List[Stream]] - selected: Optional[int] +class PartModel(BaseModel): + id: Optional[str] = None + file: Optional[str] = None + file_size: Optional[str] = None + indexes: Optional[int] = None + streams: Optional[List[StreamModel]] = None + selected: Optional[int] = None -class MediaInfoItem(BaseModel): - id: Optional[str] - container: Optional[str] - bitrate: Optional[str] - height: Optional[str] - width: Optional[str] - aspect_ratio: Optional[str] - video_codec: Optional[str] - video_resolution: Optional[str] - video_full_resolution: Optional[str] - video_framerate: Optional[str] - video_profile: Optional[str] - audio_codec: Optional[str] - audio_channels: Optional[str] - audio_channel_layout: Optional[str] - audio_profile: Optional[str] - optimized_version: Optional[int] - channel_call_sign: Optional[str] - channel_identifier: Optional[str] - channel_thumb: Optional[str] - parts: Optional[List[Part]] - +class MediaInfoItemModel(BaseModel): + id: Optional[str] = None + container: Optional[str] = None + bitrate: Optional[str] = None + height: Optional[str] = None + width: Optional[str] = None + aspect_ratio: Optional[str] = None + video_codec: Optional[str] = None + video_resolution: Optional[str] = None + video_full_resolution: Optional[str] = None + video_framerate: Optional[str] = None + video_profile: Optional[str] = None + audio_codec: Optional[str] = None + audio_channels: Optional[str] = None + audio_channel_layout: Optional[str] = None + audio_profile: Optional[str] = None + optimized_version: Optional[int] = None + channel_call_sign: Optional[str] = None + channel_identifier: Optional[str] = None + channel_thumb: Optional[str] = None + parts: Optional[List[PartModel]] = None -class MovieItem(BaseModel): - media_type: Optional[str] - section_id: Optional[str] - library_name: Optional[str] - rating_key: Optional[str] - parent_rating_key: Optional[str] - grandparent_rating_key: Optional[str] - title: Optional[str] - parent_title: Optional[str] - grandparent_title: Optional[str] - original_title: Optional[str] - sort_title: Optional[str] - media_index: Optional[str] - parent_media_index: Optional[str] - studio: Optional[str] - content_rating: Optional[str] - summary: Optional[str] - tagline: Optional[str] - rating: Optional[str] - rating_image: Optional[str] - audience_rating: Optional[str] - audience_rating_image: Optional[str] - user_rating: Optional[str] - duration: Optional[str] - year: Optional[str] - thumb: Optional[str] - parent_thumb: Optional[str] - grandparent_thumb: Optional[str] - art: Optional[str] - banner: Optional[str] - originally_available_at: Optional[str] - added_at: Optional[str] - updated_at: Optional[str] - last_viewed_at: Optional[str] - guid: Optional[str] - parent_guid: Optional[str] - grandparent_guid: Optional[str] - directors: Optional[List] - writers: Optional[List] - actors: Optional[List] - genres: Optional[List] - labels: Optional[List] - collections: Optional[List] - guids: Optional[List] - full_title: Optional[str] - children_count: Optional[int] - live: Optional[int] - media_info: Optional[List[MediaInfoItem]] +class MovieItemModel(BaseModel): + media_type: Optional[str] = None + section_id: Optional[str] = None + library_name: Optional[str] = None + rating_key: Optional[str] = None + parent_rating_key: Optional[str] = None + grandparent_rating_key: Optional[str] = None + title: Optional[str] = None + parent_title: Optional[str] = None + grandparent_title: Optional[str] = None + original_title: Optional[str] = None + sort_title: Optional[str] = None + media_index: Optional[str] = None + parent_media_index: Optional[str] = None + studio: Optional[str] = None + content_rating: Optional[str] = None + summary: Optional[str] = None + tagline: Optional[str] = None + rating: Optional[str] = None + rating_image: Optional[str] = None + audience_rating: Optional[str] = None + audience_rating_image: Optional[str] = None + user_rating: Optional[str] = None + duration: Optional[str] = None + year: Optional[str] = None + thumb: Optional[str] = None + parent_thumb: Optional[str] = None + grandparent_thumb: Optional[str] = None + art: Optional[str] = None + banner: Optional[str] = None + originally_available_at: Optional[str] = None + added_at: Optional[str] = None + updated_at: Optional[str] = None + last_viewed_at: Optional[str] = None + guid: Optional[str] = None + parent_guid: Optional[str] = None + grandparent_guid: Optional[str] = None + directors: Optional[List] = None + writers: Optional[List] = None + actors: Optional[List] = None + genres: Optional[List] = None + labels: Optional[List] = None + collections: Optional[List] = None + guids: Optional[List] = None + full_title: Optional[str] = None + children_count: Optional[int] = None + live: Optional[int] = None + media_info: Optional[List[MediaInfoItemModel]] = None -class ShowItem(BaseModel): - media_type: Optional[str] - section_id: Optional[str] - library_name: Optional[str] - rating_key: Optional[str] - parent_rating_key: Optional[str] - grandparent_rating_key: Optional[str] - title: Optional[str] - parent_title: Optional[str] - grandparent_title: Optional[str] - original_title: Optional[str] - sort_title: Optional[str] - media_index: Optional[str] - parent_media_index: Optional[str] - studio: Optional[str] - content_rating: Optional[str] - summary: Optional[str] - tagline: Optional[str] - rating: Optional[str] - rating_image: Optional[str] - audience_rating: Optional[str] - audience_rating_image: Optional[str] - user_rating: Optional[str] - duration: Optional[str] - year: Optional[str] - thumb: Optional[str] - parent_thumb: Optional[str] - grandparent_thumb: Optional[str] - art: Optional[str] - banner: Optional[str] - originally_available_at: Optional[str] - added_at: Optional[str] - updated_at: Optional[str] - last_viewed_at: Optional[str] - guid: Optional[str] - parent_guid: Optional[str] - grandparent_guid: Optional[str] - directors: Optional[List] - writers: Optional[List] - actors: Optional[List[str]] - genres: Optional[List[str]] - labels: Optional[List] - collections: Optional[List] - guids: Optional[List] - full_title: Optional[str] - children_count: Optional[int] - live: Optional[int] - media_info: Optional[List] +class ShowItemModel(BaseModel): + media_type: Optional[str] = None + section_id: Optional[str] = None + library_name: Optional[str] = None + rating_key: Optional[str] = None + parent_rating_key: Optional[str] = None + grandparent_rating_key: Optional[str] = None + title: Optional[str] = None + parent_title: Optional[str] = None + grandparent_title: Optional[str] = None + original_title: Optional[str] = None + sort_title: Optional[str] = None + media_index: Optional[str] = None + parent_media_index: Optional[str] = None + studio: Optional[str] = None + content_rating: Optional[str] = None + summary: Optional[str] = None + tagline: Optional[str] = None + rating: Optional[str] = None + rating_image: Optional[str] = None + audience_rating: Optional[str] = None + audience_rating_image: Optional[str] = None + user_rating: Optional[str] = None + duration: Optional[str] = None + year: Optional[str] = None + thumb: Optional[str] = None + parent_thumb: Optional[str] = None + grandparent_thumb: Optional[str] = None + art: Optional[str] = None + banner: Optional[str] = None + originally_available_at: Optional[str] = None + added_at: Optional[str] = None + updated_at: Optional[str] = None + last_viewed_at: Optional[str] = None + guid: Optional[str] = None + parent_guid: Optional[str] = None + grandparent_guid: Optional[str] = None + directors: Optional[List] = None + writers: Optional[List] = None + actors: Optional[List[str]] = None + genres: Optional[List[str]] = None + labels: Optional[List] = None + collections: Optional[List] = None + guids: Optional[List] = None + full_title: Optional[str] = None + children_count: Optional[int] = None + live: Optional[int] = None + media_info: Optional[List] = None -class SeasonItem(BaseModel): - media_type: Optional[str] - section_id: Optional[str] - library_name: Optional[str] - rating_key: Optional[str] - parent_rating_key: Optional[str] - grandparent_rating_key: Optional[str] - title: Optional[str] - parent_title: Optional[str] - grandparent_title: Optional[str] - original_title: Optional[str] - sort_title: Optional[str] - media_index: Optional[str] - parent_media_index: Optional[str] - studio: Optional[str] - content_rating: Optional[str] - summary: Optional[str] - tagline: Optional[str] - rating: Optional[str] - rating_image: Optional[str] - audience_rating: Optional[str] - audience_rating_image: Optional[str] - user_rating: Optional[str] - duration: Optional[str] - year: Optional[str] - thumb: Optional[str] - parent_thumb: Optional[str] - grandparent_thumb: Optional[str] - art: Optional[str] - banner: Optional[str] - originally_available_at: Optional[str] - added_at: Optional[str] - updated_at: Optional[str] - last_viewed_at: Optional[str] - guid: Optional[str] - parent_guid: Optional[str] - grandparent_guid: Optional[str] - directors: Optional[List] - writers: Optional[List] - actors: Optional[List[str]] - genres: Optional[List[str]] - labels: Optional[List] - collections: Optional[List] - guids: Optional[List] - full_title: Optional[str] - children_count: Optional[int] - live: Optional[int] - media_info: Optional[List] +class SeasonItemModel(BaseModel): + media_type: Optional[str] = None + section_id: Optional[str] = None + library_name: Optional[str] = None + rating_key: Optional[str] = None + parent_rating_key: Optional[str] = None + grandparent_rating_key: Optional[str] = None + title: Optional[str] = None + parent_title: Optional[str] = None + grandparent_title: Optional[str] = None + original_title: Optional[str] = None + sort_title: Optional[str] = None + media_index: Optional[str] = None + parent_media_index: Optional[str] = None + studio: Optional[str] = None + content_rating: Optional[str] = None + summary: Optional[str] = None + tagline: Optional[str] = None + rating: Optional[str] = None + rating_image: Optional[str] = None + audience_rating: Optional[str] = None + audience_rating_image: Optional[str] = None + user_rating: Optional[str] = None + duration: Optional[str] = None + year: Optional[str] = None + thumb: Optional[str] = None + parent_thumb: Optional[str] = None + grandparent_thumb: Optional[str] = None + art: Optional[str] = None + banner: Optional[str] = None + originally_available_at: Optional[str] = None + added_at: Optional[str] = None + updated_at: Optional[str] = None + last_viewed_at: Optional[str] = None + guid: Optional[str] = None + parent_guid: Optional[str] = None + grandparent_guid: Optional[str] = None + directors: Optional[List] = None + writers: Optional[List] = None + actors: Optional[List[str]] = None + genres: Optional[List[str]] = None + labels: Optional[List] = None + collections: Optional[List] = None + guids: Optional[List] = None + full_title: Optional[str] = None + children_count: Optional[int] = None + live: Optional[int] = None + media_info: Optional[List] = None -class EpisodeItem(BaseModel): - media_type: Optional[str] - section_id: Optional[str] - library_name: Optional[str] - rating_key: Optional[str] - parent_rating_key: Optional[str] - grandparent_rating_key: Optional[str] - title: Optional[str] - parent_title: Optional[str] - grandparent_title: Optional[str] - original_title: Optional[str] - sort_title: Optional[str] - media_index: Optional[str] - parent_media_index: Optional[str] - studio: Optional[str] - content_rating: Optional[str] - summary: Optional[str] - tagline: Optional[str] - rating: Optional[str] - rating_image: Optional[str] - audience_rating: Optional[str] - audience_rating_image: Optional[str] - user_rating: Optional[str] - duration: Optional[str] - year: Optional[str] - thumb: Optional[str] - parent_thumb: Optional[str] - grandparent_thumb: Optional[str] - art: Optional[str] - banner: Optional[str] - originally_available_at: Optional[str] - added_at: Optional[str] - updated_at: Optional[str] - last_viewed_at: Optional[str] - guid: Optional[str] - parent_guid: Optional[str] - grandparent_guid: Optional[str] - directors: Optional[List[str]] - writers: Optional[List[str]] - actors: Optional[List[str]] - genres: Optional[List[str]] - labels: Optional[List] - collections: Optional[List] - guids: Optional[List] - full_title: Optional[str] - children_count: Optional[int] - live: Optional[int] - media_info: Optional[List[MediaInfoItem]] +class EpisodeItemModel(BaseModel): + media_type: Optional[str] = None + section_id: Optional[str] = None + library_name: Optional[str] = None + rating_key: Optional[str] = None + parent_rating_key: Optional[str] = None + grandparent_rating_key: Optional[str] = None + title: Optional[str] = None + parent_title: Optional[str] = None + grandparent_title: Optional[str] = None + original_title: Optional[str] = None + sort_title: Optional[str] = None + media_index: Optional[str] = None + parent_media_index: Optional[str] = None + studio: Optional[str] = None + content_rating: Optional[str] = None + summary: Optional[str] = None + tagline: Optional[str] = None + rating: Optional[str] = None + rating_image: Optional[str] = None + audience_rating: Optional[str] = None + audience_rating_image: Optional[str] = None + user_rating: Optional[str] = None + duration: Optional[str] = None + year: Optional[str] = None + thumb: Optional[str] = None + parent_thumb: Optional[str] = None + grandparent_thumb: Optional[str] = None + art: Optional[str] = None + banner: Optional[str] = None + originally_available_at: Optional[str] = None + added_at: Optional[str] = None + updated_at: Optional[str] = None + last_viewed_at: Optional[str] = None + guid: Optional[str] = None + parent_guid: Optional[str] = None + grandparent_guid: Optional[str] = None + directors: Optional[List[str]] = None + writers: Optional[List[str]] = None + actors: Optional[List[str]] = None + genres: Optional[List[str]] = None + labels: Optional[List] = None + collections: Optional[List] = None + guids: Optional[List] = None + full_title: Optional[str] = None + children_count: Optional[int] = None + live: Optional[int] = None + media_info: Optional[List[MediaInfoItemModel]] = None -class ResultsList(BaseModel): - movie: Optional[List[MovieItem]] - show: Optional[List[ShowItem]] - season: Optional[List[SeasonItem]] - episode: Optional[List[EpisodeItem]] - artist: Optional[List] - album: Optional[List] - track: Optional[List] - collection: Optional[List] +class ResultsListModel(BaseModel): + movie: Optional[List[MovieItemModel]] = None + show: Optional[List[ShowItemModel]] = None + season: Optional[List[SeasonItemModel]] = None + episode: Optional[List[EpisodeItemModel]] = None + artist: Optional[List] = None + album: Optional[List] = None + track: Optional[List] = None + collection: Optional[List] = None -class SearchResults(BaseModel): - results_count: Optional[int] - results_list: Optional[ResultsList] +class SearchResultsModel(BaseModel): + results_count: Optional[int] = None + results_list: Optional[ResultsListModel] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: SearchResults -class Model(BaseModel): - response: Response diff --git a/tautulli/models/server_id.py b/tautulli/models/server_id.py index 95bf0cd..4aed67e 100644 --- a/tautulli/models/server_id.py +++ b/tautulli/models/server_id.py @@ -9,15 +9,8 @@ from pydantic import BaseModel -class ServerID(BaseModel): - identifier: Optional[Any] +class ServerIDModel(BaseModel): + identifier: Optional[Any] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: ServerID - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/server_identity.py b/tautulli/models/server_identity.py index 4384708..243cf3c 100644 --- a/tautulli/models/server_identity.py +++ b/tautulli/models/server_identity.py @@ -9,16 +9,6 @@ from pydantic import BaseModel -class ServerIdentity(BaseModel): - machine_identifier: Optional[str] - version: Optional[str] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: ServerIdentity - - -class Model(BaseModel): - response: Response +class ServerIdentityModel(BaseModel): + machine_identifier: Optional[str] = None + version: Optional[str] = None diff --git a/tautulli/models/server_info.py b/tautulli/models/server_info.py index fa36f67..68e1f92 100644 --- a/tautulli/models/server_info.py +++ b/tautulli/models/server_info.py @@ -9,25 +9,18 @@ from pydantic import BaseModel -class ServerInfo(BaseModel): - pms_name: Optional[str] - pms_version: Optional[str] - pms_platform: Optional[str] - pms_ip: Optional[str] - pms_port: Optional[int] - pms_ssl: Optional[int] - pms_is_remote: Optional[int] - pms_url: Optional[str] - pms_url_manual: Optional[int] - pms_identifier: Optional[str] - pms_plexpass: Optional[int] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: ServerInfo - - -class Model(BaseModel): - response: Response +class ServerInfoModel(BaseModel): + pms_name: Optional[str] = None + pms_version: Optional[str] = None + pms_platform: Optional[str] = None + pms_ip: Optional[str] = None + pms_port: Optional[int] = None + pms_ssl: Optional[int] = None + pms_is_remote: Optional[int] = None + pms_url: Optional[str] = None + pms_url_manual: Optional[int] = None + pms_identifier: Optional[str] = None + pms_plexpass: Optional[int] = None + + + diff --git a/tautulli/models/server_list.py b/tautulli/models/server_list.py index 12918e7..fecc3d2 100644 --- a/tautulli/models/server_list.py +++ b/tautulli/models/server_list.py @@ -9,23 +9,13 @@ from pydantic import BaseModel -class ServerListEntry(BaseModel): - httpsRequired: Optional[str] - clientIdentifier: Optional[str] - label: Optional[str] - ip: Optional[str] - port: Optional[str] - uri: Optional[str] - local: Optional[str] - value: Optional[str] - is_cloud: Optional[bool] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[ServerListEntry] - - -class Model(BaseModel): - response: Response +class ServerListEntryModel(BaseModel): + httpsRequired: Optional[str] = None + clientIdentifier: Optional[str] = None + label: Optional[str] = None + ip: Optional[str] = None + port: Optional[str] = None + uri: Optional[str] = None + local: Optional[str] = None + value: Optional[str] = None + is_cloud: Optional[bool] = None diff --git a/tautulli/models/server_status.py b/tautulli/models/server_status.py index 9d67e79..6c60f97 100644 --- a/tautulli/models/server_status.py +++ b/tautulli/models/server_status.py @@ -9,16 +9,9 @@ from pydantic import BaseModel -class ServerStatus(BaseModel): - result: Optional[str] - connected: Optional[bool] +class ServerStatusModel(BaseModel): + result: Optional[str] = None + connected: Optional[bool] = None -class Response(BaseModel): - result: str - message: Any - data: ServerStatus - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/servers_info.py b/tautulli/models/servers_info.py index 9f9c996..c318106 100644 --- a/tautulli/models/servers_info.py +++ b/tautulli/models/servers_info.py @@ -4,24 +4,14 @@ from __future__ import annotations -from typing import Any, List, Optional +from typing import Optional from pydantic import BaseModel -class ServersInfoEntry(BaseModel): - name: Optional[str] - machine_identifier: Optional[str] - host: Optional[str] - port: Optional[str] - version: Optional[str] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[ServersInfoEntry] - - -class Model(BaseModel): - response: Response +class ServersInfoEntryModel(BaseModel): + name: Optional[str] = None + machine_identifier: Optional[str] = None + host: Optional[str] = None + port: Optional[str] = None + version: Optional[str] = None diff --git a/tautulli/models/settings.py b/tautulli/models/settings.py index 78f7c08..879436c 100644 --- a/tautulli/models/settings.py +++ b/tautulli/models/settings.py @@ -9,745 +9,735 @@ from pydantic import BaseModel -class IFTTT(BaseModel): - ifttt_on_stop: Optional[bool] - ifttt_on_pause: Optional[bool] - ifttt_key: Optional[str] - ifttt_on_concurrent: Optional[bool] - ifttt_on_created: Optional[bool] - ifttt_on_buffer: Optional[bool] - ifttt_enabled: Optional[bool] - ifttt_on_pmsupdate: Optional[bool] - ifttt_on_newdevice: Optional[bool] - ifttt_on_intdown: Optional[bool] - ifttt_on_extup: Optional[bool] - ifttt_on_intup: Optional[bool] - ifttt_on_resume: Optional[bool] - ifttt_on_watched: Optional[bool] - ifttt_event: Optional[str] - ifttt_on_extdown: Optional[bool] - ifttt_on_play: Optional[bool] - - -class Growl(BaseModel): - growl_enabled: Optional[bool] - growl_on_play: Optional[bool] - growl_on_stop: Optional[bool] - growl_on_buffer: Optional[bool] - growl_on_pause: Optional[bool] - growl_on_intdown: Optional[bool] - growl_host: Optional[str] - growl_on_extup: Optional[bool] - growl_on_newdevice: Optional[bool] - growl_on_pmsupdate: Optional[bool] - growl_password: Optional[str] - growl_on_resume: Optional[bool] - growl_on_created: Optional[bool] - growl_on_concurrent: Optional[bool] - growl_on_watched: Optional[bool] - growl_on_intup: Optional[bool] - growl_on_extdown: Optional[bool] - - -class PMS(BaseModel): - pms_use_bif: Optional[bool] - pms_uuid: Optional[str] - pms_url: Optional[str] - pms_update_channel: Optional[str] - pms_update_distro: Optional[str] - pms_name: Optional[str] - pms_logs_folder: Optional[str] - pms_plexpass: Optional[int] +class IFTTTModel(BaseModel): + ifttt_on_stop: Optional[bool] = None + ifttt_on_pause: Optional[bool] = None + ifttt_key: Optional[str] = None + ifttt_on_concurrent: Optional[bool] = None + ifttt_on_created: Optional[bool] = None + ifttt_on_buffer: Optional[bool] = None + ifttt_enabled: Optional[bool] = None + ifttt_on_pmsupdate: Optional[bool] = None + ifttt_on_newdevice: Optional[bool] = None + ifttt_on_intdown: Optional[bool] = None + ifttt_on_extup: Optional[bool] = None + ifttt_on_intup: Optional[bool] = None + ifttt_on_resume: Optional[bool] = None + ifttt_on_watched: Optional[bool] = None + ifttt_event: Optional[str] = None + ifttt_on_extdown: Optional[bool] = None + ifttt_on_play: Optional[bool] = None + + +class GrowlModel(BaseModel): + growl_enabled: Optional[bool] = None + growl_on_play: Optional[bool] = None + growl_on_stop: Optional[bool] = None + growl_on_buffer: Optional[bool] = None + growl_on_pause: Optional[bool] = None + growl_on_intdown: Optional[bool] = None + growl_host: Optional[str] = None + growl_on_extup: Optional[bool] = None + growl_on_newdevice: Optional[bool] = None + growl_on_pmsupdate: Optional[bool] = None + growl_password: Optional[str] = None + growl_on_resume: Optional[bool] = None + growl_on_created: Optional[bool] = None + growl_on_concurrent: Optional[bool] = None + growl_on_watched: Optional[bool] = None + growl_on_intup: Optional[bool] = None + growl_on_extdown: Optional[bool] = None + + +class PMSModel(BaseModel): + pms_use_bif: Optional[bool] = None + pms_uuid: Optional[str] = None + pms_url: Optional[str] = None + pms_update_channel: Optional[str] = None + pms_update_distro: Optional[str] = None + pms_name: Optional[str] = None + pms_logs_folder: Optional[str] = None + pms_plexpass: Optional[int] = None pms_token: Optional[str] = None - pms_port: Optional[int] - pms_is_remote: Optional[int] - pms_identifier: Optional[str] - pms_ssl: Optional[int] - pms_version: Optional[str] - pms_update_distro_build: Optional[str] - pms_ip: Optional[str] - pms_logs_line_cap: Optional[str] - pms_platform: Optional[str] - pms_url_manual: Optional[int] - pms_web_url: Optional[str] - pms_is_cloud: Optional[int] - pms_url_override: Optional[str] - - -class Monitoring(BaseModel): - notify_upload_posters: Optional[str] - movie_notify_enable: Optional[bool] - notify_on_resume_body_text: Optional[str] - notify_on_pmsupdate_body_text: Optional[str] - refresh_libraries_on_startup: Optional[bool] - session_db_write_attempts: Optional[str] - notify_on_created_body_text: Optional[str] - buffer_wait: Optional[str] - notify_on_intup_subject_text: Optional[str] - notify_recently_added_grandparent: Optional[bool] - notify_on_newdevice_subject_text: Optional[str] - notify_on_extup_subject_text: Optional[str] - notify_on_watched_subject_text: Optional[str] - notify_on_pause_subject_text: Optional[str] - notify_on_extup_body_text: Optional[str] - notify_on_watched_body_text: Optional[str] - music_notify_on_pause: Optional[bool] - notify_on_start_body_text: Optional[str] - notify_on_pause_body_text: Optional[str] - notify_on_buffer_body_text: Optional[str] - music_notify_on_stop: Optional[bool] - tv_notify_on_stop: Optional[bool] - notify_on_stop_body_text: Optional[str] - notify_on_created_subject_text: Optional[str] - notify_on_extdown_body_text: Optional[str] - notify_scripts_args_text: Optional[str] - music_logging_enable: Optional[bool] - movie_notify_on_stop: Optional[bool] - notify_watched_percent: Optional[str] - notify_on_concurrent_subject_text: Optional[str] - notify_on_concurrent_body_text: Optional[str] - tv_logging_enable: Optional[bool] - tv_notify_enable: Optional[bool] - notify_recently_added_delay: Optional[str] - notify_on_intdown_body_text: Optional[str] - logging_ignore_interval: Optional[str] - notify_on_newdevice_body_text: Optional[str] - refresh_users_interval: Optional[str] - monitoring_use_websocket: Optional[bool] - monitor_pms_updates: Optional[bool] - notify_on_start_subject_text: Optional[str] - notify_recently_added: Optional[bool] - notify_on_pmsupdate_subject_text: Optional[str] - music_notify_enable: Optional[bool] - movie_notify_on_start: Optional[bool] - notify_concurrent_by_ip: Optional[bool] - refresh_users_on_startup: Optional[bool] - buffer_threshold: Optional[str] - notify_on_extdown_subject_text: Optional[str] - refresh_libraries_interval: Optional[str] - tv_notify_on_start: Optional[bool] - video_logging_enable: Optional[bool] - notify_on_resume_subject_text: Optional[str] - notify_concurrent_threshold: Optional[str] - notify_on_stop_subject_text: Optional[str] - movie_notify_on_pause: Optional[bool] - notify_consecutive: Optional[bool] - movie_logging_enable: Optional[bool] - notify_on_intup_body_text: Optional[str] - notify_on_intdown_subject_text: Optional[str] - music_notify_on_start: Optional[bool] - tv_notify_on_pause: Optional[bool] - monitor_remote_access: Optional[bool] - imgur_client_id: Optional[str] - monitoring_interval: Optional[str] - notify_on_buffer_subject_text: Optional[str] - tv_watched_percent: Optional[str] - notify_group_recently_added_grandparent: Optional[bool] - notify_recently_added_upgrade: Optional[bool] - notify_group_recently_added: Optional[bool] - notify_group_recently_added_parent: Optional[bool] - movie_watched_percent: Optional[str] - music_watched_percent: Optional[str] - notify_continued_session_threshold: Optional[str] - notify_remote_access_threshold: Optional[str] - notify_new_device_initial_only: Optional[bool] - - -class GetFileSizesHold(BaseModel): - section_ids: Optional[List] - rating_keys: Optional[List] - - -class General(BaseModel): - week_start_monday: Optional[bool] - git_token: Optional[str] - home_stats_cards: Optional[List[str]] - backup_interval: Optional[str] - graph_days: Optional[str] - graph_type: Optional[str] - get_file_sizes: Optional[bool] - http_basic_auth: Optional[bool] - api_sql: Optional[bool] - http_root: Optional[str] - http_proxy: Optional[bool] - freeze_db: Optional[bool] - ip_logging_enable: Optional[bool] - launch_browser: Optional[bool] - http_username: Optional[str] - https_create_cert: Optional[bool] - do_not_override_git_branch: Optional[bool] - home_stats_length: Optional[str] - http_host: Optional[str] - first_run_complete: Optional[bool] - enable_https: Optional[bool] - check_github: Optional[bool] - api_enabled: Optional[bool] - git_path: Optional[str] - update_labels: Optional[bool] - config_version: Optional[str] - check_github_interval: Optional[str] - https_ip: Optional[str] - group_history_tables: Optional[bool] - https_domain: Optional[str] - graph_tab: Optional[str] - geoip_db: Optional[str] - http_password: Optional[str] - home_stats_count: Optional[str] - backup_dir: Optional[str] - git_user: Optional[str] - interface: Optional[str] - cache_images: Optional[bool] - log_blacklist: Optional[bool] - graph_months: Optional[str] - cleanup_files: Optional[bool] - check_github_on_startup: Optional[bool] - http_port: Optional[str] - log_dir: Optional[str] - update_db_interval: Optional[str] - allow_guest_access: Optional[bool] - time_format: Optional[str] - cache_dir: Optional[str] - home_sections: Optional[List[str]] - backup_days: Optional[str] - https_cert: Optional[str] - api_key: Optional[str] - update_section_ids: Optional[bool] - date_format: Optional[str] - home_stats_type: Optional[bool] - http_environment: Optional[str] - history_table_activity: Optional[bool] - https_key: Optional[str] - http_hash_password: Optional[bool] - home_library_cards: Optional[List[str]] - http_hashed_password: Optional[bool] - git_branch: Optional[str] - anon_redirect: Optional[str] - http_plex_admin: Optional[bool] - update_show_changelog: Optional[int] - show_advanced_settings: Optional[bool] - git_remote: Optional[str] - https_cert_chain: Optional[str] - git_repo: Optional[str] - home_stats_recently_added_count: Optional[str] - themoviedb_apikey: Optional[str] - tvmaze_lookup: Optional[bool] - update_notifiers_db: Optional[bool] - themoviedb_lookup: Optional[bool] - plexpy_auto_update: Optional[bool] - update_libraries_db_notify: Optional[bool] - home_refresh_interval: Optional[str] - http_base_url: Optional[str] - win_sys_tray: Optional[bool] - musicbrainz_lookup: Optional[bool] - geoip_db_update_days: Optional[str] - maxmind_license_key: Optional[str] - geoip_db_installed: Optional[bool] - launch_startup: Optional[bool] - sys_tray_icon: Optional[bool] - export_dir: Optional[str] - http_rate_limit_attempts: Optional[str] - http_rate_limit_attempts_interval: Optional[str] - http_rate_limit_lockout_time: Optional[str] - get_file_sizes_hold: Optional[GetFileSizesHold] - interface_list: Optional[List[str]] - - -class Slack(BaseModel): - slack_on_stop: Optional[bool] - slack_icon_emoji: Optional[str] - slack_on_watched: Optional[bool] - slack_on_extup: Optional[bool] - slack_on_resume: Optional[bool] - slack_hook: Optional[str] - slack_incl_subject: Optional[bool] - slack_on_pmsupdate: Optional[bool] - slack_channel: Optional[str] - slack_on_buffer: Optional[bool] - slack_on_extdown: Optional[bool] - slack_username: Optional[str] - slack_incl_pmslink: Optional[bool] - slack_enabled: Optional[bool] - slack_incl_poster: Optional[bool] - slack_on_pause: Optional[bool] - slack_on_concurrent: Optional[bool] - slack_on_intup: Optional[bool] - slack_on_intdown: Optional[bool] - slack_on_play: Optional[bool] - slack_on_created: Optional[bool] - slack_on_newdevice: Optional[bool] - - -class Boxcar(BaseModel): - boxcar_sound: Optional[str] - boxcar_on_newdevice: Optional[bool] - boxcar_on_watched: Optional[bool] - boxcar_on_buffer: Optional[bool] - boxcar_on_stop: Optional[bool] - boxcar_on_extdown: Optional[bool] - boxcar_on_pmsupdate: Optional[bool] - boxcar_on_intdown: Optional[bool] - boxcar_on_pause: Optional[bool] - boxcar_on_play: Optional[bool] - boxcar_on_created: Optional[bool] - boxcar_on_intup: Optional[bool] - boxcar_on_resume: Optional[bool] - boxcar_on_concurrent: Optional[bool] - boxcar_enabled: Optional[bool] - boxcar_on_extup: Optional[bool] - boxcar_token: Optional[str] - - -class PushBullet(BaseModel): - pushbullet_on_play: Optional[bool] - pushbullet_channel_tag: Optional[str] - pushbullet_on_buffer: Optional[bool] - pushbullet_apikey: Optional[str] - pushbullet_on_resume: Optional[bool] - pushbullet_on_concurrent: Optional[bool] - pushbullet_on_created: Optional[bool] - pushbullet_on_pause: Optional[bool] - pushbullet_on_extdown: Optional[bool] - pushbullet_on_stop: Optional[bool] - pushbullet_on_extup: Optional[bool] - pushbullet_on_pmsupdate: Optional[bool] - pushbullet_enabled: Optional[bool] - pushbullet_on_watched: Optional[bool] - pushbullet_on_intdown: Optional[bool] - pushbullet_deviceid: Optional[str] - pushbullet_on_intup: Optional[bool] - pushbullet_on_newdevice: Optional[bool] - - -class Scripts(BaseModel): - scripts_on_newdevice: Optional[bool] - scripts_on_stop: Optional[bool] - scripts_on_intdown_script: Optional[str] - scripts_on_newdevice_script: Optional[str] - scripts_folder: Optional[str] - scripts_on_pmsupdate: Optional[bool] - scripts_on_buffer: Optional[bool] - scripts_on_concurrent: Optional[bool] - scripts_on_intup_script: Optional[str] - scripts_on_intdown: Optional[bool] - scripts_on_resume: Optional[bool] - scripts_on_extdown_script: Optional[str] - scripts_on_extup: Optional[bool] - scripts_on_play_script: Optional[str] - scripts_on_created_script: Optional[str] - scripts_on_pmsupdate_script: Optional[str] - scripts_on_resume_script: Optional[str] - scripts_on_stop_script: Optional[str] - scripts_on_watched_script: Optional[str] - scripts_enabled: Optional[bool] - scripts_on_extup_script: Optional[str] - scripts_on_extdown: Optional[bool] - scripts_on_created: Optional[bool] - scripts_on_concurrent_script: Optional[str] - scripts_on_pause_script: Optional[str] - scripts_on_pause: Optional[bool] - scripts_on_intup: Optional[bool] - scripts_timeout: Optional[str] - scripts_on_watched: Optional[bool] - scripts_on_buffer_script: Optional[str] - scripts_on_play: Optional[bool] - - -class NMA(BaseModel): - nma_on_pmsupdate: Optional[bool] - nma_priority: Optional[bool] - nma_on_intdown: Optional[bool] - nma_on_buffer: Optional[bool] - nma_on_play: Optional[bool] - nma_on_newdevice: Optional[bool] - nma_on_resume: Optional[bool] - nma_on_concurrent: Optional[bool] - nma_on_watched: Optional[bool] - nma_apikey: Optional[str] - nma_on_intup: Optional[bool] - nma_on_stop: Optional[bool] - nma_on_created: Optional[bool] - nma_on_pause: Optional[bool] - nma_enabled: Optional[bool] - nma_on_extdown: Optional[bool] - nma_on_extup: Optional[bool] - - -class Hipchat(BaseModel): - hipchat_emoticon: Optional[str] - hipchat_incl_subject: Optional[bool] - hipchat_on_extdown: Optional[bool] - hipchat_on_intup: Optional[bool] - hipchat_enabled: Optional[bool] - hipchat_on_created: Optional[bool] - hipchat_on_newdevice: Optional[bool] - hipchat_on_play: Optional[bool] - hipchat_on_resume: Optional[bool] - hipchat_on_buffer: Optional[bool] - hipchat_incl_poster: Optional[bool] - hipchat_on_watched: Optional[bool] - hipchat_color: Optional[str] - hipchat_on_concurrent: Optional[bool] - hipchat_url: Optional[str] - hipchat_on_pmsupdate: Optional[bool] - hipchat_on_extup: Optional[bool] - hipchat_incl_pmslink: Optional[bool] - hipchat_on_pause: Optional[bool] - hipchat_on_intdown: Optional[bool] - hipchat_on_stop: Optional[bool] - - -class Pushalot(BaseModel): - pushalot_apikey: Optional[str] - pushalot_on_pmsupdate: Optional[bool] - pushalot_enabled: Optional[bool] - pushalot_on_extdown: Optional[bool] - pushalot_on_created: Optional[bool] - pushalot_on_pause: Optional[bool] - pushalot_on_stop: Optional[bool] - pushalot_on_buffer: Optional[bool] - pushalot_on_intup: Optional[bool] - pushalot_on_newdevice: Optional[bool] - pushalot_on_concurrent: Optional[bool] - pushalot_on_watched: Optional[bool] - pushalot_on_play: Optional[bool] - pushalot_on_extup: Optional[bool] - pushalot_on_intdown: Optional[bool] - pushalot_on_resume: Optional[bool] - - -class Prowl(BaseModel): - prowl_on_created: Optional[bool] - prowl_on_play: Optional[bool] - prowl_on_extdown: Optional[bool] - prowl_on_pause: Optional[bool] - prowl_on_intdown: Optional[bool] - prowl_on_intup: Optional[bool] - prowl_enabled: Optional[bool] - prowl_priority: Optional[bool] - prowl_on_pmsupdate: Optional[bool] - prowl_on_newdevice: Optional[bool] - prowl_on_extup: Optional[bool] - prowl_on_watched: Optional[bool] - prowl_on_buffer: Optional[bool] - prowl_on_resume: Optional[bool] - prowl_on_stop: Optional[bool] - prowl_on_concurrent: Optional[bool] - prowl_keys: Optional[str] - - -class Advanced(BaseModel): - verify_ssl_cert: Optional[bool] - journal_mode: Optional[str] - pms_timeout: Optional[str] - cache_sizemb: Optional[str] - session_db_write_attempts: Optional[str] - system_analytics: Optional[bool] - notification_threads: Optional[str] - remote_access_ping_threshold: Optional[str] - websocket_connection_timeout: Optional[str] - config_version: Optional[str] - metadata_cache_seconds: Optional[str] - websocket_connection_attempts: Optional[str] - jwt_secret: Optional[str] - websocket_monitor_ping_pong: Optional[bool] - synchronous_mode: Optional[str] - pms_update_check_interval: Optional[str] - jwt_update_secret: Optional[bool] - verbose_logs: Optional[bool] - add_live_tv_library: Optional[bool] - remote_access_ping_interval: Optional[str] - check_github_cache_seconds: Optional[str] - export_threads: Optional[str] - - -class Facebook(BaseModel): - facebook_app_secret: Optional[str] - facebook_on_stop: Optional[bool] - facebook_token: Optional[str] - facebook_on_buffer: Optional[bool] - facebook_on_play: Optional[bool] - facebook_enabled: Optional[bool] - facebook_on_intup: Optional[bool] - facebook_incl_poster: Optional[bool] - facebook_on_pmsupdate: Optional[bool] - facebook_on_intdown: Optional[bool] - facebook_on_extup: Optional[bool] - facebook_on_resume: Optional[bool] - facebook_on_concurrent: Optional[bool] - facebook_on_extdown: Optional[bool] - facebook_group: Optional[str] - facebook_on_pause: Optional[bool] - facebook_app_id: Optional[str] - facebook_incl_pmslink: Optional[bool] - facebook_on_newdevice: Optional[bool] - facebook_on_watched: Optional[bool] - facebook_redirect_uri: Optional[str] - facebook_incl_subject: Optional[bool] - facebook_on_created: Optional[bool] - - -class Email(BaseModel): - email_from_name: Optional[str] - email_bcc: Optional[str] - email_on_pause: Optional[bool] - email_smtp_password: Optional[str] - email_tls: Optional[bool] - email_smtp_port: Optional[str] - email_on_watched: Optional[bool] - email_smtp_server: Optional[str] - email_on_intdown: Optional[bool] - email_on_concurrent: Optional[bool] - email_on_intup: Optional[bool] - email_enabled: Optional[bool] - email_on_buffer: Optional[bool] - email_on_resume: Optional[bool] - email_smtp_user: Optional[str] - email_cc: Optional[str] - email_on_newdevice: Optional[bool] - email_on_stop: Optional[bool] - email_on_extdown: Optional[bool] - email_html_support: Optional[bool] - email_on_extup: Optional[bool] - email_on_created: Optional[bool] - email_on_pmsupdate: Optional[bool] - email_to: Optional[str] - email_from: Optional[str] - email_on_play: Optional[bool] - - -class OSXNotify(BaseModel): - osx_notify_on_intdown: Optional[bool] - osx_notify_on_buffer: Optional[bool] - osx_notify_app: Optional[str] - osx_notify_on_created: Optional[bool] - osx_notify_on_pmsupdate: Optional[bool] - osx_notify_on_stop: Optional[bool] - osx_notify_enabled: Optional[bool] - osx_notify_on_intup: Optional[bool] - osx_notify_on_watched: Optional[bool] - osx_notify_on_pause: Optional[bool] - osx_notify_on_concurrent: Optional[bool] - osx_notify_on_newdevice: Optional[bool] - osx_notify_on_play: Optional[bool] - osx_notify_on_extdown: Optional[bool] - osx_notify_on_extup: Optional[bool] - osx_notify_on_resume: Optional[bool] - - -class PlexWatch(BaseModel): - grouping_user_history: Optional[bool] - plexwatch_database: Optional[str] - grouping_global_history: Optional[bool] - grouping_charts: Optional[bool] - - -class Pushover(BaseModel): - pushover_enabled: Optional[bool] - pushover_on_extup: Optional[bool] - pushover_on_intup: Optional[bool] - pushover_on_buffer: Optional[bool] - pushover_html_support: Optional[bool] - pushover_keys: Optional[str] - pushover_incl_url: Optional[bool] - pushover_on_pause: Optional[bool] - pushover_on_play: Optional[bool] - pushover_on_stop: Optional[bool] - pushover_apitoken: Optional[str] - pushover_incl_pmslink: Optional[bool] - pushover_on_pmsupdate: Optional[bool] - pushover_on_extdown: Optional[bool] - pushover_priority: Optional[bool] - pushover_on_intdown: Optional[bool] - pushover_on_newdevice: Optional[bool] - pushover_sound: Optional[str] - pushover_on_created: Optional[bool] - pushover_on_resume: Optional[bool] - pushover_on_concurrent: Optional[bool] - pushover_on_watched: Optional[bool] - - -class Telegram(BaseModel): - telegram_on_buffer: Optional[bool] - telegram_bot_token: Optional[str] - telegram_incl_poster: Optional[bool] - telegram_on_resume: Optional[bool] - telegram_on_pmsupdate: Optional[bool] - telegram_html_support: Optional[bool] - telegram_on_created: Optional[bool] - telegram_incl_subject: Optional[bool] - telegram_disable_web_preview: Optional[bool] - telegram_enabled: Optional[bool] - telegram_on_concurrent: Optional[bool] - telegram_on_intdown: Optional[bool] - telegram_on_extdown: Optional[bool] - telegram_on_pause: Optional[bool] - telegram_on_newdevice: Optional[bool] - telegram_on_watched: Optional[bool] - telegram_on_stop: Optional[bool] - telegram_on_play: Optional[bool] - telegram_on_extup: Optional[bool] - telegram_chat_id: Optional[str] - telegram_on_intup: Optional[bool] - - -class Twitter(BaseModel): - twitter_on_resume: Optional[bool] - twitter_on_pmsupdate: Optional[bool] - twitter_on_buffer: Optional[bool] - twitter_on_concurrent: Optional[bool] - twitter_enabled: Optional[bool] - twitter_on_watched: Optional[bool] - twitter_consumer_secret: Optional[str] - twitter_on_extup: Optional[bool] - twitter_on_intdown: Optional[bool] - twitter_on_intup: Optional[bool] - twitter_access_token_secret: Optional[str] - twitter_on_newdevice: Optional[bool] - twitter_on_stop: Optional[bool] - twitter_consumer_key: Optional[str] - twitter_access_token: Optional[str] - twitter_incl_subject: Optional[bool] - twitter_on_extdown: Optional[bool] - twitter_on_pause: Optional[bool] - twitter_on_play: Optional[bool] - twitter_incl_poster: Optional[bool] - twitter_on_created: Optional[bool] - - -class Plex(BaseModel): - plex_on_created: Optional[bool] - plex_on_concurrent: Optional[bool] - plex_client_host: Optional[str] - plex_on_stop: Optional[bool] - plex_on_resume: Optional[bool] - plex_on_watched: Optional[bool] - plex_on_play: Optional[bool] - plex_on_extdown: Optional[bool] - plex_on_intdown: Optional[bool] - plex_on_newdevice: Optional[bool] - plex_enabled: Optional[bool] - plex_on_buffer: Optional[bool] - plex_on_intup: Optional[bool] - plex_on_pmsupdate: Optional[bool] - plex_username: Optional[str] - plex_on_pause: Optional[bool] - plex_password: Optional[str] - plex_on_extup: Optional[bool] - - -class Join(BaseModel): - join_on_concurrent: Optional[bool] - join_on_newdevice: Optional[bool] - join_deviceid: Optional[str] - join_on_play: Optional[bool] - join_on_watched: Optional[bool] - join_on_resume: Optional[bool] - join_on_created: Optional[bool] - join_on_extdown: Optional[bool] - join_on_intup: Optional[bool] - join_on_buffer: Optional[bool] - join_incl_subject: Optional[bool] - join_enabled: Optional[bool] - join_on_pause: Optional[bool] - join_apikey: Optional[str] - join_on_pmsupdate: Optional[bool] - join_on_intdown: Optional[bool] - join_on_extup: Optional[bool] - join_on_stop: Optional[bool] - - -class XBMC(BaseModel): - xbmc_password: Optional[str] - xbmc_on_play: Optional[bool] - xbmc_on_pause: Optional[bool] - xbmc_username: Optional[str] - xbmc_on_extup: Optional[bool] - xbmc_on_watched: Optional[bool] - xbmc_on_buffer: Optional[bool] - xbmc_enabled: Optional[bool] - xbmc_host: Optional[str] - xbmc_on_created: Optional[bool] - xbmc_on_intup: Optional[bool] - xbmc_on_extdown: Optional[bool] - xbmc_on_pmsupdate: Optional[bool] - xbmc_on_stop: Optional[bool] - xbmc_on_newdevice: Optional[bool] - xbmc_on_resume: Optional[bool] - xbmc_on_intdown: Optional[bool] - xbmc_on_concurrent: Optional[bool] - - -class Browser(BaseModel): - browser_on_intdown: Optional[bool] - browser_on_newdevice: Optional[bool] - browser_on_pmsupdate: Optional[bool] - browser_on_intup: Optional[bool] - browser_on_buffer: Optional[bool] - browser_auto_hide_delay: Optional[str] - browser_on_created: Optional[bool] - browser_on_pause: Optional[bool] - browser_on_stop: Optional[bool] - browser_on_play: Optional[bool] - browser_on_watched: Optional[bool] - browser_on_extdown: Optional[bool] - browser_on_extup: Optional[bool] - browser_on_resume: Optional[bool] - browser_on_concurrent: Optional[bool] - browser_enabled: Optional[bool] - - -class Newsletter(BaseModel): - newsletter_dir: Optional[str] - newsletter_templates: Optional[str] - newsletter_self_hosted: Optional[bool] - newsletter_static_url: Optional[bool] - newsletter_inline_styles: Optional[bool] - newsletter_password: Optional[str] - newsletter_custom_dir: Optional[str] - newsletter_auth: Optional[bool] - - -class Cloudinary(BaseModel): - cloudinary_api_key: Optional[str] - cloudinary_cloud_name: Optional[str] - cloudinary_api_secret: Optional[str] - - -class Settings(BaseModel): - IFTTT: Optional[IFTTT] - Growl: Optional[Growl] - PMS: Optional[PMS] - Monitoring: Optional[Monitoring] - General: Optional[General] - Slack: Optional[Slack] - Boxcar: Optional[Boxcar] - PushBullet: Optional[PushBullet] - Scripts: Optional[Scripts] - NMA: Optional[NMA] - Hipchat: Optional[Hipchat] - Pushalot: Optional[Pushalot] - Prowl: Optional[Prowl] - Advanced: Optional[Advanced] - Facebook: Optional[Facebook] - Email: Optional[Email] - OSX_Notify: Optional[OSXNotify] - PlexWatch: Optional[PlexWatch] - Pushover: Optional[Pushover] - Telegram: Optional[Telegram] - Twitter: Optional[Twitter] - Plex: Optional[Plex] - Join: Optional[Join] - XBMC: Optional[XBMC] - Browser: Optional[Browser] - Newsletter: Optional[Newsletter] - Cloudinary: Optional[Cloudinary] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: Settings - - -class Model(BaseModel): - response: Response + pms_port: Optional[int] = None + pms_is_remote: Optional[int] = None + pms_identifier: Optional[str] = None + pms_ssl: Optional[int] = None + pms_version: Optional[str] = None + pms_update_distro_build: Optional[str] = None + pms_ip: Optional[str] = None + pms_logs_line_cap: Optional[int] = None + pms_platform: Optional[str] = None + pms_url_manual: Optional[int] = None + pms_web_url: Optional[str] = None + pms_is_cloud: Optional[int] = None + pms_url_override: Optional[str] = None + + +class MonitoringModel(BaseModel): + notify_upload_posters: Optional[int] = None + movie_notify_enable: Optional[bool] = None + notify_on_resume_body_text: Optional[str] = None + notify_on_pmsupdate_body_text: Optional[str] = None + refresh_libraries_on_startup: Optional[bool] = None + session_db_write_attempts: Optional[int] = None + notify_on_created_body_text: Optional[str] = None + buffer_wait: Optional[int] = None + notify_on_intup_subject_text: Optional[str] = None + notify_recently_added_grandparent: Optional[bool] = None + notify_on_newdevice_subject_text: Optional[str] = None + notify_on_extup_subject_text: Optional[str] = None + notify_on_watched_subject_text: Optional[str] = None + notify_on_pause_subject_text: Optional[str] = None + notify_on_extup_body_text: Optional[str] = None + notify_on_watched_body_text: Optional[str] = None + music_notify_on_pause: Optional[bool] = None + notify_on_start_body_text: Optional[str] = None + notify_on_pause_body_text: Optional[str] = None + notify_on_buffer_body_text: Optional[str] = None + music_notify_on_stop: Optional[bool] = None + tv_notify_on_stop: Optional[bool] = None + notify_on_stop_body_text: Optional[str] = None + notify_on_created_subject_text: Optional[str] = None + notify_on_extdown_body_text: Optional[str] = None + notify_scripts_args_text: Optional[str] = None + music_logging_enable: Optional[bool] = None + movie_notify_on_stop: Optional[bool] = None + notify_watched_percent: Optional[int] = None + notify_on_concurrent_subject_text: Optional[str] = None + notify_on_concurrent_body_text: Optional[str] = None + tv_logging_enable: Optional[bool] = None + tv_notify_enable: Optional[bool] = None + notify_recently_added_delay: Optional[int] = None + notify_on_intdown_body_text: Optional[str] = None + logging_ignore_interval: Optional[int] = None + notify_on_newdevice_body_text: Optional[str] = None + refresh_users_interval: Optional[int] = None + monitoring_use_websocket: Optional[bool] = None + monitor_pms_updates: Optional[bool] = None + notify_on_start_subject_text: Optional[str] = None + notify_recently_added: Optional[bool] = None + notify_on_pmsupdate_subject_text: Optional[str] = None + music_notify_enable: Optional[bool] = None + movie_notify_on_start: Optional[bool] = None + notify_concurrent_by_ip: Optional[bool] = None + refresh_users_on_startup: Optional[bool] = None + buffer_threshold: Optional[int] = None + notify_on_extdown_subject_text: Optional[str] = None + refresh_libraries_interval: Optional[int] = None + tv_notify_on_start: Optional[bool] = None + video_logging_enable: Optional[bool] = None + notify_on_resume_subject_text: Optional[str] = None + notify_concurrent_threshold: Optional[int] = None + notify_on_stop_subject_text: Optional[str] = None + movie_notify_on_pause: Optional[bool] = None + notify_consecutive: Optional[bool] = None + movie_logging_enable: Optional[bool] = None + notify_on_intup_body_text: Optional[str] = None + notify_on_intdown_subject_text: Optional[str] = None + music_notify_on_start: Optional[bool] = None + tv_notify_on_pause: Optional[bool] = None + monitor_remote_access: Optional[bool] = None + imgur_client_id: Optional[str] = None + monitoring_interval: Optional[int] = None + notify_on_buffer_subject_text: Optional[str] = None + tv_watched_percent: Optional[int] = None + notify_group_recently_added_grandparent: Optional[bool] = None + notify_recently_added_upgrade: Optional[bool] = None + notify_group_recently_added: Optional[bool] = None + notify_group_recently_added_parent: Optional[bool] = None + movie_watched_percent: Optional[int] = None + music_watched_percent: Optional[int] = None + notify_continued_session_threshold: Optional[int] = None + notify_remote_access_threshold: Optional[int] = None + notify_new_device_initial_only: Optional[bool] = None + + +class GetFileSizesHoldModel(BaseModel): + section_ids: Optional[List] = None + rating_keys: Optional[List] = None + + +class GeneralModel(BaseModel): + week_start_monday: Optional[bool] = None + git_token: Optional[str] = None + home_stats_cards: Optional[List[str]] = None + backup_interval: Optional[int] = None + graph_days: Optional[int] = None + graph_type: Optional[str] = None + get_file_sizes: Optional[bool] = None + http_basic_auth: Optional[bool] = None + api_sql: Optional[bool] = None + http_root: Optional[str] = None + http_proxy: Optional[bool] = None + freeze_db: Optional[bool] = None + ip_logging_enable: Optional[bool] = None + launch_browser: Optional[bool] = None + http_username: Optional[str] = None + https_create_cert: Optional[bool] = None + do_not_override_git_branch: Optional[bool] = None + home_stats_length: Optional[str] = None + http_host: Optional[str] = None + first_run_complete: Optional[bool] = None + enable_https: Optional[bool] = None + check_github: Optional[bool] = None + api_enabled: Optional[bool] = None + git_path: Optional[str] = None + update_labels: Optional[bool] = None + config_version: Optional[str] = None + check_github_interval: Optional[int] = None + https_ip: Optional[str] = None + group_history_tables: Optional[bool] = None + https_domain: Optional[str] = None + graph_tab: Optional[str] = None + geoip_db: Optional[str] = None + http_password: Optional[str] = None + home_stats_count: Optional[str] = None + backup_dir: Optional[str] = None + git_user: Optional[str] = None + interface: Optional[str] = None + cache_images: Optional[bool] = None + log_blacklist: Optional[bool] = None + graph_months: Optional[str] = None + cleanup_files: Optional[bool] = None + check_github_on_startup: Optional[bool] = None + http_port: Optional[int] = None + log_dir: Optional[str] = None + update_db_interval: Optional[int] = None + allow_guest_access: Optional[bool] = None + time_format: Optional[str] = None + cache_dir: Optional[str] = None + home_sections: Optional[List[str]] = None + backup_days: Optional[int] = None + https_cert: Optional[str] = None + api_key: Optional[str] = None + update_section_ids: Optional[bool] = None + date_format: Optional[str] = None + home_stats_type: Optional[bool] = None + http_environment: Optional[str] = None + history_table_activity: Optional[bool] = None + https_key: Optional[str] = None + http_hash_password: Optional[bool] = None + home_library_cards: Optional[List[str]] = None + http_hashed_password: Optional[bool] = None + git_branch: Optional[str] = None + anon_redirect: Optional[str] = None + http_plex_admin: Optional[bool] = None + update_show_changelog: Optional[int] = None + show_advanced_settings: Optional[bool] = None + git_remote: Optional[str] = None + https_cert_chain: Optional[str] = None + git_repo: Optional[str] = None + home_stats_recently_added_count: Optional[str] = None + themoviedb_apikey: Optional[str] = None + tvmaze_lookup: Optional[bool] = None + update_notifiers_db: Optional[bool] = None + themoviedb_lookup: Optional[bool] = None + plexpy_auto_update: Optional[bool] = None + update_libraries_db_notify: Optional[bool] = None + home_refresh_interval: Optional[int] = None + http_base_url: Optional[str] = None + win_sys_tray: Optional[bool] = None + musicbrainz_lookup: Optional[bool] = None + geoip_db_update_days: Optional[int] = None + maxmind_license_key: Optional[str] = None + geoip_db_installed: Optional[bool] = None + launch_startup: Optional[bool] = None + sys_tray_icon: Optional[bool] = None + export_dir: Optional[str] = None + http_rate_limit_attempts: Optional[int] = None + http_rate_limit_attempts_interval: Optional[int] = None + http_rate_limit_lockout_time: Optional[int] = None + get_file_sizes_hold: Optional[GetFileSizesHoldModel] = None + interface_list: Optional[List[str]] = None + + +class SlackModel(BaseModel): + slack_on_stop: Optional[bool] = None + slack_icon_emoji: Optional[str] = None + slack_on_watched: Optional[bool] = None + slack_on_extup: Optional[bool] = None + slack_on_resume: Optional[bool] = None + slack_hook: Optional[str] = None + slack_incl_subject: Optional[bool] = None + slack_on_pmsupdate: Optional[bool] = None + slack_channel: Optional[str] = None + slack_on_buffer: Optional[bool] = None + slack_on_extdown: Optional[bool] = None + slack_username: Optional[str] = None + slack_incl_pmslink: Optional[bool] = None + slack_enabled: Optional[bool] = None + slack_incl_poster: Optional[bool] = None + slack_on_pause: Optional[bool] = None + slack_on_concurrent: Optional[bool] = None + slack_on_intup: Optional[bool] = None + slack_on_intdown: Optional[bool] = None + slack_on_play: Optional[bool] = None + slack_on_created: Optional[bool] = None + slack_on_newdevice: Optional[bool] = None + + +class BoxcarModel(BaseModel): + boxcar_sound: Optional[str] = None + boxcar_on_newdevice: Optional[bool] = None + boxcar_on_watched: Optional[bool] = None + boxcar_on_buffer: Optional[bool] = None + boxcar_on_stop: Optional[bool] = None + boxcar_on_extdown: Optional[bool] = None + boxcar_on_pmsupdate: Optional[bool] = None + boxcar_on_intdown: Optional[bool] = None + boxcar_on_pause: Optional[bool] = None + boxcar_on_play: Optional[bool] = None + boxcar_on_created: Optional[bool] = None + boxcar_on_intup: Optional[bool] = None + boxcar_on_resume: Optional[bool] = None + boxcar_on_concurrent: Optional[bool] = None + boxcar_enabled: Optional[bool] = None + boxcar_on_extup: Optional[bool] = None + boxcar_token: Optional[str] = None + + +class PushBulletModel(BaseModel): + pushbullet_on_play: Optional[bool] = None + pushbullet_channel_tag: Optional[str] = None + pushbullet_on_buffer: Optional[bool] = None + pushbullet_apikey: Optional[str] = None + pushbullet_on_resume: Optional[bool] = None + pushbullet_on_concurrent: Optional[bool] = None + pushbullet_on_created: Optional[bool] = None + pushbullet_on_pause: Optional[bool] = None + pushbullet_on_extdown: Optional[bool] = None + pushbullet_on_stop: Optional[bool] = None + pushbullet_on_extup: Optional[bool] = None + pushbullet_on_pmsupdate: Optional[bool] = None + pushbullet_enabled: Optional[bool] = None + pushbullet_on_watched: Optional[bool] = None + pushbullet_on_intdown: Optional[bool] = None + pushbullet_deviceid: Optional[str] = None + pushbullet_on_intup: Optional[bool] = None + pushbullet_on_newdevice: Optional[bool] = None + + +class ScriptsModel(BaseModel): + scripts_on_newdevice: Optional[bool] = None + scripts_on_stop: Optional[bool] = None + scripts_on_intdown_script: Optional[str] = None + scripts_on_newdevice_script: Optional[str] = None + scripts_folder: Optional[str] = None + scripts_on_pmsupdate: Optional[bool] = None + scripts_on_buffer: Optional[bool] = None + scripts_on_concurrent: Optional[bool] = None + scripts_on_intup_script: Optional[str] = None + scripts_on_intdown: Optional[bool] = None + scripts_on_resume: Optional[bool] = None + scripts_on_extdown_script: Optional[str] = None + scripts_on_extup: Optional[bool] = None + scripts_on_play_script: Optional[str] = None + scripts_on_created_script: Optional[str] = None + scripts_on_pmsupdate_script: Optional[str] = None + scripts_on_resume_script: Optional[str] = None + scripts_on_stop_script: Optional[str] = None + scripts_on_watched_script: Optional[str] = None + scripts_enabled: Optional[bool] = None + scripts_on_extup_script: Optional[str] = None + scripts_on_extdown: Optional[bool] = None + scripts_on_created: Optional[bool] = None + scripts_on_concurrent_script: Optional[str] = None + scripts_on_pause_script: Optional[str] = None + scripts_on_pause: Optional[bool] = None + scripts_on_intup: Optional[bool] = None + scripts_timeout: Optional[int] = None + scripts_on_watched: Optional[bool] = None + scripts_on_buffer_script: Optional[str] = None + scripts_on_play: Optional[bool] = None + + +class NMAModel(BaseModel): + nma_on_pmsupdate: Optional[bool] = None + nma_priority: Optional[bool] = None + nma_on_intdown: Optional[bool] = None + nma_on_buffer: Optional[bool] = None + nma_on_play: Optional[bool] = None + nma_on_newdevice: Optional[bool] = None + nma_on_resume: Optional[bool] = None + nma_on_concurrent: Optional[bool] = None + nma_on_watched: Optional[bool] = None + nma_apikey: Optional[str] = None + nma_on_intup: Optional[bool] = None + nma_on_stop: Optional[bool] = None + nma_on_created: Optional[bool] = None + nma_on_pause: Optional[bool] = None + nma_enabled: Optional[bool] = None + nma_on_extdown: Optional[bool] = None + nma_on_extup: Optional[bool] = None + + +class HipchatModel(BaseModel): + hipchat_emoticon: Optional[str] = None + hipchat_incl_subject: Optional[bool] = None + hipchat_on_extdown: Optional[bool] = None + hipchat_on_intup: Optional[bool] = None + hipchat_enabled: Optional[bool] = None + hipchat_on_created: Optional[bool] = None + hipchat_on_newdevice: Optional[bool] = None + hipchat_on_play: Optional[bool] = None + hipchat_on_resume: Optional[bool] = None + hipchat_on_buffer: Optional[bool] = None + hipchat_incl_poster: Optional[bool] = None + hipchat_on_watched: Optional[bool] = None + hipchat_color: Optional[str] = None + hipchat_on_concurrent: Optional[bool] = None + hipchat_url: Optional[str] = None + hipchat_on_pmsupdate: Optional[bool] = None + hipchat_on_extup: Optional[bool] = None + hipchat_incl_pmslink: Optional[bool] = None + hipchat_on_pause: Optional[bool] = None + hipchat_on_intdown: Optional[bool] = None + hipchat_on_stop: Optional[bool] = None + + +class PushalotModel(BaseModel): + pushalot_apikey: Optional[str] = None + pushalot_on_pmsupdate: Optional[bool] = None + pushalot_enabled: Optional[bool] = None + pushalot_on_extdown: Optional[bool] = None + pushalot_on_created: Optional[bool] = None + pushalot_on_pause: Optional[bool] = None + pushalot_on_stop: Optional[bool] = None + pushalot_on_buffer: Optional[bool] = None + pushalot_on_intup: Optional[bool] = None + pushalot_on_newdevice: Optional[bool] = None + pushalot_on_concurrent: Optional[bool] = None + pushalot_on_watched: Optional[bool] = None + pushalot_on_play: Optional[bool] = None + pushalot_on_extup: Optional[bool] = None + pushalot_on_intdown: Optional[bool] = None + pushalot_on_resume: Optional[bool] = None + + +class ProwlModel(BaseModel): + prowl_on_created: Optional[bool] = None + prowl_on_play: Optional[bool] = None + prowl_on_extdown: Optional[bool] = None + prowl_on_pause: Optional[bool] = None + prowl_on_intdown: Optional[bool] = None + prowl_on_intup: Optional[bool] = None + prowl_enabled: Optional[bool] = None + prowl_priority: Optional[bool] = None + prowl_on_pmsupdate: Optional[bool] = None + prowl_on_newdevice: Optional[bool] = None + prowl_on_extup: Optional[bool] = None + prowl_on_watched: Optional[bool] = None + prowl_on_buffer: Optional[bool] = None + prowl_on_resume: Optional[bool] = None + prowl_on_stop: Optional[bool] = None + prowl_on_concurrent: Optional[bool] = None + prowl_keys: Optional[str] = None + + +class AdvancedModel(BaseModel): + verify_ssl_cert: Optional[bool] = None + journal_mode: Optional[str] = None + pms_timeout: Optional[int] = None + cache_sizemb: Optional[int] = None + session_db_write_attempts: Optional[int] = None + system_analytics: Optional[bool] = None + notification_threads: Optional[int] = None + remote_access_ping_threshold: Optional[int] = None + websocket_connection_timeout: Optional[int] = None + config_version: Optional[int] = None + metadata_cache_seconds: Optional[int] = None + websocket_connection_attempts: Optional[int] = None + jwt_secret: Optional[str] = None + websocket_monitor_ping_pong: Optional[bool] = None + synchronous_mode: Optional[str] = None + pms_update_check_interval: Optional[int] = None + jwt_update_secret: Optional[bool] = None + verbose_logs: Optional[bool] = None + add_live_tv_library: Optional[bool] = None + remote_access_ping_interval: Optional[int] = None + check_github_cache_seconds: Optional[int] = None + export_threads: Optional[int] = None + + +class FacebookModel(BaseModel): + facebook_app_secret: Optional[str] = None + facebook_on_stop: Optional[bool] = None + facebook_token: Optional[str] = None + facebook_on_buffer: Optional[bool] = None + facebook_on_play: Optional[bool] = None + facebook_enabled: Optional[bool] = None + facebook_on_intup: Optional[bool] = None + facebook_incl_poster: Optional[bool] = None + facebook_on_pmsupdate: Optional[bool] = None + facebook_on_intdown: Optional[bool] = None + facebook_on_extup: Optional[bool] = None + facebook_on_resume: Optional[bool] = None + facebook_on_concurrent: Optional[bool] = None + facebook_on_extdown: Optional[bool] = None + facebook_group: Optional[str] = None + facebook_on_pause: Optional[bool] = None + facebook_app_id: Optional[str] = None + facebook_incl_pmslink: Optional[bool] = None + facebook_on_newdevice: Optional[bool] = None + facebook_on_watched: Optional[bool] = None + facebook_redirect_uri: Optional[str] = None + facebook_incl_subject: Optional[bool] = None + facebook_on_created: Optional[bool] = None + + +class EmailModel(BaseModel): + email_from_name: Optional[str] = None + email_bcc: Optional[str] = None + email_on_pause: Optional[bool] = None + email_smtp_password: Optional[str] = None + email_tls: Optional[bool] = None + email_smtp_port: Optional[str] = None + email_on_watched: Optional[bool] = None + email_smtp_server: Optional[str] = None + email_on_intdown: Optional[bool] = None + email_on_concurrent: Optional[bool] = None + email_on_intup: Optional[bool] = None + email_enabled: Optional[bool] = None + email_on_buffer: Optional[bool] = None + email_on_resume: Optional[bool] = None + email_smtp_user: Optional[str] = None + email_cc: Optional[str] = None + email_on_newdevice: Optional[bool] = None + email_on_stop: Optional[bool] = None + email_on_extdown: Optional[bool] = None + email_html_support: Optional[bool] = None + email_on_extup: Optional[bool] = None + email_on_created: Optional[bool] = None + email_on_pmsupdate: Optional[bool] = None + email_to: Optional[str] = None + email_from: Optional[str] = None + email_on_play: Optional[bool] = None + + +class OSXNotifyModel(BaseModel): + osx_notify_on_intdown: Optional[bool] = None + osx_notify_on_buffer: Optional[bool] = None + osx_notify_app: Optional[str] = None + osx_notify_on_created: Optional[bool] = None + osx_notify_on_pmsupdate: Optional[bool] = None + osx_notify_on_stop: Optional[bool] = None + osx_notify_enabled: Optional[bool] = None + osx_notify_on_intup: Optional[bool] = None + osx_notify_on_watched: Optional[bool] = None + osx_notify_on_pause: Optional[bool] = None + osx_notify_on_concurrent: Optional[bool] = None + osx_notify_on_newdevice: Optional[bool] = None + osx_notify_on_play: Optional[bool] = None + osx_notify_on_extdown: Optional[bool] = None + osx_notify_on_extup: Optional[bool] = None + osx_notify_on_resume: Optional[bool] = None + + +class PlexWatchModel(BaseModel): + grouping_user_history: Optional[bool] = None + plexwatch_database: Optional[str] = None + grouping_global_history: Optional[bool] = None + grouping_charts: Optional[bool] = None + + +class PushoverModel(BaseModel): + pushover_enabled: Optional[bool] = None + pushover_on_extup: Optional[bool] = None + pushover_on_intup: Optional[bool] = None + pushover_on_buffer: Optional[bool] = None + pushover_html_support: Optional[bool] = None + pushover_keys: Optional[str] = None + pushover_incl_url: Optional[bool] = None + pushover_on_pause: Optional[bool] = None + pushover_on_play: Optional[bool] = None + pushover_on_stop: Optional[bool] = None + pushover_apitoken: Optional[str] = None + pushover_incl_pmslink: Optional[bool] = None + pushover_on_pmsupdate: Optional[bool] = None + pushover_on_extdown: Optional[bool] = None + pushover_priority: Optional[bool] = None + pushover_on_intdown: Optional[bool] = None + pushover_on_newdevice: Optional[bool] = None + pushover_sound: Optional[str] = None + pushover_on_created: Optional[bool] = None + pushover_on_resume: Optional[bool] = None + pushover_on_concurrent: Optional[bool] = None + pushover_on_watched: Optional[bool] = None + + +class TelegramModel(BaseModel): + telegram_on_buffer: Optional[bool] = None + telegram_bot_token: Optional[str] = None + telegram_incl_poster: Optional[bool] = None + telegram_on_resume: Optional[bool] = None + telegram_on_pmsupdate: Optional[bool] = None + telegram_html_support: Optional[bool] = None + telegram_on_created: Optional[bool] = None + telegram_incl_subject: Optional[bool] = None + telegram_disable_web_preview: Optional[bool] = None + telegram_enabled: Optional[bool] = None + telegram_on_concurrent: Optional[bool] = None + telegram_on_intdown: Optional[bool] = None + telegram_on_extdown: Optional[bool] = None + telegram_on_pause: Optional[bool] = None + telegram_on_newdevice: Optional[bool] = None + telegram_on_watched: Optional[bool] = None + telegram_on_stop: Optional[bool] = None + telegram_on_play: Optional[bool] = None + telegram_on_extup: Optional[bool] = None + telegram_chat_id: Optional[str] = None + telegram_on_intup: Optional[bool] = None + + +class TwitterModel(BaseModel): + twitter_on_resume: Optional[bool] = None + twitter_on_pmsupdate: Optional[bool] = None + twitter_on_buffer: Optional[bool] = None + twitter_on_concurrent: Optional[bool] = None + twitter_enabled: Optional[bool] = None + twitter_on_watched: Optional[bool] = None + twitter_consumer_secret: Optional[str] = None + twitter_on_extup: Optional[bool] = None + twitter_on_intdown: Optional[bool] = None + twitter_on_intup: Optional[bool] = None + twitter_access_token_secret: Optional[str] = None + twitter_on_newdevice: Optional[bool] = None + twitter_on_stop: Optional[bool] = None + twitter_consumer_key: Optional[str] = None + twitter_access_token: Optional[str] = None + twitter_incl_subject: Optional[bool] = None + twitter_on_extdown: Optional[bool] = None + twitter_on_pause: Optional[bool] = None + twitter_on_play: Optional[bool] = None + twitter_incl_poster: Optional[bool] = None + twitter_on_created: Optional[bool] = None + + +class PlexModel(BaseModel): + plex_on_created: Optional[bool] = None + plex_on_concurrent: Optional[bool] = None + plex_client_host: Optional[str] = None + plex_on_stop: Optional[bool] = None + plex_on_resume: Optional[bool] = None + plex_on_watched: Optional[bool] = None + plex_on_play: Optional[bool] = None + plex_on_extdown: Optional[bool] = None + plex_on_intdown: Optional[bool] = None + plex_on_newdevice: Optional[bool] = None + plex_enabled: Optional[bool] = None + plex_on_buffer: Optional[bool] = None + plex_on_intup: Optional[bool] = None + plex_on_pmsupdate: Optional[bool] = None + plex_username: Optional[str] = None + plex_on_pause: Optional[bool] = None + plex_password: Optional[str] = None + plex_on_extup: Optional[bool] = None + + +class JoinModel(BaseModel): + join_on_concurrent: Optional[bool] = None + join_on_newdevice: Optional[bool] = None + join_deviceid: Optional[str] = None + join_on_play: Optional[bool] = None + join_on_watched: Optional[bool] = None + join_on_resume: Optional[bool] = None + join_on_created: Optional[bool] = None + join_on_extdown: Optional[bool] = None + join_on_intup: Optional[bool] = None + join_on_buffer: Optional[bool] = None + join_incl_subject: Optional[bool] = None + join_enabled: Optional[bool] = None + join_on_pause: Optional[bool] = None + join_apikey: Optional[str] = None + join_on_pmsupdate: Optional[bool] = None + join_on_intdown: Optional[bool] = None + join_on_extup: Optional[bool] = None + join_on_stop: Optional[bool] = None + + +class XBMCModel(BaseModel): + xbmc_password: Optional[str] = None + xbmc_on_play: Optional[bool] = None + xbmc_on_pause: Optional[bool] = None + xbmc_username: Optional[str] = None + xbmc_on_extup: Optional[bool] = None + xbmc_on_watched: Optional[bool] = None + xbmc_on_buffer: Optional[bool] = None + xbmc_enabled: Optional[bool] = None + xbmc_host: Optional[str] = None + xbmc_on_created: Optional[bool] = None + xbmc_on_intup: Optional[bool] = None + xbmc_on_extdown: Optional[bool] = None + xbmc_on_pmsupdate: Optional[bool] = None + xbmc_on_stop: Optional[bool] = None + xbmc_on_newdevice: Optional[bool] = None + xbmc_on_resume: Optional[bool] = None + xbmc_on_intdown: Optional[bool] = None + xbmc_on_concurrent: Optional[bool] = None + + +class BrowserModel(BaseModel): + browser_on_intdown: Optional[bool] = None + browser_on_newdevice: Optional[bool] = None + browser_on_pmsupdate: Optional[bool] = None + browser_on_intup: Optional[bool] = None + browser_on_buffer: Optional[bool] = None + browser_auto_hide_delay: Optional[int] = None + browser_on_created: Optional[bool] = None + browser_on_pause: Optional[bool] = None + browser_on_stop: Optional[bool] = None + browser_on_play: Optional[bool] = None + browser_on_watched: Optional[bool] = None + browser_on_extdown: Optional[bool] = None + browser_on_extup: Optional[bool] = None + browser_on_resume: Optional[bool] = None + browser_on_concurrent: Optional[bool] = None + browser_enabled: Optional[bool] = None + + +class NewsletterModel(BaseModel): + newsletter_dir: Optional[str] = None + newsletter_templates: Optional[str] = None + newsletter_self_hosted: Optional[bool] = None + newsletter_static_url: Optional[bool] = None + newsletter_inline_styles: Optional[bool] = None + newsletter_password: Optional[str] = None + newsletter_custom_dir: Optional[str] = None + newsletter_auth: Optional[bool] = None + + +class CloudinaryModel(BaseModel): + cloudinary_api_key: Optional[str] = None + cloudinary_cloud_name: Optional[str] = None + cloudinary_api_secret: Optional[str] = None + + +class SettingsModel(BaseModel): + IFTTT: Optional[IFTTTModel] = None + Growl: Optional[GrowlModel] = None + PMS: Optional[PMSModel] = None + Monitoring: Optional[MonitoringModel] = None + General: Optional[GeneralModel] = None + Slack: Optional[SlackModel] = None + Boxcar: Optional[BoxcarModel] = None + PushBullet: Optional[PushBulletModel] = None + Scripts: Optional[ScriptsModel] = None + NMA: Optional[NMAModel] = None + Hipchat: Optional[HipchatModel] = None + Pushalot: Optional[PushalotModel] = None + Prowl: Optional[ProwlModel] = None + Advanced: Optional[AdvancedModel] = None + Facebook: Optional[FacebookModel] = None + Email: Optional[EmailModel] = None + OSX_Notify: Optional[OSXNotifyModel] = None + PlexWatch: Optional[PlexWatchModel] = None + Pushover: Optional[PushoverModel] = None + Telegram: Optional[TelegramModel] = None + Twitter: Optional[TwitterModel] = None + Plex: Optional[PlexModel] = None + Join: Optional[JoinModel] = None + XBMC: Optional[XBMCModel] = None + Browser: Optional[BrowserModel] = None + Newsletter: Optional[NewsletterModel] = None + Cloudinary: Optional[CloudinaryModel] = None diff --git a/tautulli/models/status.py b/tautulli/models/status.py index ab74cf9..a8f0f67 100644 --- a/tautulli/models/status.py +++ b/tautulli/models/status.py @@ -9,10 +9,6 @@ from pydantic import BaseModel -class Status(BaseModel): - result: Optional[str] - message: Any - - -class Model(BaseModel): - response: Status +class StatusModel(BaseModel): + result: Optional[str] = None + message: Any = None diff --git a/tautulli/models/stream_data.py b/tautulli/models/stream_data.py index 1b4ecae..9a6f77d 100644 --- a/tautulli/models/stream_data.py +++ b/tautulli/models/stream_data.py @@ -9,62 +9,55 @@ from pydantic import BaseModel -class StreamData(BaseModel): - bitrate: Optional[int] - video_full_resolution: Optional[str] - optimized_version: Optional[str] - optimized_version_profile: Optional[str] - optimized_version_title: Optional[str] - synced_version: Optional[str] - synced_version_profile: Optional[str] - container: Optional[str] - video_codec: Optional[str] - video_bitrate: Optional[int] - video_width: Optional[int] - video_height: Optional[int] - video_framerate: Optional[str] - video_dynamic_range: Optional[str] - aspect_ratio: Optional[str] - audio_codec: Optional[str] - audio_bitrate: Optional[int] - audio_channels: Optional[int] - subtitle_codec: Optional[str] - stream_bitrate: Optional[int] - stream_video_full_resolution: Optional[str] - quality_profile: Optional[str] - stream_container_decision: Optional[str] - stream_container: Optional[str] - stream_video_decision: Optional[str] - stream_video_codec: Optional[str] - stream_video_bitrate: Optional[int] - stream_video_width: Optional[int] - stream_video_height: Optional[int] - stream_video_framerate: Optional[str] - stream_video_dynamic_range: Optional[str] - stream_audio_decision: Optional[str] - stream_audio_codec: Optional[str] - stream_audio_bitrate: Optional[int] - stream_audio_channels: Optional[int] - subtitles: Optional[str] - stream_subtitle_decision: Optional[str] - stream_subtitle_codec: Optional[str] - transcode_hw_decoding: Optional[str] - transcode_hw_encoding: Optional[str] - video_decision: Optional[str] - audio_decision: Optional[str] - media_type: Optional[str] - title: Optional[str] - grandparent_title: Optional[str] - original_title: Optional[str] - current_session: Optional[int] - pre_tautulli: Optional[str] +class StreamDataModel(BaseModel): + bitrate: Optional[int] = None + video_full_resolution: Optional[str] = None + optimized_version: Optional[str] = None + optimized_version_profile: Optional[str] = None + optimized_version_title: Optional[str] = None + synced_version: Optional[str] = None + synced_version_profile: Optional[str] = None + container: Optional[str] = None + video_codec: Optional[str] = None + video_bitrate: Optional[int] = None + video_width: Optional[int] = None + video_height: Optional[int] = None + video_framerate: Optional[str] = None + video_dynamic_range: Optional[str] = None + aspect_ratio: Optional[str] = None + audio_codec: Optional[str] = None + audio_bitrate: Optional[int] = None + audio_channels: Optional[int] = None + subtitle_codec: Optional[str] = None + stream_bitrate: Optional[int] = None + stream_video_full_resolution: Optional[str] = None + quality_profile: Optional[str] = None + stream_container_decision: Optional[str] = None + stream_container: Optional[str] = None + stream_video_decision: Optional[str] = None + stream_video_codec: Optional[str] = None + stream_video_bitrate: Optional[int] = None + stream_video_width: Optional[int] = None + stream_video_height: Optional[int] = None + stream_video_framerate: Optional[str] = None + stream_video_dynamic_range: Optional[str] = None + stream_audio_decision: Optional[str] = None + stream_audio_codec: Optional[str] = None + stream_audio_bitrate: Optional[int] = None + stream_audio_channels: Optional[int] = None + subtitles: Optional[str] = None + stream_subtitle_decision: Optional[str] = None + stream_subtitle_codec: Optional[str] = None + transcode_hw_decoding: Optional[str] = None + transcode_hw_encoding: Optional[str] = None + video_decision: Optional[str] = None + audio_decision: Optional[str] = None + media_type: Optional[str] = None + title: Optional[str] = None + grandparent_title: Optional[str] = None + original_title: Optional[str] = None + current_session: Optional[int] = None + pre_tautulli: Optional[str] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: StreamData - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/synced_items.py b/tautulli/models/synced_items.py index bb32c2d..08b318b 100644 --- a/tautulli/models/synced_items.py +++ b/tautulli/models/synced_items.py @@ -9,37 +9,30 @@ from pydantic import BaseModel -class SyncedItems(BaseModel): - audio_bitrate: Optional[str] - client_id: Optional[str] - content_type: Optional[str] - device_name: Optional[str] - failure: Optional[str] - item_complete_count: Optional[str] - item_count: Optional[str] - item_downloaded_count: Optional[str] - item_downloaded_percent_complete: Optional[int] - metadata_type: Optional[str] - photo_quality: Optional[str] - platform: Optional[str] - rating_key: Optional[str] - root_title: Optional[str] - state: Optional[str] - sync_id: Optional[str] - sync_title: Optional[str] - total_size: Optional[str] - user: Optional[str] - user_id: Optional[str] - username: Optional[str] - video_bitrate: Optional[str] - video_quality: Optional[str] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[SyncedItems] - - -class Model(BaseModel): - response: Response +class SyncedItemsModel(BaseModel): + audio_bitrate: Optional[str] = None + client_id: Optional[str] = None + content_type: Optional[str] = None + device_name: Optional[str] = None + failure: Optional[str] = None + item_complete_count: Optional[str] = None + item_count: Optional[str] = None + item_downloaded_count: Optional[str] = None + item_downloaded_percent_complete: Optional[int] = None + metadata_type: Optional[str] = None + photo_quality: Optional[str] = None + platform: Optional[str] = None + rating_key: Optional[str] = None + root_title: Optional[str] = None + state: Optional[str] = None + sync_id: Optional[str] = None + sync_title: Optional[str] = None + total_size: Optional[str] = None + user: Optional[str] = None + user_id: Optional[str] = None + username: Optional[str] = None + video_bitrate: Optional[str] = None + video_quality: Optional[str] = None + + + diff --git a/tautulli/models/tautulli_info.py b/tautulli/models/tautulli_info.py index 1fb9d53..b10e93a 100644 --- a/tautulli/models/tautulli_info.py +++ b/tautulli/models/tautulli_info.py @@ -9,20 +9,14 @@ from pydantic import BaseModel -class TautulliInfo(BaseModel): - tautulli_install_type: Optional[str] - tautulli_version: Optional[str] - tautulli_branch: Optional[str] - tautulli_commit: Optional[str] - tautulli_platform: Optional[str] - tautulli_platform_release: Optional[str] - tautulli_platform_version: Optional[str] - tautulli_platform_linux_distro: Optional[str] - tautulli_platform_device_name: Optional[str] - tautulli_python_version: Optional[str] - - -class Model(BaseModel): - result: Optional[str] - message: Optional[str] - data: TautulliInfo +class TautulliInfoModel(BaseModel): + tautulli_install_type: Optional[str] = None + tautulli_version: Optional[str] = None + tautulli_branch: Optional[str] = None + tautulli_commit: Optional[str] = None + tautulli_platform: Optional[str] = None + tautulli_platform_release: Optional[str] = None + tautulli_platform_version: Optional[str] = None + tautulli_platform_linux_distro: Optional[str] = None + tautulli_platform_device_name: Optional[str] = None + tautulli_python_version: Optional[str] = None diff --git a/tautulli/models/update_check.py b/tautulli/models/update_check.py index 157bcd0..3ac6c87 100644 --- a/tautulli/models/update_check.py +++ b/tautulli/models/update_check.py @@ -9,16 +9,6 @@ from pydantic import BaseModel -class UpdateCheck(BaseModel): - update: Optional[bool] - install_type: Optional[str] - - -class Response(BaseModel): - result: Optional[str] - message: Optional[str] - data: UpdateCheck - - -class Model(BaseModel): - response: Response +class UpdateCheckModel(BaseModel): + update: Optional[bool] = None + install_type: Optional[str] = None diff --git a/tautulli/models/user.py b/tautulli/models/user.py index 513737d..0d4ce6a 100644 --- a/tautulli/models/user.py +++ b/tautulli/models/user.py @@ -9,30 +9,23 @@ from pydantic import BaseModel -class User(BaseModel): - row_id: Optional[int] - user_id: Optional[int] - username: Optional[str] - friendly_name: Optional[str] - user_thumb: Optional[str] - email: Optional[str] - is_active: Optional[int] - is_admin: Optional[str] - is_home_user: Optional[int] - is_allow_sync: Optional[int] - is_restricted: Optional[int] - do_notify: Optional[int] - keep_history: Optional[int] - allow_guest: Optional[int] - deleted_user: Optional[int] - shared_libraries: Optional[List] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: User - - -class Model(BaseModel): - response: Response +class UserModel(BaseModel): + row_id: Optional[int] = None + user_id: Optional[int] = None + username: Optional[str] = None + friendly_name: Optional[str] = None + user_thumb: Optional[str] = None + email: Optional[str] = None + is_active: Optional[int] = None + is_admin: Optional[int] = None + is_home_user: Optional[int] = None + is_allow_sync: Optional[int] = None + is_restricted: Optional[int] = None + do_notify: Optional[int] = None + keep_history: Optional[int] = None + allow_guest: Optional[int] = None + deleted_user: Optional[int] = None + shared_libraries: Optional[List] = None + + + diff --git a/tautulli/models/user_ips.py b/tautulli/models/user_ips.py index ccdc68e..410bfe4 100644 --- a/tautulli/models/user_ips.py +++ b/tautulli/models/user_ips.py @@ -9,42 +9,35 @@ from pydantic import BaseModel -class Datum(BaseModel): - friendly_name: Optional[str] - guid: Optional[str] - id: Optional[int] - ip_address: Optional[str] - last_played: Optional[str] - last_seen: Optional[int] - first_seen: Optional[int] - live: Optional[int] - media_index: Optional[int] - media_type: Optional[str] - originally_available_at: Optional[str] - parent_media_index: Optional[int] - parent_title: Optional[str] - platform: Optional[str] - play_count: Optional[int] - player: Optional[str] - rating_key: Optional[int] - thumb: Optional[str] - transcode_decision: Optional[str] - user_id: Optional[int] - year: Optional[int] - - -class UserIPs(BaseModel): - draw: Optional[int] - recordsTotal: Optional[int] - recordsFiltered: Optional[int] - data: Optional[List[Datum]] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: UserIPs - - -class Model(BaseModel): - response: Response +class DatumModel(BaseModel): + friendly_name: Optional[str] = None + guid: Optional[str] = None + id: Optional[int] = None + ip_address: Optional[str] = None + last_played: Optional[str] = None + last_seen: Optional[int] = None + first_seen: Optional[int] = None + live: Optional[int] = None + media_index: Optional[int] = None + media_type: Optional[str] = None + originally_available_at: Optional[str] = None + parent_media_index: Optional[int] = None + parent_title: Optional[str] = None + platform: Optional[str] = None + play_count: Optional[int] = None + player: Optional[str] = None + rating_key: Optional[int] = None + thumb: Optional[str] = None + transcode_decision: Optional[str] = None + user_id: Optional[int] = None + year: Optional[int] = None + + +class UserIPsModel(BaseModel): + draw: Optional[int] = None + recordsTotal: Optional[int] = None + recordsFiltered: Optional[int] = None + data: Optional[List[DatumModel]] = None + + + diff --git a/tautulli/models/user_logins.py b/tautulli/models/user_logins.py index 0aaa549..1a958f4 100644 --- a/tautulli/models/user_logins.py +++ b/tautulli/models/user_logins.py @@ -9,31 +9,24 @@ from pydantic import BaseModel -class Datum(BaseModel): - browser: Optional[str] - friendly_name: Optional[str] - host: Optional[str] - ip_address: Optional[str] - os: Optional[str] - timestamp: Optional[int] - user: Optional[str] - user_agent: Optional[str] - user_group: Optional[str] - user_id: Optional[int] - - -class UserLogins(BaseModel): - draw: Optional[int] - recordsTotal: Optional[int] - recordsFiltered: Optional[int] - data: Optional[List[Datum]] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: UserLogins - - -class Model(BaseModel): - response: Response +class DatumModel(BaseModel): + browser: Optional[str] = None + friendly_name: Optional[str] = None + host: Optional[str] = None + ip_address: Optional[str] = None + os: Optional[str] = None + timestamp: Optional[int] = None + user: Optional[str] = None + user_agent: Optional[str] = None + user_group: Optional[str] = None + user_id: Optional[int] = None + + +class UserLoginsModel(BaseModel): + draw: Optional[int] = None + recordsTotal: Optional[int] = None + recordsFiltered: Optional[int] = None + data: Optional[List[DatumModel]] = None + + + diff --git a/tautulli/models/user_player_stats.py b/tautulli/models/user_player_stats.py index bff9303..819ba72 100644 --- a/tautulli/models/user_player_stats.py +++ b/tautulli/models/user_player_stats.py @@ -9,19 +9,12 @@ from pydantic import BaseModel -class UserPlayerStats(BaseModel): - platform: Optional[str] - platform_name: Optional[str] - player_name: Optional[str] - result_id: Optional[int] - total_plays: Optional[int] +class UserPlayerStatsModel(BaseModel): + platform: Optional[str] = None + platform_name: Optional[str] = None + player_name: Optional[str] = None + result_id: Optional[int] = None + total_plays: Optional[int] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[UserPlayerStats] - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/user_watch_time_stats.py b/tautulli/models/user_watch_time_stats.py index 1a1b6bb..a6150aa 100644 --- a/tautulli/models/user_watch_time_stats.py +++ b/tautulli/models/user_watch_time_stats.py @@ -9,17 +9,10 @@ from pydantic import BaseModel -class UserWatchTimeStats(BaseModel): - query_days: Optional[int] - total_plays: Optional[int] - total_time: Optional[int] +class UserWatchTimeStatsModel(BaseModel): + query_days: Optional[int] = None + total_plays: Optional[int] = None + total_time: Optional[int] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[UserWatchTimeStats] - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/usernames.py b/tautulli/models/usernames.py index 334d2fc..73618d6 100644 --- a/tautulli/models/usernames.py +++ b/tautulli/models/usernames.py @@ -9,16 +9,9 @@ from pydantic import BaseModel -class UserName(BaseModel): - user_id: Optional[int] - friendly_name: Optional[str] +class UserNameModel(BaseModel): + user_id: Optional[int] = None + friendly_name: Optional[str] = None -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[UserName] - -class Model(BaseModel): - response: Response diff --git a/tautulli/models/users.py b/tautulli/models/users.py index 772d1e7..0903642 100644 --- a/tautulli/models/users.py +++ b/tautulli/models/users.py @@ -9,34 +9,27 @@ from pydantic import BaseModel -class User(BaseModel): - row_id: Optional[int] - user_id: Optional[int] - username: Optional[str] - friendly_name: Optional[str] - thumb: Optional[str] - email: Optional[str] - is_active: Optional[int] - is_admin: Optional[int] - is_home_user: Optional[int] - is_allow_sync: Optional[int] - is_restricted: Optional[int] - do_notify: Optional[int] - keep_history: Optional[int] - allow_guest: Optional[int] - shared_libraries: Optional[List[str]] - filter_all: Optional[str] - filter_movies: Optional[str] - filter_tv: Optional[str] - filter_music: Optional[str] - filter_photos: Optional[str] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: List[User] - - -class Model(BaseModel): - response: Response +class UserModel(BaseModel): + row_id: Optional[int] = None + user_id: Optional[int] = None + username: Optional[str] = None + friendly_name: Optional[str] = None + thumb: Optional[str] = None + email: Optional[str] = None + is_active: Optional[int] = None + is_admin: Optional[int] = None + is_home_user: Optional[int] = None + is_allow_sync: Optional[int] = None + is_restricted: Optional[int] = None + do_notify: Optional[int] = None + keep_history: Optional[int] = None + allow_guest: Optional[int] = None + shared_libraries: Optional[List[str]] = None + filter_all: Optional[str] = None + filter_movies: Optional[str] = None + filter_tv: Optional[str] = None + filter_music: Optional[str] = None + filter_photos: Optional[str] = None + + + diff --git a/tautulli/models/users_table.py b/tautulli/models/users_table.py index 70b08c6..76f9a5f 100644 --- a/tautulli/models/users_table.py +++ b/tautulli/models/users_table.py @@ -9,51 +9,44 @@ from pydantic import BaseModel -class Datum(BaseModel): - row_id: Optional[int] - user_id: Optional[int] - username: Optional[str] - friendly_name: Optional[str] - user_thumb: Optional[str] - plays: Optional[int] - duration: Optional[int] - last_seen: Optional[int] - last_played: Optional[str] - history_row_id: Optional[int] - ip_address: Optional[str] - platform: Optional[str] - player: Optional[str] - rating_key: Optional[int] - media_type: Optional[str] - thumb: Optional[str] - parent_title: Optional[str] - year: Optional[Any] - media_index: Optional[Union[int, str]] - parent_media_index: Optional[Union[int, str]] - live: Optional[int] - originally_available_at: Optional[str] - guid: Optional[str] - transcode_decision: Optional[str] - do_notify: Optional[int] - keep_history: Optional[int] - allow_guest: Optional[int] - is_active: Optional[int] - title: Optional[str] - email: Optional[str] - - -class UsersTable(BaseModel): - recordsFiltered: Optional[int] - recordsTotal: Optional[int] - data: Optional[List[Datum]] - draw: Optional[int] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: UsersTable - - -class Model(BaseModel): - response: Response +class DatumModel(BaseModel): + row_id: Optional[int] = None + user_id: Optional[int] = None + username: Optional[str] = None + friendly_name: Optional[str] = None + user_thumb: Optional[str] = None + plays: Optional[int] = None + duration: Optional[int] = None + last_seen: Optional[int] = None + last_played: Optional[str] = None + history_row_id: Optional[int] = None + ip_address: Optional[str] = None + platform: Optional[str] = None + player: Optional[str] = None + rating_key: Optional[int] = None + media_type: Optional[str] = None + thumb: Optional[str] = None + parent_title: Optional[str] = None + year: Optional[Any] = None + media_index: Optional[Union[int, str]] = None + parent_media_index: Optional[Union[int, str]] = None + live: Optional[int] = None + originally_available_at: Optional[str] = None + guid: Optional[str] = None + transcode_decision: Optional[str] = None + do_notify: Optional[int] = None + keep_history: Optional[int] = None + allow_guest: Optional[int] = None + is_active: Optional[int] = None + title: Optional[str] = None + email: Optional[str] = None + + +class UsersTableModel(BaseModel): + recordsFiltered: Optional[int] = None + recordsTotal: Optional[int] = None + data: Optional[List[DatumModel]] = None + draw: Optional[int] = None + + + diff --git a/tautulli/models/whois_lookup.py b/tautulli/models/whois_lookup.py index 3ebf9e5..b77d6d3 100644 --- a/tautulli/models/whois_lookup.py +++ b/tautulli/models/whois_lookup.py @@ -9,32 +9,25 @@ from pydantic import BaseModel -class Net(BaseModel): - cidr: Optional[str] - name: Optional[str] - handle: Optional[str] - range: Optional[str] - description: Optional[str] - country: Optional[str] - state: Optional[str] - city: Optional[str] - address: Optional[str] - postal_code: Optional[str] - emails: Optional[List[str]] - created: Optional[str] - updated: Optional[str] - - -class WHOISLookup(BaseModel): - host: Optional[str] - nets: Optional[List[Net]] - - -class Response(BaseModel): - result: Optional[str] - message: Any - data: WHOISLookup - - -class Model(BaseModel): - response: Response +class NetModel(BaseModel): + cidr: Optional[str] = None + name: Optional[str] = None + handle: Optional[str] = None + range: Optional[str] = None + description: Optional[str] = None + country: Optional[str] = None + state: Optional[str] = None + city: Optional[str] = None + address: Optional[str] = None + postal_code: Optional[str] = None + emails: Optional[List[str]] = None + created: Optional[str] = None + updated: Optional[str] = None + + +class WHOISLookupModel(BaseModel): + host: Optional[str] = None + nets: Optional[List[NetModel]] = None + + + diff --git a/tautulli/tools/api_helper.py b/tautulli/tools/api_helper.py index 2cd12cd..6e0d419 100644 --- a/tautulli/tools/api_helper.py +++ b/tautulli/tools/api_helper.py @@ -82,7 +82,7 @@ def activity_summary(self) -> dict: :rtype: dict """ _activity_data = self._api.activity() - return build_summary_from_activity_json(activity_data=_activity_data).dict() + return build_summary_from_activity_json(activity_data=_activity_data).model_dump() @property def activity_summary_message(self) -> str: diff --git a/tests/test_json_api.py b/tests/test_json_api.py index a0b1fd6..bddd3c2 100644 --- a/tests/test_json_api.py +++ b/tests/test_json_api.py @@ -4,6 +4,7 @@ from tautulli.exceptions import HttpException from tests.setup import raw_client, invalid_raw_client, no_ssl_client + @pytest.mark.skip(reason="Doesn't play well in CI.") def test_invalid_api_key(): client = invalid_raw_client() @@ -12,15 +13,17 @@ def test_invalid_api_key(): assert type(e.value) == HttpException assert "Invalid apikey" in str(e) + def test_ssl(): client = raw_client() assert client._ssl_verify is True client = no_ssl_client() assert client._ssl_verify is False - arnold_quote = client.arnold # attempt to use the client + arnold_quote = client.arnold # attempt to use the client assert arnold_quote is not None assert type(arnold_quote) == str + @pytest.mark.skip(reason="Can't test add.") def test_add_newsletter_config(): client = raw_client()