MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / MaybeLoadPlaylistFile

Function MaybeLoadPlaylistFile

src/PlaylistFile.cxx:239–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239static PlaylistFileContents
240MaybeLoadPlaylistFile(Path path_fs, PlaylistFileEditor::LoadMode load_mode)
241try {
242 if (load_mode == PlaylistFileEditor::LoadMode::NO)
243 return {};
244
245 return LoadPlaylistFile(path_fs);
246} catch (const PlaylistError &error) {
247 if (error.GetCode() == PlaylistResult::NO_SUCH_LIST &&
248 load_mode == PlaylistFileEditor::LoadMode::TRY)
249 return {};
250
251 throw;
252 }
253
254PlaylistFileEditor::PlaylistFileEditor(const char *name_utf8,
255 LoadMode load_mode)

Callers 1

PlaylistFileEditorMethod · 0.85

Calls 2

LoadPlaylistFileFunction · 0.85
GetCodeMethod · 0.80

Tested by

no test coverage detected