navidrome/model/mediafolder.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
314 B
Go
Raw Normal View History

2020-01-14 22:22:34 -05:00
package model
2016-02-24 19:14:48 -05:00
2022-09-14 21:09:39 -04:00
import (
"io/fs"
"os"
)
2016-02-24 19:14:48 -05:00
type MediaFolder struct {
2020-05-09 22:29:02 -04:00
ID int32
2016-02-24 19:14:48 -05:00
Name string
Path string
}
2022-09-14 21:09:39 -04:00
func (f MediaFolder) FS() fs.FS {
return os.DirFS(f.Path)
}
2016-03-03 21:01:55 -05:00
type MediaFolders []MediaFolder
type MediaFolderRepository interface {
2020-10-25 21:52:51 -04:00
Get(id int32) (*MediaFolder, error)
GetAll() (MediaFolders, error)
}