Hello,

I tired to add support for *.sub (MicroDVD) subtitles type and it seems to work.
Any thought are welcome.

====================================================
/usr/ports/multimedia/minidlna/patches/patch-add-subs
====================================================

Adds *.sub support


Index: metadata.c
--- metadata.c.org
+++ metadata.c
@@ -146,6 +146,11 @@
                strcpy(p, ".smi");
                ret = access(file, R_OK);
        }
+       if (ret != 0)
+       {
+               strcpy(p, ".sub");
+               ret = access(file, R_OK);
+       }

        if (ret == 0)
        {

Index: utils.c
--- utils.c.org
+++ utils.c
@@ -439,7 +439,8 @@
 int
 is_caption(const char * file)
 {
-       return (ends_with(file, ".srt") || ends_with(file, ".smi"));
+       return (ends_with(file, ".srt") || ends_with(file, ".smi") ||
+               ends_with(file, ".sub"));
 }

 media_types

Reply via email to