21 lines
372 B
Go
21 lines
372 B
Go
package config
|
|
|
|
import "path/filepath"
|
|
|
|
type Paths struct {
|
|
DownloadRoot string
|
|
ChannelsDir string
|
|
EpisodesDir string
|
|
MediaDir string
|
|
}
|
|
|
|
func (c Config) Paths() Paths {
|
|
root := c.Download_dir
|
|
return Paths{
|
|
DownloadRoot: root,
|
|
ChannelsDir: filepath.Join(root, "channels"),
|
|
EpisodesDir: filepath.Join(root, "episodes"),
|
|
MediaDir: c.Media_dir,
|
|
}
|
|
}
|