From c0bb3dd6e0c58b75518c75b3f22dd7d52f5968fd Mon Sep 17 00:00:00 2001 From: Chris Talkington Date: Mon, 21 Aug 2023 04:15:58 -0500 Subject: [PATCH] Use snapshot assertion for Jellyfin diagnostics (#98732) --- .../jellyfin/snapshots/test_diagnostics.ambr | 1788 +++++++++++++++++ tests/components/jellyfin/test_diagnostics.py | 602 +----- 2 files changed, 1795 insertions(+), 595 deletions(-) create mode 100644 tests/components/jellyfin/snapshots/test_diagnostics.ambr diff --git a/tests/components/jellyfin/snapshots/test_diagnostics.ambr b/tests/components/jellyfin/snapshots/test_diagnostics.ambr new file mode 100644 index 00000000000..c992628f034 --- /dev/null +++ b/tests/components/jellyfin/snapshots/test_diagnostics.ambr @@ -0,0 +1,1788 @@ +# serializer version: 1 +# name: test_diagnostics + dict({ + 'entry': dict({ + 'data': dict({ + 'client_device_id': 'entry-id', + 'password': '**REDACTED**', + 'url': 'https://example.com', + 'username': 'test-username', + }), + 'title': 'Jellyfin', + }), + 'server': dict({ + 'id': 'SERVER-UUID', + 'name': 'JELLYFIN-SERVER', + 'version': None, + }), + 'sessions': list([ + dict({ + 'capabilities': dict({ + 'AppStoreUrl': 'string', + 'DeviceProfile': dict({ + 'AlbumArtPn': 'string', + 'CodecProfiles': list([ + dict({ + 'ApplyConditions': list([ + dict({ + 'Condition': 'Equals', + 'IsRequired': True, + 'Property': 'AudioChannels', + 'Value': 'string', + }), + ]), + 'Codec': 'string', + 'Conditions': list([ + dict({ + 'Condition': 'Equals', + 'IsRequired': True, + 'Property': 'AudioChannels', + 'Value': 'string', + }), + ]), + 'Container': 'string', + 'Type': 'Video', + }), + ]), + 'ContainerProfiles': list([ + dict({ + 'Conditions': list([ + dict({ + 'Condition': 'Equals', + 'IsRequired': True, + 'Property': 'AudioChannels', + 'Value': 'string', + }), + ]), + 'Container': 'string', + 'Type': 'Audio', + }), + ]), + 'DirectPlayProfiles': list([ + dict({ + 'AudioCodec': 'string', + 'Container': 'string', + 'Type': 'Audio', + 'VideoCodec': 'string', + }), + ]), + 'EnableAlbumArtInDidl': False, + 'EnableMSMediaReceiverRegistrar': False, + 'EnableSingleAlbumArtLimit': False, + 'EnableSingleSubtitleLimit': False, + 'FriendlyName': 'string', + 'Id': 'string', + 'Identification': dict({ + 'FriendlyName': 'string', + 'Headers': list([ + dict({ + 'Match': 'Equals', + 'Name': 'string', + 'Value': 'string', + }), + ]), + 'Manufacturer': 'string', + 'ManufacturerUrl': 'string', + 'ModelDescription': 'string', + 'ModelName': 'string', + 'ModelNumber': 'string', + 'ModelUrl': 'string', + 'SerialNumber': 'string', + }), + 'IgnoreTranscodeByteRangeRequests': False, + 'Manufacturer': 'string', + 'ManufacturerUrl': 'string', + 'MaxAlbumArtHeight': 0, + 'MaxAlbumArtWidth': 0, + 'MaxIconHeight': 0, + 'MaxIconWidth': 0, + 'MaxStaticBitrate': 0, + 'MaxStaticMusicBitrate': 0, + 'MaxStreamingBitrate': 0, + 'ModelDescription': 'string', + 'ModelName': 'string', + 'ModelNumber': 'string', + 'ModelUrl': 'string', + 'MusicStreamingTranscodingBitrate': 0, + 'Name': 'string', + 'ProtocolInfo': 'string', + 'RequiresPlainFolders': False, + 'RequiresPlainVideoItems': False, + 'ResponseProfiles': list([ + dict({ + 'AudioCodec': 'string', + 'Conditions': list([ + dict({ + 'Condition': 'Equals', + 'IsRequired': True, + 'Property': 'AudioChannels', + 'Value': 'string', + }), + ]), + 'Container': 'string', + 'MimeType': 'string', + 'OrgPn': 'string', + 'Type': 'Audio', + 'VideoCodec': 'string', + }), + ]), + 'SerialNumber': 'string', + 'SonyAggregationFlags': 'string', + 'SubtitleProfiles': list([ + dict({ + 'Container': 'string', + 'DidlMode': 'string', + 'Format': 'string', + 'Language': 'string', + 'Method': 'Encode', + }), + ]), + 'SupportedMediaTypes': 'string', + 'TimelineOffsetSeconds': 0, + 'TranscodingProfiles': list([ + dict({ + 'AudioCodec': 'string', + 'BreakOnNonKeyFrames': False, + 'Conditions': list([ + dict({ + 'Condition': 'Equals', + 'IsRequired': True, + 'Property': 'AudioChannels', + 'Value': 'string', + }), + ]), + 'Container': 'string', + 'Context': 'Streaming', + 'CopyTimestamps': False, + 'EnableMpegtsM2TsMode': False, + 'EnableSubtitlesInManifest': False, + 'EstimateContentLength': False, + 'MaxAudioChannels': 'string', + 'MinSegments': 0, + 'Protocol': 'string', + 'SegmentLength': 0, + 'TranscodeSeekInfo': 'Auto', + 'Type': 'Audio', + 'VideoCodec': 'string', + }), + ]), + 'UserId': 'string', + 'XmlRootAttributes': list([ + dict({ + 'Name': 'string', + 'Value': 'string', + }), + ]), + }), + 'IconUrl': 'string', + 'MessageCallbackUrl': 'string', + 'PlayableMediaTypes': list([ + 'Video', + ]), + 'SupportedCommands': list([ + 'VolumeSet', + 'Mute', + ]), + 'SupportsContentUploading': True, + 'SupportsMediaControl': True, + 'SupportsPersistentIdentifier': True, + 'SupportsSync': True, + }), + 'client_name': 'Jellyfin for Developers', + 'client_version': '1.0.0', + 'device_id': 'DEVICE-UUID', + 'device_name': 'JELLYFIN-DEVICE', + 'id': 'SESSION-UUID', + 'now_playing': dict({ + 'AirDays': list([ + 'Sunday', + ]), + 'AirTime': 'string', + 'AirsAfterSeasonNumber': 0, + 'AirsBeforeEpisodeNumber': 0, + 'AirsBeforeSeasonNumber': 0, + 'Album': 'string', + 'AlbumArtist': 'string', + 'AlbumArtists': list([ + dict({ + 'Id': '38a5a5bb-dc30-49a2-b175-1de0d1488c43', + 'Name': 'string', + }), + ]), + 'AlbumCount': 0, + 'AlbumId': '21af9851-8e39-43a9-9c47-513d3b9e99fc', + 'AlbumPrimaryImageTag': 'string', + 'Altitude': 0, + 'Aperture': 0, + 'ArtistCount': 0, + 'ArtistItems': list([ + dict({ + 'Id': '38a5a5bb-dc30-49a2-b175-1de0d1488c43', + 'Name': 'string', + }), + ]), + 'Artists': list([ + 'string', + ]), + 'AspectRatio': 'string', + 'Audio': 'Mono', + 'BackdropImageTags': list([ + 'string', + ]), + 'CameraMake': 'string', + 'CameraModel': 'string', + 'CanDelete': True, + 'CanDownload': True, + 'ChannelId': '04b0b2a5-93cb-474d-8ea9-3df0f84eb0ff', + 'ChannelName': 'string', + 'ChannelNumber': 'string', + 'ChannelPrimaryImageTag': 'string', + 'ChannelType': 'TV', + 'Chapters': list([ + dict({ + 'ImageDateModified': '2019-08-24T14:15:22Z', + 'ImagePath': 'string', + 'ImageTag': 'string', + 'Name': 'string', + 'StartPositionTicks': 0, + }), + ]), + 'ChildCount': 0, + 'CollectionType': 'string', + 'CommunityRating': 0, + 'CompletionPercentage': 0, + 'Container': 'string', + 'CriticRating': 0, + 'CumulativeRunTimeTicks': 0, + 'CurrentProgram': dict({ + }), + 'CustomRating': 'string', + 'DateCreated': '2019-08-24T14:15:22Z', + 'DateLastMediaAdded': '2019-08-24T14:15:22Z', + 'DisplayOrder': 'string', + 'DisplayPreferencesId': 'string', + 'EnableMediaSourceDisplay': True, + 'EndDate': '2019-08-24T14:15:22Z', + 'EpisodeCount': 0, + 'EpisodeTitle': 'string', + 'Etag': 'string', + 'ExposureTime': 0, + 'ExternalUrls': list([ + dict({ + 'Name': 'string', + 'Url': 'string', + }), + ]), + 'ExtraType': 'string', + 'FocalLength': 0, + 'ForcedSortName': 'string', + 'GenreItems': list([ + dict({ + 'Id': '38a5a5bb-dc30-49a2-b175-1de0d1488c43', + 'Name': 'string', + }), + ]), + 'Genres': list([ + 'string', + ]), + 'HasSubtitles': True, + 'Height': 0, + 'Id': 'EPISODE-UUID', + 'ImageBlurHashes': dict({ + 'Art': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Backdrop': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Banner': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Box': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'BoxRear': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Chapter': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Disc': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Logo': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Menu': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Primary': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Profile': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Screenshot': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Thumb': dict({ + 'property1': 'string', + 'property2': 'string', + }), + }), + 'ImageOrientation': 'TopLeft', + 'ImageTags': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'IndexNumber': 3, + 'IndexNumberEnd': 0, + 'IsFolder': False, + 'IsHD': True, + 'IsKids': True, + 'IsLive': True, + 'IsMovie': True, + 'IsNews': True, + 'IsPlaceHolder': True, + 'IsPremiere': True, + 'IsRepeat': True, + 'IsSeries': True, + 'IsSports': True, + 'IsoSpeedRating': 0, + 'IsoType': 'Dvd', + 'Latitude': 0, + 'LocalTrailerCount': 0, + 'LocationType': 'FileSystem', + 'LockData': True, + 'LockedFields': list([ + 'Cast', + ]), + 'Longitude': 0, + 'MediaSourceCount': 0, + 'MediaSources': list([ + dict({ + 'AnalyzeDurationMs': 0, + 'Bitrate': 0, + 'BufferMs': 0, + 'Container': 'string', + 'DefaultAudioStreamIndex': 0, + 'DefaultSubtitleStreamIndex': 0, + 'ETag': 'string', + 'EncoderPath': 'string', + 'EncoderProtocol': 'File', + 'Formats': list([ + 'string', + ]), + 'GenPtsInput': True, + 'Id': 'string', + 'IgnoreDts': True, + 'IgnoreIndex': True, + 'IsInfiniteStream': True, + 'IsRemote': True, + 'IsoType': 'Dvd', + 'LiveStreamId': 'string', + 'MediaAttachments': list([ + dict({ + 'Codec': 'string', + 'CodecTag': 'string', + 'Comment': 'string', + 'DeliveryUrl': 'string', + 'FileName': 'string', + 'Index': 0, + 'MimeType': 'string', + }), + ]), + 'MediaStreams': list([ + dict({ + 'AspectRatio': 'string', + 'AverageFrameRate': 0, + 'BitDepth': 0, + 'BitRate': 0, + 'BlPresentFlag': 0, + 'ChannelLayout': 'string', + 'Channels': 0, + 'Codec': 'string', + 'CodecTag': 'string', + 'CodecTimeBase': 'string', + 'ColorPrimaries': 'string', + 'ColorRange': 'string', + 'ColorSpace': 'string', + 'ColorTransfer': 'string', + 'Comment': 'string', + 'DeliveryMethod': 'Encode', + 'DeliveryUrl': 'string', + 'DisplayTitle': 'string', + 'DvBlSignalCompatibilityId': 0, + 'DvLevel': 0, + 'DvProfile': 0, + 'DvVersionMajor': 0, + 'DvVersionMinor': 0, + 'ElPresentFlag': 0, + 'Height': 0, + 'Index': 0, + 'IsAVC': True, + 'IsAnamorphic': True, + 'IsDefault': True, + 'IsExternal': True, + 'IsExternalUrl': True, + 'IsForced': True, + 'IsInterlaced': True, + 'IsTextSubtitleStream': True, + 'Language': 'string', + 'Level': 0, + 'LocalizedDefault': 'string', + 'LocalizedExternal': 'string', + 'LocalizedForced': 'string', + 'LocalizedUndefined': 'string', + 'NalLengthSize': 'string', + 'PacketLength': 0, + 'Path': 'string', + 'PixelFormat': 'string', + 'Profile': 'string', + 'RealFrameRate': 0, + 'RefFrames': 0, + 'RpuPresentFlag': 0, + 'SampleRate': 0, + 'Score': 0, + 'SupportsExternalStream': True, + 'TimeBase': 'string', + 'Title': 'string', + 'Type': 'Audio', + 'VideoDoViTitle': 'string', + 'VideoRange': 'string', + 'VideoRangeType': 'string', + 'Width': 0, + }), + ]), + 'Name': 'string', + 'OpenToken': 'string', + 'Path': 'string', + 'Protocol': 'File', + 'ReadAtNativeFramerate': True, + 'RequiredHttpHeaders': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'RequiresClosing': True, + 'RequiresLooping': True, + 'RequiresOpening': True, + 'RunTimeTicks': 0, + 'Size': 0, + 'SupportsDirectPlay': True, + 'SupportsDirectStream': True, + 'SupportsProbing': True, + 'SupportsTranscoding': True, + 'Timestamp': 'None', + 'TranscodingContainer': 'string', + 'TranscodingSubProtocol': 'string', + 'TranscodingUrl': 'string', + 'Type': 'Default', + 'Video3DFormat': 'HalfSideBySide', + 'VideoType': 'VideoFile', + }), + ]), + 'MediaStreams': list([ + dict({ + 'AspectRatio': 'string', + 'AverageFrameRate': 0, + 'BitDepth': 0, + 'BitRate': 0, + 'BlPresentFlag': 0, + 'ChannelLayout': 'string', + 'Channels': 0, + 'Codec': 'string', + 'CodecTag': 'string', + 'CodecTimeBase': 'string', + 'ColorPrimaries': 'string', + 'ColorRange': 'string', + 'ColorSpace': 'string', + 'ColorTransfer': 'string', + 'Comment': 'string', + 'DeliveryMethod': 'Encode', + 'DeliveryUrl': 'string', + 'DisplayTitle': 'string', + 'DvBlSignalCompatibilityId': 0, + 'DvLevel': 0, + 'DvProfile': 0, + 'DvVersionMajor': 0, + 'DvVersionMinor': 0, + 'ElPresentFlag': 0, + 'Height': 0, + 'Index': 0, + 'IsAVC': True, + 'IsAnamorphic': True, + 'IsDefault': True, + 'IsExternal': True, + 'IsExternalUrl': True, + 'IsForced': True, + 'IsInterlaced': True, + 'IsTextSubtitleStream': True, + 'Language': 'string', + 'Level': 0, + 'LocalizedDefault': 'string', + 'LocalizedExternal': 'string', + 'LocalizedForced': 'string', + 'LocalizedUndefined': 'string', + 'NalLengthSize': 'string', + 'PacketLength': 0, + 'Path': 'string', + 'PixelFormat': 'string', + 'Profile': 'string', + 'RealFrameRate': 0, + 'RefFrames': 0, + 'RpuPresentFlag': 0, + 'SampleRate': 0, + 'Score': 0, + 'SupportsExternalStream': True, + 'TimeBase': 'string', + 'Title': 'string', + 'Type': 'Audio', + 'VideoDoViTitle': 'string', + 'VideoRange': 'string', + 'VideoRangeType': 'string', + 'Width': 0, + }), + ]), + 'MediaType': 'string', + 'MovieCount': 0, + 'MusicVideoCount': 0, + 'Name': 'EPISODE', + 'Number': 'string', + 'OfficialRating': 'string', + 'OriginalTitle': 'string', + 'Overview': 'string', + 'ParentArtImageTag': 'string', + 'ParentArtItemId': '10c1875b-b82c-48e8-bae9-939a5e68dc2f', + 'ParentBackdropImageTags': list([ + 'string', + ]), + 'ParentBackdropItemId': 'c22fd826-17fc-44f4-9b04-1eb3e8fb9173', + 'ParentId': 'PARENT-UUID', + 'ParentIndexNumber': 1, + 'ParentLogoImageTag': 'string', + 'ParentLogoItemId': 'c78d400f-de5c-421e-8714-4fb05d387233', + 'ParentPrimaryImageItemId': 'string', + 'ParentPrimaryImageTag': 'string', + 'ParentThumbImageTag': 'string', + 'ParentThumbItemId': 'ae6ff707-333d-4994-be6d-b83ca1b35f46', + 'PartCount': 0, + 'Path': 'string', + 'People': list([ + dict({ + 'Id': '38a5a5bb-dc30-49a2-b175-1de0d1488c43', + 'ImageBlurHashes': dict({ + 'Art': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Backdrop': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Banner': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Box': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'BoxRear': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Chapter': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Disc': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Logo': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Menu': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Primary': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Profile': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Screenshot': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Thumb': dict({ + 'property1': 'string', + 'property2': 'string', + }), + }), + 'Name': 'string', + 'PrimaryImageTag': 'string', + 'Role': 'string', + 'Type': 'string', + }), + ]), + 'PlayAccess': 'Full', + 'PlaylistItemId': 'string', + 'PreferredMetadataCountryCode': 'string', + 'PreferredMetadataLanguage': 'string', + 'PremiereDate': '2019-08-24T14:15:22Z', + 'PrimaryImageAspectRatio': 0, + 'ProductionLocations': list([ + 'string', + ]), + 'ProductionYear': 0, + 'ProgramCount': 0, + 'ProgramId': 'string', + 'ProviderIds': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'RecursiveItemCount': 0, + 'RemoteTrailers': list([ + dict({ + 'Name': 'string', + 'Url': 'string', + }), + ]), + 'RunTimeTicks': 600000000, + 'ScreenshotImageTags': list([ + 'string', + ]), + 'SeasonId': 'SEASON-UUID', + 'SeasonName': 'SEASON', + 'SeriesCount': 0, + 'SeriesId': 'SERIES-UUID', + 'SeriesName': 'SERIES', + 'SeriesPrimaryImageTag': 'string', + 'SeriesStudio': 'HASS', + 'SeriesThumbImageTag': 'string', + 'SeriesTimerId': 'string', + 'ServerId': 'SERVER-UUID', + 'ShutterSpeed': 0, + 'Software': 'string', + 'SongCount': 0, + 'SortName': 'string', + 'SourceType': 'string', + 'SpecialFeatureCount': 0, + 'StartDate': '2019-08-24T14:15:22Z', + 'Status': 'string', + 'Studios': list([ + dict({ + 'Id': '38a5a5bb-dc30-49a2-b175-1de0d1488c43', + 'Name': 'string', + }), + ]), + 'SupportsSync': True, + 'Taglines': list([ + 'string', + ]), + 'Tags': list([ + 'string', + ]), + 'TimerId': 'string', + 'TrailerCount': 0, + 'Type': 'Episode', + 'UserData': dict({ + 'IsFavorite': True, + 'ItemId': 'string', + 'Key': 'string', + 'LastPlayedDate': '2019-08-24T14:15:22Z', + 'Likes': True, + 'PlayCount': 0, + 'PlaybackPositionTicks': 0, + 'Played': True, + 'PlayedPercentage': 0, + 'Rating': 0, + 'UnplayedItemCount': 0, + }), + 'Video3DFormat': 'HalfSideBySide', + 'VideoType': 'VideoFile', + 'Width': 0, + }), + 'play_state': dict({ + 'AudioStreamIndex': 0, + 'CanSeek': True, + 'IsMuted': True, + 'IsPaused': True, + 'LiveStreamId': 'string', + 'MediaSourceId': 'string', + 'PlayMethod': 'Transcode', + 'PositionTicks': 100000000, + 'RepeatMode': 'RepeatNone', + 'SubtitleStreamIndex': 0, + 'VolumeLevel': 0, + }), + 'user_id': '08ba1929-681e-4b24-929b-9245852f65c0', + }), + dict({ + 'capabilities': dict({ + 'AppStoreUrl': 'string', + 'DeviceProfile': dict({ + 'AlbumArtPn': 'string', + 'CodecProfiles': list([ + dict({ + 'ApplyConditions': list([ + dict({ + 'Condition': 'Equals', + 'IsRequired': True, + 'Property': 'AudioChannels', + 'Value': 'string', + }), + ]), + 'Codec': 'string', + 'Conditions': list([ + dict({ + 'Condition': 'Equals', + 'IsRequired': True, + 'Property': 'AudioChannels', + 'Value': 'string', + }), + ]), + 'Container': 'string', + 'Type': 'Video', + }), + ]), + 'ContainerProfiles': list([ + dict({ + 'Conditions': list([ + dict({ + 'Condition': 'Equals', + 'IsRequired': True, + 'Property': 'AudioChannels', + 'Value': 'string', + }), + ]), + 'Container': 'string', + 'Type': 'Audio', + }), + ]), + 'DirectPlayProfiles': list([ + dict({ + 'AudioCodec': 'string', + 'Container': 'string', + 'Type': 'Audio', + 'VideoCodec': 'string', + }), + ]), + 'EnableAlbumArtInDidl': False, + 'EnableMSMediaReceiverRegistrar': False, + 'EnableSingleAlbumArtLimit': False, + 'EnableSingleSubtitleLimit': False, + 'FriendlyName': 'string', + 'Id': 'string', + 'Identification': dict({ + 'FriendlyName': 'string', + 'Headers': list([ + dict({ + 'Match': 'Equals', + 'Name': 'string', + 'Value': 'string', + }), + ]), + 'Manufacturer': 'string', + 'ManufacturerUrl': 'string', + 'ModelDescription': 'string', + 'ModelName': 'string', + 'ModelNumber': 'string', + 'ModelUrl': 'string', + 'SerialNumber': 'string', + }), + 'IgnoreTranscodeByteRangeRequests': False, + 'Manufacturer': 'string', + 'ManufacturerUrl': 'string', + 'MaxAlbumArtHeight': 0, + 'MaxAlbumArtWidth': 0, + 'MaxIconHeight': 0, + 'MaxIconWidth': 0, + 'MaxStaticBitrate': 0, + 'MaxStaticMusicBitrate': 0, + 'MaxStreamingBitrate': 0, + 'ModelDescription': 'string', + 'ModelName': 'string', + 'ModelNumber': 'string', + 'ModelUrl': 'string', + 'MusicStreamingTranscodingBitrate': 0, + 'Name': 'string', + 'ProtocolInfo': 'string', + 'RequiresPlainFolders': False, + 'RequiresPlainVideoItems': False, + 'ResponseProfiles': list([ + dict({ + 'AudioCodec': 'string', + 'Conditions': list([ + dict({ + 'Condition': 'Equals', + 'IsRequired': True, + 'Property': 'AudioChannels', + 'Value': 'string', + }), + ]), + 'Container': 'string', + 'MimeType': 'string', + 'OrgPn': 'string', + 'Type': 'Audio', + 'VideoCodec': 'string', + }), + ]), + 'SerialNumber': 'string', + 'SonyAggregationFlags': 'string', + 'SubtitleProfiles': list([ + dict({ + 'Container': 'string', + 'DidlMode': 'string', + 'Format': 'string', + 'Language': 'string', + 'Method': 'Encode', + }), + ]), + 'SupportedMediaTypes': 'string', + 'TimelineOffsetSeconds': 0, + 'TranscodingProfiles': list([ + dict({ + 'AudioCodec': 'string', + 'BreakOnNonKeyFrames': False, + 'Conditions': list([ + dict({ + 'Condition': 'Equals', + 'IsRequired': True, + 'Property': 'AudioChannels', + 'Value': 'string', + }), + ]), + 'Container': 'string', + 'Context': 'Streaming', + 'CopyTimestamps': False, + 'EnableMpegtsM2TsMode': False, + 'EnableSubtitlesInManifest': False, + 'EstimateContentLength': False, + 'MaxAudioChannels': 'string', + 'MinSegments': 0, + 'Protocol': 'string', + 'SegmentLength': 0, + 'TranscodeSeekInfo': 'Auto', + 'Type': 'Audio', + 'VideoCodec': 'string', + }), + ]), + 'UserId': 'string', + 'XmlRootAttributes': list([ + dict({ + 'Name': 'string', + 'Value': 'string', + }), + ]), + }), + 'IconUrl': 'string', + 'MessageCallbackUrl': 'string', + 'PlayableMediaTypes': list([ + 'Video', + ]), + 'SupportedCommands': list([ + 'VolumeSet', + 'Mute', + ]), + 'SupportsContentUploading': True, + 'SupportsMediaControl': True, + 'SupportsPersistentIdentifier': True, + 'SupportsSync': True, + }), + 'client_name': 'Jellyfin for Developers', + 'client_version': '1.0.0', + 'device_id': 'DEVICE-UUID-TWO', + 'device_name': 'JELLYFIN-DEVICE-TWO', + 'id': 'SESSION-UUID-TWO', + 'now_playing': dict({ + 'AirDays': list([ + 'Sunday', + ]), + 'AirTime': 'string', + 'AirsAfterSeasonNumber': 0, + 'AirsBeforeEpisodeNumber': 0, + 'AirsBeforeSeasonNumber': 0, + 'Album': 'string', + 'AlbumArtist': 'string', + 'AlbumArtists': list([ + dict({ + 'Id': '38a5a5bb-dc30-49a2-b175-1de0d1488c43', + 'Name': 'string', + }), + ]), + 'AlbumCount': 0, + 'AlbumId': '21af9851-8e39-43a9-9c47-513d3b9e99fc', + 'AlbumPrimaryImageTag': 'string', + 'Altitude': 0, + 'Aperture': 0, + 'ArtistCount': 0, + 'ArtistItems': list([ + dict({ + 'Id': '38a5a5bb-dc30-49a2-b175-1de0d1488c43', + 'Name': 'string', + }), + ]), + 'Artists': list([ + 'string', + ]), + 'AspectRatio': 'string', + 'Audio': 'Mono', + 'BackdropImageTags': list([ + 'string', + ]), + 'CameraMake': 'string', + 'CameraModel': 'string', + 'CanDelete': True, + 'CanDownload': True, + 'ChannelId': '04b0b2a5-93cb-474d-8ea9-3df0f84eb0ff', + 'ChannelName': 'string', + 'ChannelNumber': 'string', + 'ChannelPrimaryImageTag': 'string', + 'ChannelType': 'TV', + 'Chapters': list([ + dict({ + 'ImageDateModified': '2019-08-24T14:15:22Z', + 'ImagePath': 'string', + 'ImageTag': 'string', + 'Name': 'string', + 'StartPositionTicks': 0, + }), + ]), + 'ChildCount': 0, + 'CollectionType': 'string', + 'CommunityRating': 0, + 'CompletionPercentage': 0, + 'Container': 'string', + 'CriticRating': 0, + 'CumulativeRunTimeTicks': 0, + 'CurrentProgram': dict({ + }), + 'CustomRating': 'string', + 'DateCreated': '2019-08-24T14:15:22Z', + 'DateLastMediaAdded': '2019-08-24T14:15:22Z', + 'DisplayOrder': 'string', + 'DisplayPreferencesId': 'string', + 'EnableMediaSourceDisplay': True, + 'EndDate': '2019-08-24T14:15:22Z', + 'EpisodeCount': 0, + 'EpisodeTitle': 'string', + 'Etag': 'string', + 'ExposureTime': 0, + 'ExternalUrls': list([ + dict({ + 'Name': 'string', + 'Url': 'string', + }), + ]), + 'ExtraType': 'string', + 'FocalLength': 0, + 'ForcedSortName': 'string', + 'GenreItems': list([ + dict({ + 'Id': '38a5a5bb-dc30-49a2-b175-1de0d1488c43', + 'Name': 'string', + }), + ]), + 'Genres': list([ + 'string', + ]), + 'HasSubtitles': True, + 'Height': 0, + 'Id': 'EPISODE-UUID', + 'ImageBlurHashes': dict({ + 'Art': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Backdrop': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Banner': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Box': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'BoxRear': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Chapter': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Disc': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Logo': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Menu': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Primary': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Profile': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Screenshot': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Thumb': dict({ + 'property1': 'string', + 'property2': 'string', + }), + }), + 'ImageOrientation': 'TopLeft', + 'ImageTags': dict({ + 'Backdrop': 'string', + 'property2': 'string', + }), + 'IndexNumber': 0, + 'IndexNumberEnd': 0, + 'IsFolder': False, + 'IsHD': True, + 'IsKids': True, + 'IsLive': True, + 'IsMovie': True, + 'IsNews': True, + 'IsPlaceHolder': True, + 'IsPremiere': True, + 'IsRepeat': True, + 'IsSeries': True, + 'IsSports': True, + 'IsoSpeedRating': 0, + 'IsoType': 'Dvd', + 'Latitude': 0, + 'LocalTrailerCount': 0, + 'LocationType': 'FileSystem', + 'LockData': True, + 'LockedFields': list([ + 'Cast', + ]), + 'Longitude': 0, + 'MediaSourceCount': 0, + 'MediaSources': list([ + dict({ + 'AnalyzeDurationMs': 0, + 'Bitrate': 0, + 'BufferMs': 0, + 'Container': 'string', + 'DefaultAudioStreamIndex': 0, + 'DefaultSubtitleStreamIndex': 0, + 'ETag': 'string', + 'EncoderPath': 'string', + 'EncoderProtocol': 'File', + 'Formats': list([ + 'string', + ]), + 'GenPtsInput': True, + 'Id': 'string', + 'IgnoreDts': True, + 'IgnoreIndex': True, + 'IsInfiniteStream': True, + 'IsRemote': True, + 'IsoType': 'Dvd', + 'LiveStreamId': 'string', + 'MediaAttachments': list([ + dict({ + 'Codec': 'string', + 'CodecTag': 'string', + 'Comment': 'string', + 'DeliveryUrl': 'string', + 'FileName': 'string', + 'Index': 0, + 'MimeType': 'string', + }), + ]), + 'MediaStreams': list([ + dict({ + 'AspectRatio': 'string', + 'AverageFrameRate': 0, + 'BitDepth': 0, + 'BitRate': 0, + 'BlPresentFlag': 0, + 'ChannelLayout': 'string', + 'Channels': 0, + 'Codec': 'string', + 'CodecTag': 'string', + 'CodecTimeBase': 'string', + 'ColorPrimaries': 'string', + 'ColorRange': 'string', + 'ColorSpace': 'string', + 'ColorTransfer': 'string', + 'Comment': 'string', + 'DeliveryMethod': 'Encode', + 'DeliveryUrl': 'string', + 'DisplayTitle': 'string', + 'DvBlSignalCompatibilityId': 0, + 'DvLevel': 0, + 'DvProfile': 0, + 'DvVersionMajor': 0, + 'DvVersionMinor': 0, + 'ElPresentFlag': 0, + 'Height': 0, + 'Index': 0, + 'IsAVC': True, + 'IsAnamorphic': True, + 'IsDefault': True, + 'IsExternal': True, + 'IsExternalUrl': True, + 'IsForced': True, + 'IsInterlaced': True, + 'IsTextSubtitleStream': True, + 'Language': 'string', + 'Level': 0, + 'LocalizedDefault': 'string', + 'LocalizedExternal': 'string', + 'LocalizedForced': 'string', + 'LocalizedUndefined': 'string', + 'NalLengthSize': 'string', + 'PacketLength': 0, + 'Path': 'string', + 'PixelFormat': 'string', + 'Profile': 'string', + 'RealFrameRate': 0, + 'RefFrames': 0, + 'RpuPresentFlag': 0, + 'SampleRate': 0, + 'Score': 0, + 'SupportsExternalStream': True, + 'TimeBase': 'string', + 'Title': 'string', + 'Type': 'Audio', + 'VideoDoViTitle': 'string', + 'VideoRange': 'string', + 'VideoRangeType': 'string', + 'Width': 0, + }), + ]), + 'Name': 'string', + 'OpenToken': 'string', + 'Path': 'string', + 'Protocol': 'File', + 'ReadAtNativeFramerate': True, + 'RequiredHttpHeaders': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'RequiresClosing': True, + 'RequiresLooping': True, + 'RequiresOpening': True, + 'RunTimeTicks': 0, + 'Size': 0, + 'SupportsDirectPlay': True, + 'SupportsDirectStream': True, + 'SupportsProbing': True, + 'SupportsTranscoding': True, + 'Timestamp': 'None', + 'TranscodingContainer': 'string', + 'TranscodingSubProtocol': 'string', + 'TranscodingUrl': 'string', + 'Type': 'Default', + 'Video3DFormat': 'HalfSideBySide', + 'VideoType': 'VideoFile', + }), + ]), + 'MediaStreams': list([ + dict({ + 'AspectRatio': 'string', + 'AverageFrameRate': 0, + 'BitDepth': 0, + 'BitRate': 0, + 'BlPresentFlag': 0, + 'ChannelLayout': 'string', + 'Channels': 0, + 'Codec': 'string', + 'CodecTag': 'string', + 'CodecTimeBase': 'string', + 'ColorPrimaries': 'string', + 'ColorRange': 'string', + 'ColorSpace': 'string', + 'ColorTransfer': 'string', + 'Comment': 'string', + 'DeliveryMethod': 'Encode', + 'DeliveryUrl': 'string', + 'DisplayTitle': 'string', + 'DvBlSignalCompatibilityId': 0, + 'DvLevel': 0, + 'DvProfile': 0, + 'DvVersionMajor': 0, + 'DvVersionMinor': 0, + 'ElPresentFlag': 0, + 'Height': 0, + 'Index': 0, + 'IsAVC': True, + 'IsAnamorphic': True, + 'IsDefault': True, + 'IsExternal': True, + 'IsExternalUrl': True, + 'IsForced': True, + 'IsInterlaced': True, + 'IsTextSubtitleStream': True, + 'Language': 'string', + 'Level': 0, + 'LocalizedDefault': 'string', + 'LocalizedExternal': 'string', + 'LocalizedForced': 'string', + 'LocalizedUndefined': 'string', + 'NalLengthSize': 'string', + 'PacketLength': 0, + 'Path': 'string', + 'PixelFormat': 'string', + 'Profile': 'string', + 'RealFrameRate': 0, + 'RefFrames': 0, + 'RpuPresentFlag': 0, + 'SampleRate': 0, + 'Score': 0, + 'SupportsExternalStream': True, + 'TimeBase': 'string', + 'Title': 'string', + 'Type': 'Audio', + 'VideoDoViTitle': 'string', + 'VideoRange': 'string', + 'VideoRangeType': 'string', + 'Width': 0, + }), + ]), + 'MediaType': 'string', + 'MovieCount': 0, + 'MusicVideoCount': 0, + 'Name': 'MOVIE', + 'Number': 'string', + 'OfficialRating': 'string', + 'OriginalTitle': 'string', + 'Overview': 'string', + 'ParentArtImageTag': 'string', + 'ParentArtItemId': '10c1875b-b82c-48e8-bae9-939a5e68dc2f', + 'ParentBackdropImageTags': list([ + 'string', + ]), + 'ParentBackdropItemId': '', + 'ParentId': '', + 'ParentIndexNumber': 0, + 'ParentLogoImageTag': 'string', + 'ParentLogoItemId': 'c78d400f-de5c-421e-8714-4fb05d387233', + 'ParentPrimaryImageItemId': 'string', + 'ParentPrimaryImageTag': 'string', + 'ParentThumbImageTag': 'string', + 'ParentThumbItemId': 'ae6ff707-333d-4994-be6d-b83ca1b35f46', + 'PartCount': 0, + 'Path': 'string', + 'People': list([ + dict({ + 'Id': '38a5a5bb-dc30-49a2-b175-1de0d1488c43', + 'ImageBlurHashes': dict({ + 'Art': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Backdrop': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Banner': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Box': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'BoxRear': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Chapter': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Disc': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Logo': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Menu': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Primary': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Profile': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Screenshot': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'Thumb': dict({ + 'property1': 'string', + 'property2': 'string', + }), + }), + 'Name': 'string', + 'PrimaryImageTag': 'string', + 'Role': 'string', + 'Type': 'string', + }), + ]), + 'PlayAccess': 'Full', + 'PlaylistItemId': 'string', + 'PreferredMetadataCountryCode': 'string', + 'PreferredMetadataLanguage': 'string', + 'PremiereDate': '2019-08-24T14:15:22Z', + 'PrimaryImageAspectRatio': 0, + 'ProductionLocations': list([ + 'string', + ]), + 'ProductionYear': 0, + 'ProgramCount': 0, + 'ProgramId': 'string', + 'ProviderIds': dict({ + 'property1': 'string', + 'property2': 'string', + }), + 'RecursiveItemCount': 0, + 'RemoteTrailers': list([ + dict({ + 'Name': 'string', + 'Url': 'string', + }), + ]), + 'RunTimeTicks': 2000000000, + 'ScreenshotImageTags': list([ + 'string', + ]), + 'SeasonId': 'SEASON-UUID', + 'SeasonName': 'SEASON', + 'SeriesCount': 0, + 'SeriesId': 'SERIES-UUID', + 'SeriesName': 'SERIES', + 'SeriesPrimaryImageTag': 'string', + 'SeriesStudio': 'HASS', + 'SeriesThumbImageTag': 'string', + 'SeriesTimerId': 'string', + 'ServerId': 'SERVER-UUID', + 'ShutterSpeed': 0, + 'Software': 'string', + 'SongCount': 0, + 'SortName': 'string', + 'SourceType': 'string', + 'SpecialFeatureCount': 0, + 'StartDate': '2019-08-24T14:15:22Z', + 'Status': 'string', + 'Studios': list([ + dict({ + 'Id': '38a5a5bb-dc30-49a2-b175-1de0d1488c43', + 'Name': 'string', + }), + ]), + 'SupportsSync': True, + 'Taglines': list([ + 'string', + ]), + 'Tags': list([ + 'string', + ]), + 'TimerId': 'string', + 'TrailerCount': 0, + 'Type': 'Movie', + 'UserData': dict({ + 'IsFavorite': True, + 'ItemId': 'string', + 'Key': 'string', + 'LastPlayedDate': '2019-08-24T14:15:22Z', + 'Likes': True, + 'PlayCount': 0, + 'PlaybackPositionTicks': 0, + 'Played': True, + 'PlayedPercentage': 0, + 'Rating': 0, + 'UnplayedItemCount': 0, + }), + 'Video3DFormat': 'HalfSideBySide', + 'VideoType': 'VideoFile', + 'Width': 0, + }), + 'play_state': dict({ + 'AudioStreamIndex': 0, + 'CanSeek': True, + 'IsMuted': False, + 'IsPaused': False, + 'LiveStreamId': 'string', + 'MediaSourceId': 'string', + 'PlayMethod': 'Transcode', + 'PositionTicks': 230000000, + 'RepeatMode': 'RepeatNone', + 'SubtitleStreamIndex': 0, + 'VolumeLevel': 55, + }), + 'user_id': 'USER-UUID-TWO', + }), + dict({ + 'capabilities': dict({ + 'AppStoreUrl': 'string', + 'DeviceProfile': dict({ + 'AlbumArtPn': 'string', + 'CodecProfiles': list([ + dict({ + 'ApplyConditions': list([ + dict({ + 'Condition': 'Equals', + 'IsRequired': True, + 'Property': 'AudioChannels', + 'Value': 'string', + }), + ]), + 'Codec': 'string', + 'Conditions': list([ + dict({ + 'Condition': 'Equals', + 'IsRequired': True, + 'Property': 'AudioChannels', + 'Value': 'string', + }), + ]), + 'Container': 'string', + 'Type': 'Video', + }), + ]), + 'ContainerProfiles': list([ + dict({ + 'Conditions': list([ + dict({ + 'Condition': 'Equals', + 'IsRequired': True, + 'Property': 'AudioChannels', + 'Value': 'string', + }), + ]), + 'Container': 'string', + 'Type': 'Audio', + }), + ]), + 'DirectPlayProfiles': list([ + dict({ + 'AudioCodec': 'string', + 'Container': 'string', + 'Type': 'Audio', + 'VideoCodec': 'string', + }), + ]), + 'EnableAlbumArtInDidl': False, + 'EnableMSMediaReceiverRegistrar': False, + 'EnableSingleAlbumArtLimit': False, + 'EnableSingleSubtitleLimit': False, + 'FriendlyName': 'string', + 'Id': 'string', + 'Identification': dict({ + 'FriendlyName': 'string', + 'Headers': list([ + dict({ + 'Match': 'Equals', + 'Name': 'string', + 'Value': 'string', + }), + ]), + 'Manufacturer': 'string', + 'ManufacturerUrl': 'string', + 'ModelDescription': 'string', + 'ModelName': 'string', + 'ModelNumber': 'string', + 'ModelUrl': 'string', + 'SerialNumber': 'string', + }), + 'IgnoreTranscodeByteRangeRequests': False, + 'Manufacturer': 'string', + 'ManufacturerUrl': 'string', + 'MaxAlbumArtHeight': 0, + 'MaxAlbumArtWidth': 0, + 'MaxIconHeight': 0, + 'MaxIconWidth': 0, + 'MaxStaticBitrate': 0, + 'MaxStaticMusicBitrate': 0, + 'MaxStreamingBitrate': 0, + 'ModelDescription': 'string', + 'ModelName': 'string', + 'ModelNumber': 'string', + 'ModelUrl': 'string', + 'MusicStreamingTranscodingBitrate': 0, + 'Name': 'string', + 'ProtocolInfo': 'string', + 'RequiresPlainFolders': False, + 'RequiresPlainVideoItems': False, + 'ResponseProfiles': list([ + dict({ + 'AudioCodec': 'string', + 'Conditions': list([ + dict({ + 'Condition': 'Equals', + 'IsRequired': True, + 'Property': 'AudioChannels', + 'Value': 'string', + }), + ]), + 'Container': 'string', + 'MimeType': 'string', + 'OrgPn': 'string', + 'Type': 'Audio', + 'VideoCodec': 'string', + }), + ]), + 'SerialNumber': 'string', + 'SonyAggregationFlags': 'string', + 'SubtitleProfiles': list([ + dict({ + 'Container': 'string', + 'DidlMode': 'string', + 'Format': 'string', + 'Language': 'string', + 'Method': 'Encode', + }), + ]), + 'SupportedMediaTypes': 'string', + 'TimelineOffsetSeconds': 0, + 'TranscodingProfiles': list([ + dict({ + 'AudioCodec': 'string', + 'BreakOnNonKeyFrames': False, + 'Conditions': list([ + dict({ + 'Condition': 'Equals', + 'IsRequired': True, + 'Property': 'AudioChannels', + 'Value': 'string', + }), + ]), + 'Container': 'string', + 'Context': 'Streaming', + 'CopyTimestamps': False, + 'EnableMpegtsM2TsMode': False, + 'EnableSubtitlesInManifest': False, + 'EstimateContentLength': False, + 'MaxAudioChannels': 'string', + 'MinSegments': 0, + 'Protocol': 'string', + 'SegmentLength': 0, + 'TranscodeSeekInfo': 'Auto', + 'Type': 'Audio', + 'VideoCodec': 'string', + }), + ]), + 'UserId': 'string', + 'XmlRootAttributes': list([ + dict({ + 'Name': 'string', + 'Value': 'string', + }), + ]), + }), + 'IconUrl': 'string', + 'MessageCallbackUrl': 'string', + 'PlayableMediaTypes': list([ + 'Video', + ]), + 'SupportedCommands': list([ + 'MoveUp', + ]), + 'SupportsContentUploading': False, + 'SupportsMediaControl': False, + 'SupportsPersistentIdentifier': False, + 'SupportsSync': True, + }), + 'client_name': 'Jellyfin for Developers', + 'client_version': '2.0.0', + 'device_id': 'DEVICE-UUID-THREE', + 'device_name': 'JELLYFIN-DEVICE-THREE', + 'id': 'SESSION-UUID-THREE', + 'now_playing': None, + 'play_state': dict({ + 'AudioStreamIndex': 0, + 'CanSeek': True, + 'IsMuted': True, + 'IsPaused': False, + 'LiveStreamId': 'string', + 'MediaSourceId': 'string', + 'PlayMethod': 'Transcode', + 'PositionTicks': 0, + 'RepeatMode': 'RepeatNone', + 'SubtitleStreamIndex': 0, + 'VolumeLevel': 0, + }), + 'user_id': 'USER-UUID', + }), + dict({ + 'capabilities': dict({ + 'PlayableMediaTypes': list([ + 'Audio', + 'Video', + ]), + 'SupportedCommands': list([ + 'MoveUp', + 'MoveDown', + 'MoveLeft', + 'MoveRight', + 'PageUp', + 'PageDown', + 'PreviousLetter', + 'NextLetter', + 'ToggleOsd', + 'ToggleContextMenu', + 'Select', + 'Back', + 'SendKey', + 'SendString', + 'GoHome', + 'GoToSettings', + 'VolumeUp', + 'VolumeDown', + 'Mute', + 'Unmute', + 'ToggleMute', + 'SetVolume', + 'SetAudioStreamIndex', + 'SetSubtitleStreamIndex', + 'DisplayContent', + 'GoToSearch', + 'DisplayMessage', + 'SetRepeatMode', + 'SetShuffleQueue', + 'ChannelUp', + 'ChannelDown', + 'PlayMediaSource', + 'PlayTrailers', + ]), + 'SupportsContentUploading': False, + 'SupportsMediaControl': True, + 'SupportsPersistentIdentifier': False, + 'SupportsSync': False, + }), + 'client_name': 'Jellyfin Android', + 'client_version': '2.4.4', + 'device_id': 'DEVICE-UUID-FOUR', + 'device_name': 'JELLYFIN DEVICE FOUR', + 'id': 'SESSION-UUID-FOUR', + 'now_playing': dict({ + 'Album': 'ALBUM', + 'AlbumArtist': 'Album Artist', + 'AlbumArtists': list([ + dict({ + 'Id': '9a65b2c222ddb34e51f5cae360fad3a1', + 'Name': 'Album Artist', + }), + ]), + 'AlbumId': 'ALBUM-UUID', + 'ArtistItems': list([ + dict({ + 'Id': '1d864900526d9a9513b489f1cc28f8ca', + 'Name': 'Contributing Artist', + }), + ]), + 'Artists': list([ + 'Contributing Artist', + ]), + 'BackdropImageTags': list([ + ]), + 'ChannelId': None, + 'DateCreated': '2022-10-19T03:09:11.392057Z', + 'EnableMediaSourceDisplay': True, + 'ExternalUrls': list([ + ]), + 'GenreItems': list([ + ]), + 'Genres': list([ + ]), + 'Id': 'MUSIC-UUID', + 'ImageBlurHashes': dict({ + }), + 'ImageTags': dict({ + }), + 'IndexNumber': 1, + 'IsFolder': False, + 'LocalTrailerCount': 0, + 'LocationType': 'FileSystem', + 'MediaStreams': list([ + dict({ + 'BitRate': 256000, + 'ChannelLayout': 'stereo', + 'Channels': 2, + 'Codec': 'mp3', + 'DisplayTitle': 'MP3 - Stereo', + 'Index': 0, + 'IsDefault': False, + 'IsExternal': False, + 'IsForced': False, + 'IsInterlaced': False, + 'IsTextSubtitleStream': False, + 'Level': 0, + 'SampleRate': 44100, + 'SupportsExternalStream': False, + 'TimeBase': '1/14112000', + 'Type': 'Audio', + }), + ]), + 'MediaType': 'Audio', + 'Name': 'MUSIC FILE', + 'ParentId': '4c0343ed1bbcda094178076230051b7e', + 'Path': 'string', + 'ProviderIds': dict({ + }), + 'RunTimeTicks': 736391552, + 'ServerId': 'SERVER-UUID', + 'SpecialFeatureCount': 0, + 'Studios': list([ + ]), + 'Taglines': list([ + ]), + 'Type': 'Audio', + }), + 'play_state': dict({ + 'CanSeek': True, + 'IsMuted': False, + 'IsPaused': False, + 'MediaSourceId': 'a744119f757f88858f95aab1628708c4', + 'PlayMethod': 'DirectPlay', + 'PositionTicks': 220246970, + 'RepeatMode': 'RepeatNone', + 'VolumeLevel': 100, + }), + 'user_id': 'USER-UUID-TWO', + }), + ]), + }) +# --- diff --git a/tests/components/jellyfin/test_diagnostics.py b/tests/components/jellyfin/test_diagnostics.py index 15561f5294c..b56d864eaac 100644 --- a/tests/components/jellyfin/test_diagnostics.py +++ b/tests/components/jellyfin/test_diagnostics.py @@ -1,4 +1,5 @@ """Test Jellyfin diagnostics.""" +from syrupy import SnapshotAssertion from homeassistant.core import HomeAssistant @@ -11,601 +12,12 @@ async def test_diagnostics( hass: HomeAssistant, init_integration: MockConfigEntry, hass_client: ClientSessionGenerator, + snapshot: SnapshotAssertion, ) -> None: """Test generating diagnostics for a config entry.""" - entry = init_integration + data = await get_diagnostics_for_config_entry(hass, hass_client, init_integration) - diag = await get_diagnostics_for_config_entry(hass, hass_client, entry) - assert diag - assert diag["entry"] == { - "title": "Jellyfin", - "data": { - "url": "https://example.com", - "username": "test-username", - "password": "**REDACTED**", - "client_device_id": entry.entry_id, - }, - } - assert diag["server"] == { - "id": "SERVER-UUID", - "name": "JELLYFIN-SERVER", - "version": None, - } - assert diag["sessions"] - assert len(diag["sessions"]) == 4 - assert diag["sessions"][0] == { - "id": "SESSION-UUID", - "user_id": "08ba1929-681e-4b24-929b-9245852f65c0", - "device_id": "DEVICE-UUID", - "device_name": "JELLYFIN-DEVICE", - "client_name": "Jellyfin for Developers", - "client_version": "1.0.0", - "capabilities": { - "PlayableMediaTypes": ["Video"], - "SupportedCommands": ["VolumeSet", "Mute"], - "SupportsMediaControl": True, - "SupportsContentUploading": True, - "MessageCallbackUrl": "string", - "SupportsPersistentIdentifier": True, - "SupportsSync": True, - "DeviceProfile": { - "Name": "string", - "Id": "string", - "Identification": { - "FriendlyName": "string", - "ModelNumber": "string", - "SerialNumber": "string", - "ModelName": "string", - "ModelDescription": "string", - "ModelUrl": "string", - "Manufacturer": "string", - "ManufacturerUrl": "string", - "Headers": [ - {"Name": "string", "Value": "string", "Match": "Equals"} - ], - }, - "FriendlyName": "string", - "Manufacturer": "string", - "ManufacturerUrl": "string", - "ModelName": "string", - "ModelDescription": "string", - "ModelNumber": "string", - "ModelUrl": "string", - "SerialNumber": "string", - "EnableAlbumArtInDidl": False, - "EnableSingleAlbumArtLimit": False, - "EnableSingleSubtitleLimit": False, - "SupportedMediaTypes": "string", - "UserId": "string", - "AlbumArtPn": "string", - "MaxAlbumArtWidth": 0, - "MaxAlbumArtHeight": 0, - "MaxIconWidth": 0, - "MaxIconHeight": 0, - "MaxStreamingBitrate": 0, - "MaxStaticBitrate": 0, - "MusicStreamingTranscodingBitrate": 0, - "MaxStaticMusicBitrate": 0, - "SonyAggregationFlags": "string", - "ProtocolInfo": "string", - "TimelineOffsetSeconds": 0, - "RequiresPlainVideoItems": False, - "RequiresPlainFolders": False, - "EnableMSMediaReceiverRegistrar": False, - "IgnoreTranscodeByteRangeRequests": False, - "XmlRootAttributes": [{"Name": "string", "Value": "string"}], - "DirectPlayProfiles": [ - { - "Container": "string", - "AudioCodec": "string", - "VideoCodec": "string", - "Type": "Audio", - } - ], - "TranscodingProfiles": [ - { - "Container": "string", - "Type": "Audio", - "VideoCodec": "string", - "AudioCodec": "string", - "Protocol": "string", - "EstimateContentLength": False, - "EnableMpegtsM2TsMode": False, - "TranscodeSeekInfo": "Auto", - "CopyTimestamps": False, - "Context": "Streaming", - "EnableSubtitlesInManifest": False, - "MaxAudioChannels": "string", - "MinSegments": 0, - "SegmentLength": 0, - "BreakOnNonKeyFrames": False, - "Conditions": [ - { - "Condition": "Equals", - "Property": "AudioChannels", - "Value": "string", - "IsRequired": True, - } - ], - } - ], - "ContainerProfiles": [ - { - "Type": "Audio", - "Conditions": [ - { - "Condition": "Equals", - "Property": "AudioChannels", - "Value": "string", - "IsRequired": True, - } - ], - "Container": "string", - } - ], - "CodecProfiles": [ - { - "Type": "Video", - "Conditions": [ - { - "Condition": "Equals", - "Property": "AudioChannels", - "Value": "string", - "IsRequired": True, - } - ], - "ApplyConditions": [ - { - "Condition": "Equals", - "Property": "AudioChannels", - "Value": "string", - "IsRequired": True, - } - ], - "Codec": "string", - "Container": "string", - } - ], - "ResponseProfiles": [ - { - "Container": "string", - "AudioCodec": "string", - "VideoCodec": "string", - "Type": "Audio", - "OrgPn": "string", - "MimeType": "string", - "Conditions": [ - { - "Condition": "Equals", - "Property": "AudioChannels", - "Value": "string", - "IsRequired": True, - } - ], - } - ], - "SubtitleProfiles": [ - { - "Format": "string", - "Method": "Encode", - "DidlMode": "string", - "Language": "string", - "Container": "string", - } - ], - }, - "AppStoreUrl": "string", - "IconUrl": "string", - }, - "now_playing": { - "Name": "EPISODE", - "OriginalTitle": "string", - "ServerId": "SERVER-UUID", - "Id": "EPISODE-UUID", - "Etag": "string", - "SourceType": "string", - "PlaylistItemId": "string", - "DateCreated": "2019-08-24T14:15:22Z", - "DateLastMediaAdded": "2019-08-24T14:15:22Z", - "ExtraType": "string", - "AirsBeforeSeasonNumber": 0, - "AirsAfterSeasonNumber": 0, - "AirsBeforeEpisodeNumber": 0, - "CanDelete": True, - "CanDownload": True, - "HasSubtitles": True, - "PreferredMetadataLanguage": "string", - "PreferredMetadataCountryCode": "string", - "SupportsSync": True, - "Container": "string", - "SortName": "string", - "ForcedSortName": "string", - "Video3DFormat": "HalfSideBySide", - "PremiereDate": "2019-08-24T14:15:22Z", - "ExternalUrls": [{"Name": "string", "Url": "string"}], - "MediaSources": [ - { - "Protocol": "File", - "Id": "string", - "Path": "string", - "EncoderPath": "string", - "EncoderProtocol": "File", - "Type": "Default", - "Container": "string", - "Size": 0, - "Name": "string", - "IsRemote": True, - "ETag": "string", - "RunTimeTicks": 0, - "ReadAtNativeFramerate": True, - "IgnoreDts": True, - "IgnoreIndex": True, - "GenPtsInput": True, - "SupportsTranscoding": True, - "SupportsDirectStream": True, - "SupportsDirectPlay": True, - "IsInfiniteStream": True, - "RequiresOpening": True, - "OpenToken": "string", - "RequiresClosing": True, - "LiveStreamId": "string", - "BufferMs": 0, - "RequiresLooping": True, - "SupportsProbing": True, - "VideoType": "VideoFile", - "IsoType": "Dvd", - "Video3DFormat": "HalfSideBySide", - "MediaStreams": [ - { - "Codec": "string", - "CodecTag": "string", - "Language": "string", - "ColorRange": "string", - "ColorSpace": "string", - "ColorTransfer": "string", - "ColorPrimaries": "string", - "DvVersionMajor": 0, - "DvVersionMinor": 0, - "DvProfile": 0, - "DvLevel": 0, - "RpuPresentFlag": 0, - "ElPresentFlag": 0, - "BlPresentFlag": 0, - "DvBlSignalCompatibilityId": 0, - "Comment": "string", - "TimeBase": "string", - "CodecTimeBase": "string", - "Title": "string", - "VideoRange": "string", - "VideoRangeType": "string", - "VideoDoViTitle": "string", - "LocalizedUndefined": "string", - "LocalizedDefault": "string", - "LocalizedForced": "string", - "LocalizedExternal": "string", - "DisplayTitle": "string", - "NalLengthSize": "string", - "IsInterlaced": True, - "IsAVC": True, - "ChannelLayout": "string", - "BitRate": 0, - "BitDepth": 0, - "RefFrames": 0, - "PacketLength": 0, - "Channels": 0, - "SampleRate": 0, - "IsDefault": True, - "IsForced": True, - "Height": 0, - "Width": 0, - "AverageFrameRate": 0, - "RealFrameRate": 0, - "Profile": "string", - "Type": "Audio", - "AspectRatio": "string", - "Index": 0, - "Score": 0, - "IsExternal": True, - "DeliveryMethod": "Encode", - "DeliveryUrl": "string", - "IsExternalUrl": True, - "IsTextSubtitleStream": True, - "SupportsExternalStream": True, - "Path": "string", - "PixelFormat": "string", - "Level": 0, - "IsAnamorphic": True, - } - ], - "MediaAttachments": [ - { - "Codec": "string", - "CodecTag": "string", - "Comment": "string", - "Index": 0, - "FileName": "string", - "MimeType": "string", - "DeliveryUrl": "string", - } - ], - "Formats": ["string"], - "Bitrate": 0, - "Timestamp": "None", - "RequiredHttpHeaders": { - "property1": "string", - "property2": "string", - }, - "TranscodingUrl": "string", - "TranscodingSubProtocol": "string", - "TranscodingContainer": "string", - "AnalyzeDurationMs": 0, - "DefaultAudioStreamIndex": 0, - "DefaultSubtitleStreamIndex": 0, - } - ], - "CriticRating": 0, - "ProductionLocations": ["string"], - "Path": "string", - "EnableMediaSourceDisplay": True, - "OfficialRating": "string", - "CustomRating": "string", - "ChannelId": "04b0b2a5-93cb-474d-8ea9-3df0f84eb0ff", - "ChannelName": "string", - "Overview": "string", - "Taglines": ["string"], - "Genres": ["string"], - "CommunityRating": 0, - "CumulativeRunTimeTicks": 0, - "RunTimeTicks": 600000000, - "PlayAccess": "Full", - "AspectRatio": "string", - "ProductionYear": 0, - "IsPlaceHolder": True, - "Number": "string", - "ChannelNumber": "string", - "IndexNumber": 3, - "IndexNumberEnd": 0, - "ParentIndexNumber": 1, - "RemoteTrailers": [{"Url": "string", "Name": "string"}], - "ProviderIds": {"property1": "string", "property2": "string"}, - "IsHD": True, - "IsFolder": False, - "ParentId": "PARENT-UUID", - "Type": "Episode", - "People": [ - { - "Name": "string", - "Id": "38a5a5bb-dc30-49a2-b175-1de0d1488c43", - "Role": "string", - "Type": "string", - "PrimaryImageTag": "string", - "ImageBlurHashes": { - "Primary": {"property1": "string", "property2": "string"}, - "Art": {"property1": "string", "property2": "string"}, - "Backdrop": {"property1": "string", "property2": "string"}, - "Banner": {"property1": "string", "property2": "string"}, - "Logo": {"property1": "string", "property2": "string"}, - "Thumb": {"property1": "string", "property2": "string"}, - "Disc": {"property1": "string", "property2": "string"}, - "Box": {"property1": "string", "property2": "string"}, - "Screenshot": {"property1": "string", "property2": "string"}, - "Menu": {"property1": "string", "property2": "string"}, - "Chapter": {"property1": "string", "property2": "string"}, - "BoxRear": {"property1": "string", "property2": "string"}, - "Profile": {"property1": "string", "property2": "string"}, - }, - } - ], - "Studios": [ - {"Name": "string", "Id": "38a5a5bb-dc30-49a2-b175-1de0d1488c43"} - ], - "GenreItems": [ - {"Name": "string", "Id": "38a5a5bb-dc30-49a2-b175-1de0d1488c43"} - ], - "ParentLogoItemId": "c78d400f-de5c-421e-8714-4fb05d387233", - "ParentBackdropItemId": "c22fd826-17fc-44f4-9b04-1eb3e8fb9173", - "ParentBackdropImageTags": ["string"], - "LocalTrailerCount": 0, - "UserData": { - "Rating": 0, - "PlayedPercentage": 0, - "UnplayedItemCount": 0, - "PlaybackPositionTicks": 0, - "PlayCount": 0, - "IsFavorite": True, - "Likes": True, - "LastPlayedDate": "2019-08-24T14:15:22Z", - "Played": True, - "Key": "string", - "ItemId": "string", - }, - "RecursiveItemCount": 0, - "ChildCount": 0, - "SeriesName": "SERIES", - "SeriesId": "SERIES-UUID", - "SeasonId": "SEASON-UUID", - "SpecialFeatureCount": 0, - "DisplayPreferencesId": "string", - "Status": "string", - "AirTime": "string", - "AirDays": ["Sunday"], - "Tags": ["string"], - "PrimaryImageAspectRatio": 0, - "Artists": ["string"], - "ArtistItems": [ - {"Name": "string", "Id": "38a5a5bb-dc30-49a2-b175-1de0d1488c43"} - ], - "Album": "string", - "CollectionType": "string", - "DisplayOrder": "string", - "AlbumId": "21af9851-8e39-43a9-9c47-513d3b9e99fc", - "AlbumPrimaryImageTag": "string", - "SeriesPrimaryImageTag": "string", - "AlbumArtist": "string", - "AlbumArtists": [ - {"Name": "string", "Id": "38a5a5bb-dc30-49a2-b175-1de0d1488c43"} - ], - "SeasonName": "SEASON", - "MediaStreams": [ - { - "Codec": "string", - "CodecTag": "string", - "Language": "string", - "ColorRange": "string", - "ColorSpace": "string", - "ColorTransfer": "string", - "ColorPrimaries": "string", - "DvVersionMajor": 0, - "DvVersionMinor": 0, - "DvProfile": 0, - "DvLevel": 0, - "RpuPresentFlag": 0, - "ElPresentFlag": 0, - "BlPresentFlag": 0, - "DvBlSignalCompatibilityId": 0, - "Comment": "string", - "TimeBase": "string", - "CodecTimeBase": "string", - "Title": "string", - "VideoRange": "string", - "VideoRangeType": "string", - "VideoDoViTitle": "string", - "LocalizedUndefined": "string", - "LocalizedDefault": "string", - "LocalizedForced": "string", - "LocalizedExternal": "string", - "DisplayTitle": "string", - "NalLengthSize": "string", - "IsInterlaced": True, - "IsAVC": True, - "ChannelLayout": "string", - "BitRate": 0, - "BitDepth": 0, - "RefFrames": 0, - "PacketLength": 0, - "Channels": 0, - "SampleRate": 0, - "IsDefault": True, - "IsForced": True, - "Height": 0, - "Width": 0, - "AverageFrameRate": 0, - "RealFrameRate": 0, - "Profile": "string", - "Type": "Audio", - "AspectRatio": "string", - "Index": 0, - "Score": 0, - "IsExternal": True, - "DeliveryMethod": "Encode", - "DeliveryUrl": "string", - "IsExternalUrl": True, - "IsTextSubtitleStream": True, - "SupportsExternalStream": True, - "Path": "string", - "PixelFormat": "string", - "Level": 0, - "IsAnamorphic": True, - } - ], - "VideoType": "VideoFile", - "PartCount": 0, - "MediaSourceCount": 0, - "ImageTags": {"property1": "string", "property2": "string"}, - "BackdropImageTags": ["string"], - "ScreenshotImageTags": ["string"], - "ParentLogoImageTag": "string", - "ParentArtItemId": "10c1875b-b82c-48e8-bae9-939a5e68dc2f", - "ParentArtImageTag": "string", - "SeriesThumbImageTag": "string", - "ImageBlurHashes": { - "Primary": {"property1": "string", "property2": "string"}, - "Art": {"property1": "string", "property2": "string"}, - "Backdrop": {"property1": "string", "property2": "string"}, - "Banner": {"property1": "string", "property2": "string"}, - "Logo": {"property1": "string", "property2": "string"}, - "Thumb": {"property1": "string", "property2": "string"}, - "Disc": {"property1": "string", "property2": "string"}, - "Box": {"property1": "string", "property2": "string"}, - "Screenshot": {"property1": "string", "property2": "string"}, - "Menu": {"property1": "string", "property2": "string"}, - "Chapter": {"property1": "string", "property2": "string"}, - "BoxRear": {"property1": "string", "property2": "string"}, - "Profile": {"property1": "string", "property2": "string"}, - }, - "SeriesStudio": "HASS", - "ParentThumbItemId": "ae6ff707-333d-4994-be6d-b83ca1b35f46", - "ParentThumbImageTag": "string", - "ParentPrimaryImageItemId": "string", - "ParentPrimaryImageTag": "string", - "Chapters": [ - { - "StartPositionTicks": 0, - "Name": "string", - "ImagePath": "string", - "ImageDateModified": "2019-08-24T14:15:22Z", - "ImageTag": "string", - } - ], - "LocationType": "FileSystem", - "IsoType": "Dvd", - "MediaType": "string", - "EndDate": "2019-08-24T14:15:22Z", - "LockedFields": ["Cast"], - "TrailerCount": 0, - "MovieCount": 0, - "SeriesCount": 0, - "ProgramCount": 0, - "EpisodeCount": 0, - "SongCount": 0, - "AlbumCount": 0, - "ArtistCount": 0, - "MusicVideoCount": 0, - "LockData": True, - "Width": 0, - "Height": 0, - "CameraMake": "string", - "CameraModel": "string", - "Software": "string", - "ExposureTime": 0, - "FocalLength": 0, - "ImageOrientation": "TopLeft", - "Aperture": 0, - "ShutterSpeed": 0, - "Latitude": 0, - "Longitude": 0, - "Altitude": 0, - "IsoSpeedRating": 0, - "SeriesTimerId": "string", - "ProgramId": "string", - "ChannelPrimaryImageTag": "string", - "StartDate": "2019-08-24T14:15:22Z", - "CompletionPercentage": 0, - "IsRepeat": True, - "EpisodeTitle": "string", - "ChannelType": "TV", - "Audio": "Mono", - "IsMovie": True, - "IsSports": True, - "IsSeries": True, - "IsLive": True, - "IsNews": True, - "IsKids": True, - "IsPremiere": True, - "TimerId": "string", - "CurrentProgram": {}, - }, - "play_state": { - "PositionTicks": 100000000, - "CanSeek": True, - "IsPaused": True, - "IsMuted": True, - "VolumeLevel": 0, - "AudioStreamIndex": 0, - "SubtitleStreamIndex": 0, - "MediaSourceId": "string", - "PlayMethod": "Transcode", - "RepeatMode": "RepeatNone", - "LiveStreamId": "string", - }, - } + assert data["entry"]["data"]["client_device_id"] == init_integration.entry_id + data["entry"]["data"]["client_device_id"] = "entry-id" + + assert data == snapshot