[banshee] Read/write IsCompilation from/to vorbis comment
- From: Alexander Kojevnikov <alexk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] Read/write IsCompilation from/to vorbis comment
- Date: Tue, 23 Feb 2010 23:18:22 +0000 (UTC)
commit f10f6dc3a520d217c017cd909889aa39c9244943
Author: Alexander Kojevnikov <alexander kojevnikov com>
Date: Wed Feb 24 10:15:06 2010 +1100
Read/write IsCompilation from/to vorbis comment
NEWS | 2 +-
build/m4/banshee/taglib.m4 | 2 +-
.../Banshee.Core/Banshee.Streaming/StreamTagger.cs | 14 ++++++++++++++
3 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index 83a1285..5b47604 100644
--- a/NEWS
+++ b/NEWS
@@ -124,7 +124,7 @@ DEPENDENCIES
* NDesk DBus (ndesk-dbus) 0.5
* NDesk DBus GLib (ndesk-dbus-glib) 0.3
* Mono.Addins (mono-addins) 0.3.1
- * TagLib# (taglib-sharp) >= 2.0.3.2
+ * TagLib# (taglib-sharp) >= 2.0.3.5
* Required to build default feature stack:
* libmtp >= 0.2.0
diff --git a/build/m4/banshee/taglib.m4 b/build/m4/banshee/taglib.m4
index d7e36d0..cfeb328 100644
--- a/build/m4/banshee/taglib.m4
+++ b/build/m4/banshee/taglib.m4
@@ -1,5 +1,5 @@
AC_DEFUN([BANSHEE_CHECK_TAGLIB_SHARP],
[
- PKG_CHECK_MODULES(TAGLIB_SHARP, taglib-sharp >= 2.0.3.2)
+ PKG_CHECK_MODULES(TAGLIB_SHARP, taglib-sharp >= 2.0.3.5)
AC_SUBST(TAGLIB_SHARP_LIBS)
])
diff --git a/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs b/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs
index a1a3399..d243557 100644
--- a/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs
+++ b/src/Core/Banshee.Core/Banshee.Streaming/StreamTagger.cs
@@ -215,6 +215,12 @@ namespace Banshee.Streaming
private static bool IsCompilation (TagLib.File file)
{
try {
+ var xiph_tag = file.GetTag(TagLib.TagTypes.Xiph, true) as TagLib.Ogg.XiphComment;
+ if (xiph_tag != null && xiph_tag.IsCompilation)
+ return true;
+ } catch {}
+
+ try {
TagLib.Id3v2.Tag id3v2_tag = file.GetTag(TagLib.TagTypes.Id3v2, true) as TagLib.Id3v2.Tag;
if (id3v2_tag != null && id3v2_tag.IsCompilation)
return true;
@@ -240,6 +246,14 @@ namespace Banshee.Streaming
private static void SaveIsCompilation (TagLib.File file, bool is_compilation)
{
try {
+ var xiph_tag = file.GetTag(TagLib.TagTypes.Xiph, true) as TagLib.Ogg.XiphComment;
+ if (xiph_tag != null) {
+ xiph_tag.IsCompilation = is_compilation;
+ return;
+ }
+ } catch {}
+
+ try {
TagLib.Id3v2.Tag id3v2_tag = file.GetTag(TagLib.TagTypes.Id3v2, true) as TagLib.Id3v2.Tag;
if (id3v2_tag != null) {
id3v2_tag.IsCompilation = is_compilation;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]