NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 4 5 6 7 8 … 93 Next »
Custom recording rules

 
  • 0 Vote(s) - 0 Average
Custom recording rules
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,100
Threads: 957
Joined: May 2006
#41
2012-10-11, 10:44 PM
The description field is really overloaded it can start with a movie year, subtitle, s/e + subtitle or just a description. Are you using a utility to do all that?

Martin
Graham
Offline

Posting Freak

UK
Posts: 4,058
Threads: 102
Joined: Dec 2005
#42
2012-10-11, 11:56 PM (This post was last modified: 2012-10-12, 12:06 AM by Graham.)
mvallevand Wrote:Are you using a utility to do all that?

The year is copied to the description by the xmltv grabber. The actors are copied by the good gadget from pbs that is at ...

http://forums.nextpvr.com/showthread.php...light=xslt

The subtitle is there intermittently in the original xmltv (usually in the +1 channels ... which could be ignored if there was a "exclude channels" list). Thanks.

Edit: For completeness, I suspect that an episode might be on Channel A at, say, 8 pm. The exact same episode would then be on Channel A + 1 at 9 pm with a different description and with null in the series and episode column and with a null subtitle. I also fear that something similar might happen if the exact same episode is on Channel A on Monday and on Channel B on Tuesday. So no problems there then.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,100
Threads: 957
Joined: May 2006
#43
2012-10-12, 12:10 AM
OK thanks, your guide is too customized to try and work with. I prefer working with what a general user will see.

Martin
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,100
Threads: 957
Joined: May 2006
#44
2012-10-13, 05:53 PM
Sub, when regular ScheduledRecording records are created with an EPGEvent is the title case sensitive?

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#45
2012-10-13, 06:25 PM
From memory it's case insensitive.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,100
Threads: 957
Joined: May 2006
#46
2012-10-13, 08:26 PM
sub Wrote:From memory it's case insensitive.

From the SQL calling showing it is.

Next question: when using advanceRules do you still make sure that uniqueID's are respected when processing the returned list?

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#47
2012-10-13, 08:58 PM
Yes
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,100
Threads: 957
Joined: May 2006
#48
2012-10-14, 06:13 PM (This post was last modified: 2012-10-14, 10:20 PM by mvallevand.)
Thanks sub, this seem to be working quite well now.

If any dev's are interesting testing this for their apps, I build I simple C# app (attached) that lets you test your SQL (hard coded to the Win7 default)

The code on the button click is

Code:
private void button1_Click(object sender, EventArgs e)
        {
            SQLiteConnection conn = new SQLiteConnection("URI=file:" + "C:/users/public/npvr/" + "npvr.db3");
            conn.Open();
            SQLiteCommand selectCommand = new SQLiteCommand();
            selectCommand.Connection = conn;
            string command = textBox1.Text;
            selectCommand.CommandText = command;
            Debug.WriteLine(selectCommand.CommandText);
            SQLiteDataAdapter da = new SQLiteDataAdapter(selectCommand);
            System.Data.DataTable ds = new System.Data.DataTable();
            da.Fill(ds);
            dataGridView1.DataSource = ds;
            conn.Close();
        }

and you also need this class in your project.

Code:
[SQLiteFunction(Name = "XmlLookup", Arguments = 2, FuncType = FunctionType.Scalar)]
    class MyRegEx2 : SQLiteFunction
    {
        public override object Invoke(object[] args)
        {
            try
            {
                string input = Convert.ToString(args[0]);
                if (input.Length > 0)
                {
                    XmlDocument doc = new XmlDocument();
                    doc.LoadXml(input);
                    XmlNode node = doc.SelectSingleNode(Convert.ToString(args[1]));
                    if (node != null)
                    {
                        return node.InnerText;
                    }
                }
            }
            catch (Exception e)
            {
                Debug.WriteLine(e.Message);
            }
            return "";
        }
    }

Martin
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,100
Threads: 957
Joined: May 2006
#49
2012-10-14, 10:38 PM
Graham Wrote:The subtitle is there intermittently in the original xmltv (usually in the +1 channels ... which could be ignored if there was a "exclude channels" list). Thanks.

Now that I have better control of sqlite, I am sure I can do something a bit better to stop duplicate even with your custom view, I can certainly avoid the duplicates of the recordings shown here as long as you keep your sam subtitle logic.

Martin
Graham
Offline

Posting Freak

UK
Posts: 4,058
Threads: 102
Joined: Dec 2005
#50
2012-10-15, 10:43 AM
mvallevand Wrote:I can certainly avoid the duplicates of the recordings shown here as long as you keep your sam subtitle logic.

I am slightly embarrassed. After I sent you my database, I went back and looked at this again.

I remembered that I get EPG data from two sources. The channels that I am likely to record from get their EPG from xmltv (C4 & E4). The channels that I am not likely to record were getting EPG from the DVB-T broadcast (C4+1 & E4+1).

The unique-id filed in the epg-event table is populated for every show that had a series and episode number in the source EPG data. I assume that the unique-id field is populated by NPVR when it does an updateepg.

There is an "avoid duplicates" option in Settings that was ticked on.

I setup my recordings again. I set record one recurring record as all "TBBT" on Channel 4 and a second recurring record as all "TBBT" on E4. It appears that this is doing what I want and recording a single copy of every episode (i.e. no duplicates even though there are duplicates in the EPG).

I have now changed the EPG source for C4 +1 and E4 +1 to xmltv and they have now have EPG data in the same format as C4 and E4.

As an experiment, I deleted the two existing recurring recordings and created a single new recurring recording - all episodes all channels. This did not record duplicates within itself (i.e. all new recordings were unique) but it did record duplicates of shows that were already recorded and in the database.

In summary ...
  • Apologies for my dodgy database and for forgetting to mention that I get EPG data from two sources.
  • The built-in "don't record duplicates" appears to work to avoid duplicates within a set of recordings spawned by a single recurring recording.
  • The built-in "don't record duplicates" appears not to avoid duplicates of shows that already recorded.
  • For completeness, I should mention that I am doing all this using Alibert's jolly good TV Listings.


I'm grateful that you are looking at this. My "requirement" seems to be evolving (but requirements always do!). I am trying to "build a library" of every episode of TBBT without duplicates and that takes account of the already recorded episodes ... select distinct from future broadcasts where not in (select from existing recordings).

This was all kicked off by my daughter "obtaining" copies of every TBBT in series one and two. My daughter would be trying to build a library "where subtitle not include S1 or S2".

Just in case you thought this might be easy ... how to cope with watching and deleting some episodes while the "library" is still being accumulated ?

And finally, please don't do anything only and only on my account ... I can cope quite well with the recording functions that we already have. Thank you for listening.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (6): « Previous 1 2 3 4 5 6 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Custom recording tomx 2 690 2025-02-07, 09:14 AM
Last Post: tomx
  API call for Recording Complete linustorvalds 1 460 2025-01-19, 02:11 PM
Last Post: mvallevand
  Manual recording API mvallevand 2 1,122 2023-11-09, 02:14 PM
Last Post: mvallevand
  Recording direct to GPhotos API rgonzalez 0 1,514 2020-06-29, 04:45 AM
Last Post: rgonzalez
  Recurring Recording URL Parameters jcole998 2 3,069 2019-09-19, 01:08 PM
Last Post: jcole998
  Get recording length from stream skogl 46 14,500 2019-08-15, 09:34 PM
Last Post: sub
  Unexpected result when deleting a pending recording scJohn 5 3,876 2018-05-06, 10:09 PM
Last Post: sub
  custom creation of a recurring error p37307 2 2,380 2017-12-19, 03:45 AM
Last Post: mvallevand
  How to best verify success when adding a recurring recording drmargarit 1 2,874 2017-03-02, 03:13 PM
Last Post: mvallevand
  Change recording filename programmatically immediately before recording starts? craigrs84 5 6,201 2015-07-13, 09:28 PM
Last Post: patco444

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

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

Linear Mode
Threaded Mode