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 0a8b11e154 - Show all commits

View File

@ -75,13 +75,17 @@ func LookupTVFileLocation(config config.Config, ids []int) []string {
xml.Unmarshal(body, &plexModel)
plexTV := plexModel.Video
results := make([]string, 0)
for _, i := range plexTV {
f := i.Media.Part.File
if _, ok := m[f]; !ok {
m[f] = true
fileList = append(fileList, filepath.Dir(filepath.Dir(i.Media.Part.File)))
}
for _, r := range fileList {
if _, ok := m[r]; !ok {
m[r] = true
results = append(results, r)
}
}
}