mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 20:47:35 +03:00
23 lines
314 B
Go
23 lines
314 B
Go
package model
|
|
|
|
import (
|
|
"io/fs"
|
|
"os"
|
|
)
|
|
|
|
type MediaFolder struct {
|
|
ID int32
|
|
Name string
|
|
Path string
|
|
}
|
|
|
|
func (f MediaFolder) FS() fs.FS {
|
|
return os.DirFS(f.Path)
|
|
}
|
|
|
|
type MediaFolders []MediaFolder
|
|
|
|
type MediaFolderRepository interface {
|
|
Get(id int32) (*MediaFolder, error)
|
|
GetAll() (MediaFolders, error)
|
|
}
|