clients: Add media extension to titles for Hyundai TVs

On Hyundai HLN 24TS382 Smart TV, the DLNA client refuses to display
media files whose title does not end with a media file extension.
Because minidlna strips the extensions, all folders thus appear empty.

This patch adds a quirk for Hyundai TVs that appends the original file
extension to the titles, which fixes the issue.
This commit is contained in:
Jindřich Makovička 2017-05-02 20:08:30 +02:00 committed by Justin Maggard
parent 46d806ce2d
commit 5450ac486e
3 changed files with 18 additions and 0 deletions

View File

@ -205,6 +205,13 @@ struct client_type_s client_types[] =
EUserAgent EUserAgent
}, },
{ EHyundaiTV,
FLAG_DLNA,
"Hyundai TV",
"HYUNDAITV",
EFriendlyName
},
{ ERokuSoundBridge, { ERokuSoundBridge,
FLAG_MS_PFS | FLAG_AUDIO_ONLY | FLAG_MIME_WAV_WAV | FLAG_FORCE_SORT, FLAG_MS_PFS | FLAG_AUDIO_ONLY | FLAG_MIME_WAV_WAV | FLAG_FORCE_SORT,
"Roku SoundBridge", "Roku SoundBridge",

View File

@ -75,6 +75,7 @@ enum client_types {
ESonyBravia, ESonyBravia,
ESonyInternetTV, ESonyInternetTV,
EToshibaTV, EToshibaTV,
EHyundaiTV,
EAsusOPlay, EAsusOPlay,
EBubbleUPnP, EBubbleUPnP,
ENetFrontLivingConnect, ENetFrontLivingConnect,

View File

@ -883,6 +883,16 @@ callback(void *args, int argc, char **argv, char **azColName)
if( strlen(title) > 23 ) if( strlen(title) > 23 )
title[23] = '\0'; title[23] = '\0';
} }
/* Hyundai hack: Only titles with a media extension get recognized. */
else if( passed_args->client == EHyundaiTV )
{
ext = mime_to_ext(mime);
ret = asprintf(&alt_title, "%s.%s", title, ext);
if( ret > 0 )
title = alt_title;
else
alt_title = NULL;
}
} }
else if( *mime == 'a' ) else if( *mime == 'a' )
{ {