[tvdiary] TV Diary 0.0.3-5 update with Real Time Scheduling

martxw

Active Member
I've finally found time to update TV Diary to take advantage of Real Time Scheduling.

In the Daily TV Diary tab, the Recorded/To be recorded table now includes a remote control icon to allow you to cancel a scheduled recording or reminder. Reminders are also included in the list and included in the conflict detection.

If you have the Watchlist enabled in Settings, the daily suggestions table includes the remote control icon to allow you to schedule or cancel a recording or reminder.

For scheduling I use the same Programme Details popup as the main WebIF EPG page. This provides comprehensive functionality, showing when there is a conflict and the alternative times you can try to schedule at. So you can navigate within the dialog until you find a time that doesn't conflict.

The Watchlist tab shows all of the programmes in the EPG that match your watchlist specification. Here you can also schedule or cancel.

If you haven't used the watchlist before, you can get TV Diary to suggest all movies with the following specification:
Code:
C||C||C|(20*)|
C||C||C|[20*]|
C|Doctor Who|C||C||
C|qi|C|bbc|C||
The fields are:
Code:
<Title-Test>|<Title-Text>|<Channel-Test>|<Channel-Text>|<Syn-Test>|<Syn-Text>
So the first two rules are looking for years 2000 onwards in parentheses or square brackets in the synopsis. This is the general convention for movies, and I'm not that interested in seeing films older than that.
The next rule looks for the title containing "Doctor Who".
The final rule looks for the title containing "qi" and the channel containing "bbc".

The watchlist functionality is based on the Programme Search, and at some point I'll get the watchlist editor to show you the last few searches so you don't have to remember the format. I'm not likely to find time to produce a fully interactive editor.

The Programme Search tab also includes the remote control icons to schedule or cancel recordings. I've also fixed the Return key handing to perform the search. It defaults to Search EPG, but if you click on the Search Diary button that becomes the default.

After scheduling or cancelling, when you close the popup, the TV Diary contents will refresh to reflect any changes you may have made.

FYI the source is at https://github.com/martxw/Humax_tvdiary
 

Terrahawk

Member
Nice :thumbsup:. Just tried the package this evening and particuarly like the watchlist. [FS] A nice addition would be if duplicates could be removed from the watchlist results.
 
OP
martxw

martxw

Active Member
I've just put put another update, 0.0.3-6, with the watchlist showing the recent search specifications. You can simply copy the text into the watchlist. It's useful because the search operation mnemonics aren't obvious.

Yes, the watchlist results could have the option of displaying distinct programmes like it does in the daily suggestions tab. The caption shows the distinct new vs total of new, and I already allow you to click on the repeat totals in order to filter them out. So aggregating to focus on the distinct programmes would be useful.
 

MymsMan

Ad detector
I was not a regular TVdiary user but I installed it again to give it another try but I find it too slow to be of practical use,
Far too frequently it reports "Error: Timed out acquiring exclusive access to the database. Try again later."
or
Code:
Unable to aquire an exclusive lock on the TV Diary database.
Wait a few moments and try refreshing this page.
Even when it does work it seems to take about 40sec to populate the screen

On a positive note it no longer shows periods when Detectads is decrypting a recording as the programme being watched
 

Attachments

OP
martxw

martxw

Active Member
It's a tight squeeze in the Humax!
I don't use Detectads, so I don't know how much that requires.
Having to get an exclusive lock is annoying. I'd much rather access the DB without having to lock, but it's not safe with sqlite, and you can't do finer-grained locks for multiple processes.
I upped the timeout period as fetching the data was taking a while, but that was with a PC browsing over SAMBA, and with SourceTree Git UI also keeping itself updated. In Sysmon that gave me 40-50% System usage and frequently close to 100% overall CPU usage. Shutting Windows Explorer and SourceTree keeps CPU usage low, with sparse peaks infrequently crossing 50%.

Right now I'm getting the daily tab updated in just over 10 seconds.
 
OP
martxw

martxw

Active Member
I've uploaded 0.0.3-7, which displays the daily suggestions and watchlist grouped and sorted by programme title and synopsis.

Af123's extended characters fix to EPG carry through automatically to fix the blobs that were appearing in TV Diary. Cheers.
 
I've uploaded 0.0.3-7, which displays the daily suggestions and watchlist grouped and sorted by programme title and synopsis.

Af123's extended characters fix to EPG carry through automatically to fix the blobs that were appearing in TV Diary. Cheers.
I manually updated to this, apparently successfully. I then went to the Settings menu and found that only the first five or so items were listed instead of 20+. I tried a reboot and the box went into initial installation mode, involving a retune and the resetting of preferences. The webif's backup features made a recovery relatively painless.

It could well have been a pure coincidence, but...
 
OP
martxw

martxw

Active Member
Hmm. I'd guess coincidence, as nothing's changed in the settings area for ages. It's a long time since I've had the sort of disk corruption that forced a full reset.
 

mihaid

Well-Known Member
I was not a regular TVdiary user but I installed it again to give it another try but I find it too slow to be of practical use,
Far too frequently it reports "Error: Timed out acquiring exclusive access to the database. Try again later."
mine just won't load up tv diary. since a few days ago I keep getting the error above

I've got no rts
 
OP
martxw

martxw

Active Member
mine just won't load up tv diary. since a few days ago I keep getting the error above

I've got no rts
Mine's getting the same, and unfortunately there isn't a lot I can do because it's so hard to do concurrent access on the sqlite file based DB.
I'm getting fed up with hitting refresh, so I'll try tweaking the timeout tonight. It'll mean it'll wait longer before giving up, so you won't have to retry so often, but it's slowing down with the work it has to do.

If you're not interested in the old viewing history, you could delete the /mod/etc/tvdiary.db file so it starts from scratch again.
My DB is 29.3MB now, going back to November 2013, when I was watching a lot of Time Team!
 

MymsMan

Ad detector
If you're not interested in the old viewing history, you could delete the /mod/etc/tvdiary.db file so it starts from scratch again.
My DB is 29.3MB now, going back to November 2013, when I was watching a lot of Time Team!
Possibly not worth the effort but you could move, on a monthly basis, all data from previous months to an archive data base and use that if looking at anything older than the current or last month.
Sysmon filters older records to prevent its database growing too large so you might be able to keep just the programmes viewed rather than the full detailed timings
 
OP
martxw

martxw

Active Member
It'd be tricky deciding how much to ditch. I'm currently getting value out of the deja-vu reminders, based on the CRID of programmes I've already watched cropping up again, but the string matching of the descriptions is also helping.
I'm big into machine learning these days, so offloading everything into the cloud would be nice but complicated.

I've pushed up a new release, tvdiary 0.0.4-3, which has longer timeouts (the index page was set to 2 seconds, now 20) and much less logging enabled. I also corrected the missing redring dependency.
 

mihaid

Well-Known Member
Mine's getting the same, and unfortunately there isn't a lot I can do because it's so hard to do concurrent access on the sqlite file based DB.
I'm getting fed up with hitting refresh, so I'll try tweaking the timeout tonight. It'll mean it'll wait longer before giving up, so you won't have to retry so often, but it's slowing down with the work it has to do.

If you're not interested in the old viewing history, you could delete the /mod/etc/tvdiary.db file so it starts from scratch again.
My DB is 29.3MB now, going back to November 2013, when I was watching a lot of Time Team!
Wait a minute. Does this happen because it take the t2 a long time to open the file?
 

mihaid

Well-Known Member
It'd be tricky deciding how much to ditch. I'm currently getting value out of the deja-vu reminders, based on the CRID of programmes I've already watched cropping up again, but the string matching of the descriptions is also helping.
I'm big into machine learning these days, so offloading everything into the cloud would be nice but complicated.

I've pushed up a new release, tvdiary 0.0.4-3, which has longer timeouts (the index page was set to 2 seconds, now 20) and much less logging enabled. I also corrected the missing redring dependency.
4-3 does not show up in my updates
 
OP
martxw

martxw

Active Member
Wait a minute. Does this happen because it take the t2 a long time to open the file?
The DB file? I'm not sure whether it's slow to open or slow elsewhere in its use. If it were the file opening I guess a separate process that did all the access to the DB would help.
As it is, only one CGI request at a time is permitted access to the file, so each has to wait for the last to finish with the file first.
So the 20 second timeout is waiting for another process to finish processing and close the file. It's not the T2 being intrinsically slow.
 

mihaid

Well-Known Member
I found a very surprising result. It seems that my t2 recorded cosmos by sagan in 2014 on bbc4 as part of a series of 13 but only the first episode. I'm sure I would have recorded the whole series. Does anyone remember anything about it?
 
Top