diff --git a/data/interfaces/default/info.html b/data/interfaces/default/info.html
index cd20164b..30e78013 100644
--- a/data/interfaces/default/info.html
+++ b/data/interfaces/default/info.html
@@ -303,6 +303,19 @@ DOCUMENTATION :: END
% endif
% endif
+
+ % if data['media_type'] in ('collection', 'playlist') and data['children_count']:
+ <%
+ if data['media_type'] == 'collection':
+ suffix = MEDIA_TYPE_HEADERS[data['sub_media_type']]
+ elif data['media_type'] == 'playlist':
+ suffix = MEDIA_TYPE_HEADERS[data['playlist_type']]
+ if data['children_count'] == 1:
+ suffix = suffix[:-1]
+ %>
+ Items ${data['children_count']} ${suffix}
+ % endif
+
% if data['directors']:
Directed by ${data['directors'][0]}
@@ -328,11 +341,6 @@ DOCUMENTATION :: END
Year ${data['year']}
% endif
-
- % if data['duration']:
- Items ${data['children_count']} ${'track' if data['playlist_type'] == 'audio' else 'video'}${'s' if data['children_count'] > 1 else ''}
- % endif
-
% if data['duration']:
Runtime ${data['duration']}
@@ -459,7 +467,7 @@ DOCUMENTATION :: END
-
Loading movies list...
+
Loading collection items...
@@ -468,11 +476,11 @@ DOCUMENTATION :: END
-
Loading ${'track' if data['playlist_type'] == 'audio' else 'video'} list...
+
Loading playlist items...
% endif
diff --git a/data/interfaces/default/js/script.js b/data/interfaces/default/js/script.js
index e6ca1577..cfd047a6 100644
--- a/data/interfaces/default/js/script.js
+++ b/data/interfaces/default/js/script.js
@@ -835,3 +835,16 @@ function user_page(user_id, user) {
return params;
}
+
+MEDIA_TYPE_HEADERS = {
+ 'movie': 'Movies',
+ 'show': 'TV Shows',
+ 'season': 'Seasons',
+ 'episode': 'Episodes',
+ 'artist': 'Artists',
+ 'album': 'Albums',
+ 'track': 'Tracks',
+ 'video': 'Videos',
+ 'audio': 'Tracks',
+ 'photo': 'Photos'
+}
\ No newline at end of file
diff --git a/data/interfaces/default/js/tables/collections_table.js b/data/interfaces/default/js/tables/collections_table.js
index e0ea9547..a3cde91c 100644
--- a/data/interfaces/default/js/tables/collections_table.js
+++ b/data/interfaces/default/js/tables/collections_table.js
@@ -73,7 +73,11 @@ collections_table_options = {
"data": "childCount",
"createdCell": function (td, cellData, rowData, row, col) {
if (cellData !== '') {
- $(td).html(cellData);
+ var type = MEDIA_TYPE_HEADERS[rowData['subtype']] || '';
+ if (rowData['childCount'] == 1) {
+ type = type.slice(0, -1);
+ }
+ $(td).html(cellData + ' ' + type);
}
},
"width": "10%",
diff --git a/data/interfaces/default/js/tables/playlists_table.js b/data/interfaces/default/js/tables/playlists_table.js
index b5859b05..e0d408ab 100644
--- a/data/interfaces/default/js/tables/playlists_table.js
+++ b/data/interfaces/default/js/tables/playlists_table.js
@@ -39,7 +39,11 @@ playlists_table_options = {
"data": "leafCount",
"createdCell": function (td, cellData, rowData, row, col) {
if (cellData !== '') {
- $(td).html(cellData);
+ var type = MEDIA_TYPE_HEADERS[rowData['playlistType']] || '';
+ if (rowData['leafCount'] == 1) {
+ type = type.slice(0, -1);
+ }
+ $(td).html(cellData + ' ' + type);
}
},
"width": "20%",
diff --git a/plexpy/common.py b/plexpy/common.py
index 6032fd0f..bdad683b 100644
--- a/plexpy/common.py
+++ b/plexpy/common.py
@@ -73,6 +73,9 @@ MEDIA_TYPE_HEADERS = {
'artist': 'Artists',
'album': 'Albums',
'track': 'Tracks',
+ 'video': 'Videos',
+ 'audio': 'Tracks',
+ 'photo': 'Photos'
}
PLATFORM_NAME_OVERRIDES = {
diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py
index 05248ab7..2030fb80 100644
--- a/plexpy/pmsconnect.py
+++ b/plexpy/pmsconnect.py
@@ -1271,7 +1271,7 @@ class PmsConnect(object):
'collections': collections,
'guids': guids,
'full_title': helpers.get_xml_attr(metadata_main, 'title'),
- 'children_count': helpers.cast_to_int(helpers.get_xml_attr(metadata_main, 'leafCount')),
+ 'children_count': helpers.cast_to_int(helpers.get_xml_attr(metadata_main, 'childCount')),
'live': int(helpers.get_xml_attr(metadata_main, 'live') == '1')
}