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

Function LoadQueueSong

src/queue/Save.cxx:62–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62static DetachedSong
63LoadQueueSong(LineReader &file, const char *line)
64{
65 std::unique_ptr<DetachedSong> song;
66
67 if (const char *p = StringAfterPrefix(line, SONG_BEGIN)) {
68 const char *uri = p;
69 return song_load(file, uri);
70 } else {
71 char *endptr;
72 long ret = strtol(line, &endptr, 10);
73 if (ret < 0 || *endptr != ':' || endptr[1] == 0)
74 throw std::runtime_error("Malformed playlist line in state file");
75
76 const char *uri = endptr + 1;
77
78 return DetachedSong(uri);
79 }
80}
81
82void
83queue_load_song(LineReader &file, const SongLoader &loader,

Callers 1

queue_load_songFunction · 0.85

Calls 1

song_loadFunction · 0.85

Tested by

no test coverage detected