summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-01-22 13:51:33 +0100
committerGravatar waker <wakeroid@gmail.com>2011-01-22 13:51:33 +0100
commit6f520312e87f7a485cd841997d4cfe4f1c3034c9 (patch)
tree973108a5a749171008f0dc28a93186120df155ec
parent72ba01ed7bb0967e0b257db295a320a05f362742 (diff)
fixed loading of single-track cuesheets
-rw-r--r--playlist.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/playlist.c b/playlist.c
index 1968aae9..9238449e 100644
--- a/playlist.c
+++ b/playlist.c
@@ -353,7 +353,6 @@ plt_add (int before, const char *title) {
// NOTE: caller must ensure that configuration is saved after that call
void
plt_remove (int plt) {
- trace ("plt_remove %d\n", plt);
int i;
assert (plt >= 0 && plt < playlists_count);
PLT_LOCK;
@@ -965,9 +964,11 @@ pl_insert_cue_from_buffer (playItem_t *after, playItem_t *origin, const uint8_t
}
else if (!strncmp (p, "TRACK ", 6)) {
trace ("cue: adding track: %s %s %s\n", origin->fname, title, track);
- // add previous track
- after = pl_process_cue_track (after, origin->fname, &prev, track, index00, index01, pregap, title, performer, albumtitle, genre, date, replaygain_album_gain, replaygain_album_peak, replaygain_track_gain, replaygain_track_peak, origin->decoder_id, origin->filetype, samplerate);
- trace ("cue: added %p (%p)\n", after);
+ if (title[0]) {
+ // add previous track
+ after = pl_process_cue_track (after, origin->fname, &prev, track, index00, index01, pregap, title, performer, albumtitle, genre, date, replaygain_album_gain, replaygain_album_peak, replaygain_track_gain, replaygain_track_peak, origin->decoder_id, origin->filetype, samplerate);
+ trace ("cue: added %p (%p)\n", after);
+ }
track[0] = 0;
title[0] = 0;
@@ -1004,7 +1005,7 @@ pl_insert_cue_from_buffer (playItem_t *after, playItem_t *origin, const uint8_t
// fprintf (stderr, "got unknown line:\n%s\n", p);
}
}
- if (ins == after) {
+ if (!title[0]) {
UNLOCK;
return NULL;
}
@@ -2337,7 +2338,6 @@ pl_load (const char *fname) {
}
pl_insert_item (playlist->tail[PL_MAIN], it);
pl_item_unref (it);
- trace ("last playlist item refc: %d\n", it->_refc);
it = NULL;
}
GLOBAL_UNLOCK;