TV Show Fix #6

Merged
mattburchett merged 17 commits from matt/#2 into master 2018-11-20 23:08:30 +00:00
Showing only changes of commit 9cfd5c4274 - Show all commits

View File

@ -49,6 +49,7 @@ func LookupMovieFileLocation(config config.Config, ids []int) []string {
func LookupTVFileLocation(config config.Config, ids []int) []string { func LookupTVFileLocation(config config.Config, ids []int) []string {
fileList := make([]string, 0) fileList := make([]string, 0)
m := make(map[string]bool) m := make(map[string]bool)
results := make([]string, 0)
for _, i := range ids { for _, i := range ids {
plexURL := fmt.Sprintf("%s:%d%s%d%s%s", config.PlexHost, config.PlexPort, "/library/metadata/", i, "/allLeaves/?X-Plex-Token=", config.PlexToken) plexURL := fmt.Sprintf("%s:%d%s%d%s%s", config.PlexHost, config.PlexPort, "/library/metadata/", i, "/allLeaves/?X-Plex-Token=", config.PlexToken)
@ -75,7 +76,6 @@ func LookupTVFileLocation(config config.Config, ids []int) []string {
xml.Unmarshal(body, &plexModel) xml.Unmarshal(body, &plexModel)
plexTV := plexModel.Video plexTV := plexModel.Video
results := make([]string, 0)
for _, i := range plexTV { for _, i := range plexTV {
fileList = append(fileList, filepath.Dir(filepath.Dir(i.Media.Part.File))) fileList = append(fileList, filepath.Dir(filepath.Dir(i.Media.Part.File)))