vdr-projects / vdr-plugin-epgsearch

Searchtimer and replacement of the VDR program menu
GNU General Public License v2.0
3 stars 5 forks source link

Raise limit of shorttext (MAX_SUBTITLE_LENGTH) #12

Closed FireFlyVDR closed 1 year ago

FireFlyVDR commented 1 year ago

In epgsearchext.c the default for MAX_SUBTITLE_LENGTH is currently set to 40 which is nowadays often too short and results in a cut-off shorttext (episode-name) in recordings (It's called here subtitle but actually the field is named shorttext in EIT). The limit was present in former VDR versions (e.g. in VDR 1.6 it's defined in recording.c) but is no longer present in recent versions. Therefore the limit in epgsearch should be raised to at least 256 or better to the max EIT descriptor length of 4096. Then the condition in the Makefile for setting MAX_SUBTITLE_LENGTH can be removed.

--- epgsearchext.c.orig 2021-12-10 21:20:29.000000000 +0100
+++ epgsearchext.c      2023-06-06 18:31:26.144359223 +0200
@@ -43,7 +43,7 @@
 cSearchExts SearchTemplates;

 #ifndef MAX_SUBTITLE_LENGTH
-#define MAX_SUBTITLE_LENGTH 40
+#define MAX_SUBTITLE_LENGTH 4096
 #endif

 // -- cSearchExt -----------------------------------------------------------------
FireFlyVDR commented 1 year ago

I've been digging deeper and found that the 40 char limit was originally introduced for recordings on VFAT but the special VFAT handling was replaced in VDR 2.0 (released in 2013) by the --dirnames parameter and no more special VFAT handling is required in cTimers according to VDR's history file. Therefore I suggest to remove the shorttext limit completely with the attached patch.

epgsearch-2.4.1_remove_shorttext_limit.diff.txt

tomjfr commented 1 year ago

Will be in the next update (it would be nice if patches were done against the offficial git code, but thanks).