summaryrefslogtreecommitdiffstats
path: root/media-plugins/xmms-wma/files/xmms-wma-ds-rcc.patch
blob: fcdc82a2c0d059cdcb95e955c20ec1c4f82130b6 (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
diff -dPNur xmms-wma-1.0.5-new/xmms-wma.c xmms-wma-1.0.5-new-rcc/xmms-wma.c
--- xmms-wma-1.0.5-new/xmms-wma.c	2007-04-22 00:47:20.000000000 +0200
+++ xmms-wma-1.0.5-new-rcc/xmms-wma.c	2007-04-22 01:13:08.000000000 +0200
@@ -36,6 +36,7 @@
 #include <xmms/configfile.h>
 #include <xmms/util.h>
 #include <xmms/titlestring.h>
+#include <libxmms/rcc.h>
 #endif
 
 #ifdef HAVE_AV_CONFIG_H
@@ -302,7 +303,7 @@
     input->file_path = filename;
 #endif
     input->file_ext = extname(filename);
-    ret = xmms_get_titlestring(xmms_get_gentitle_format(), input);
+    ret = xmms_charset_get_titlestring(xmms_get_gentitle_format(), input, XMMS_RCC_UTF8);
     if(input) g_free(input);
 
     if(!ret)
@@ -488,6 +489,7 @@
     char *title;
     char *tmp;
     char *message;
+    char *recoded;
     AVFormatContext *in = NULL;
     AVCodecContext *s = NULL;
     AVCodec *codec;
@@ -518,6 +520,11 @@
 
     strcpy(message, "\n\n\n");
     strcat(message, "File Name: ");
+    recoded = xmms_rcc_recode(XMMS_RCC_FS, XMMS_RCC_OUT, slashkill(filename));
+    if (recoded) {
+	strcat(message, recoded);
+	free(recoded);
+    } else 
     strcat(message, slashkill(filename));
     strcat(message, "\n\n");
     strcat(message, "Audio Info:\n");
@@ -558,18 +565,33 @@
     if (in->title[0] != '\0')
     {
 	strcat(message, "Title: ");
+	recoded = xmms_rcc_recode(XMMS_RCC_UTF8, XMMS_RCC_OUT, in->title);
+	if (recoded) {
+	    strcat(message, recoded);
+	    free(recoded);
+        } else 
 	strcat(message, in->title);
 	strcat(message, "\n");
     }	
     if (in->author[0] != '\0')
     {
 	strcat(message, "Author: ");
+	recoded = xmms_rcc_recode(XMMS_RCC_UTF8, XMMS_RCC_OUT, in->author);
+	if (recoded) {
+	    strcat(message, recoded);
+	    free(recoded);
+        } else 
 	strcat(message, in->author);
 	strcat(message, "\n");
     }	
     if (in->album[0] != '\0')
     {
 	strcat(message, "Album: ");
+	recoded = xmms_rcc_recode(XMMS_RCC_UTF8, XMMS_RCC_OUT, in->album);
+	if (recoded) {
+	    strcat(message, recoded);
+	    free(recoded);
+        } else 
 	strcat(message, in->album);
 	strcat(message, "\n");
     }
@@ -598,12 +620,23 @@
     if (in->comment[0] != '\0')
     {
 	strcat(message, "Comments: ");
+	recoded = xmms_rcc_recode(XMMS_RCC_UTF8, XMMS_RCC_OUT, in->comment);
+	if (recoded) {
+	    strcat(message, recoded);
+	    free(recoded);
+        } else 
 	strcat(message, in->comment);
 	strcat(message, "\n");
     }
     if (in->copyright[0] != '\0')
     {
 	strcat(message, "Copyright: ");
+	strcat(message, "Comments: ");
+	recoded = xmms_rcc_recode(XMMS_RCC_UTF8, XMMS_RCC_OUT, in->copyright);
+	if (recoded) {
+	    strcat(message, recoded);
+	    free(recoded);
+        } else 
 	strcat(message, in->copyright);
 	strcat(message, "\n");
     }