summaryrefslogtreecommitdiffstats
path: root/media-plugins/xmms-wma/files/xmms-wma-ds-rcc.patch
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
commitca9627e70852f6b2e835660df870fe3ab405882d (patch)
tree0a008b1d5b16fa0679a195ed7b5662c7891f591c /media-plugins/xmms-wma/files/xmms-wma-ds-rcc.patch
downloaddarklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip
Initial import
Diffstat (limited to 'media-plugins/xmms-wma/files/xmms-wma-ds-rcc.patch')
-rw-r--r--media-plugins/xmms-wma/files/xmms-wma-ds-rcc.patch98
1 files changed, 98 insertions, 0 deletions
diff --git a/media-plugins/xmms-wma/files/xmms-wma-ds-rcc.patch b/media-plugins/xmms-wma/files/xmms-wma-ds-rcc.patch
new file mode 100644
index 0000000..fcdc82a
--- /dev/null
+++ b/media-plugins/xmms-wma/files/xmms-wma-ds-rcc.patch
@@ -0,0 +1,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");
+ }