mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-14 01:02:59 -07:00
Update export fields
This commit is contained in:
parent
f497c11d73
commit
f8e94224cf
1 changed files with 107 additions and 45 deletions
|
@ -74,7 +74,6 @@ class Export(object):
|
||||||
'photo': 'photos',
|
'photo': 'photos',
|
||||||
'clip': 'clips',
|
'clip': 'clips',
|
||||||
'collection': 'collections',
|
'collection': 'collections',
|
||||||
'children': 'children',
|
|
||||||
'playlist': 'playlists',
|
'playlist': 'playlists',
|
||||||
'item': 'items'
|
'item': 'items'
|
||||||
}
|
}
|
||||||
|
@ -89,7 +88,7 @@ class Export(object):
|
||||||
'photoalbum': ['photoalbum', 'photo', 'clip'],
|
'photoalbum': ['photoalbum', 'photo', 'clip'],
|
||||||
'photo': [],
|
'photo': [],
|
||||||
'clip': [],
|
'clip': [],
|
||||||
'collection': ['children'],
|
'collection': ['item'],
|
||||||
'playlist': ['item']
|
'playlist': ['item']
|
||||||
}
|
}
|
||||||
TREE_MEDIA_TYPES = [
|
TREE_MEDIA_TYPES = [
|
||||||
|
@ -97,7 +96,7 @@ class Export(object):
|
||||||
('track', 'album', 'artist'),
|
('track', 'album', 'artist'),
|
||||||
('photo', 'photoalbum'),
|
('photo', 'photoalbum'),
|
||||||
('clip', 'photoalbum'),
|
('clip', 'photoalbum'),
|
||||||
('children', 'collection'),
|
('item', 'collection'),
|
||||||
('item', 'playlist')
|
('item', 'playlist')
|
||||||
]
|
]
|
||||||
METADATA_LEVELS = (0, 1, 2, 3, 9)
|
METADATA_LEVELS = (0, 1, 2, 3, 9)
|
||||||
|
@ -158,6 +157,7 @@ class Export(object):
|
||||||
_movie_attrs = {
|
_movie_attrs = {
|
||||||
'addedAt': helpers.datetime_to_iso,
|
'addedAt': helpers.datetime_to_iso,
|
||||||
'art': None,
|
'art': None,
|
||||||
|
'artBlurHash': None,
|
||||||
'artFile': lambda o: self.get_image(o, 'art'),
|
'artFile': lambda o: self.get_image(o, 'art'),
|
||||||
'audienceRating': None,
|
'audienceRating': None,
|
||||||
'audienceRatingImage': None,
|
'audienceRatingImage': None,
|
||||||
|
@ -217,9 +217,10 @@ class Export(object):
|
||||||
'duration': None,
|
'duration': None,
|
||||||
'height': None,
|
'height': None,
|
||||||
'id': None,
|
'id': None,
|
||||||
|
'isOptimizedVersion': None,
|
||||||
'has64bitOffsets': None,
|
'has64bitOffsets': None,
|
||||||
'optimizedForStreaming': None,
|
'optimizedForStreaming': None,
|
||||||
'optimizedVersion': None,
|
'proxyType': None,
|
||||||
'target': None,
|
'target': None,
|
||||||
'title': None,
|
'title': None,
|
||||||
'videoCodec': None,
|
'videoCodec': None,
|
||||||
|
@ -237,36 +238,42 @@ class Export(object):
|
||||||
'exists': None,
|
'exists': None,
|
||||||
'file': None,
|
'file': None,
|
||||||
'has64bitOffsets': None,
|
'has64bitOffsets': None,
|
||||||
|
'hasThumbnail': None,
|
||||||
'id': None,
|
'id': None,
|
||||||
'indexes': None,
|
'indexes': None,
|
||||||
'key': None,
|
'key': None,
|
||||||
'size': None,
|
|
||||||
'sizeHuman': lambda o: helpers.human_file_size(getattr(o, 'size', 0)),
|
|
||||||
'optimizedForStreaming': None,
|
'optimizedForStreaming': None,
|
||||||
'packetLength': None,
|
'packetLength': None,
|
||||||
'requiredBandwidths': None,
|
'requiredBandwidths': None,
|
||||||
|
'size': None,
|
||||||
|
'sizeHuman': lambda o: helpers.human_file_size(getattr(o, 'size', 0)),
|
||||||
'syncItemId': None,
|
'syncItemId': None,
|
||||||
'syncState': None,
|
'syncState': None,
|
||||||
'videoProfile': None,
|
'videoProfile': None,
|
||||||
'videoStreams': {
|
'videoStreams': {
|
||||||
|
'bitrate': None,
|
||||||
'codec': None,
|
'codec': None,
|
||||||
'codecID': None,
|
|
||||||
'default': None,
|
'default': None,
|
||||||
'displayTitle': None,
|
'displayTitle': None,
|
||||||
'extendedDisplayTitle': None,
|
'extendedDisplayTitle': None,
|
||||||
'id': None,
|
'id': None,
|
||||||
'index': None,
|
'index': None,
|
||||||
|
'key': None,
|
||||||
'language': None,
|
'language': None,
|
||||||
'languageCode': None,
|
'languageCode': None,
|
||||||
|
'requiredBandwidths': None,
|
||||||
'selected': None,
|
'selected': None,
|
||||||
'streamType': None,
|
'streamType': None,
|
||||||
'title': None,
|
'title': None,
|
||||||
'type': None,
|
'type': None,
|
||||||
|
'anamorphic': None,
|
||||||
'bitDepth': None,
|
'bitDepth': None,
|
||||||
'bitrate': None,
|
|
||||||
'cabac': None,
|
'cabac': None,
|
||||||
'chromaLocation': None,
|
'chromaLocation': None,
|
||||||
'chromaSubsampling': None,
|
'chromaSubsampling': None,
|
||||||
|
'codecID': None,
|
||||||
|
'codedHeight': None,
|
||||||
|
'codedWidth': None,
|
||||||
'colorPrimaries': None,
|
'colorPrimaries': None,
|
||||||
'colorRange': None,
|
'colorRange': None,
|
||||||
'colorSpace': None,
|
'colorSpace': None,
|
||||||
|
@ -290,32 +297,32 @@ class Export(object):
|
||||||
'pixelFormat': None,
|
'pixelFormat': None,
|
||||||
'profile': None,
|
'profile': None,
|
||||||
'refFrames': None,
|
'refFrames': None,
|
||||||
'requiredBandwidths': None,
|
|
||||||
'scanType': None,
|
'scanType': None,
|
||||||
'streamIdentifier': None,
|
'streamIdentifier': None,
|
||||||
'width': None
|
'width': None
|
||||||
},
|
},
|
||||||
'audioStreams': {
|
'audioStreams': {
|
||||||
|
'bitrate': None,
|
||||||
'codec': None,
|
'codec': None,
|
||||||
'default': None,
|
'default': None,
|
||||||
'displayTitle': None,
|
'displayTitle': None,
|
||||||
'extendedDisplayTitle': None,
|
'extendedDisplayTitle': None,
|
||||||
'id': None,
|
'id': None,
|
||||||
'index': None,
|
'index': None,
|
||||||
|
'key': None,
|
||||||
'language': None,
|
'language': None,
|
||||||
'languageCode': None,
|
'languageCode': None,
|
||||||
|
'requiredBandwidths': None,
|
||||||
'selected': None,
|
'selected': None,
|
||||||
'streamType': None,
|
'streamType': None,
|
||||||
'title': None,
|
'title': None,
|
||||||
'type': None,
|
'type': None,
|
||||||
'audioChannelLayout': None,
|
'audioChannelLayout': None,
|
||||||
'bitDepth': None,
|
'bitDepth': None,
|
||||||
'bitrate': None,
|
|
||||||
'bitrateMode': None,
|
'bitrateMode': None,
|
||||||
'channels': None,
|
'channels': None,
|
||||||
'duration': None,
|
'duration': None,
|
||||||
'profile': None,
|
'profile': None,
|
||||||
'requiredBandwidths': None,
|
|
||||||
'samplingRate': None,
|
'samplingRate': None,
|
||||||
'streamIdentifier': None
|
'streamIdentifier': None
|
||||||
},
|
},
|
||||||
|
@ -326,6 +333,7 @@ class Export(object):
|
||||||
'extendedDisplayTitle': None,
|
'extendedDisplayTitle': None,
|
||||||
'id': None,
|
'id': None,
|
||||||
'index': None,
|
'index': None,
|
||||||
|
'key': None,
|
||||||
'language': None,
|
'language': None,
|
||||||
'languageCode': None,
|
'languageCode': None,
|
||||||
'requiredBandwidths': None,
|
'requiredBandwidths': None,
|
||||||
|
@ -333,10 +341,10 @@ class Export(object):
|
||||||
'streamType': None,
|
'streamType': None,
|
||||||
'title': None,
|
'title': None,
|
||||||
'type': None,
|
'type': None,
|
||||||
|
'container': None,
|
||||||
'forced': None,
|
'forced': None,
|
||||||
'format': None,
|
'format': None,
|
||||||
'headerCompression': None,
|
'headerCompression': None,
|
||||||
'key': None,
|
|
||||||
'transient': None
|
'transient': None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -360,6 +368,7 @@ class Export(object):
|
||||||
'summary': None,
|
'summary': None,
|
||||||
'tagline': None,
|
'tagline': None,
|
||||||
'thumb': None,
|
'thumb': None,
|
||||||
|
'thumbBlurHash': None,
|
||||||
'thumbFile': lambda o: self.get_image(o, 'thumb'),
|
'thumbFile': lambda o: self.get_image(o, 'thumb'),
|
||||||
'title': None,
|
'title': None,
|
||||||
'titleSort': None,
|
'titleSort': None,
|
||||||
|
@ -367,6 +376,7 @@ class Export(object):
|
||||||
'updatedAt': helpers.datetime_to_iso,
|
'updatedAt': helpers.datetime_to_iso,
|
||||||
'userRating': None,
|
'userRating': None,
|
||||||
'viewCount': None,
|
'viewCount': None,
|
||||||
|
'viewOffset': None,
|
||||||
'writers': {
|
'writers': {
|
||||||
'id': None,
|
'id': None,
|
||||||
'tag': None
|
'tag': None
|
||||||
|
@ -379,6 +389,7 @@ class Export(object):
|
||||||
_show_attrs = {
|
_show_attrs = {
|
||||||
'addedAt': helpers.datetime_to_iso,
|
'addedAt': helpers.datetime_to_iso,
|
||||||
'art': None,
|
'art': None,
|
||||||
|
'artBlurHash': None,
|
||||||
'artFile': lambda o: self.get_image(o, 'art'),
|
'artFile': lambda o: self.get_image(o, 'art'),
|
||||||
'banner': None,
|
'banner': None,
|
||||||
'childCount': None,
|
'childCount': None,
|
||||||
|
@ -423,6 +434,7 @@ class Export(object):
|
||||||
'summary': None,
|
'summary': None,
|
||||||
'theme': None,
|
'theme': None,
|
||||||
'thumb': None,
|
'thumb': None,
|
||||||
|
'thumbBlurHash': None,
|
||||||
'thumbFile': lambda o: self.get_image(o, 'thumb'),
|
'thumbFile': lambda o: self.get_image(o, 'thumb'),
|
||||||
'title': None,
|
'title': None,
|
||||||
'titleSort': None,
|
'titleSort': None,
|
||||||
|
@ -440,6 +452,7 @@ class Export(object):
|
||||||
_season_attrs = {
|
_season_attrs = {
|
||||||
'addedAt': helpers.datetime_to_iso,
|
'addedAt': helpers.datetime_to_iso,
|
||||||
'art': None,
|
'art': None,
|
||||||
|
'artBlurHash': None,
|
||||||
'artFile': lambda o: self.get_image(o, 'art'),
|
'artFile': lambda o: self.get_image(o, 'art'),
|
||||||
'fields': {
|
'fields': {
|
||||||
'name': None,
|
'name': None,
|
||||||
|
@ -463,6 +476,7 @@ class Export(object):
|
||||||
'ratingKey': None,
|
'ratingKey': None,
|
||||||
'summary': None,
|
'summary': None,
|
||||||
'thumb': None,
|
'thumb': None,
|
||||||
|
'thumbBlurHash': None,
|
||||||
'thumbFile': lambda o: self.get_image(o, 'thumb'),
|
'thumbFile': lambda o: self.get_image(o, 'thumb'),
|
||||||
'title': None,
|
'title': None,
|
||||||
'titleSort': None,
|
'titleSort': None,
|
||||||
|
@ -479,7 +493,16 @@ class Export(object):
|
||||||
_episode_attrs = {
|
_episode_attrs = {
|
||||||
'addedAt': helpers.datetime_to_iso,
|
'addedAt': helpers.datetime_to_iso,
|
||||||
'art': None,
|
'art': None,
|
||||||
|
'artBlurHash': None,
|
||||||
'artFile': lambda o: self.get_image(o, 'art'),
|
'artFile': lambda o: self.get_image(o, 'art'),
|
||||||
|
'chapters': {
|
||||||
|
'id': None,
|
||||||
|
'tag': None,
|
||||||
|
'index': None,
|
||||||
|
'start': None,
|
||||||
|
'end': None,
|
||||||
|
'thumb': None
|
||||||
|
},
|
||||||
'chapterSource': None,
|
'chapterSource': None,
|
||||||
'contentRating': None,
|
'contentRating': None,
|
||||||
'directors': {
|
'directors': {
|
||||||
|
@ -523,9 +546,10 @@ class Export(object):
|
||||||
'duration': None,
|
'duration': None,
|
||||||
'height': None,
|
'height': None,
|
||||||
'id': None,
|
'id': None,
|
||||||
|
'isOptimizedVersion': None,
|
||||||
'has64bitOffsets': None,
|
'has64bitOffsets': None,
|
||||||
'optimizedForStreaming': None,
|
'optimizedForStreaming': None,
|
||||||
'optimizedVersion': None,
|
'proxyType': None,
|
||||||
'target': None,
|
'target': None,
|
||||||
'title': None,
|
'title': None,
|
||||||
'videoCodec': None,
|
'videoCodec': None,
|
||||||
|
@ -543,36 +567,42 @@ class Export(object):
|
||||||
'exists': None,
|
'exists': None,
|
||||||
'file': None,
|
'file': None,
|
||||||
'has64bitOffsets': None,
|
'has64bitOffsets': None,
|
||||||
|
'hasThumbnail': None,
|
||||||
'id': None,
|
'id': None,
|
||||||
'indexes': None,
|
'indexes': None,
|
||||||
'key': None,
|
'key': None,
|
||||||
'size': None,
|
|
||||||
'sizeHuman': lambda o: helpers.human_file_size(getattr(o, 'size', 0)),
|
|
||||||
'optimizedForStreaming': None,
|
'optimizedForStreaming': None,
|
||||||
'packetLength': None,
|
'packetLength': None,
|
||||||
'requiredBandwidths': None,
|
'requiredBandwidths': None,
|
||||||
|
'size': None,
|
||||||
|
'sizeHuman': lambda o: helpers.human_file_size(getattr(o, 'size', 0)),
|
||||||
'syncItemId': None,
|
'syncItemId': None,
|
||||||
'syncState': None,
|
'syncState': None,
|
||||||
'videoProfile': None,
|
'videoProfile': None,
|
||||||
'videoStreams': {
|
'videoStreams': {
|
||||||
|
'bitrate': None,
|
||||||
'codec': None,
|
'codec': None,
|
||||||
'codecID': None,
|
|
||||||
'default': None,
|
'default': None,
|
||||||
'displayTitle': None,
|
'displayTitle': None,
|
||||||
'extendedDisplayTitle': None,
|
'extendedDisplayTitle': None,
|
||||||
'id': None,
|
'id': None,
|
||||||
'index': None,
|
'index': None,
|
||||||
|
'key': None,
|
||||||
'language': None,
|
'language': None,
|
||||||
'languageCode': None,
|
'languageCode': None,
|
||||||
|
'requiredBandwidths': None,
|
||||||
'selected': None,
|
'selected': None,
|
||||||
'streamType': None,
|
'streamType': None,
|
||||||
'title': None,
|
'title': None,
|
||||||
'type': None,
|
'type': None,
|
||||||
|
'anamorphic': None,
|
||||||
'bitDepth': None,
|
'bitDepth': None,
|
||||||
'bitrate': None,
|
|
||||||
'cabac': None,
|
'cabac': None,
|
||||||
'chromaLocation': None,
|
'chromaLocation': None,
|
||||||
'chromaSubsampling': None,
|
'chromaSubsampling': None,
|
||||||
|
'codecID': None,
|
||||||
|
'codedHeight': None,
|
||||||
|
'codedWidth': None,
|
||||||
'colorPrimaries': None,
|
'colorPrimaries': None,
|
||||||
'colorRange': None,
|
'colorRange': None,
|
||||||
'colorSpace': None,
|
'colorSpace': None,
|
||||||
|
@ -596,32 +626,32 @@ class Export(object):
|
||||||
'pixelFormat': None,
|
'pixelFormat': None,
|
||||||
'profile': None,
|
'profile': None,
|
||||||
'refFrames': None,
|
'refFrames': None,
|
||||||
'requiredBandwidths': None,
|
|
||||||
'scanType': None,
|
'scanType': None,
|
||||||
'streamIdentifier': None,
|
'streamIdentifier': None,
|
||||||
'width': None
|
'width': None
|
||||||
},
|
},
|
||||||
'audioStreams': {
|
'audioStreams': {
|
||||||
|
'bitrate': None,
|
||||||
'codec': None,
|
'codec': None,
|
||||||
'default': None,
|
'default': None,
|
||||||
'displayTitle': None,
|
'displayTitle': None,
|
||||||
'extendedDisplayTitle': None,
|
'extendedDisplayTitle': None,
|
||||||
'id': None,
|
'id': None,
|
||||||
'index': None,
|
'index': None,
|
||||||
|
'key': None,
|
||||||
'language': None,
|
'language': None,
|
||||||
'languageCode': None,
|
'languageCode': None,
|
||||||
|
'requiredBandwidths': None,
|
||||||
'selected': None,
|
'selected': None,
|
||||||
'streamType': None,
|
'streamType': None,
|
||||||
'title': None,
|
'title': None,
|
||||||
'type': None,
|
'type': None,
|
||||||
'audioChannelLayout': None,
|
'audioChannelLayout': None,
|
||||||
'bitDepth': None,
|
'bitDepth': None,
|
||||||
'bitrate': None,
|
|
||||||
'bitrateMode': None,
|
'bitrateMode': None,
|
||||||
'channels': None,
|
'channels': None,
|
||||||
'duration': None,
|
'duration': None,
|
||||||
'profile': None,
|
'profile': None,
|
||||||
'requiredBandwidths': None,
|
|
||||||
'samplingRate': None,
|
'samplingRate': None,
|
||||||
'streamIdentifier': None
|
'streamIdentifier': None
|
||||||
},
|
},
|
||||||
|
@ -632,6 +662,7 @@ class Export(object):
|
||||||
'extendedDisplayTitle': None,
|
'extendedDisplayTitle': None,
|
||||||
'id': None,
|
'id': None,
|
||||||
'index': None,
|
'index': None,
|
||||||
|
'key': None,
|
||||||
'language': None,
|
'language': None,
|
||||||
'languageCode': None,
|
'languageCode': None,
|
||||||
'requiredBandwidths': None,
|
'requiredBandwidths': None,
|
||||||
|
@ -639,10 +670,10 @@ class Export(object):
|
||||||
'streamType': None,
|
'streamType': None,
|
||||||
'title': None,
|
'title': None,
|
||||||
'type': None,
|
'type': None,
|
||||||
|
'container': None,
|
||||||
'forced': None,
|
'forced': None,
|
||||||
'format': None,
|
'format': None,
|
||||||
'headerCompression': None,
|
'headerCompression': None,
|
||||||
'key': None,
|
|
||||||
'transient': None
|
'transient': None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -658,6 +689,7 @@ class Export(object):
|
||||||
'ratingKey': None,
|
'ratingKey': None,
|
||||||
'summary': None,
|
'summary': None,
|
||||||
'thumb': None,
|
'thumb': None,
|
||||||
|
'thumbBlurHash': None,
|
||||||
'thumbFile': lambda o: self.get_image(o, 'thumb'),
|
'thumbFile': lambda o: self.get_image(o, 'thumb'),
|
||||||
'title': None,
|
'title': None,
|
||||||
'titleSort': None,
|
'titleSort': None,
|
||||||
|
@ -665,6 +697,7 @@ class Export(object):
|
||||||
'updatedAt': helpers.datetime_to_iso,
|
'updatedAt': helpers.datetime_to_iso,
|
||||||
'userRating': None,
|
'userRating': None,
|
||||||
'viewCount': None,
|
'viewCount': None,
|
||||||
|
'viewOffset': None,
|
||||||
'writers': {
|
'writers': {
|
||||||
'id': None,
|
'id': None,
|
||||||
'tag': None
|
'tag': None
|
||||||
|
@ -677,6 +710,7 @@ class Export(object):
|
||||||
_artist_attrs = {
|
_artist_attrs = {
|
||||||
'addedAt': helpers.datetime_to_iso,
|
'addedAt': helpers.datetime_to_iso,
|
||||||
'art': None,
|
'art': None,
|
||||||
|
'artBlurHash': None,
|
||||||
'artFile': lambda o: self.get_image(o, 'art'),
|
'artFile': lambda o: self.get_image(o, 'art'),
|
||||||
'collections': {
|
'collections': {
|
||||||
'id': None,
|
'id': None,
|
||||||
|
@ -708,12 +742,17 @@ class Export(object):
|
||||||
},
|
},
|
||||||
'rating': None,
|
'rating': None,
|
||||||
'ratingKey': None,
|
'ratingKey': None,
|
||||||
|
'similar': {
|
||||||
|
'id': None,
|
||||||
|
'tag': None
|
||||||
|
},
|
||||||
'styles': {
|
'styles': {
|
||||||
'id': None,
|
'id': None,
|
||||||
'tag': None
|
'tag': None
|
||||||
},
|
},
|
||||||
'summary': None,
|
'summary': None,
|
||||||
'thumb': None,
|
'thumb': None,
|
||||||
|
'thumbBlurHash': None,
|
||||||
'thumbFile': lambda o: self.get_image(o, 'thumb'),
|
'thumbFile': lambda o: self.get_image(o, 'thumb'),
|
||||||
'title': None,
|
'title': None,
|
||||||
'titleSort': None,
|
'titleSort': None,
|
||||||
|
@ -729,6 +768,7 @@ class Export(object):
|
||||||
_album_attrs = {
|
_album_attrs = {
|
||||||
'addedAt': helpers.datetime_to_iso,
|
'addedAt': helpers.datetime_to_iso,
|
||||||
'art': None,
|
'art': None,
|
||||||
|
'artBlurHash': None,
|
||||||
'artFile': lambda o: self.get_image(o, 'art'),
|
'artFile': lambda o: self.get_image(o, 'art'),
|
||||||
'collections': {
|
'collections': {
|
||||||
'id': None,
|
'id': None,
|
||||||
|
@ -767,12 +807,14 @@ class Export(object):
|
||||||
'parentTitle': None,
|
'parentTitle': None,
|
||||||
'rating': None,
|
'rating': None,
|
||||||
'ratingKey': None,
|
'ratingKey': None,
|
||||||
|
'studio': None,
|
||||||
'styles': {
|
'styles': {
|
||||||
'id': None,
|
'id': None,
|
||||||
'tag': None
|
'tag': None
|
||||||
},
|
},
|
||||||
'summary': None,
|
'summary': None,
|
||||||
'thumb': None,
|
'thumb': None,
|
||||||
|
'thumbBlurHash': None,
|
||||||
'thumbFile': lambda o: self.get_image(o, 'thumb'),
|
'thumbFile': lambda o: self.get_image(o, 'thumb'),
|
||||||
'title': None,
|
'title': None,
|
||||||
'titleSort': None,
|
'titleSort': None,
|
||||||
|
@ -781,6 +823,7 @@ class Export(object):
|
||||||
'userRating': None,
|
'userRating': None,
|
||||||
'viewCount': None,
|
'viewCount': None,
|
||||||
'viewedLeafCount': None,
|
'viewedLeafCount': None,
|
||||||
|
'year': None,
|
||||||
'tracks': lambda e: self.export_obj(e)
|
'tracks': lambda e: self.export_obj(e)
|
||||||
}
|
}
|
||||||
return _album_attrs
|
return _album_attrs
|
||||||
|
@ -789,6 +832,8 @@ class Export(object):
|
||||||
_track_attrs = {
|
_track_attrs = {
|
||||||
'addedAt': helpers.datetime_to_iso,
|
'addedAt': helpers.datetime_to_iso,
|
||||||
'art': None,
|
'art': None,
|
||||||
|
'artBlurHash': None,
|
||||||
|
'chapterSource': None,
|
||||||
'duration': None,
|
'duration': None,
|
||||||
'durationHuman': lambda o: helpers.human_duration(getattr(o, 'duration', 0)),
|
'durationHuman': lambda o: helpers.human_duration(getattr(o, 'duration', 0)),
|
||||||
'fields': {
|
'fields': {
|
||||||
|
@ -829,18 +874,23 @@ class Export(object):
|
||||||
'hasThumbnail': None,
|
'hasThumbnail': None,
|
||||||
'id': None,
|
'id': None,
|
||||||
'key': None,
|
'key': None,
|
||||||
|
'requiredBandwidths': None,
|
||||||
'size': None,
|
'size': None,
|
||||||
'sizeHuman': lambda o: helpers.human_file_size(getattr(o, 'size', 0)),
|
'sizeHuman': lambda o: helpers.human_file_size(getattr(o, 'size', 0)),
|
||||||
'requiredBandwidths': None,
|
|
||||||
'syncItemId': None,
|
'syncItemId': None,
|
||||||
'syncState': None,
|
'syncState': None,
|
||||||
'audioStreams': {
|
'audioStreams': {
|
||||||
|
'bitrate': None,
|
||||||
'codec': None,
|
'codec': None,
|
||||||
'default': None,
|
'default': None,
|
||||||
'displayTitle': None,
|
'displayTitle': None,
|
||||||
'extendedDisplayTitle': None,
|
'extendedDisplayTitle': None,
|
||||||
'id': None,
|
'id': None,
|
||||||
'index': None,
|
'index': None,
|
||||||
|
'key': None,
|
||||||
|
'language': None,
|
||||||
|
'languageCode': None,
|
||||||
|
'requiredBandwidths': None,
|
||||||
'selected': None,
|
'selected': None,
|
||||||
'streamType': None,
|
'streamType': None,
|
||||||
'title': None,
|
'title': None,
|
||||||
|
@ -849,7 +899,8 @@ class Export(object):
|
||||||
'albumPeak': None,
|
'albumPeak': None,
|
||||||
'albumRange': None,
|
'albumRange': None,
|
||||||
'audioChannelLayout': None,
|
'audioChannelLayout': None,
|
||||||
'bitrate': None,
|
'bitDepth': None,
|
||||||
|
'bitrateMode': None,
|
||||||
'channels': None,
|
'channels': None,
|
||||||
'duration': None,
|
'duration': None,
|
||||||
'endRamp': None,
|
'endRamp': None,
|
||||||
|
@ -857,9 +908,9 @@ class Export(object):
|
||||||
'loudness': None,
|
'loudness': None,
|
||||||
'lra': None,
|
'lra': None,
|
||||||
'peak': None,
|
'peak': None,
|
||||||
'requiredBandwidths': None,
|
'profile': None,
|
||||||
'samplingRate': None,
|
'samplingRate': None,
|
||||||
'startRamp': None,
|
'startRamp': None
|
||||||
},
|
},
|
||||||
'lyricStreams': {
|
'lyricStreams': {
|
||||||
'codec': None,
|
'codec': None,
|
||||||
|
@ -868,14 +919,18 @@ class Export(object):
|
||||||
'extendedDisplayTitle': None,
|
'extendedDisplayTitle': None,
|
||||||
'id': None,
|
'id': None,
|
||||||
'index': None,
|
'index': None,
|
||||||
'minLines': None,
|
'key': None,
|
||||||
'provider': None,
|
'language': None,
|
||||||
|
'languageCode': None,
|
||||||
|
'requiredBandwidths': None,
|
||||||
|
'selected': None,
|
||||||
'streamType': None,
|
'streamType': None,
|
||||||
'timed': None,
|
|
||||||
'title': None,
|
'title': None,
|
||||||
'type': None,
|
'type': None,
|
||||||
'format': None,
|
'format': None,
|
||||||
'key': None
|
'minLines': None,
|
||||||
|
'provider': None,
|
||||||
|
'timed': None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -894,12 +949,14 @@ class Export(object):
|
||||||
'ratingKey': None,
|
'ratingKey': None,
|
||||||
'summary': None,
|
'summary': None,
|
||||||
'thumb': None,
|
'thumb': None,
|
||||||
|
'thumbBlurHash': None,
|
||||||
'title': None,
|
'title': None,
|
||||||
'titleSort': None,
|
'titleSort': None,
|
||||||
'type': None,
|
'type': None,
|
||||||
'updatedAt': helpers.datetime_to_iso,
|
'updatedAt': helpers.datetime_to_iso,
|
||||||
'userRating': None,
|
'userRating': None,
|
||||||
'viewCount': None,
|
'viewCount': None,
|
||||||
|
'viewOffset': None,
|
||||||
'year': None,
|
'year': None,
|
||||||
}
|
}
|
||||||
return _track_attrs
|
return _track_attrs
|
||||||
|
@ -926,6 +983,7 @@ class Export(object):
|
||||||
'titleSort': None,
|
'titleSort': None,
|
||||||
'type': lambda e: 'photoalbum' if e == 'photo' else e,
|
'type': lambda e: 'photoalbum' if e == 'photo' else e,
|
||||||
'updatedAt': helpers.datetime_to_iso,
|
'updatedAt': helpers.datetime_to_iso,
|
||||||
|
'userRating': None,
|
||||||
'photoalbums': lambda o: [self.export_obj(e) for e in getattr(o, 'albums')()],
|
'photoalbums': lambda o: [self.export_obj(e) for e in getattr(o, 'albums')()],
|
||||||
'photos': lambda e: self.export_obj(e),
|
'photos': lambda e: self.export_obj(e),
|
||||||
'clips': lambda e: self.export_obj(e)
|
'clips': lambda e: self.export_obj(e)
|
||||||
|
@ -967,6 +1025,7 @@ class Export(object):
|
||||||
'aperture': None,
|
'aperture': None,
|
||||||
'aspectRatio': None,
|
'aspectRatio': None,
|
||||||
'container': None,
|
'container': None,
|
||||||
|
'exposure': None,
|
||||||
'height': None,
|
'height': None,
|
||||||
'id': None,
|
'id': None,
|
||||||
'iso': None,
|
'iso': None,
|
||||||
|
@ -997,6 +1056,7 @@ class Export(object):
|
||||||
_collection_attrs = {
|
_collection_attrs = {
|
||||||
'addedAt': helpers.datetime_to_iso,
|
'addedAt': helpers.datetime_to_iso,
|
||||||
'art': None,
|
'art': None,
|
||||||
|
'artBlurHash': None,
|
||||||
'artFile': lambda o: self.get_image(o, 'art'),
|
'artFile': lambda o: self.get_image(o, 'art'),
|
||||||
'childCount': None,
|
'childCount': None,
|
||||||
'collectionMode': None,
|
'collectionMode': None,
|
||||||
|
@ -1022,12 +1082,13 @@ class Export(object):
|
||||||
'subtype': None,
|
'subtype': None,
|
||||||
'summary': None,
|
'summary': None,
|
||||||
'thumb': None,
|
'thumb': None,
|
||||||
|
'thumbBlurHash': None,
|
||||||
'thumbFile': lambda o: self.get_image(o, 'thumb'),
|
'thumbFile': lambda o: self.get_image(o, 'thumb'),
|
||||||
'title': None,
|
'title': None,
|
||||||
'titleSort': None,
|
'titleSort': None,
|
||||||
'type': None,
|
'type': None,
|
||||||
'updatedAt': helpers.datetime_to_iso,
|
'updatedAt': helpers.datetime_to_iso,
|
||||||
'children': lambda e: self.export_obj(e)
|
'items': lambda e: self.export_obj(e)
|
||||||
}
|
}
|
||||||
return _collection_attrs
|
return _collection_attrs
|
||||||
|
|
||||||
|
@ -1099,7 +1160,7 @@ class Export(object):
|
||||||
'locations', 'media.aspectRatio', 'media.audioChannels', 'media.audioCodec', 'media.audioProfile',
|
'locations', 'media.aspectRatio', 'media.audioChannels', 'media.audioCodec', 'media.audioProfile',
|
||||||
'media.bitrate', 'media.container', 'media.duration', 'media.height', 'media.width',
|
'media.bitrate', 'media.container', 'media.duration', 'media.height', 'media.width',
|
||||||
'media.videoCodec', 'media.videoFrameRate', 'media.videoProfile', 'media.videoResolution',
|
'media.videoCodec', 'media.videoFrameRate', 'media.videoProfile', 'media.videoResolution',
|
||||||
'media.optimizedVersion', 'media.hdr'
|
'media.isOptimizedVersion', 'media.hdr'
|
||||||
],
|
],
|
||||||
2: [
|
2: [
|
||||||
'media.parts.file', 'media.parts.duration',
|
'media.parts.file', 'media.parts.duration',
|
||||||
|
@ -1128,7 +1189,7 @@ class Export(object):
|
||||||
'media.parts.subtitleStreams.language', 'media.parts.subtitleStreams.languageCode',
|
'media.parts.subtitleStreams.language', 'media.parts.subtitleStreams.languageCode',
|
||||||
'media.parts.subtitleStreams.title', 'media.parts.subtitleStreams.displayTitle',
|
'media.parts.subtitleStreams.title', 'media.parts.subtitleStreams.displayTitle',
|
||||||
'media.parts.subtitleStreams.extendedDisplayTitle', 'media.parts.subtitleStreams.forced',
|
'media.parts.subtitleStreams.extendedDisplayTitle', 'media.parts.subtitleStreams.forced',
|
||||||
'media.parts.subtitleStreams.default'
|
'media.parts.subtitleStreams.default', 'media.parts.subtitleStreams.container'
|
||||||
],
|
],
|
||||||
9: [
|
9: [
|
||||||
'locations', 'media'
|
'locations', 'media'
|
||||||
|
@ -1199,6 +1260,7 @@ class Export(object):
|
||||||
],
|
],
|
||||||
3: [
|
3: [
|
||||||
'art', 'thumb', 'key', 'chapterSource',
|
'art', 'thumb', 'key', 'chapterSource',
|
||||||
|
'chapters.tag', 'chapters.index', 'chapters.start', 'chapters.end', 'chapters.thumb',
|
||||||
'updatedAt', 'lastViewedAt', 'viewCount',
|
'updatedAt', 'lastViewedAt', 'viewCount',
|
||||||
'parentThumb', 'parentKey',
|
'parentThumb', 'parentKey',
|
||||||
'grandparentArt', 'grandparentThumb', 'grandparentTheme', 'grandparentKey'
|
'grandparentArt', 'grandparentThumb', 'grandparentTheme', 'grandparentKey'
|
||||||
|
@ -1210,7 +1272,7 @@ class Export(object):
|
||||||
'locations', 'media.aspectRatio', 'media.audioChannels', 'media.audioCodec', 'media.audioProfile',
|
'locations', 'media.aspectRatio', 'media.audioChannels', 'media.audioCodec', 'media.audioProfile',
|
||||||
'media.bitrate', 'media.container', 'media.duration', 'media.height', 'media.width',
|
'media.bitrate', 'media.container', 'media.duration', 'media.height', 'media.width',
|
||||||
'media.videoCodec', 'media.videoFrameRate', 'media.videoProfile', 'media.videoResolution',
|
'media.videoCodec', 'media.videoFrameRate', 'media.videoProfile', 'media.videoResolution',
|
||||||
'media.optimizedVersion', 'media.hdr'
|
'media.isOptimizedVersion', 'media.hdr'
|
||||||
],
|
],
|
||||||
2: [
|
2: [
|
||||||
'media.parts.file', 'media.parts.duration',
|
'media.parts.file', 'media.parts.duration',
|
||||||
|
@ -1239,7 +1301,7 @@ class Export(object):
|
||||||
'media.parts.subtitleStreams.language', 'media.parts.subtitleStreams.languageCode',
|
'media.parts.subtitleStreams.language', 'media.parts.subtitleStreams.languageCode',
|
||||||
'media.parts.subtitleStreams.title', 'media.parts.subtitleStreams.displayTitle',
|
'media.parts.subtitleStreams.title', 'media.parts.subtitleStreams.displayTitle',
|
||||||
'media.parts.subtitleStreams.extendedDisplayTitle', 'media.parts.subtitleStreams.forced',
|
'media.parts.subtitleStreams.extendedDisplayTitle', 'media.parts.subtitleStreams.forced',
|
||||||
'media.parts.subtitleStreams.default'
|
'media.parts.subtitleStreams.default', 'media.parts.subtitleStreams.container'
|
||||||
],
|
],
|
||||||
9: [
|
9: [
|
||||||
'locations', 'media'
|
'locations', 'media'
|
||||||
|
@ -1257,7 +1319,7 @@ class Export(object):
|
||||||
'albums'
|
'albums'
|
||||||
],
|
],
|
||||||
2: [
|
2: [
|
||||||
'collections.tag', 'genres.tag', 'countries.tag', 'moods.tag', 'styles.tag',
|
'collections.tag', 'genres.tag', 'countries.tag', 'moods.tag', 'similar.tag', 'styles.tag',
|
||||||
'fields.name', 'fields.locked'
|
'fields.name', 'fields.locked'
|
||||||
],
|
],
|
||||||
3: [
|
3: [
|
||||||
|
@ -1274,7 +1336,7 @@ class Export(object):
|
||||||
_metadata_levels = {
|
_metadata_levels = {
|
||||||
1: [
|
1: [
|
||||||
'ratingKey', 'title', 'titleSort', 'originallyAvailableAt', 'addedAt',
|
'ratingKey', 'title', 'titleSort', 'originallyAvailableAt', 'addedAt',
|
||||||
'rating', 'userRating',
|
'rating', 'userRating', 'studio', 'year',
|
||||||
'summary', 'guid', 'type', 'index',
|
'summary', 'guid', 'type', 'index',
|
||||||
'parentTitle', 'parentRatingKey', 'parentGuid',
|
'parentTitle', 'parentRatingKey', 'parentGuid',
|
||||||
'tracks'
|
'tracks'
|
||||||
|
@ -1304,7 +1366,7 @@ class Export(object):
|
||||||
'grandparentTitle', 'grandparentRatingKey', 'grandparentGuid'
|
'grandparentTitle', 'grandparentRatingKey', 'grandparentGuid'
|
||||||
],
|
],
|
||||||
2: [
|
2: [
|
||||||
'moods.tag', 'writers.tag',
|
'moods.tag',
|
||||||
'fields.name', 'fields.locked'
|
'fields.name', 'fields.locked'
|
||||||
],
|
],
|
||||||
3: [
|
3: [
|
||||||
|
@ -1356,7 +1418,7 @@ class Export(object):
|
||||||
_metadata_levels = {
|
_metadata_levels = {
|
||||||
1: [
|
1: [
|
||||||
'ratingKey', 'title', 'titleSort', 'addedAt',
|
'ratingKey', 'title', 'titleSort', 'addedAt',
|
||||||
'summary', 'guid', 'type', 'index',
|
'summary', 'guid', 'type', 'index', 'userRating',
|
||||||
'photoalbums', 'photos', 'clips'
|
'photoalbums', 'photos', 'clips'
|
||||||
],
|
],
|
||||||
2: [
|
2: [
|
||||||
|
@ -1392,7 +1454,7 @@ class Export(object):
|
||||||
}
|
}
|
||||||
_media_info_levels = {
|
_media_info_levels = {
|
||||||
1: [
|
1: [
|
||||||
'locations', 'media.aspectRatio', 'media.aperture',
|
'locations', 'media.aspectRatio', 'media.aperture', 'media.exposure',
|
||||||
'media.container', 'media.height', 'media.width',
|
'media.container', 'media.height', 'media.width',
|
||||||
'media.iso', 'media.lens', 'media.make', 'media.model'
|
'media.iso', 'media.lens', 'media.make', 'media.model'
|
||||||
],
|
],
|
||||||
|
@ -1416,7 +1478,7 @@ class Export(object):
|
||||||
'contentRating',
|
'contentRating',
|
||||||
'summary', 'guid', 'type', 'subtype', 'childCount',
|
'summary', 'guid', 'type', 'subtype', 'childCount',
|
||||||
'collectionMode', 'collectionSort',
|
'collectionMode', 'collectionSort',
|
||||||
'children'
|
'items'
|
||||||
],
|
],
|
||||||
2: [
|
2: [
|
||||||
'labels.tag',
|
'labels.tag',
|
||||||
|
@ -1880,8 +1942,8 @@ class Export(object):
|
||||||
export_attrs_set.add(self.PLURAL_MEDIA_TYPES[child_media_type])
|
export_attrs_set.add(self.PLURAL_MEDIA_TYPES[child_media_type])
|
||||||
|
|
||||||
if media_type != self.media_type:
|
if media_type != self.media_type:
|
||||||
if self.media_type == 'collection' and 'children' in self._custom_fields:
|
if self.media_type == 'collection' and 'item' in self._custom_fields:
|
||||||
export_attrs_set.update(self._custom_fields['children'])
|
export_attrs_set.update(self._custom_fields['item'])
|
||||||
elif self.media_type == 'playlist' and 'item' in self._custom_fields:
|
elif self.media_type == 'playlist' and 'item' in self._custom_fields:
|
||||||
export_attrs_set.update(self._custom_fields['item'])
|
export_attrs_set.update(self._custom_fields['item'])
|
||||||
|
|
||||||
|
@ -2284,7 +2346,7 @@ def get_custom_fields(media_type, sub_media_type=None):
|
||||||
prefix = ''
|
prefix = ''
|
||||||
|
|
||||||
while child_media_type:
|
while child_media_type:
|
||||||
if child_media_type in ('children', 'item'):
|
if child_media_type == 'item':
|
||||||
fields_child_media_type = sub_media_type
|
fields_child_media_type = sub_media_type
|
||||||
else:
|
else:
|
||||||
fields_child_media_type = child_media_type
|
fields_child_media_type = child_media_type
|
||||||
|
@ -2406,10 +2468,10 @@ def build_export_docs():
|
||||||
section = section_head.format(anchor=media_type, section=section_title) + '\n\n'.join(details)
|
section = section_head.format(anchor=media_type, section=section_title) + '\n\n'.join(details)
|
||||||
|
|
||||||
if media_type == 'collection':
|
if media_type == 'collection':
|
||||||
section += '\n\n* <a id="children">**Note:**</a> `children` can be [Movies](#movie) or [Shows](#show) ' \
|
section += '\n\n* <a id="collection-items">**Note:**</a> Collection `items` can be [Movies](#movie) or [Shows](#show) ' \
|
||||||
'depending on the collection.'
|
'depending on the collection.'
|
||||||
elif media_type == 'playlist':
|
elif media_type == 'playlist':
|
||||||
section += '\n\n* <a id="item">**Note:**</a> `items` can be [Movies](#movie), [Episodes](#episode), ' \
|
section += '\n\n* <a id="playlist-item">**Note:**</a> Playlist `items` can be [Movies](#movie), [Episodes](#episode), ' \
|
||||||
'[Tracks](#track), or [Photos](#photo) depending on the playlist.'
|
'[Tracks](#track), or [Photos](#photo) depending on the playlist.'
|
||||||
|
|
||||||
sections.append(section)
|
sections.append(section)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue