Commit bfbb8f20 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Feature: playlist history for ICY based streams.

This patch adds support for history for ICY based streams.
Of cause this has the same limits for metedata as ICY has.

See: #766
parent 961453b0
......@@ -181,6 +181,7 @@ static void filter_shoutcast_metadata (source_t *source, char *metadata, unsigne
stats_event_conv (source->mount, "title", p, source->format->charset);
yp_touch (source->mount);
free (p);
playlist_push_track(source->history, &source->format->vc);
}
} while (0);
}
......
......@@ -141,6 +141,11 @@ int playlist_push_track(playlist_t *playlist, vorbis_comment *vc)
track->creator = __query_vc(vc, "ARTIST");
track->album = __query_vc(vc, "ALBUM");
track->trackNum = __query_vc(vc, "TRACKNUMBER");
if (!track->title && !track->creator && !track->album && !track->trackNum) {
/* no useful meta data has been found. try ICY style meta data */
track->title = __query_vc(vc, "X_ICY_TITLE");
}
}
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment