Skip to content

Conversation

obeone
Copy link

@obeone obeone commented Jun 3, 2025

  • Add WebDAV storage backend using github.com/studio-b12/gowebdav
  • Update CLI flags and environment variables for WebDAV configuration
  • Document new provider and its usage in README
  • Update workflow GitHub Actions versions
  • Add gowebdav dependency to go.mod and go.sum

(I updated the release workflow because upload-artifact@v2 wasn't exist anymore)

@aspacca
Copy link
Collaborator

aspacca commented Jun 4, 2025

@obeone , thank you very much for this!

i'll review as soon as possible

@aspacca
Copy link
Collaborator

aspacca commented Sep 1, 2025

@obeone , sorry for the very late feedback. indeed i reviewed your PR immediately and from what I remember the only main concern from my side it's that I just prefer if you use a different webdav library.

under x/net there's https://pkg.go.dev/golang.org/x/net/webdav

I was going to tell you I could migrate to that library, if you had no willing to do the effort in your PR, please let me know :)

Copy link
Collaborator

@aspacca aspacca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see also the comment in the PR conversation about the webdav library change, please

// Type returns the storage type
func (s *WebDAVStorage) Type() string { return "webdav" }

func (s *WebDAVStorage) fullPath(token, filename string) string {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks an helper that could be moved outside of the specific storage implementation, if we don't have already one somewhere.
could you please do?

func (s *WebDAVStorage) Head(_ context.Context, token, filename string) (uint64, error) {
fi, err := s.client.Stat(s.fullPath(token, filename))
if err != nil {
if s.logger != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't do this kind of logging (unfortunately, I can admit) throughout all the project. if you want extra information for the user could you please wrap with en error with your specific message instead?
feel free to open a new PR reviewing the whole logging mechanism ;)

var rc io.ReadCloser
var err error
if rng != nil {
rc, err = s.client.ReadStreamRange(p, int64(rng.Start), int64(rng.Limit))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you tested this on playing a video or audio media with scrobbling?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants