SageTV Community  

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

Notices

SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-10-2017, 02:25 PM
bialio's Avatar
bialio bialio is offline
SageTVaholic
 
Join Date: May 2007
Location: Frisco, TX
Posts: 3,445
Favorite with season or original airdate keyword?

I frequently find myself wanting to record a show's latest season (usually start something on Netflix, realize I like it, and start recording it).

It'd be nice if I could create a favorite that used a 'Season 4 or later' condition along with matching the title or keyword or whatever.

Is that possible? I don't know how the favorite manager code in the scheduler works....
__________________
PHOENIX 3 is here!
Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient
Reply With Quote
  #2  
Old 01-10-2017, 03:16 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
It's not 'entirely' possible. The lucene engine that handles the keyword search has a select set of information for the shows to match against. As far as I can tell, the fields that are present are:
id; title; desc; ep; year; rated; peeps; categories; ers; bonuses

So season and episode are not really available. the year property is I think only populated normally for movies.

Now, I'm not sure this can't be added - adding more fields to the search should not be difficult, but it would increase the memory for print of the index, as well as slow down the index and searching tasks. Even then, I'm not sure if the keyword query would support a 'Season>3' type test. I know nothing about lucene queries.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #3  
Old 01-10-2017, 03:32 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
I did something similar with Matlock a while back just wanted the last few seasons. I had to use the EP as a keyword.
Attached Images
File Type: png Untitled.png (296.7 KB, 189 views)
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #4  
Old 01-10-2017, 03:48 PM
bialio's Avatar
bialio bialio is offline
SageTVaholic
 
Join Date: May 2007
Location: Frisco, TX
Posts: 3,445
Thanks! that's tricky.
__________________
PHOENIX 3 is here!
Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient
Reply With Quote
  #5  
Old 01-11-2017, 04:15 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
Beyond that...you'd need to modify Agent.java to add a field for season and then add it into the UI as well so you can set it. This won't have any performance impacts though...so nothing to worry about there.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #6  
Old 01-11-2017, 07:29 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by Narflex View Post
Beyond that...you'd need to modify Agent.java to add a field for season and then add it into the UI as well so you can set it. This won't have any performance impacts though...so nothing to worry about there.
Something I couldn't tell in my first code exploration of this... Do agents use the lucene search? Would it be possible to do more advanced filters in a keyword search my specifying an actual lucene query?
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #7  
Old 01-12-2017, 12:12 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
Quote:
Originally Posted by Fuzzy View Post
Something I couldn't tell in my first code exploration of this... Do agents use the lucene search? Would it be possible to do more advanced filters in a keyword search my specifying an actual lucene query?
Agents can use the Lucene search feature...however, for compatibility with how it worked before we added Lucene, there is the flag use_legacy_keyword_favorites which defaults to true. If you set that to false, then it'll use Lucene for keyword favorites only; but then it won't support regex in search patterns and also won't search every field like it would without Lucene.

The normal process is just walking over the entire Airing table and matching those against the Agent's criteria. Even for the Lucene search, it would first search using the keyword and then apply the same matching after that to limit even further (for things like channel restrictions).
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #8  
Old 01-12-2017, 12:25 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by Narflex View Post
Agents can use the Lucene search feature...however, for compatibility with how it worked before we added Lucene, there is the flag use_legacy_keyword_favorites which defaults to true. If you set that to false, then it'll use Lucene for keyword favorites only; but then it won't support regex in search patterns and also won't search every field like it would without Lucene.

The normal process is just walking over the entire Airing table and matching those against the Agent's criteria. Even for the Lucene search, it would first search using the keyword and then apply the same matching after that to limit even further (for things like channel restrictions).
Okay, that was what was confusing me in the code I think. I saw all the lucene code in there, and saw the legacy switch - I just made an assumption that the legacy mode would be optional, and that the 'new' way would be the norm (though honestly, if I'd looked closer, that would have been clear).

So i wonder, if the most versatile option to improve on the agent's flexibility, while allowing the old regex 'keyword' search, would be to add either a 'query' search, or maybe even a prefix that could be added in a keyword search that flagged it as a more advanced 'lucene' search (thereby making it compatible with older UI's). might be a relatively simple change in the agent code then to check not just the legacy switch, but also the first few bytes of the keyword, and if it matches, it will process the keyword NOT as regex, but as a lucene query. Combined with adding a few more fields to the lucene index, this would provide all the flexibility the op is asking for and more.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #9  
Old 01-12-2017, 12:34 PM
bialio's Avatar
bialio bialio is offline
SageTVaholic
 
Join Date: May 2007
Location: Frisco, TX
Posts: 3,445
Can you put a full REGEX in the Keyword field? I see the * and ? are called out, but if the other operators are available that'd be sweet....
__________________
PHOENIX 3 is here!
Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient
Reply With Quote
  #10  
Old 01-12-2017, 01:27 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Yeah, pretty sure it does a regex match to some string generated from the airing - I'm not entirely sure the full format of the string though. I'm pretty sure it starts with the ID though, which is why a very common use of the keyword on a regular title favorite is EP\d+ to only match to airings with full episodic metadata with them (since those without the actual episode info will be SH* ID's).
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #11  
Old 01-12-2017, 04:24 PM
bialio's Avatar
bialio bialio is offline
SageTVaholic
 
Join Date: May 2007
Location: Frisco, TX
Posts: 3,445
SO - I modified a keyword favorite with some basic REGEX and it works. So with a little work you can accomplish this 'season x or later' - just have to find the EP number.

btl.
__________________
PHOENIX 3 is here!
Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient
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
Original Airdate nyplayer Gemstone for v7 1 10-31-2012 05:42 PM
Use Original Airdate to determine between multiple title hits? evilpenguin Batch Metadata Tools 7 01-27-2011 09:23 PM
Record by keyword. jryan15 SageMC Custom Interface 4 01-23-2010 11:32 PM
Keyword Favorite - Title/Year Combo rsagetv99 SageTV Software 2 09-08-2009 06:55 PM
Keyword Favorite, but exclude a show sixdoubleo SageTV Software 3 01-24-2008 03:04 PM


All times are GMT -6. The time now is 05:42 PM.


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