implement CreatePlaylist button for jellyfin

This commit is contained in:
Drew Weymouth
2025-09-22 17:22:43 -07:00
parent 6ea3499491
commit a55b7216d5
3 changed files with 6 additions and 7 deletions
@@ -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 {
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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=