sound-juicer r2220 - in trunk: . data src



Author: rburton
Date: Tue Jun 17 08:23:55 2008
New Revision: 2220
URL: http://svn.gnome.org/viewvc/sound-juicer?rev=2220&view=rev

Log:
2008-06-17  Ross Burton  <ross burtonini com>

	* src/sj-extracting.c:
	* data/sound-juicer.schemas.in:
	Add %ay, album year.  Based on a patch by Juan F. GimÃnez
	Silva (#522909).


Modified:
   trunk/ChangeLog
   trunk/data/sound-juicer.schemas.in
   trunk/src/sj-extracting.c

Modified: trunk/data/sound-juicer.schemas.in
==============================================================================
--- trunk/data/sound-juicer.schemas.in	(original)
+++ trunk/data/sound-juicer.schemas.in	Tue Jun 17 08:23:55 2008
@@ -73,6 +73,7 @@
         %aA -- album artist (lowercase)
         %as -- album artist (sortable)
         %aS -- album artist (sortable lowercase)
+        %ay -- album year
         %tt -- track title
         %tT -- track title (lowercase)
         %ta -- track artist

Modified: trunk/src/sj-extracting.c
==============================================================================
--- trunk/src/sj-extracting.c	(original)
+++ trunk/src/sj-extracting.c	Tue Jun 17 08:23:55 2008
@@ -876,6 +876,7 @@
  *
  * Valid markers so far are:
  * %at -- album title
+ * %ay -- album year
  * %aa -- album artist
  * %aA -- album artist (lowercase)
  * %as -- album artist sortname
@@ -944,6 +945,13 @@
       case 't':
         string = sanitize_path (track->album->title, filesystem_type);
         break;
+      case 'y':
+        if (track->album->release_date && g_date_valid(track->album->release_date)) {
+          tmp = g_strdup_printf ("%d", g_date_get_year (track->album->release_date)); 
+          string = sanitize_path (tmp, filesystem_type);
+          g_free (tmp);
+        }
+        break;
       case 'T':
         tmp = g_utf8_strdown (track->album->title, -1);
         string = sanitize_path (tmp, filesystem_type);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]