navidrome/model/mediafolder.go

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

24 lines
314 B
Go
Raw Normal View History

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