From a55b7216d56053b0f07e84c323fa9165deec775d Mon Sep 17 00:00:00 2001 From: Drew Weymouth Date: Mon, 22 Sep 2025 17:22:43 -0700 Subject: [PATCH] implement CreatePlaylist button for jellyfin --- backend/mediaprovider/jellyfin/jellyfinmediaprovider.go | 7 +++---- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/backend/mediaprovider/jellyfin/jellyfinmediaprovider.go b/backend/mediaprovider/jellyfin/jellyfinmediaprovider.go index 6a60460..d67216c 100644 --- a/backend/mediaprovider/jellyfin/jellyfinmediaprovider.go +++ b/backend/mediaprovider/jellyfin/jellyfinmediaprovider.go @@ -1,7 +1,6 @@ package jellyfin import ( - "errors" "image" "io" "math" @@ -79,7 +78,7 @@ func (j *jellyfinMediaProvider) SetLibrary(id string) error { } func (j *jellyfinMediaProvider) CreatePlaylistWithTracks(name string, trackIDs []string) error { - return j.client.CreatePlaylist(name, trackIDs) + return j.client.CreatePlaylist(name, "", false, trackIDs) } func (j *jellyfinMediaProvider) DeletePlaylist(id string) error { @@ -91,11 +90,11 @@ func (j *jellyfinMediaProvider) CanMakePublicPlaylist() bool { } func (j *jellyfinMediaProvider) EditPlaylist(id, name, description string, public bool) error { - return j.client.UpdatePlaylistMetadata(id, name, description) + return j.client.UpdatePlaylistMetadata(id, name, description, false) } func (j *jellyfinMediaProvider) CreatePlaylist(name, description string, public bool) error { - return errors.New("unimplemented") + return j.client.CreatePlaylist(name, description, public, nil) } func (j *jellyfinMediaProvider) AddPlaylistTracks(id string, trackIDsToAdd []string) error { diff --git a/go.mod b/go.mod index 9ddfe03..ddcd524 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/deluan/sanitize v0.0.0-20230310221930-6e18967d9fc1 github.com/dweymouth/fyne-advanced-list v0.0.0-20250211191927-58ea85eec72c github.com/dweymouth/fyne-tooltip v0.3.0 - github.com/dweymouth/go-jellyfin v0.0.0-20250914000657-c172d6f678bb + github.com/dweymouth/go-jellyfin v0.0.0-20250923002019-77408ca7bfed github.com/go-audio/audio v1.0.0 github.com/go-audio/wav v1.1.0 github.com/godbus/dbus/v5 v5.1.0 diff --git a/go.sum b/go.sum index 00193bb..087afa2 100644 --- a/go.sum +++ b/go.sum @@ -23,8 +23,8 @@ github.com/dweymouth/fyne-tooltip v0.3.0 h1:NKCyTkh9NtvnTsiHtTOtaJzRDOFYP8AckQ2t github.com/dweymouth/fyne-tooltip v0.3.0/go.mod h1:m04ShLW/Tp6LXrNieTumApvNgo7YSB+wi+jZTN+kDBU= github.com/dweymouth/fyne/v2 v2.3.0-rc1.0.20250712002006-5064d705dac4 h1:Q3r94AcVL8yaF4Nrd3EQFKyLL3UN/zHPkj+My9B2vCQ= github.com/dweymouth/fyne/v2 v2.3.0-rc1.0.20250712002006-5064d705dac4/go.mod h1:YZt7SksjvrSNJCwbWFV32WON3mE1Sr7L41D29qMZ/lU= -github.com/dweymouth/go-jellyfin v0.0.0-20250914000657-c172d6f678bb h1:KNCB0eDnrT81L5Up6y5jp91fnih3Yh6l1+vYy7JicEE= -github.com/dweymouth/go-jellyfin v0.0.0-20250914000657-c172d6f678bb/go.mod h1:fcUagHBaQnt06GmBAllNE0J4O/7064zXRWdqnTTtVjI= +github.com/dweymouth/go-jellyfin v0.0.0-20250923002019-77408ca7bfed h1:XiU6491cgNOb8bGerKvPhcOBMHJiFz1UQbRvzy6Guws= +github.com/dweymouth/go-jellyfin v0.0.0-20250923002019-77408ca7bfed/go.mod h1:fcUagHBaQnt06GmBAllNE0J4O/7064zXRWdqnTTtVjI= github.com/dweymouth/go-wav v0.0.0-20250719173115-e60429a83eb0 h1:mYcctuWgVArHhSLJxndlUM43C3hoE18BLDBkXKM2tl0= github.com/dweymouth/go-wav v0.0.0-20250719173115-e60429a83eb0/go.mod h1:bp2870jtp/ixAJLIOdShBfl1WpyLGDZ57jnVWMgkgIc= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=