Skip to content

Commit

Permalink
refactor!: change volume for hardlinks-trash guide
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleTryon committed Jun 11, 2023
1 parent 4f3e26b commit 4059186
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 60 deletions.
12 changes: 6 additions & 6 deletions models/services/jellyfin/jellyfin.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ type Jellyfin struct {
}

type JellyfinOptions struct {
Config string `yaml:"config"`
Library string `yaml:"library"`
Config string `yaml:"config"`
Library string `yaml:"library"`
}

// Return default values for service
Expand All @@ -33,12 +33,12 @@ func (s *Jellyfin) Default() services.ServiceInterface {
},
Ports: services.Ports{
Http: &http,
Udp: &udp,
Udp: &udp,
},
},
JellyfinOptions: JellyfinOptions{
Config: "/opt/jellyfin/config",
Library: "/opt/jellyfin/library",
Config: "/opt/jellyfin/config",
Library: "/data/library",
},
}
return p
Expand Down Expand Up @@ -66,4 +66,4 @@ func (s *Jellyfin) Configure() services.ServiceInterface {
}

return s
}
}
2 changes: 1 addition & 1 deletion models/services/kavita/kavita.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (s *Kavita) Default() services.ServiceInterface {
},
KavitaOptions: KavitaOptions{
Config: "/opt/kavita/config",
Library: "/opt/kavita/library",
Library: "/data/library/books",
},
}
return p
Expand Down
2 changes: 1 addition & 1 deletion models/services/plex/plex.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (s *Plex) Default() services.ServiceInterface {
},
PlexOptions: PlexOptions{
Config: "/opt/plex/config",
Library: "/opt/plex/library",
Library: "/data/library",
},
}
return p
Expand Down
17 changes: 9 additions & 8 deletions models/services/qbittorrent/qbittorrent.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ type Qbittorrent struct {
}

type QbittorrentOptions struct {
Config string `yaml:"config"`
Downloads string `yaml:"downloads"`
Config string `yaml:"config"`
Data string `yaml:"data"`
}

// Return default values for service
Expand All @@ -40,8 +40,8 @@ func (s *Qbittorrent) Default() services.ServiceInterface {
},
},
QbittorrentOptions: QbittorrentOptions{
Config: "/opt/qbittorrent/config",
Downloads: "~/downloads",
Config: "/opt/qbittorrent/config",
Data: "/data/torrents",
},
}
return q
Expand All @@ -58,13 +58,14 @@ func (s *Qbittorrent) Configure() services.ServiceInterface {
fmt.Println(err.Error())
}

inputDownloadsPath := &survey.Input{
Message: "Enter the path to your qbittorrent downloads folder:",
Default: s.Downloads,
inputDataPath := &survey.Input{
Message: "Enter the path to your torrent data folder:",
Default: s.Data,
}
err = survey.AskOne(inputDownloadsPath, &s.Downloads)
err = survey.AskOne(inputDataPath, &s.Data)
if err != nil {
fmt.Println(err.Error())
}

return s
}
26 changes: 8 additions & 18 deletions models/services/radarr/radarr.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ type Radarr struct {
}

type RadarrOptions struct {
Config string `yaml:"config"`
Downloads string `yaml:"downloads"`
Movies string `yaml:"movies"`
Config string `yaml:"config"`
Data string `yaml:"data"`
}

// Return default values for service
Expand All @@ -36,9 +35,8 @@ func (s *Radarr) Default() services.ServiceInterface {
},
},
RadarrOptions: RadarrOptions{
Config: "/opt/radarr/config",
Downloads: "~/downloads",
Movies: "/opt/radarr/movies",
Config: "/opt/radarr/config",
Data: "/data",
},
}
return p
Expand All @@ -55,22 +53,14 @@ func (s *Radarr) Configure() services.ServiceInterface {
fmt.Println(err.Error())
}

inputDownloadsPath := &survey.Input{
Message: "Enter the path to your radarr downloads folder:",
Default: s.Downloads,
inputDataPath := &survey.Input{
Message: "Enter the path to your top level media folder:",
Default: s.Data,
}
err = survey.AskOne(inputDownloadsPath, &s.Downloads)
err = survey.AskOne(inputDataPath, &s.Data)
if err != nil {
fmt.Println(err.Error())
}

inputMoviePath := &survey.Input{
Message: "Enter the path to your radarr Movies folder:",
Default: s.Movies,
}
err = survey.AskOne(inputMoviePath, &s.Movies)
if err != nil {
fmt.Println(err.Error())
}
return s
}
17 changes: 9 additions & 8 deletions models/services/sabnzbd/sabnzbd.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ type Sabnzbd struct {
}

type SabnzbdOptions struct {
Config string `yaml:"config"`
Downloads string `yaml:"downloads"`
Config string `yaml:"config"`
Data string `yaml:"data"`
}

// Return default values for service
Expand All @@ -36,8 +36,8 @@ func (s *Sabnzbd) Default() services.ServiceInterface {
},
},
SabnzbdOptions: SabnzbdOptions{
Config: "/opt/sabnzbd/config",
Downloads: "~/downloads",
Config: "/opt/sabnzbd/config",
Data: "/data/usenet",
},
}
return q
Expand All @@ -54,13 +54,14 @@ func (s *Sabnzbd) Configure() services.ServiceInterface {
fmt.Println(err.Error())
}

inputDownloadsPath := &survey.Input{
Message: "Enter the path to your sabnzbd downloads folder:",
Default: s.Downloads,
inputDataPath := &survey.Input{
Message: "Enter the path to your usenet data folder:",
Default: s.Data,
}
err = survey.AskOne(inputDownloadsPath, &s.Downloads)
err = survey.AskOne(inputDataPath, &s.Data)
if err != nil {
fmt.Println(err.Error())
}

return s
}
26 changes: 8 additions & 18 deletions models/services/sonarr/sonarr.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ type Sonarr struct {
}

type SonarrOptions struct {
Config string `yaml:"config"`
Downloads string `yaml:"downloads"`
Tv string `yaml:"tv"`
Config string `yaml:"config"`
Data string `yaml:"data"`
}

// Return default values for service
Expand All @@ -36,9 +35,8 @@ func (s *Sonarr) Default() services.ServiceInterface {
},
},
SonarrOptions: SonarrOptions{
Config: "/opt/sonarr/config",
Downloads: "~/downloads",
Tv: "/opt/sonarr/tv",
Config: "/opt/sonarr/config",
Data: "/data",
},
}
return p
Expand All @@ -55,22 +53,14 @@ func (s *Sonarr) Configure() services.ServiceInterface {
fmt.Println(err.Error())
}

inputDownloadsPath := &survey.Input{
Message: "Enter the path to your Sonarr downloads folder:",
Default: s.Downloads,
inputDataPath := &survey.Input{
Message: "Enter the path to your top level media folder:",
Default: s.Data,
}
err = survey.AskOne(inputDownloadsPath, &s.Downloads)
err = survey.AskOne(inputDataPath, &s.Data)
if err != nil {
fmt.Println(err.Error())
}

inputTvPath := &survey.Input{
Message: "Enter the path to your Sonarr TV folder:",
Default: s.Tv,
}
err = survey.AskOne(inputTvPath, &s.Tv)
if err != nil {
fmt.Println(err.Error())
}
return s
}

0 comments on commit 4059186

Please sign in to comment.