NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 77 78 79 80 81 … 93 Next »
External Recordings Manager

 
  • 0 Vote(s) - 0 Average
External Recordings Manager
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#21
2004-12-26, 05:39 PM
Take out the Channel element from the PriorityRecordings.xml for right now. It isn't a required element, and currently I'm not looking at the element for determining whether it should be added to the recordings.

You can also try using the updated schema that is attached. I channged the channel elment from an xs:byte to an xs:integer. This should allow those that have Digital Cable or Sattellite to have channel numbers greater than 255.
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#22
2004-12-27, 01:13 AM
An Updated version should be released sometime today. Found and fixed a big problem with Scheduled Recordings, and Priority recordings. All around, the priority recording options should be much more accurate.
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#23
2004-12-27, 01:47 AM
Okay, update happened quicker than I thought. Works with Access or MSDE as databases.

Version 0.0.2 Alpha contains a logic change in the way I was detecting conflicts with scheduled and priority programs. This should more accurately reflect what is to be scheduled.

The XSD for the PriorityPrograms.xml has been changed so that the Channel number has to be an integer instead of a byte. This should work better for Digital Cable/Satellite users.

Also included a some more detailed error logging information. Currently I still cancel the conflicted program. I'll probably add a command line switch to specify whether programs that are conflicted should be deleted or set in a conflict status.

Also, I no longer use the GBPVR methods for canceling a recording, or for adding a recording to the database. Too many restrictions for what I was trying to accomplish. So I wrote my own. This means that if Sub changes the underlying database, this code may break as well. I'll try to keep it in synch.
jrockintuitive
Offline

Senior Member

Posts: 292
Threads: 19
Joined: Dec 2004
#24
2004-12-27, 02:52 PM
A few thing here...

1. I use Data Source=".\gbpvr.mdb" - and you application still works - that's good
2. I do not recieve an error if ProgramName cannot be found (I change the name of The West Wing to The West Wingddd and no error message)
3. You are not looking for special characters in the title string ProgramName ="A Dog's Life" the ' character is causing an error


4.
Capture source = My zip is 07310 and I use comcast digital

With the PriorityRecording.xml below the same eposide of Las Vegas gets repeated.
First run the recording priority as is. Then change X-Men to priority of 3 and Las Vegas of priority of one. Walla, Las Vegas will be repeated every time you run priority recording exe.
Also if you run the same priority recording xml twice, different results will appear on the screen and in the DB.


<?xml version="1.0" encoding="UTF-8"?>
<GBPVR xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation="http://localhost:7647/gbpvr/PriorityReco...">
<Recording type="Season" priority="1">
<Channel>135</Channel>
<ProgramName>X-Men</ProgramName>
<RecordingType>All Episodes</RecordingType>
<Quality>High</Quality>
<CaptureSource>1</CaptureSource>
</Recording>
<Recording type="Season" priority="2">
<Channel>37</Channel>
<ProgramName>Desperate Housewives</ProgramName>
<RecordingType>All Episodes</RecordingType>
<Quality>High</Quality>
<CaptureSource>1</CaptureSource>
</Recording>
<Recording type="Season" priority="3">
<Channel>4</Channel>
<ProgramName>Las Vegas</ProgramName>
<RecordingType>New Episodes</RecordingType>
<Quality>Low</Quality>
<CaptureSource>1</CaptureSource>
</Recording>
<Recording type="Season" priority="4">
<Channel>37</Channel>
<ProgramName>The West Wing</ProgramName>
<RecordingType>All Episodes</RecordingType>
<Quality>High</Quality>
<CaptureSource>1</CaptureSource>
</Recording>
<Recording type="Season" priority="5">
<Channel>37</Channel>
<ProgramName>Star Trek: Enterprise</ProgramName>
<RecordingType>All Episodes</RecordingType>
<Quality>High</Quality>
<CaptureSource>1</CaptureSource>
</Recording>
<Recording type="Season" priority="6">
<Channel>37</Channel>
<ProgramName>Joey</ProgramName>
<RecordingType>All Episodes</RecordingType>
<Quality>High</Quality>
<CaptureSource>1</CaptureSource>
</Recording>
<Recording type="Season" priority="7">
<Channel>37</Channel>
<ProgramName>Significant Others</ProgramName>
<RecordingType>All Episodes</RecordingType>
<Quality>High</Quality>
<CaptureSource>1</CaptureSource>
</Recording>
</GBPVR>
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#25
2004-12-27, 03:31 PM
[b Wrote:Quote[/b] ]
A few thing here...

1. I use Data Source=".\gbpvr.mdb" - and you application still works - that's good
2. I do not recieve an error if ProgramName cannot be found (I change the name of The West Wing to The West Wingddd and no error message)
3. You are not looking for special characters in the title string ProgramName ="A Dog's Life" the ' character is causing an error

1. Yeah, I figured the .\gbpvr.mdb should work, as long as you keep the RecordingUtil.dll file in the GBPVR directory. I had to specify the full path to the database while testing because I wasn't running in the gbpvr directory.

2. Noted. I'll add error checking for those situations. Just didn't get that detailed this early.

3. Yeah, knew about this one as well. Will make sure I set it so the SQL is handled correctly when doing it's look up.

4. Thanks for the PriorityRecording File. I'll see if I can duplicate it. Make sure that you are running the most recent upload of the file as that should have taken care of most of these situations. I had the same problem until I re-arranged the way I was handling the recording logic. I'll use your file as a test, and see if I can repeat the situation.

I should have another update later today.
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#26
2004-12-27, 03:55 PM
[b Wrote:Quote[/b] ]
4.
Capture source = My zip is 07310 and I use comcast digital

With the PriorityRecording.xml below the same eposide of Las Vegas gets repeated.
First run the recording priority as is. Then change X-Men to priority of 3 and Las Vegas of priority of one. Walla, Las Vegas will be repeated every time you run priority recording exe.
Also if you run the same priority recording xml twice, different results will appear on the screen and in the DB.

Jrock, I was able to duplicate the error using my Cable Guide, and I have a good idea what is happening. It has to do with the difference in running time between the programs. X-Men is only a half hour program, and Las Vegas is an hour long program. So when X-Men is set to a priority of 1, two episodes are initially recorded. However, when switching priority of Las Vegas to 1 and X-Men to 3, two Episodes of Las Vegas are recorded in place of the two X-Men episodes. I just need to check to make sure that particular ProgramOID is not already scheduled. If it is scheduled, then I won't schedule it, if not, I'll schedule. That should take care of the issue.
jrockintuitive
Offline

Senior Member

Posts: 292
Threads: 19
Joined: Dec 2004
#27
2004-12-27, 05:44 PM
Can you tell me what steps the program is taking... this should really help in testing.

I was about to use my existing recording to test this application, when I realized that priorityrecording xml file and what is stored in the DB is exactly the same except the priority recording file has priority.
Why don't we stick a priority column in the DB. I'm sure Jorm will be happy to extend his XRecord to include the ability to add/edit priorities. Then we would have a front-end to your recording program.

JRock
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#28
2004-12-27, 06:08 PM
[b Wrote:Quote[/b] ]
Can you tell me what steps the program is taking... this should really help in testing.
Here it is in a nut shell.

1. Load all Known Recordings that are in the Scheduler.
2. Load all the Priority Recordings from the XML file.
3. (New in v0.0.3) Retrieve stats for Priority Recordings.
4. (New in v0.0.3) If a priority recording doesn't have any potential programs, drop it from the list for this run.
5. Start Scheduling Potential Programs and Check for Conflicts.
6. Load up the program schedule from today forward.
7. Check to see if the program is currently scheduled.
8. If not scheduled does it conflict with any programs that are scheduled. If it is scheduled check to see if there is a higher priority program ( Step 12)
9. If conflict is the conflict a priority program. if so which conflict is it.
10. Which is the higher priority. If current program is higher, then cancel existing program and schedule new program.
11. Add to list of known recordings, removing old program from the list. Get next Program. Go to step 7
12. Check for Conflicts in Priority Scheduling.
13. if conflict has priority, then cancel currently scheduled program and add higher priority program.
14. Remove old program.
15. Add new program to known recordings.
16. Get next program.

That's basically it.

[b Wrote:Quote[/b] ]
I was about to use my existing recording to test this application, when I realized that priorityrecording xml file and what is stored in the DB is exactly the same except the priority recording file has priority.
Why don't we stick a priority column in the DB. I'm sure Jorm will be happy to extend his XRecord to include the ability to add/edit priorities. Then we would have a front-end to your recording program.

The main reason I don't add a column to the existing GBPVR Recording_Schedule table is because I don't want to modify the base tables. I don't mind eventually adding a seperate table that I can maintain, but I don't want to cause potential problems if Sub makes major changes to his tables. As it is, I'm already reading and writing the tables directly, which is about as far as I want to take interfacing to the existing tables. Now with that said, I do have interfaces that Jorm could use to read and write the PriorityRecordings.xml file. The main interface returns both the XML DOM and also a Collection of Recordings objects which contain information on the priority recordings.

Once I get to a stable release, I'm going to release the source code so that others may modify and further enhance the program for their own needs. This should let Jorm or anybody else who wants to build an interface for setting the priority of the recordings.

The next message will contain the fixes for most of the problems encountered.
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#29
2004-12-27, 06:11 PM
Version 0.0.3 Alpha:

* Fixed multiple recordings showing up for the same time slot when priorities have changed.
* Can now include Episode Titles with Apostrophe's in the name: (i.e. A Dog's Life)
* Added some statistical information before recordings are scheduled, showing number of potential
recordings.
* If no Potential Recordings are found for a Priority Recording, it is removed from the list for
that run only.
* Total number of potential recordings are displayed.
jrockintuitive
Offline

Senior Member

Posts: 292
Threads: 19
Joined: Dec 2004
#30
2004-12-27, 08:40 PM
If a show is scheduled and is not in the Priority Recording xml and a program in the Priority Recording xml is at the same time as the exiting schedule show then the existing recording stays.

However, if a program scheduled and is not in the priority recording xml file, and another program is scheduled (in the conflict status) in the priority recording item as priority of 7, and a third program in the priority recording xml file that is currently not scheduled with a priority of less than seven, then you will have two programs recorded at the same time.

For Example
The People's Court is scheduled for 4-5 (not in the priority recording xml)
Oprah Winfrey is confilct status at the time of 4-5 and in priority recording xml with a priority of 7
Judge Judy is not scheduled and is in the priority recording xml with a priority of 2

The end result is that The People's Court is scheduled for 4-5, Oprah Winfrey is not scheduled (the conflict status is removed), and Judge Judy is scheduled for 4-4:30. Thus People's Court and Judge Judy is scheduled for the same time.

Another related issue is that Judge Judy is not being scheduled from 4:30 - 5 today but it is being scheduled 4-4:30 and 4:30-5 every other day.


I have an idea what could simply the code and remove these discrepancies.
Starting from step 7
Attempt to schedule each program in reverse priority order (starting with step 10)
If the program is scheduled and not in conflict do nothing else
Move all other program in its time slot (start after or equal to the starting time and end before or equal to the end time) to conflict (or remove them) - You can probably do this in one update or delete SQL statement
If the program is scheduled and in conflict, take off the conflict, else record the program.
Process next file

This should always work due to the order that you are processing programs. The higher priority program is processed second; therefore take priority.

The only problem I see with this methodology is when you attempt to reschedule the program.

Just a thought.

JRock
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (8): « Previous 1 2 3 4 5 … 8 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  Import/export recordings via API? whurlston 4 3,786 2019-02-19, 11:48 AM
Last Post: Graham
  Conflict recordings scJohn 1 2,582 2018-03-23, 07:43 PM
Last Post: sub
  API / web call for setting recordings Pbathuk 2 3,290 2018-01-13, 05:17 AM
Last Post: Pbathuk
  API access to artwork and deleting recordings cncb 29 15,478 2016-11-06, 02:20 AM
Last Post: mvallevand
  How to move recordings without them getting deleted from db drmargarit 4 3,876 2015-09-27, 05:33 PM
Last Post: sub
  Best approach to creating recurring recordings from c# drmargarit 0 2,609 2015-09-27, 01:32 AM
Last Post: drmargarit
  Changing the recording priority on recurring recordings cbgifford 4 3,776 2014-08-17, 03:13 PM
Last Post: Kiwi
  How does NextPVR group recordings for XBMC? spinnaker 2 2,284 2013-11-21, 01:33 AM
Last Post: spinnaker
  Web API call for Ready recordings? bgowland 2 1,871 2013-11-03, 12:43 AM
Last Post: bgowland
  Delete recordings from database but not from disk? spinnaker 8 3,788 2013-10-26, 10:51 PM
Last Post: spinnaker

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

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

Linear Mode
Threaded Mode