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

Limit channels for searching repetitions #18

Open FireFlyVDR opened 1 month ago

FireFlyVDR commented 1 month ago

Pressing '1' in the EPG detail for an event shows all repetitions of that event, but for channels with many regional channels this results in a long list with effectivley the same events. Example: WDR with WDR HD Bonn, WDR HD Dortmund, WDR HD Essen etc. and also their SD variants WDR Bonn, WDR Dortmund, WDR Essen etc. With the patch below the search is limited to the first n channels like in the Whats-On menu. The same config variable is used - maybe the varable should be renamed to reflect the additional behaviour. Please also check for any side effects.

--- epgsearchext.c.orig 2021-12-10 21:20:29.000000000 +0100
+++ epgsearchext.c      2024-07-02 12:57:13.927086983 +0200
@@ -1021,6 +1021,12 @@
                 continue;
             }

+            if (useChannel == 0) {
+                if (EPGSearchConfig.maxChannelMenuNow > 0 && channel->Number() > EPGSearchConfig.maxChannelMenuNow) {
+                    Schedule = Schedules->Next(Schedule);
+                    continue;
+                }
+            }
             if (useChannel == 1 && channelMin && channelMax) {
                 if (channelMin->Number() > channel->Number() || channelMax->Number() < channel->Number()) {
                     Schedule = Schedules->Next(Schedule);
tomjfr commented 1 month ago

The side effect is that any searchtimer would also be limited to maxChannelMenuNow. I would accept the patch if this could be avoided.

FireFlyVDR commented 1 month ago

Unfortunately I'm not familiar enough with epgsearch to write such a patch. Therefore please take this as an enhancement request. Thanks