[phpBB Debug] PHP Notice: in file /viewtopic.php on line 981: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 981: getdate(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead
Linuxcentre • View topic - [solved] Cannot search across series and episode names

[solved] Cannot search across series and episode names

Bring out the bugs.

[solved] Cannot search across series and episode names

Postby roaima » 16 Feb 2010 12:17

I'm using the command line version 2.66, which as of "now" is the latest and greatest.

I'm hoping to PVR the Olympics finals, so I've tried a search using this line:
Code: Select all
get-iplayer --type tv --long 'olympic.*final'

but this returns zero results.

If I search on either
Code: Select all
'olympic'
or
Code: Select all
'final'
it works, proving (to me) that the
Code: Select all
--long
flag is indeed allowing a search within either the series name or the episode name. But it appears that the search does not act across both fields at once.

Here are the relevant entries from the partial search:
Code: Select all
468:    Olympic Snowboarding - Vancouver 2010: Men's Snowboard Cross - Final, BBC Sport, Snowboarding,Sport,TV,Winter Olympics,Winter Sports, default, 0 days 0 hours ago - Clare Balding and Graham Bell introduce coverage of the men's snowboard cross final.


I've also tried
Code: Select all
--fields=name,episode
as an alternative to
Code: Select all
--long
, but that seems to make no difference.

Any suggestions, please?
Cheers,
Chris
roaima
 
Posts: 3
Joined: 16 Feb 2010 11:27

Re: Cannot search across series and episode names

Postby linuxcentre » 16 Feb 2010 23:48

Yes you are right - regex across the whole search wasn't isn't intended to be supported.

You could try '(olympic|final)' as a regex...
linuxcentre
Site Admin
 
Posts: 306
Joined: 31 Dec 2009 17:29

Re: Cannot search across series and episode names

Postby roaima » 17 Feb 2010 00:17

Surely a construct such as "(olympic|final)" is a boolean OR rather than a boolean AND? In which case this would match all occurrences of "olympic" as well as all occurrences of "final", rather than only those occurrences in which "olympic" and "final" were present together.

Maybe I'll take a look at your code and see if I'm up to submitting a patch. It's a stunning;y useful application!

Cheers,
Chris
roaima
 
Posts: 3
Joined: 16 Feb 2010 11:27

Re: Cannot search across series and episode names

Postby linuxcentre » 17 Feb 2010 01:25

It wasn't as bad a change as I thought it would be. Basically it strings together the listed fields in order and space separated then does the match on it. I'll put it in the next release but you might have to wait for a while. Here's the small patch to the 'get_regex_matches' function:

Code: Select all
                        # Add included matches
-                        for my $field ( @searchfields ) {
-                               $download_hash{ $this->{index} } = $this if $this->{$field} =~ /$download_regex/i;
-                        }
+                        my @compund_fields;
+                        push @compund_fields, $this->{$_} for @searchfields;
+                        $download_hash{ $this->{index} } = $this if (join ' ', @compund_fields) =~ /$download_regex/i;
linuxcentre
Site Admin
 
Posts: 306
Joined: 31 Dec 2009 17:29

Re: Cannot search across series and episode names

Postby linuxcentre » 21 Feb 2010 17:48

This is out in v2.67 now.
linuxcentre
Site Admin
 
Posts: 306
Joined: 31 Dec 2009 17:29

Re: [solved] Cannot search across series and episode names

Postby roaima » 21 Feb 2010 19:23

I'm constantly amazed by your rapid turnaround on new features and bug fixes. Thank you very much!
Chris
roaima
 
Posts: 3
Joined: 16 Feb 2010 11:27


Return to bugs



Who is online

Users browsing this forum: No registered users and 0 guests

cron
./cache/ is NOT writable.