Recorded TV HD Addin

User avatar
IT Troll

Posts: 1172
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#261

Post by IT Troll » Mon Aug 10, 2020 7:24 am

I think you might need to force a re-identification of the series with the new version.

Move the episode WTV out of the watched folder. If the episode remains in the database you may need to manually delete it. Finally drop the file back into the watched folder. Hopefully the series will be identified and added correctly this time.
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1

User avatar
StinkyImp

Posts: 669
Joined: Thu May 11, 2017 7:53 pm
Location:

HTPC Specs: Show details

#262

Post by StinkyImp » Mon Aug 10, 2020 3:20 pm

IT Troll wrote: Mon Aug 10, 2020 7:24 am I think you might need to force a re-identification of the series with the new version.

Move the episode WTV out of the watched folder. If the episode remains in the database you may need to manually delete it. Finally drop the file back into the watched folder. Hopefully the series will be identified and added correctly this time.
That didn't work. :think:

When all this started a few days ago I manually entered the series into the database and everything worked as intended. After I manually removed the series and started using the recommended fixes, that's when all the issues bubbled up. For now I'll add the series back into the database to get things flowing nicely again.

There's something else strange going on though... I've been manually updating the database for years (ever since Mark stopped supporting it) and so much so, I have a shortcut to it. Manually updating the database has become routine.

Here's the strange thing. Because I was making changes so often I've also been performing a nightly backup of the database during these past years. Since installing the 2.1 version my nightly database backups have failed. I surmise it's a permission issue, but I haven't had time to confirm.

Did 2.1 change the permissions (or something else) on the database?

User avatar
dopdahl

Posts: 47
Joined: Thu Jul 09, 2020 12:34 pm
Location:

HTPC Specs: Show details

#263

Post by dopdahl » Mon Aug 10, 2020 4:46 pm

No specific changes in that regard. Is it possible that you left the DB open in some other SQL client?

User avatar
StinkyImp

Posts: 669
Joined: Thu May 11, 2017 7:53 pm
Location:

HTPC Specs: Show details

#264

Post by StinkyImp » Mon Aug 10, 2020 5:43 pm

dopdahl wrote: Mon Aug 10, 2020 4:46 pmNo specific changes in that regard. Is it possible that you left the DB open in some other SQL client?
No. I'm pretty OCD about things running on the system and have a routine where I look through everything (including running processes) to make sure everything that's not needed is shut down before I retire for the night. In the unlikely event that I don't perform my nightly ritual, I can't go to sleep and find myself performing those steps again.

I'm not to the point of opening and closing doors multiple times, or turning doorknobs multiple times, but I do have certain routines I have to go through or I can't rest. :oops:

I'll eventually figure it out. Probably at 2 or 3 in the morning...

User avatar
IT Troll

Posts: 1172
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#265

Post by IT Troll » Mon Aug 10, 2020 8:19 pm

StinkyImp wrote: Mon Aug 10, 2020 3:20 pm Since installing the 2.1 version my nightly database backups have failed. I surmise it's a permission issue, but I haven't had time to confirm.

Did 2.1 change the permissions (or something else) on the database?
How are you doing your backup? Just a copy of the file?

The database libraries were changed and it could be they are now locking the file.
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1

User avatar
dopdahl

Posts: 47
Joined: Thu Jul 09, 2020 12:34 pm
Location:

HTPC Specs: Show details

#266

Post by dopdahl » Mon Aug 10, 2020 8:46 pm

File copy works fine here... boy it sure is nice to be able to browse and select artwork... too bad that isn't working from the addin.

User avatar
IT Troll

Posts: 1172
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#267

Post by IT Troll » Tue Aug 11, 2020 11:33 am

Yep, file copy works for me too. Perhaps StinkyImp is using backup software with database-level backup?
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1

User avatar
StinkyImp

Posts: 669
Joined: Thu May 11, 2017 7:53 pm
Location:

HTPC Specs: Show details

#268

Post by StinkyImp » Tue Aug 11, 2020 4:17 pm

IT Troll wrote: Mon Aug 10, 2020 8:19 pmHow are you doing your backup? Just a copy of the file?

The database libraries were changed and it could be they are now locking the file.
You nailed it! The new service executable is keeping the database open. I verified by replacing it with Mark's last version and it was able to (SyncToy) backup the database like it had for years.

I then looked at any programs that were using the database when the backup failed and it turned out to be the new service executable.

Successful backup using the pre August 8 service executable:

Code: Select all

SYNC: 08/08/2020 03:00:10:227: SyncToy run of RecordedTVHD database (C:\Users\Public\RecordedTVHD\database\, H:\Public Transfer\Portable Apps\PortableApps\epg123\backup\C.Users.Public.RecordedTVHD.database\) completed at 8/8/2020 3:00:10 AM.
SyncToy action was 'Contribute'.
SyncToy options were:
	Active for run all
	Files included: RecordedTVHDdb.s3db
	Files excluded: *.txt
	Do not check file contents
	Include read-only files
	Include hidden files
	Include system files
	Backup older files (send to Recycle Bin)
	All subfolders included
SyncToy run took 00:00:00:594.
Copied 126,976 bytes in 1 files in 00:00:00:594.
Bytes per second 213,752.1, files per second 1.7.
Backups using post August 8 service executable:

Code: Select all

SYNC: 08/11/2020 07:49:50:836: SyncToy run of RecordedTVHD database (C:\Users\Public\RecordedTVHD\database\, H:\Public Transfer\Portable Apps\PortableApps\epg123\backup\C.Users.Public.RecordedTVHD.database\) completed at 8/11/2020 7:49:50 AM.
SyncToy action was 'Contribute'.
SyncToy options were:
	Active for run all
	Files included: RecordedTVHDdb.s3db
	Files excluded: *.txt
	Do not check file contents
	Include read-only files
	Include hidden files
	Include system files
	Backup older files (send to Recycle Bin)
	All subfolders included
SyncToy run took 00:00:00:053.
Copied 81,920 bytes in 1 files in 00:00:00:53.
Bytes per second 1,545,570.0, files per second 18.9.
Avoided copying 126,976 bytes in 1 files that did not require action.
Warning: 1 failures occured.
You can retry by selecting "Run" again or select "Preview" to see
the operations that remain to be performed.

SYNC: 08/11/2020 07:49:50:836: *** Error: Cannot read from the source file C:\Users\Public\RecordedTVHD\database\RecordedTVHDdb.s3db. The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
The only process that has it locked is the service executable.
Capture.PNG
Process Explorer
I'll either use VSS or (stop the service -> backup -> restart the service) or something else... I'll figure something out.

Either way, this is MY problem, not yours!

KEEP THOSE UPDATES COMING! :lol:

User avatar
IT Troll

Posts: 1172
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#269

Post by IT Troll » Tue Aug 11, 2020 4:43 pm

StinkyImp wrote: Tue Aug 11, 2020 4:17 pm I'll either use VSS or (stop the service -> backup -> restart the service) or something else... I'll figure something out.
I think you will find a regular file copy would work. I believe SyncToy requires exclusive read access. It is a limitation which comes from it's age.
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1

User avatar
StinkyImp

Posts: 669
Joined: Thu May 11, 2017 7:53 pm
Location:

HTPC Specs: Show details

#270

Post by StinkyImp » Tue Aug 11, 2020 7:23 pm

IT Troll wrote: Tue Aug 11, 2020 4:43 pm I think you will find a regular file copy would work. I believe SyncToy requires exclusive read access. It is a limitation which comes from it's age.
Without going in to the complexities of my Rube Golbergesque LAN and multi-state WAN backup system, a simple file copy isn't really simple to incorporate. But (and there's always a but) I started thinking about why I felt it important to make daily backups... and that's because I was going into the database multiple times a week for the past few years to fix something because it wasn't working.

All the hard work that you and dopdahl have put into RTVHD recently has negated my need to backup the database. It should have struck me at this exact moment.

Why would I need a backup when the robust system you've created can magically generate a new database from scratch in just a few short minutes?

I don't need to back it up anymore and now I can simply disable it and forget it. :crazy:

Thanks to both of you for all your hard work!

User avatar
IT Troll

Posts: 1172
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#271

Post by IT Troll » Tue Aug 11, 2020 8:12 pm

I meant for the simple file copy as a quick test. As you said, you may not need such a regular backup anymore. Perhaps just a periodic one to backup your favourites if you have large lists.

I switched to FreeFileSync a while back once I started hitting the limitations of SyncToy. I haven’t tried it for this purpose though.
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1

User avatar
dopdahl

Posts: 47
Joined: Thu Jul 09, 2020 12:34 pm
Location:

HTPC Specs: Show details

#272

Post by dopdahl » Tue Aug 11, 2020 9:23 pm

I think IT Troll may be right about the SQLite upgrade that was part of the patch is causing this. It entirely possible as well that the Service is leaving connections open, though I think given the sorts of exceptions that used to be common in the service that there would have been plenty spots where things weren't cleaned up properly. For now I guess I'll ignore it unless it causes everyone problems...

User avatar
dopdahl

Posts: 47
Joined: Thu Jul 09, 2020 12:34 pm
Location:

HTPC Specs: Show details

#273

Post by dopdahl » Tue Aug 11, 2020 9:24 pm

When you replaced it with Mark's last version did you just replace the service? Or the entire build?

User avatar
StinkyImp

Posts: 669
Joined: Thu May 11, 2017 7:53 pm
Location:

HTPC Specs: Show details

#274

Post by StinkyImp » Tue Aug 11, 2020 11:28 pm

dopdahl wrote: Tue Aug 11, 2020 9:24 pm When you replaced it with Mark's last version did you just replace the service? Or the entire build?
Just the service. It was the build dated 1/16/2020 at 2:51PM.

I'm with you. I'm just going to forget about it because it's less than a moot point now. :D

User avatar
StinkyImp

Posts: 669
Joined: Thu May 11, 2017 7:53 pm
Location:

HTPC Specs: Show details

#275

Post by StinkyImp » Tue Aug 11, 2020 11:35 pm

IT Troll wrote: Tue Aug 11, 2020 8:12 pm...you may not need such a regular backup anymore. Perhaps just a periodic one to backup your favourites if you have large lists.
I appreciate the suggestion, but I'm absolutely ecstatic that I don't even have to worry about it anymore!

I feel like there's a point within the next 10 years or so where something (I'm betting on ATSC 3.0 tuners) will catastrophically break WMC to the point of no return. Hopefully you guys will keep RTVHD running until then. 8-)

User avatar
IT Troll

Posts: 1172
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#276

Post by IT Troll » Fri Aug 21, 2020 9:44 pm

The patch has had a slight update to v2.1.1 to address a couple of minor issues.
  • [Service] Even better handling of Media Center Manual recordings.
  • [Service] Resolved permanent database locking by background service.
  • [Service] Improved search logic when matching series/episodes.
  • [Settings] Improved error handling for bad artwork URLs.
The original post has been updated.
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1

User avatar
dopdahl

Posts: 47
Joined: Thu Jul 09, 2020 12:34 pm
Location:

HTPC Specs: Show details

#277

Post by dopdahl » Thu Oct 22, 2020 1:21 pm

Here's a bit more information to document things more clearly for posterity.

The Manual Recording scenario in WMC is a bit quirky. When Adding a Series Record, you can specify one time or repeating recordings by Channel and Time rather than Series Name.
I do this for weekly horror shows that do not appear in the guide data as "series". Each week a different movie is shown, and typically the Guide Data will look like a regular movie title.

There are a few different Guide scenarios that I've observed occurring:

1. Movie Title appears in the Guide Data for the Horror Show timeslot.
2. "No Information Available" appears in the Guide Data for the timeslot.

If "No Information Available" appears, there is no hope of automatic Movie title detection and correct ingestion by RTVHD.
If the Movie Title is there, then it will be handled properly assuming that the manual scheduled recording is set up correctly within WMC.

When configuring a Manual Recording under Add Recording in WMC, the Description for the Series defaults to the text "Manual Recording". You do have the option to change it. For example, I could change it to represent the weekly show "Festival of Fear".

However, changing the name from "Manual Recording" to something else causes WMC to use the Series Description that you specified instead of the Movie Title when processing the show. This breaks the functionality I've added into RTVHD.

You can see the behavior in the 'Scheduled Recordings' listing in WMC. When the default Series Name is left at "Manual Recording" AND if the Guide actually has Information for that time slot, then the show will be listed as "Manual: Bride of the Monster".
If you override the Series Description, then the scheduled recording will be listed as "Festival of Fear" (or whatever you chose) and RTVHD won't know how to process it correctly. If the Guide has no specific title, then metadata lookup will fail, of course.

I modified RTVHD to look specifically for the text "Manual:" at the beginning of a title. If it sees that, it strips that word out and uses the rest of the title as the title of the show and always forces it to be a Movie.
It can then do a proper metadata search and insert the movie correctly into RTVHD by Movie Title.

So, while this isn't a 100% perfect solution, it does handle for me the issue of setting up Scheduled Movie recordings on a manual repeating basis and getting those Movies ingested correctly.

I probably haven't explained this as clearly as I could, but this is the proper way to make use of the special processing for "Manually Scheuled" recurring recordings in RTVHD if you want them to be ingested automatically.

User avatar
IT Troll

Posts: 1172
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#278

Post by IT Troll » Thu Oct 22, 2020 2:13 pm

Thanks, that is a clear explanation. It is not a scenario I encounter and so I was never clear exactly what the issue was.
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1

mogulman

Posts: 61
Joined: Tue Sep 13, 2011 9:35 pm
Location:

HTPC Specs: Show details

#279

Post by mogulman » Tue Nov 10, 2020 11:43 pm

I tried using the 2.1.1 exe and I get a message that RecordedTVHD isn't installed.

User avatar
IT Troll

Posts: 1172
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#280

Post by IT Troll » Tue Nov 10, 2020 11:48 pm

mogulman wrote: Tue Nov 10, 2020 11:43 pm I tried using the 2.1.1 exe and I get a message that RecordedTVHD isn't installed.
This is a patch, do you have you have RTVHD 2.0.3 installed as detailed in step 1?
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1

Post Reply