NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Legacy (v4.x and earlier) v
« Previous 1 … 195 196 197 198 199 … 433 Next »
Advanced Rules Question

Advanced Rules Question
cbgifford
Offline

Member

Posts: 189
Threads: 20
Joined: Aug 2014
#1
2015-01-07, 05:12 AM
Hey sub or anyone who can answer this one.

From everything I could gather, if I create a manual recording and then add the below SQL statement to the advanced rules, the below statement should allow me to record all first run episodes that are a series premier. Is that correct? I can only hope it's that simple!

SELECT * FROM EPG_EVENT WHERE ((Season=1 AND Episode = 1 AND first_run = True) AND start_time BETWEEN 19:00 and 21:00)
Chris


Server - Intel Core I3-3210 @ 3.40GHz - 8 GB RAM - Windows 10.0 Pro - Total Storage - 5.4 TB
Two Silicondust HD Prime CC capture, 6 tuners total
Client - Intel Core I3-3210 @3.2GHz - 4GB Ram - Windows 7.0 Pro
Client - Intel Core I3-3210 @2.9GHz - 4GB Ram - Windows 10.0 Pro
NAS - Intel Core I3-3220T @ 2.8GHz - 4GB RAM - Windows 10.0 Pro (Total Storage - 25 TB)


sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#2
2015-01-07, 06:14 AM
Try your statement above in a tool like SQLiteSpy to see if it returns what you expect.

In NextPVR you'd only use the clause bit, ie not the "SELECT * FROM EPG_EVENT WHERE" bit. Also, times are in UTC, so your clause would need to account for that. I'm aware of the "BETWEEN" operator, but I guess it might exist.
cbgifford
Offline

Member

Posts: 189
Threads: 20
Joined: Aug 2014
#3
2015-01-07, 07:04 AM
Season=1 AND Episode = 1 AND first_run = "Y"

This returned 4 shows, one in particular that I was hoping to see. If I used this with a manual record, daily and any channel, NPVR would record four separate shows then? Could I use the start and end time fields in the manual recording to constrain the time frame instead of having to worry about UTC and the BETWEEN clause?
Chris


Server - Intel Core I3-3210 @ 3.40GHz - 8 GB RAM - Windows 10.0 Pro - Total Storage - 5.4 TB
Two Silicondust HD Prime CC capture, 6 tuners total
Client - Intel Core I3-3210 @3.2GHz - 4GB Ram - Windows 7.0 Pro
Client - Intel Core I3-3210 @2.9GHz - 4GB Ram - Windows 10.0 Pro
NAS - Intel Core I3-3220T @ 2.8GHz - 4GB RAM - Windows 10.0 Pro (Total Storage - 25 TB)


sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#4
2015-01-07, 04:20 PM
cbgifford Wrote:Season=1 AND Episode = 1 AND first_run = "Y"

This returned 4 shows, one in particular that I was hoping to see. If I used this with a manual record, daily and any channel, NPVR would record four separate shows then?
If that's what the SQL query returns, then yes.

Quote:Could I use the start and end time fields in the manual recording to constrain the time frame instead of having to worry about UTC and the BETWEEN clause?
Yes you can and SQLite has functions for doing the UTC conversion for you. Sorry I don't have any SQL handy that I can provide you.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,182
Threads: 958
Joined: May 2006
#5
2015-01-07, 10:54 PM
After seeing the result set in this log, http://forums.nextpvr.com/showthread.php...post483313 I'd be worried using the time, the sqlite commands sure look correct to me.

Martin
cbgifford
Offline

Member

Posts: 189
Threads: 20
Joined: Aug 2014
#6
2015-01-07, 11:31 PM
mvallevand Wrote:After seeing the result set in this log, http://forums.nextpvr.com/showthread.php...post483313 I'd be worried using the time, the sqlite commands sure look correct to me.

Martin

I'm using SQLite Browser and the clause works fine. I'm not using the time clause in the advanced command. I'm specifying the time frame, 19:00 to 22:00 in the the manual record settings. There's a show that meets the criteria tomorrow so the manual recording should pick it up. We'll see what happens and I will post the results.

I also just ran the below clause and it worked as well. Being a DB Programmer/Analyst, I've always used the between clause when working with date/time fields instead of the < and > operators. It makes for a simpler syntax. Perhaps he could rework the clause to use BETWEEN instead and see what happens

Code:
(season=1 and episode=1 and first_run = "Y") AND time(start_time,'localtime') BETWEEN time('19:00:00') and time('22:00:00')
Chris


Server - Intel Core I3-3210 @ 3.40GHz - 8 GB RAM - Windows 10.0 Pro - Total Storage - 5.4 TB
Two Silicondust HD Prime CC capture, 6 tuners total
Client - Intel Core I3-3210 @3.2GHz - 4GB Ram - Windows 7.0 Pro
Client - Intel Core I3-3210 @2.9GHz - 4GB Ram - Windows 10.0 Pro
NAS - Intel Core I3-3220T @ 2.8GHz - 4GB RAM - Windows 10.0 Pro (Total Storage - 25 TB)


cbgifford
Offline

Member

Posts: 189
Threads: 20
Joined: Aug 2014
#7
2015-01-08, 10:25 PM
Ok, now that I have my quotes correct, I'm starting simple

season=1 and episode=1 and first_run='Y'

This clause picks up two shows when I run it using SQLite Browser. However, when I enter the command into recurring recordings, it doesn't pick anything up when I select Find All. I updated the EPG and when I checked the recurring recordings list for the time the show is supposed to air, there was nothing scheduled during that time frame. Any ideas?
Chris


Server - Intel Core I3-3210 @ 3.40GHz - 8 GB RAM - Windows 10.0 Pro - Total Storage - 5.4 TB
Two Silicondust HD Prime CC capture, 6 tuners total
Client - Intel Core I3-3210 @3.2GHz - 4GB Ram - Windows 7.0 Pro
Client - Intel Core I3-3210 @2.9GHz - 4GB Ram - Windows 10.0 Pro
NAS - Intel Core I3-3220T @ 2.8GHz - 4GB RAM - Windows 10.0 Pro (Total Storage - 25 TB)


cbgifford
Offline

Member

Posts: 189
Threads: 20
Joined: Aug 2014
#8
2015-01-09, 09:35 AM
Any ideas why this does not appear to be working?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,182
Threads: 958
Joined: May 2006
#9
2015-01-09, 12:10 PM
cbgifford Wrote:Any ideas why this does not appear to be working?

Logs, plus set extended logging. http://forums.nextpvr.com/showthread.php...post483356 so we can see the select call

Martn
BrettB
Offline

Posting Freak

Saint Paul, MN, USA
Posts: 2,670
Threads: 170
Joined: Jun 2007
#10
2015-01-09, 03:13 PM
cbgifford Wrote:This clause picks up two shows when I run it using SQLite Browser. However, when I enter the command into recurring recordings, it doesn't pick anything up when I select Find All. I updated the EPG and when I checked the recurring recordings list for the time the show is supposed to air, there was nothing scheduled during that time frame. Any ideas?

I created a manual recording with the same parameters you specified on the next post (except my default post-padding is 5 minutes). When I clicked OK, NPVR immediately scheduled all of the matching shows for me as expected. I didn't have to do an EPG update. Overnight, it would have then done the automatic EPG update, too. Now, if I go into Recurring Recordings and select that recording and click Find All, I get the same "error" you're seeing saying "No other matching shows found." But, I presume that's because it has already scheduled all of the shows which match the rule.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Colossus2 Advanced Settings meccano 1 1,211 2021-10-06, 02:50 PM
Last Post: mvallevand
  changing channels in guide - stupid user question mt900spg 2 1,625 2019-12-19, 01:30 PM
Last Post: mvallevand
  Question about Channel Changing hdpvr-doug8796 6 2,564 2019-10-09, 06:24 PM
Last Post: hdpvr-doug8796
  Series/Episode question Bobins 4 1,788 2019-06-27, 08:50 PM
Last Post: sub
  Archive question Bobins 3 1,587 2019-05-23, 12:30 PM
Last Post: ElihuRozen
  Another Skinning question - Ready Recordings bar Rage321 11 3,014 2019-04-26, 12:51 PM
Last Post: mvallevand
  Skinning question - Adding more listings, making it fit Rage321 3 1,568 2019-04-21, 01:05 AM
Last Post: Rage321
  Rebuilt on New Hardware // Decoder Question rowle1jt 8 2,509 2019-03-14, 12:06 PM
Last Post: rowle1jt
  Weird Question // Cutting Commercials rowle1jt 2 1,453 2019-02-01, 10:57 PM
Last Post: meccano
  Timer rules Ericktreetops 1 1,324 2019-01-22, 04:52 PM
Last Post: mvallevand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode