summaryrefslogtreecommitdiff
path: root/audio/gtkpod/MP4SetMetadata.diff
blob: 6f01a50d9dda0aaa37c0f1bf2be781293201ef2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
diff -ur gtkpod-0.99.14.orig/src/mp4file.c gtkpod-0.99.14/src/mp4file.c
--- gtkpod-0.99.14.orig/src/mp4file.c	2009-01-17 23:52:32.000000000 -0600
+++ gtkpod-0.99.14/src/mp4file.c	2010-03-16 22:12:08.719427169 -0500
@@ -399,11 +399,7 @@
 #else
 #warning "Album Artist field not supported with this version of libmp4v2. Album Artist support requires at least V1.6.0"
 #endif
-#if HAVE_LIBMP4V2_2
-		    if (MP4GetMetadataComposer(mp4File, &value) && value != NULL)
-#else
 		    if (MP4GetMetadataWriter(mp4File, &value) && value != NULL)
-#endif
 		    {
 			track->composer = charset_to_utf8 (value);
 			g_free(value);
@@ -413,11 +409,7 @@
 			track->comment = charset_to_utf8 (value);
 			g_free(value);
 		    }
-#if HAVE_LIBMP4V2_2
-		    if (MP4GetMetadataReleaseDate(mp4File, &value) && value != NULL)
-#else
 		    if (MP4GetMetadataYear(mp4File, &value) && value != NULL)
-#endif
 		    {
 			track->year = atoi (value);
 			g_free(value);
@@ -447,11 +439,7 @@
 			track->genre = charset_to_utf8 (value);
 			g_free(value);
 		    }
-#if HAVE_LIBMP4V2_2
-		    if (MP4GetMetadataBPM (mp4File, &numvalue))
-#else
 		    if (MP4GetMetadataTempo (mp4File, &numvalue))
-#endif
 		    {
 			track->BPM = numvalue;
 		    }
@@ -541,29 +529,16 @@
 						      &m_track, &m_tracks);
 	    gboolean has_disk = MP4GetMetadataDisk (mp4File,
 	    &m_disk, &m_disks);*/
-#if HAVE_LIBMP4V2_2
-	    gboolean has_tempo = MP4GetMetadataBPM (mp4File,
-						      &m_tempo);
-#else
 	    gboolean has_tempo = MP4GetMetadataTempo (mp4File,
 						      &m_tempo);
-#endif
 	    gboolean has_compilation = MP4GetMetadataCompilation (mp4File,
 								  &m_cpl);
 /*	    MP4GetMetadataName (mp4File, &m_name);
 	    MP4GetMetadataArtist (mp4File, &m_artist);
 	    MP4GetMetadataAlbumArtist (mp4File, &m_albumartist);
-#if HAVE_LIBMP4V2_2
-	    MP4GetMetadataComposer (mp4File, &m_writer);
-#else
 	    MP4GetMetadataWriter (mp4File, &m_writer);
-#endif
 	    MP4GetMetadataComment (mp4File, &m_comment);
-#if HAVE_LIBMP4V2_2
-	    MP4GetMetadataReleaseDate (mp4File, &m_year);
-#else
 	    MP4GetMetadataYear (mp4File, &m_year);
-#endif
 	    MP4GetMetadataAlbum (mp4File, &m_album);
 	    MP4GetMetadataGenre (mp4File, &m_genre);*/
 	    MP4GetMetadataTool (mp4File, &m_tool);
@@ -584,11 +559,7 @@
 	    g_free (value);
 #endif
 	    value = charset_from_utf8 (track->composer);
-#if HAVE_LIBMP4V2_2
-	    MP4SetMetadataComposer (mp4File, value);
-#else
 	    MP4SetMetadataWriter (mp4File, value);
-#endif
 	    g_free (value);
 
 	    value = charset_from_utf8 (track->comment);
@@ -596,11 +567,7 @@
 	    g_free (value);
 
 	    value = g_strdup_printf ("%d", track->year);
-#if HAVE_LIBMP4V2_2
-	    MP4SetMetadataReleaseDate (mp4File, value);
-#else
 	    MP4SetMetadataYear (mp4File, value);
-#endif
 	    g_free (value);
 
 	    value = charset_from_utf8 (track->album);
@@ -611,11 +578,7 @@
 
 	    MP4SetMetadataDisk (mp4File, track->cd_nr, track->cds);
 
-#if HAVE_LIBMP4V2_2
-	    MP4SetMetadataBPM (mp4File, track->BPM);
-#else
 	    MP4SetMetadataTempo (mp4File, track->BPM);
-#endif
 
 	    value = charset_from_utf8 (track->grouping);
 	    MP4SetMetadataGrouping (mp4File, value);
@@ -626,11 +589,7 @@
 	    g_free (value);
 
 #if MP4V2_HAS_METADATA_BUG
-#if HAVE_LIBMP4V2_2
-	    if (has_tempo) MP4SetMetadataBPM (mp4File, m_tempo);
-#else
 	    if (has_tempo) MP4SetMetadataTempo (mp4File, m_tempo);
-#endif
 	    if (has_compilation) MP4SetMetadataCompilation (mp4File, m_cpl);
 	    if (m_tool)     MP4SetMetadataTool (mp4File, m_tool);
 	    if (m_covert)   MP4SetMetadataCoverArt (mp4File, m_covert, m_size);