[totem-pl-parser] plparse: Export content-type in playlist-started
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem-pl-parser] plparse: Export content-type in playlist-started
- Date: Wed, 20 Mar 2013 11:13:04 +0000 (UTC)
commit 28432e1b4b1d1a6dcbf306c05927852f07bf66f8
Author: Bastien Nocera <hadess hadess net>
Date: Wed Mar 20 11:57:49 2013 +0100
plparse: Export content-type in playlist-started
For the 3 playlist types that we can save, export their content
type in the parsers. This allows us to detect such playlists,
and offer to save them back in the same location.
plparse/totem-pl-parser-lines.c | 1 +
plparse/totem-pl-parser-pls.c | 1 +
plparse/totem-pl-parser-xspf.c | 1 +
3 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plparse/totem-pl-parser-lines.c b/plparse/totem-pl-parser-lines.c
index 7cae0d7..3b74bca 100644
--- a/plparse/totem-pl-parser-lines.c
+++ b/plparse/totem-pl-parser-lines.c
@@ -390,6 +390,7 @@ totem_pl_parser_add_m3u (TotemPlParser *parser,
totem_pl_parser_add_uri (parser,
TOTEM_PL_PARSER_FIELD_IS_PLAYLIST, TRUE,
TOTEM_PL_PARSER_FIELD_URI, pl_uri,
+ TOTEM_PL_PARSER_FIELD_CONTENT_TYPE, "audio/x-mpegurl",
NULL);
for (i = 0; lines[i] != NULL; i++) {
diff --git a/plparse/totem-pl-parser-pls.c b/plparse/totem-pl-parser-pls.c
index f1b94b1..bbac1b7 100644
--- a/plparse/totem-pl-parser-pls.c
+++ b/plparse/totem-pl-parser-pls.c
@@ -197,6 +197,7 @@ totem_pl_parser_add_pls_with_contents (TotemPlParser *parser,
TOTEM_PL_PARSER_FIELD_IS_PLAYLIST, TRUE,
TOTEM_PL_PARSER_FIELD_FILE, file,
TOTEM_PL_PARSER_FIELD_TITLE, playlist_title,
+ TOTEM_PL_PARSER_FIELD_CONTENT_TYPE, "audio/x-scpls",
NULL);
g_free (playlist_title);
diff --git a/plparse/totem-pl-parser-xspf.c b/plparse/totem-pl-parser-xspf.c
index c567306..3103a3d 100644
--- a/plparse/totem-pl-parser-xspf.c
+++ b/plparse/totem-pl-parser-xspf.c
@@ -483,6 +483,7 @@ parse_xspf_entries (TotemPlParser *parser,
TOTEM_PL_PARSER_FIELD_IS_PLAYLIST, TRUE,
TOTEM_PL_PARSER_FIELD_URI, uri,
TOTEM_PL_PARSER_FIELD_TITLE, title,
+ TOTEM_PL_PARSER_FIELD_CONTENT_TYPE, "application/xspf+xml",
NULL);
for (node = parent->children; node != NULL; node = node->next) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]