+ :class="{ 'with-image': !!item?.image, 'photo': item?.item_type === 'photo' }">
+
@@ -68,6 +69,7 @@ export default {
case 'channel':
case 'playlist':
case 'folder':
+ case 'photo':
return 'select'
default:
return 'play'
@@ -88,6 +90,10 @@ export default {
},
imgUrl() {
+ if (this.item?.item_type === 'photo') {
+ return this.item?.preview_url || this.item?.url
+ }
+
let img = this.item?.image
if (!img) {
img = this.item?.images?.[0]?.url
@@ -103,11 +109,19 @@ export default {
this.item?.item_type === 'folder'
) {
return 'fas fa-folder-open'
+ } else if (this.item?.item_type === 'photo') {
+ return 'fas fa-eye'
}
return 'fas fa-play'
},
},
+
+ methods: {
+ onItemClick() {
+ this.$emit(this.clickEvent, this.item)
+ },
+ },
}
diff --git a/platypush/backend/http/webapp/src/components/panels/Media/Providers/Jellyfin/views/Media/Index.vue b/platypush/backend/http/webapp/src/components/panels/Media/Providers/Jellyfin/views/Media/Index.vue
index b96a1e173a..ee9fa7971c 100644
--- a/platypush/backend/http/webapp/src/components/panels/Media/Providers/Jellyfin/views/Media/Index.vue
+++ b/platypush/backend/http/webapp/src/components/panels/Media/Providers/Jellyfin/views/Media/Index.vue
@@ -67,7 +67,25 @@ export default {
},
mediaItems() {
- return this.sortedItems?.filter((item) => item.item_type !== 'collection') ?? []
+ const items = this.sortedItems?.filter((item) => item.item_type !== 'collection') ?? []
+
+ if (this.collection && !this.collection.collection_type) {
+ return items.sort((a, b) => {
+ if (a.created_at && b.created_at)
+ return (new Date(a.created_at)) < (new Date(b.created_at))
+
+ if (a.created_at)
+ return -1
+
+ if (b.created_at)
+ return 1
+
+ let names = [a.name || a.title || '', b.name || b.title || '']
+ return names[0].localeCompare(names[1])
+ })
+ }
+
+ return items
},
},
@@ -120,7 +138,7 @@ export default {
(
await this.request('media.jellyfin.get_items', {
parent_id: this.collection.id,
- limit: 5000,
+ limit: 25000,
})
) : (await this.request('media.jellyfin.get_collections')).map((collection) => ({
...collection,
diff --git a/platypush/backend/http/webapp/src/components/panels/Media/Providers/Jellyfin/views/Music/Index.vue b/platypush/backend/http/webapp/src/components/panels/Media/Providers/Jellyfin/views/Music/Index.vue
index 2ccca18229..1999a08408 100644
--- a/platypush/backend/http/webapp/src/components/panels/Media/Providers/Jellyfin/views/Music/Index.vue
+++ b/platypush/backend/http/webapp/src/components/panels/Media/Providers/Jellyfin/views/Music/Index.vue
@@ -212,7 +212,7 @@ export default {
'media.jellyfin.get_items',
{
parent_id: this.collection.id,
- limit: 5000,
+ limit: 25000,
}
)
).map((item) => {
@@ -234,7 +234,7 @@ export default {
'media.jellyfin.get_items',
{
parent_id: this.collection.id,
- limit: 5000,
+ limit: 25000,
}
)
break