mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
driver/audiodec: don't encode utf8 to utf8
This commit is contained in:
@@ -372,23 +372,23 @@ bool CFfmpegDec::SetMetaData(FILE *_in, CFile::FileType ft, CAudioMetaData* m)
|
|||||||
AVDictionaryEntry *tag = NULL;
|
AVDictionaryEntry *tag = NULL;
|
||||||
while ((tag = av_dict_get(avc->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) {
|
while ((tag = av_dict_get(avc->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) {
|
||||||
if(!strcasecmp(tag->key,"Title")) {
|
if(!strcasecmp(tag->key,"Title")) {
|
||||||
title = convertLatin1UTF8(tag->value);
|
title = isUTF8(tag->value) ? tag->value : convertLatin1UTF8(tag->value);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(!strcasecmp(tag->key,"Artist")) {
|
if(!strcasecmp(tag->key,"Artist")) {
|
||||||
artist = convertLatin1UTF8(tag->value);
|
artist = isUTF8(tag->value) ? tag->value : convertLatin1UTF8(tag->value);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(!strcasecmp(tag->key,"Year")) {
|
if(!strcasecmp(tag->key,"Year")) {
|
||||||
date = convertLatin1UTF8(tag->value);
|
date = isUTF8(tag->value) ? tag->value : convertLatin1UTF8(tag->value);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(!strcasecmp(tag->key,"Album")) {
|
if(!strcasecmp(tag->key,"Album")) {
|
||||||
album = convertLatin1UTF8(tag->value);
|
album = isUTF8(tag->value) ? tag->value : convertLatin1UTF8(tag->value);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(!strcasecmp(tag->key,"Genre")) {
|
if(!strcasecmp(tag->key,"Genre")) {
|
||||||
genre = convertLatin1UTF8(tag->value);
|
genre = isUTF8(tag->value) ? tag->value : convertLatin1UTF8(tag->value);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -171,10 +171,10 @@ void CAudioPlayer::sc_callback(void *arg)
|
|||||||
bool changed=false;
|
bool changed=false;
|
||||||
CSTATE *stat = (CSTATE*)arg;
|
CSTATE *stat = (CSTATE*)arg;
|
||||||
|
|
||||||
const std::string artist = convertLatin1UTF8(stat->artist);
|
const std::string artist = isUTF8(stat->artist) ? stat->artist : convertLatin1UTF8(stat->artist);
|
||||||
const std::string title = convertLatin1UTF8(stat->title);
|
const std::string title = isUTF8(stat->title) ? stat->title : convertLatin1UTF8(stat->title);
|
||||||
const std::string station = convertLatin1UTF8(stat->station);
|
const std::string station = isUTF8(stat->station) ? stat->station : convertLatin1UTF8(stat->station);
|
||||||
const std::string genre = convertLatin1UTF8(stat->genre);
|
const std::string genre = isUTF8(stat->genre) ? stat->artist : convertLatin1UTF8(stat->genre);
|
||||||
|
|
||||||
if(m_Audiofile.MetaData.artist != artist)
|
if(m_Audiofile.MetaData.artist != artist)
|
||||||
{
|
{
|
||||||
|
@@ -36,6 +36,7 @@
|
|||||||
#include <configfile.h>
|
#include <configfile.h>
|
||||||
#include <zapit/client/zapitclient.h>
|
#include <zapit/client/zapitclient.h>
|
||||||
#include <zapit/client/zapittools.h>
|
#include <zapit/client/zapittools.h>
|
||||||
|
#include <eitd/edvbstring.h> // UTF8
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <list>
|
#include <list>
|
||||||
@@ -569,9 +570,11 @@ struct SNeutrinoSettings
|
|||||||
int backlight_tv;
|
int backlight_tv;
|
||||||
int backlight_standby;
|
int backlight_standby;
|
||||||
int backlight_deepstandby;
|
int backlight_deepstandby;
|
||||||
#define FILESYSTEM_ENCODING_TO_UTF8(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::Latin1_to_UTF8(a).c_str())
|
//#define FILESYSTEM_ENCODING_TO_UTF8(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::Latin1_to_UTF8(a).c_str())
|
||||||
|
#define FILESYSTEM_ENCODING_TO_UTF8(a) (isUTF8(a) ? (a) : ZapitTools::Latin1_to_UTF8(a).c_str())
|
||||||
#define UTF8_TO_FILESYSTEM_ENCODING(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::UTF8_to_Latin1(a).c_str())
|
#define UTF8_TO_FILESYSTEM_ENCODING(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::UTF8_to_Latin1(a).c_str())
|
||||||
#define FILESYSTEM_ENCODING_TO_UTF8_STRING(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::Latin1_to_UTF8(a))
|
//#define FILESYSTEM_ENCODING_TO_UTF8_STRING(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::Latin1_to_UTF8(a))
|
||||||
|
#define FILESYSTEM_ENCODING_TO_UTF8_STRING(a) (isUTF8(a) ? (a) : ZapitTools::Latin1_to_UTF8(a))
|
||||||
|
|
||||||
// pictureviewer
|
// pictureviewer
|
||||||
char picviewer_slide_time[3];
|
char picviewer_slide_time[3];
|
||||||
|
Reference in New Issue
Block a user