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

@ -883,6 +883,16 @@ callback(void *args, int argc, char **argv, char **azColName)
if( strlen(title) > 23 )
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' )
{