Skip to content

Commit be3e6cc

Browse files
committed
removed error from getPlexLibrary()
1 parent 79e4ac6 commit be3e6cc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/plex.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,20 +151,19 @@ func getPlexLibraries(cfg Config) (Libraries, error) {
151151
return libraries, nil
152152
}
153153

154-
func (cfg *Config) getPlexLibrary() error {
154+
func (cfg *Config) getPlexLibrary() {
155155
libraries, err := getPlexLibraries(*cfg)
156156
if err != nil {
157-
return fmt.Errorf("failed to fetch libraries: %s", err.Error())
157+
log.Fatalf("failed to fetch libraries: %s", err.Error())
158158
}
159159

160160
for _, library := range libraries.MediaContainer.Library {
161161
if cfg.Plex.LibraryName == library.Title {
162162
cfg.Plex.LibraryID = library.Key
163-
return nil
164163
}
165164
}
166165

167-
return fmt.Errorf("no library named %s found, please check LIBRARY_NAME variable", cfg.Plex.LibraryName)
166+
log.Fatalf("no library named %s found, please check LIBRARY_NAME variable", cfg.Plex.LibraryName)
168167
}
169168

170169
func refreshPlexLibrary(cfg Config) error {

0 commit comments

Comments
 (0)