mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Add image export for collections and playlists
This commit is contained in:
parent
4e29960238
commit
5dade92221
2 changed files with 16 additions and 12 deletions
|
@ -74,7 +74,7 @@ DOCUMENTATION :: END
|
||||||
</label>
|
</label>
|
||||||
<p class="help-block">
|
<p class="help-block">
|
||||||
Enable to export artwork and poster image files. Warning: This will take a long time!<br>
|
Enable to export artwork and poster image files. Warning: This will take a long time!<br>
|
||||||
Note: Only applies to movies, shows, seasons, artists, and albums.
|
Note: Only applies to movies, shows, seasons, artists, albums, collections, and playlists.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -45,14 +45,20 @@ else:
|
||||||
|
|
||||||
|
|
||||||
class Export(object):
|
class Export(object):
|
||||||
MEDIA_TYPES = (
|
# True/False for allowed image export
|
||||||
'movie',
|
MEDIA_TYPES = {
|
||||||
'show', 'season', 'episode',
|
'movie': True,
|
||||||
'artist', 'album', 'track',
|
'show': True,
|
||||||
'photoalbum', 'photo',
|
'season': True,
|
||||||
'collection',
|
'episode': False,
|
||||||
'playlist'
|
'artist': True,
|
||||||
)
|
'album': True,
|
||||||
|
'track': True,
|
||||||
|
'photoalbum': False,
|
||||||
|
'photo': False,
|
||||||
|
'collection': True,
|
||||||
|
'playlist': True
|
||||||
|
}
|
||||||
PLURAL_MEDIA_TYPES = {
|
PLURAL_MEDIA_TYPES = {
|
||||||
'movie': 'movies',
|
'movie': 'movies',
|
||||||
'show': 'shows',
|
'show': 'shows',
|
||||||
|
@ -1463,9 +1469,7 @@ class Export(object):
|
||||||
logger.error("Tautulli Exporter :: %s", msg)
|
logger.error("Tautulli Exporter :: %s", msg)
|
||||||
return msg
|
return msg
|
||||||
|
|
||||||
if self.include_images and self.media_type not in ('movie', 'show', 'season', 'artist', 'album'):
|
self.include_images = self.include_images and self.MEDIA_TYPES[self.media_type]
|
||||||
self.include_images = False
|
|
||||||
|
|
||||||
self._process_custom_fields()
|
self._process_custom_fields()
|
||||||
|
|
||||||
self.filename = '{}.{}'.format(helpers.clean_filename(filename), self.file_format)
|
self.filename = '{}.{}'.format(helpers.clean_filename(filename), self.file_format)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue