From b646b5f3d775c0df98eaff6a081cace7306e8c95 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 8 Nov 2024 01:59:55 +0100 Subject: [PATCH] [media.jellyfin] Playlist implementation [UI]. --- .../src/components/panels/Media/Info.vue | 10 ++ .../src/components/panels/Media/Item.vue | 28 +++- .../panels/Media/Providers/Jellyfin.vue | 22 +++ .../Media/Providers/Jellyfin/Collections.vue | 112 +++++++++++++++ .../Providers/Jellyfin/views/Media/Index.vue | 36 ++++- .../Providers/Jellyfin/views/Music/Index.vue | 129 +++++++++++++++++- .../src/components/panels/Media/Results.vue | 3 + 7 files changed, 326 insertions(+), 14 deletions(-) diff --git a/platypush/backend/http/webapp/src/components/panels/Media/Info.vue b/platypush/backend/http/webapp/src/components/panels/Media/Info.vue index ed02db99a2..9232a1f217 100644 --- a/platypush/backend/http/webapp/src/components/panels/Media/Info.vue +++ b/platypush/backend/http/webapp/src/components/panels/Media/Info.vue @@ -27,6 +27,16 @@ +
+
Duration
+
+
+ +
+
Items
+
+
+
ImDB URL
diff --git a/platypush/backend/http/webapp/src/components/panels/Media/Item.vue b/platypush/backend/http/webapp/src/components/panels/Media/Item.vue index 7673efc809..993df225ff 100644 --- a/platypush/backend/http/webapp/src/components/panels/Media/Item.vue +++ b/platypush/backend/http/webapp/src/components/panels/Media/Item.vue @@ -14,10 +14,18 @@
- + + {{ index + 1 }} + + + {{ item.track_number }} + + {{ item.artist.name ?? item.artist }}  —  + + {{item.title || item.name}}
@@ -111,6 +119,10 @@ export default { default: false, }, + index: { + type: Number, + }, + listView: { type: Boolean, default: false, @@ -187,7 +199,7 @@ export default { }) } - if (this.item.type === 'youtube') { + if (['jellyfin', 'youtube'].includes(this.item.type)) { actions.push({ iconClass: 'fa fa-list', text: 'Add to Playlist', @@ -195,7 +207,7 @@ export default { }) } - if (this.item.type === 'youtube' && this.playlist?.length) { + if (['jellyfin', 'youtube'].includes(this.item.type) && this.playlist) { actions.push({ iconClass: 'fa fa-trash', text: 'Remove from Playlist', @@ -211,6 +223,10 @@ export default { return actions }, + + playlistView() { + return this.playlist && this.listView + }, }, methods: { @@ -308,6 +324,12 @@ export default { &:hover { text-decoration: underline; } + + .artist { + font-weight: 300; + opacity: .75; + letter-spacing: 0.065em; + } } .side { diff --git a/platypush/backend/http/webapp/src/components/panels/Media/Providers/Jellyfin.vue b/platypush/backend/http/webapp/src/components/panels/Media/Providers/Jellyfin.vue index 29da377a33..bb8086d8ff 100644 --- a/platypush/backend/http/webapp/src/components/panels/Media/Providers/Jellyfin.vue +++ b/platypush/backend/http/webapp/src/components/panels/Media/Providers/Jellyfin.vue @@ -15,6 +15,7 @@ 1) { + if (this.path[this.path.length - 1].id === item_id) { + this.selectCollection(this.path[this.path.length - 2]) + } + } else { + this.collection = null + this.select(this.rootItem) + } + }, }, watch: { diff --git a/platypush/backend/http/webapp/src/components/panels/Media/Providers/Jellyfin/Collections.vue b/platypush/backend/http/webapp/src/components/panels/Media/Providers/Jellyfin/Collections.vue index e0dd37fbf1..10cae344fe 100644 --- a/platypush/backend/http/webapp/src/components/panels/Media/Providers/Jellyfin/Collections.vue +++ b/platypush/backend/http/webapp/src/components/panels/Media/Providers/Jellyfin/Collections.vue @@ -22,12 +22,61 @@
+ +
+ +
+ +
+ + + +