SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-21-2007, 06:57 AM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Video Browser Search

I'm obviously missing something, or my ignorance has finally caught up with me, but I can't really understand how the browser search works. There are a couple of anomalies that I can't figure out.

If I change the 2 instances of
Code:
VideoSearchList = SearchSelectedFieldsRegex(pattern, true, true, false, false, false, false, false, false, false,"VD")
in the xSearch section
to
Code:
VideoSearchList = SearchSelectedFieldsRegex(pattern, true, true, true, true, true, true, true, true, true,"VD")
it allows me to search on many more fields, however it seems that in one touch numeric text search mode I get limited results from Description and Misc fields, but it works fine when one touch numeric text search mode is not turned on.

Also when I try to change the parameters for the output sort
Code:
SortLexical(VideoSearchList, false, "GetShowEpisode")
to
SortLexical(VideoSearchList, false, "GetAiringStartTime")
I've tried many other options as well, but I can't get any of them to make any difference to the displayed sort order.

Anyone got any ideas as to the obvious thing I'm doing wrong?

John
Reply With Quote
  #2  
Old 04-21-2007, 09:58 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by JREkiwi View Post
it allows me to search on many more fields, however it seems that in one touch numeric text search mode I get limited results from Description and Misc fields, but it works fine when one touch numeric text search mode is not turned on.
Are you sure it isn't finding the results, or just isn't showing the found string fragments below the text input area, along with nothing in the text input area? The found fragments shown below the input area are only checked against the results of GetShowEpisode() (the imported video title, actually). Since you've allowed searching other fields, you are reaching a point where you have found videos that do not have the search string in their title. Since no result fragments can be shown, the input & fragments areas are blank

There should only be a single instance of SearchSelectedFieldsRegex() for imported vide searching, by the way. The other one is not for Regex.

Quote:
Also when I try to change the parameters for the output sort
Code:
SortLexical(VideoSearchList, false, "GetShowEpisode")
to
SortLexical(VideoSearchList, false, "GetAiringStartTime")
I've tried many other options as well, but I can't get any of them to make any difference to the displayed sort order.
There was a mistake in the default STV, which I've now fixed. It should contain:
Code:
VideoSearchList = SortLexical(VideoSearchList, false, "GetShowEpisode")
The sort results were being thrown out & the results weren't displayed as sorted. You can change the sort method after that & it will work.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #3  
Old 04-22-2007, 04:40 AM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Thanks Andy, that sorted my sorting problem.

As far as the search goes, here's where my confusion starts. If I use the movie Armageddon as an example.

In standard search (not one touch) the search will find the movie when doing a search of "asteroid" which is in the Description field. (search1.jpg)

In one touch search it finds the movie Armageddon at "aster" (In the PeopleList is Newscaster) (search2.jpg) but at "astero" it no longer shows Armageddon in the results (search3.jpg).

I see what you mean about the blank input and fragments. If I do a search on "willis" they end up blank, but I do get a match to Armageddon with Bruce Willis in the PeopleList (search4.jpg)



John
Attached Images
File Type: jpg search1.JPG (43.6 KB, 260 views)
File Type: jpg search2.JPG (58.2 KB, 269 views)
File Type: jpg search3.JPG (44.1 KB, 257 views)
File Type: jpg search4.JPG (40.2 KB, 250 views)
Reply With Quote
  #4  
Old 04-22-2007, 09:08 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Are you using a .properties file for Armageddon? If so, could you post it? I can't reproduce it using the made up data files I test with. I'll use the properties file with some dummy video.

Oh, and I see Chef! in those search results. A local station started airing that series again and I couldn't resist watching it again. PBS channels here tend to show British comedies on Friday & Saturday night. Now, if one of them would air Joking Apart agan...

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #5  
Old 04-22-2007, 10:44 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Andy, properties attached, saved from IMDB. There are some fields in it that aren't used by Sage, but look forward to more fields being supported.

I've not seen Joking Apart, but we have a channel UKTV, which as the name may suggest plays British shows, which gets quite a hammering on the recording schedule

John
Attached Files
File Type: zip properties.zip (13.6 KB, 220 views)
Reply With Quote
  #6  
Old 04-23-2007, 12:19 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
If there is a problem with SearchSelectedFieldsRegex() in the core, then you'll have to continue tracking it down because when I use that properties file, I have no problem using one-touch NTE searching to find 'asteroid'. But, I also have no 'Newscaster' in the people list.

Are you adding this data via your import, or letting the core read in the properties file? You might want to double check how the data for that show is getting added to the database. When I use GetPeopleInShow(), the "Actors" line seems to be skipped because it isn't "Actor". I think you'll have to clean up that properties file before testing it further, because I'm getting strange results with it.

I just looked up Joking Apart on IMDB... I would say that the user rating makes the show sound great, but there are only 19 votes & they are probably people who already liked the show before looking it up. Google found other sites. All I can say is that I could not sit down while watching this show over 10 years ago... I kept laughing so hard, I always fell out of my seat. I finally decided it just wasn't worth even trying to sit. The only other show to do that to me was the American version of "Whose Line Is It Anyway?", and even then, it was only a few episodes... such as the one with Florence Henderson. Of course, I have a wierd sense of humor, so you may not agree with what I think is funny.

Oh yeah, since I'm remembering old comedy imports from years ago... there was a show called Mother and Son from Australia. I don't remember any of the jokes from that one, though.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #7  
Old 04-23-2007, 01:09 AM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Hmm, you're right, it does work when the description is imported using the properties file.

The data was added via an AddShow in my import, which is also allowing me to add a description containing carriage returns. I guess that more than likely that's the problem. I suppose you could call it a bug if I'm able to add a description with carriage returns in it via AddShow, but the search can't find it. GetShowDescription is able to get the whole description including carriage returns. I will investigate further, to pin it down.

Good catch on the Actor tag, I've fixed that up on my import.

Have you seen another Steven Moffat written show called Coupling, I loved the first 3 seasons.

John
Reply With Quote
  #8  
Old 04-23-2007, 03:34 AM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
OK, here goes. The regex one touch search doesn't search my description field (created with AddShow) if it has carriage returns in it, but the standard search does. So is it the one touch, or the standard search that isn't working properly? or is that just the difference between the two search methods?

The Sage .properties parser understandably doesn't parse fields with carriage returns, so I need to fix how I'm creating the files, which will of course solve the search issue.

Where does the .properties Comment tag get saved to? I thought it was going into Misc, but it's not.

John
Reply With Quote
  #9  
Old 04-23-2007, 10:15 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
No, I haven't seen Coupling. I don't think it has even been aired here.

Quote:
Originally Posted by JREkiwi View Post
The regex one touch search doesn't search my description field (created with AddShow) if it has carriage returns in it, but the standard search does. So is it the one touch, or the standard search that isn't working properly? or is that just the difference between the two search methods?
It sounds like there is a difference between how SearchSelectedFieldsRegex() and SearchSelectedFields() handle that situation. You should probably report an example of it to SageTV. It would either get fixed, prevented, or documented at some point.

Or, maybe check this first:

Quote:
The Sage .properties parser understandably doesn't parse fields with carriage returns, so I need to fix how I'm creating the files, which will of course solve the search issue.
Does it work if you change the strings to use "\n" (or "\\n") instead when you add the info?

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #10  
Old 04-23-2007, 12:37 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Update: Yes, definitely change any carriage returns in the text to \n.

And, the Comment tag is not currently used, so I suppose that makes it inaccessible.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #11  
Old 04-23-2007, 01:03 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Thanks Andy. During my test, I had removed all the \r and \n , so it would be nice to be able to get some formatting back in.

Thanks for your help. Incredible what unfolds by changing SearchSelectedFieldsRegex()

John
Reply With Quote
  #12  
Old 04-23-2007, 11:29 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Quote:
Originally Posted by Opus4 View Post
Update: Yes, definitely change any carriage returns in the text to \n.
Changed to only have \n but the SearchSelectedFieldsRegex() still won't find anything in an AddShow() added field with \n in it.

When I said the Sage parser doesn't parse fields with carriage returns, what I really meant, was that it only parses up to the carriage return. With only \n it still only parses up to the \n.

With my .my file handling, I had resorted to substituting \n with ### while saving and reversing that for display. I suppose I'll either eliminate the multi paragraph fields or do the same with this, unless there's another way.

There's no hidden formatting options are there? I like the way GetShowExpandedRatings() automatically replace the last seperator with "and"

John
Reply With Quote
  #13  
Old 04-24-2007, 12:09 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
I got the impression that it should be able to read in \n as part of a metadata property, so about the only thing I can suggest is to set up a sample basic metadata properties file that uses \n, where the rest of the line gets cut off when imported, and submit that as a bug.

Once that is taken care of, if SearchSelectedFieldsRegex() still can't search beyond the point where there is \n, then I suppose that would be the next bug report.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #14  
Old 04-24-2007, 01:54 AM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Bug Submitted

Thanks Andy

John
Reply With Quote
  #15  
Old 04-24-2007, 02:44 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Just an update. I probably misunderstood. The .properties field will not import past a newline \n, but will import past \n as text and parses it as a newline \n (Is there enough \n's in that sentence?)
Examples

Description=Here's a description
that goes over two lines

parses as
Here's a description

Description=Here's a description\nthat goes over two lines

parses as
Here's a description
that goes over two lines

SearchSelectedFieldsRegex() doesn't search a field containing newline \n

John
Reply With Quote
  #16  
Old 04-24-2007, 02:52 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Oh -- I thought you meant you were trying to use '\n' as part of a single line of text, and text on that single line was being cut off after the '\n' chars.

So, since that isn't a problem, I suppose SearchSelectedFieldsRegex() is the only remaining issue.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #17  
Old 04-25-2007, 01:39 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Quote:
Originally Posted by Opus4 View Post
I suppose SearchSelectedFieldsRegex() is the only remaining issue.
But not for long.

Here's the reply I got from the bug submit

The bug is in the STV. When it compiles the regex pattern it
doesn't specify DOTALL which is needed to absorb the newline characters.
I'll have the STV updated with that fix.



John
Reply With Quote
  #18  
Old 04-25-2007, 03:08 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Andy,

I assume it's this line
Code:
pattern=java_util_regex_Pattern_compile("(?iu).*?("+SearchRegexString+").*")
If you can get me the fixed version, I can include the fix in my Customize Search import, to fix any older STVs out there.

John
Reply With Quote
  #19  
Old 04-25-2007, 03:18 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Should be a pretty simple fix, according to the docs for Pattern.compile. All you need is one more argument specifying the DOTALL flag, which (according to the docs) has a decimal value of 32. So:

Code:
pattern=java_util_regex_Pattern_compile("(?iu).*?("+SearchRegexString+").*", 32)
__________________
-- Greg
Reply With Quote
  #20  
Old 04-25-2007, 03:41 PM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
or change the options block "(?iu)" to "(?ius)", giving:
Code:
pattern=java_util_regex_Pattern_compile("(?ius).*?("+SearchRegexString+").*")
PS greg: did you know studio can access Java static constants directly, so the following will also work:
Code:
pattern=java_util_regex_Pattern_compile("(?iu).*?("+SearchRegexString+").*", java_util_regex_Pattern_DOTALL)
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SageTV V6.1.4 Release Candidate Narflex SageTV Beta Test Software 2 03-09-2007 12:02 PM
Nvidia Decoder / Video quality problems brundag5 SageTV Software 2 01-12-2007 06:58 PM
Video is working, now for sound otakucode SageTV Software 2 01-03-2007 05:19 PM
Video Setup Questions... MrApollinax SageTV Software 1 12-20-2005 09:22 AM


All times are GMT -6. The time now is 07:24 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.