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 … 132 133 134 135 136 … 433 Next »
Using SQLite to add new manual recurring recording

Using SQLite to add new manual recurring recording
johnsta
Offline

Member

Posts: 62
Threads: 7
Joined: May 2016
#1
2016-05-16, 02:36 PM
I'd like to use SQLite to add a new manual recurring recording.

I used the following SQL:

Code:
INSERT INTO "RECURRING_RECORDING"
(name, match_rules, priority)
VALUES ("BBC-6-8am","<Rules>
  <ChannelOID>8995</ChannelOID>
  <ChannelName>BBC WORLD NEWS</ChannelName>
  <StartTime>2016-05-16T10:00:00.0000000Z</StartTime>
  <EndTime>2016-05-16T12:00:00.0000000Z</EndTime>
  <PrePadding>0</PrePadding>
  <PostPadding>0</PostPadding>
  <Quality>0</Quality>
  <Keep>99</Keep>
  <Days>SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY</Days>
</Rules>
","63");


And it worked great in that the record got inserted and appears in the
recurring recording listing.

The problem is that it never got scheduled. I tried scheduling other
manual recordings through the UI, and they all were added and got
scheduled, but the one that I INSERTed did not get scheduled.

When I deleted that record and scheduled the same recording through
the UI, the result looks the same in the database, but this time it
got scheduled.

I get the feeling that I have to do something extra to get an INSERT
scheduled. I tried closing and reopening NextPVR, and I tried it with
the -updatedb option, all with no luck.

I have lots of manual recurring recordings, and it would really be
great to have a command line way of scheduling them. The "Man-Rec" UI
is very hard to use, and I guess Schedule.exe only works for
non-recurring recordings.

So how can I use SQLite to schedule a recurring manual recording?

Thanks.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,926
Threads: 956
Joined: May 2006
#2
2016-05-16, 05:00 PM
johnsta Wrote:I get the feeling that I have to do something extra to get an INSERT
scheduled. I tried closing and reopening NextPVR, and I tried it with
the -updatedb option, all with no luck.

Assuming that is the correct format for a recurring recording, you would have to trigger to recordings. I think you could use the NexPVR command line option -recurring to do that.

Martin
johnsta
Offline

Member

Posts: 62
Threads: 7
Joined: May 2016
#3
2016-05-16, 05:53 PM
mvallevand Wrote:Assuming that is the correct format for a recurring recording, you would have to trigger to recordings. I think you could use the NexPVR command line option -recurring to do that.

Martin

Thanks for the suggestion, Martin. "-recurring" is not listed as a command
line option.

http://www.nextpvr.com/nwiki/pmwiki.php?...ineOptions

But I tried it anyway, and it had no effect. I also tried the
-updatedb and -reload options, and they had no effect.

However, this is turning into a mess.

The new recording appears in the "recurring recording" list, but not
in the "pending recordings" list.

So I double-clicked on it in the "recurring recording" list, and then
clicked "Update", hoping that if I updated it and saved it then it
would be ok.

Unfortunately, I got an IndexOutOfRangeException exception.

So I killed NextPVR and restarted it, and now the new manual recording
has been scheduled!!!!!!!

Unfortunately, I'm still getting the index out of range exception when
I try to update the entry, so there's a possible data base corruption
issue.

This is quite a mess. I'd really like to know how to do this the
right way.

Here's the stack dump for the exception:

Code:
************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at NUtility.Controls.UiDomainList..ctor(String normalElementName, String selectedElementName, String optionName, String[] possibleValues, Int32 selectedValueIndex, Hashtable args, SkinHelper skinHelper, IUiDomainListCallback callback)
   at NextPVR.TV.ManualRecordingPopup.Initialise()
   at NextPVR.TV.ManualRecordingPopup.Activate()
   at NextPVR.ControllerForm.ActivatePopup(IScreenPlugin popup)
   at NextPVR.TV.ShowDetailsPopup.HandleCommand(String command)
   at NextPVR.TV.ShowDetailsPopup.HandleButtonCommand(String buttonName)
   at NUtility.Controls.UiButtonList.OnClick(PointF point)
   at NextPVR.TV.ShowDetailsPopup.OnClick(PointF location)
   at NextPVR.ControllerForm.ControllerForm_MouseClick(Object sender, MouseEventArgs e)
   at System.Windows.Forms.Control.OnMouseClick(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at NextPVR.ControllerForm.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Any help would be appreciated.

John
BrettB
Offline

Posting Freak

Saint Paul, MN, USA
Posts: 2,666
Threads: 170
Joined: Jun 2007
#4
2016-05-16, 06:08 PM
johnsta Wrote:This is quite a mess. I'd really like to know how to do this the right way.

Trying to directly manipulate the database is not going to be the "right way" to schedule recordings.

If you're just looking at doing this once (or once in a while), then you should be able to create an .xml file and import that into NextPVR. You can look at the recurring-backup.xml file which gets created as part of the EPG update process for the format.

Otherwise, you should probably use one of the APIs to do the scheduling.
johnsta
Offline

Member

Posts: 62
Threads: 7
Joined: May 2016
#5
2016-05-16, 06:17 PM
Latest update:

I tried scheduling a new one-time recording. That caused it to delete
the record that I'd INSERTed from both the recurring and scheduled
tables. That also seems to have solved the corrupt database problem
as well.

If anyone knows how to get INSERT to work, I'd appreciate it.

By the way, I'm very impressed with this program. It's very well
done, and very elegant in many ways. This problem with INSERT is
the only issue that's occurred.
johnsta
Offline

Member

Posts: 62
Threads: 7
Joined: May 2016
#6
2016-05-16, 06:19 PM
BrettB Wrote:Trying to directly manipulate the database is not going to be the "right way" to schedule recordings.

If you're just looking at doing this once (or once in a while), then you should be able to create an .xml file and import that into NextPVR. You can look at the recurring-backup.xml file which gets created as part of the EPG update process for the format.

Otherwise, you should probably use one of the APIs to do the scheduling.

OK, thanks for the advice. I'll research the import XML functionality and
give it a try.
Graham
Offline

Posting Freak

UK
Posts: 4,058
Threads: 102
Joined: Dec 2005
#7
2016-05-16, 06:49 PM
johnsta Wrote:. I'll research the import XML functionality

Have you looked at the TV Listings / TV Recordings plugin ... it may be more to your taste ... http://www.nextpvr.com/nwiki/pmwiki.php?...TVListings
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,926
Threads: 956
Joined: May 2006
#8
2016-05-16, 08:43 PM (This post was last modified: 2016-05-16, 08:49 PM by mvallevand.)
Sounds like your insert isn't the right syntax, there is no reason it shouldn't work. If you want everyday you don't really need a <Days/> filter and make sure priority is unique and an integer. I used your insert and it inserts and schedules after running -recurring but I changed priority to an int.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,705
Threads: 767
Joined: Nov 2003
#9
2016-05-16, 08:48 PM
This isn't for commerical use is it? Remember, NextPVR is strictly for personal, non-commercial use. If you're intending to use it for commerical use, you need to contact us about correct licensing.
johnsta
Offline

Member

Posts: 62
Threads: 7
Joined: May 2016
#10
2016-05-16, 10:50 PM
mvallevand Wrote:...make sure priority is unique...

Oooooooooooooooohhhhhhhhhh. The priority has to be unique. I can see
why a duplicate priority could cause an array subscript exception. I
knew it had to be something simple. Anyway, that solved the problem.
Thanks!!! And no, this is not a commercial application.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Recording movies / TV to XBMC directory stucture spinnaker 10 3,513 2024-06-03, 03:56 AM
Last Post: Rod Hutchinson
  Not recording errors vidwiz 4 973 2024-04-17, 05:39 PM
Last Post: mvallevand
  Add Series/Episode Info to Recording Metadata andrewj 2 1,049 2023-11-20, 03:42 PM
Last Post: sub
  Recording to a network drive woes. 2leftfeet 12 7,164 2022-04-05, 08:03 PM
Last Post: mvallevand
  device needed for recording David209 2 1,726 2021-04-04, 08:47 AM
Last Post: David209
  PC not going to sleep after recording LeoL 7 3,245 2021-04-01, 07:17 PM
Last Post: Handy.Man
  HDHomerun recording bizzarely not working Jean0987654321 3 2,027 2021-03-27, 03:23 PM
Last Post: Jean0987654321
Video Restrict Recording Space foucomm 1 1,319 2021-01-30, 09:25 PM
Last Post: mvallevand
  Directory dropdown on the recording edit dialog MicahMakenzie 1 1,492 2021-01-11, 04:37 PM
Last Post: Graham
  Recording service stopped or not running at scheduled time MattInetroit 3 1,880 2021-01-08, 12:03 AM
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