gnome-commander r2378 - in trunk: . src/tags
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r2378 - in trunk: . src/tags
- Date: Sat, 3 Jan 2009 01:17:36 +0000 (UTC)
Author: epiotr
Date: Sat Jan 3 01:17:36 2009
New Revision: 2378
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=2378&view=rev
Log:
ID3 metatags: added support for total number of tracks (Audio.AlbumTrackCount)
Modified:
trunk/ChangeLog
trunk/src/tags/gnome-cmd-tags-taglib.cc
Modified: trunk/src/tags/gnome-cmd-tags-taglib.cc
==============================================================================
--- trunk/src/tags/gnome-cmd-tags-taglib.cc (original)
+++ trunk/src/tags/gnome-cmd-tags-taglib.cc Sat Jan 3 01:17:36 2009
@@ -211,6 +211,19 @@
metadata.add(TAG_FILE_RANK,val);
break;
+ case TAG_AUDIO_ALBUMTRACKCOUNT:
+ {
+ string::size_type pos = val.rfind('/');
+ unsigned n = 0;
+
+ if (pos==string::npos || !sscanf(val.c_str()+pos, "/%u", &n) || !n)
+ continue;
+
+ metadata.addf(tag, "%u", n);
+ DEBUG('t', "\t%s (%s) = %u\n", id.c_str(), gcmd_tags_get_name(tag), n);
+ }
+ continue;
+
default:
break;
}
@@ -299,6 +312,7 @@
const gchar *name;
}
id3v2_data[] = {
+ {TAG_AUDIO_ALBUMTRACKCOUNT,"TRCK"}, // Total no. of tracks on the album
{TAG_ID3_ALBUMSORTORDER,"TSOA"}, // Album sort order
{TAG_ID3_AUDIOCRYPTO,"AENC"}, // Audio encryption
{TAG_ID3_AUDIOSEEKPOINT,"ASPI"}, // Audio seek point index
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]