Adding entries to the RSVP Pending table

rowanmoor

Member
I have a bit of a techy question. I am thinking of doing a little tweek involving updating certain timers automatically. Not (yet) knowing Jim - I am inclined to do it with a simple SQL triggered by a cron job, but wanted to check if there are any fundamental problems with what I am thinking of doing.

I was planning to take the record from tbl_reservation (with suitable checks that it is not already in pending for a different update) and create a record in pending (in rsvp) to update things like the path. Having done some changes in WebIf and looking at the pending record created, I think I am on the right lines, but don't know if there are more complex issues that would need dealing with for any of the series links or anything.

My couple of questions are:
1) If I create a record in pending which is an exact copy of the tbl_reservation record, am I right in thinking that it would be a non-change to the timer with no ill effects? Thus making an exact copy with the path changed will update the path with no other ill effects to the timer.
2) I see that a path change uses an action of 4. Is there a list somewhere of what the valid values are for the action column in pending?
3) I see that szevtname always has a character at the start (which isn't displayed in the table view in WebIf and I haven't checked the acsii value yet) and sometimes has i7 before the name. Just out of interest, is there an explanation of those characters anywhere?

Cheers,
Rowan.
 

Black Hole

May contain traces of nut
If all you are doing is wanting the recording to go somewhere else, why not use sweeper?
 
OP
R

rowanmoor

Member
I have other reasons for wanting it to be set to the correct folder at the point of recording rather than shortly afterwards. Some of my recordings are sorted by sweeper and will remain that way, but there are some cases where I need it recorded directly into the correct folder rather than sorted afterwards.
 

Black Hole

May contain traces of nut
What you can do to check the database entry format is see what effect changing a destination folder in WebIF has.
 
OP
R

rowanmoor

Member
I have done that on a couple of cases so far and it fits my plan, but as I as I don't fully understand the contents of all the columns I just want to check if there could be any unintended consequences of what I am doing.
 
OP
R

rowanmoor

Member
I guess I am just paranoid as my day job involves maintaining very large and complex systems that have been very badly written in the past with no documentation, so changing something that seems obvious can have disasterous consequences if you are not aware of the hidden dangers.
 

af123

Administrator
Staff member
I was planning to take the record from tbl_reservation (with suitable checks that it is not already in pending for a different update) and create a record in pending (in rsvp) to update things like the path. Having done some changes in WebIf and looking at the pending record created, I think I am on the right lines, but don't know if there are more complex issues that would need dealing with for any of the series links or anything.

That should be fine. You just need to pick a unique slot number (the ulslot field) for your new row in pending.

1) If I create a record in pending which is an exact copy of the tbl_reservation record, am I right in thinking that it would be a non-change to the timer with no ill effects? Thus making an exact copy with the path changed will update the path with no other ill effects to the timer.

Correct. The change only gets applied at boot time though.

2) I see that a path change uses an action of 4. Is there a list somewhere of what the valid values are for the action column in pending?

0 - schedule
1 - delete
2 - set AR
3 - set padding
4 - set folder

3) I see that szevtname always has a character at the start (which isn't displayed in the table view in WebIf and I haven't checked the acsii value yet) and sometimes has i7 before the name. Just out of interest, is there an explanation of those characters anywhere?

I don't know what they mean but they are used in all sorts of places as string prefixes. The ASCII value for the first character when it is present is octal 25 (NAK). The leading i7 tends to be on high-def recordings.

It might be worth playing with Jim for this as the libraries make this sort of thing easy. For example, here's the code to change a folder for the recording in slot 8 of TBL_RESERVATION.

Code:
#!/mod/bin/jimsh

source /mod/webif/lib/setup
require rsv.class system.class

set event [rsv slot TBL_RESERVATION 8]

$event clear_ulslot
$event set_folder "Random Stuff"
$event insert

I appreciate there is a learning curve with this and the SQL method should work equally well.
 

af123

Administrator
Staff member
I guess I am just paranoid as my day job involves maintaining very large and complex systems that have been very badly written in the past with no documentation, so changing something that seems obvious can have disasterous consequences if you are not aware of the hidden dangers.
No idea if the Humax software is badly written, but we certainly have no documentation, just what we have determined through experimentation.
 
OP
R

rowanmoor

Member
Thanks for the info. Just what I needed to be sure of my SQL. I will probably look at jim in the future as it certainly does look like it makes things easy once you have got pas the initial learning curve (which shouldn't take too long).
 
Top