Hi Richard, > > `--refresh-include' takes a comma-separated list of case-insensitive > > regexps, from looking at the `channels_filtered' subroutine, so > > «--refresh-include '^BBC Radio 4$'» should cut out the `Extra'. > > (The regexp is quoted for Unix.) > > Are you saying the onus is on the user to insert ^ and $ in a regex to > suppress greedy matching?
What's happening is not greedy matching, but yes, if the user wants the regexp to stop matching after the `4' then they need to state that in some way, e.g. `4$'. > In the case of a search argument the documentation requires a regex. Yes. > There is no similar requirement for --refresh-include. That's a documentation error. > My view is that if the programmer chooses to use a regex there it is > up to him or her to construct the regex. Well, that's not what the code currently does. It splits the parameter on commas and treats each resulting part as a regexp, combining them with `|' so any of them matching is an overall match. For example, `foo,bar xyzzy' becomes the regexp /(foo|bar xyzzy)/i. The trailing `i' indicates case insensitive. > My first attempt was --refresh-include radio4. Nothing was found. I > concluded I had to match the channel name exactly as "BBC Radio 4". The regexp /radio4/i doesn't match the string `Radio 4'. > I was therefore surprised to have "BBC Radio 4 Extra" matched as well. The regexp /BBC Radio 4/i does match the string `BBC Radio 4 Extra'. > A more important question is do you agree that in order for > --refresh-include to work it has to be accompanied by > --refresh-exclude-groups national,regional,local? No idea. The subroutine I mentioned isn't particularly clear given I don't know the data structures it's walking so I didn't pick up on that. (More effort could have gone into distinctive identifiers to avoid many of them seemingly similar.) > > There should be a `INFO: Will refresh channel...' verbose log > > message for each channel that makes it through. > > Taking your last point first, the verbose messages are not very > helpful because they are accompanied by a lot of messages about the > schedule pages. Curiously for --refresh-include "radio 4" I get > > INFO: Will refresh channel BBC Radio 4 > INFO: Will refresh channel BBC Radio 4 > INFO: Will refresh channel BBC Radio 4 Extra That seems pretty helpful. It's confirming the channels that are matching the comma-separate list of regexps. I assume the first is there twice because it's a channel that's in two different groups. Perhaps the group could also be stated in each line. -- Cheers, Ralph. https://plus.google.com/+RalphCorderoy _______________________________________________ get_iplayer mailing list [email protected] http://lists.infradead.org/mailman/listinfo/get_iplayer

