db_print: print extra "playlist" object for embedded CUE sheets
This finally enables the new embedded CUE sheet code: when a song file contains a playlist, it is printed in the "lsinfo" output, so clients get to know about this.
This commit is contained in:
parent
a7f13d841f
commit
01b0d9eb97
1
NEWS
1
NEWS
@ -4,6 +4,7 @@ ver 0.17 (2011/??/??)
|
|||||||
- "update" and "rescan" need only "CONTROL" permission
|
- "update" and "rescan" need only "CONTROL" permission
|
||||||
- new command "seekcur" for simpler seeking within current song
|
- new command "seekcur" for simpler seeking within current song
|
||||||
- add range parameter to command "load"
|
- add range parameter to command "load"
|
||||||
|
- print extra "playlist" object for embedded CUE sheets
|
||||||
* input:
|
* input:
|
||||||
- cdio_paranoia: new input plugin to play audio CDs
|
- cdio_paranoia: new input plugin to play audio CDs
|
||||||
- curl: enable CURLOPT_NETRC
|
- curl: enable CURLOPT_NETRC
|
||||||
|
@ -56,24 +56,6 @@ print_visitor_directory(const struct directory *directory, void *data,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
print_visitor_song(struct song *song, void *data,
|
|
||||||
G_GNUC_UNUSED GError **error_r)
|
|
||||||
{
|
|
||||||
struct client *client = data;
|
|
||||||
song_print_uri(client, song);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool
|
|
||||||
print_visitor_song_info(struct song *song, void *data,
|
|
||||||
G_GNUC_UNUSED GError **error_r)
|
|
||||||
{
|
|
||||||
struct client *client = data;
|
|
||||||
song_print_info(client, song);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_playlist_in_directory(struct client *client,
|
print_playlist_in_directory(struct client *client,
|
||||||
const struct directory *directory,
|
const struct directory *directory,
|
||||||
@ -86,6 +68,42 @@ print_playlist_in_directory(struct client *client,
|
|||||||
directory_get_path(directory), name_utf8);
|
directory_get_path(directory), name_utf8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool
|
||||||
|
print_visitor_song(struct song *song, void *data,
|
||||||
|
G_GNUC_UNUSED GError **error_r)
|
||||||
|
{
|
||||||
|
assert(song != NULL);
|
||||||
|
assert(song->parent != NULL);
|
||||||
|
|
||||||
|
struct client *client = data;
|
||||||
|
song_print_uri(client, song);
|
||||||
|
|
||||||
|
if (song->tag != NULL && song->tag->has_playlist)
|
||||||
|
/* this song file has an embedded CUE sheet */
|
||||||
|
print_playlist_in_directory(client, song->parent,
|
||||||
|
song->uri);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool
|
||||||
|
print_visitor_song_info(struct song *song, void *data,
|
||||||
|
G_GNUC_UNUSED GError **error_r)
|
||||||
|
{
|
||||||
|
assert(song != NULL);
|
||||||
|
assert(song->parent != NULL);
|
||||||
|
|
||||||
|
struct client *client = data;
|
||||||
|
song_print_info(client, song);
|
||||||
|
|
||||||
|
if (song->tag != NULL && song->tag->has_playlist)
|
||||||
|
/* this song file has an embedded CUE sheet */
|
||||||
|
print_playlist_in_directory(client, song->parent,
|
||||||
|
song->uri);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
print_visitor_playlist(const struct playlist_metadata *playlist,
|
print_visitor_playlist(const struct playlist_metadata *playlist,
|
||||||
const struct directory *directory, void *ctx,
|
const struct directory *directory, void *ctx,
|
||||||
|
Loading…
Reference in New Issue
Block a user