Opened 11 years ago

Closed 11 years ago

#5757 closed defect (fixed)

MythVideo improperly caching metadata

Reported by: scott.milliken@… Owned by: Anduin Withers
Priority: minor Milestone: 0.22
Component: mythvideo Version: head
Severity: medium Keywords: mythvideo
Cc: Ticket locked: no

Description

Using trunk svn 18531.

I have noticed that until you completely exit MythTV, any changes to the filesystem are not reflected in MythVideo?. I can easily reproduce on my system by doing the following:

touch /myth/video/newfile.avi
launch MythTV
Go into Video Manager and Scan for Changes, the file will appear (in both Video Manager and Watch Videos)
rm /myth/video/newfile.avi
Go back to Video Manager and Scan for Changes, the file is still there (in both Video Manager and Watch Videos)
Exit MythTV completely
Launch MythTV
Watch Videos no longer shows the file.  Video Manager will now properly remove the file if it is no longer there.

Additionally I have found that modifying the parental level of a file in the database directly does not take effect on each front end until it completely restarts MythTV.

example: Every 15 minutes I have a cron job set up to automatically add any new videos that are unsuitable for my young'un to the videometadata table. It inserts the title, filename, showlevel=2 and browse=0.

Prior to 15831 this would reflect in the Watch Videos and Video Manager screens the next time that I entered into them. As of 15831, though, they don't reflect until MythTV is completely exited. Previous behavior was great because the only Level 1 shows on my system are Thomas the Train and Curious George, so my 3 year old can run the TV on his own, but now he's able to pull up episodes of CSI with bloody corpses all over the place...

Change History (6)

comment:1 Changed 11 years ago by stuartm

There is an issue with failing to reload properly following a scan - it's a known bug, however it's intentional that we cache the video list, it makes things much faster.

I'll let Anduin make the call on this, but I think you need to find another way of handling your videos without modifying the database directly in this manner. One idea would be to allow parental levels to be set on sub-folders so that any videos added later to that directory would gain inherited protection.

comment:2 Changed 11 years ago by Anduin Withers

(In [18540]) References #5757

Changes VideoList? lifetime to be what it was before, using a jump point to switch screens or exiting a MythVideo? view will force a reload. Eventually jump point switches should not cause a reload so don't depend on it.

comment:3 Changed 11 years ago by Anduin Withers

(In [18543]) References #5757

Cache VideoList? even when using jump points to switch screens. As messy as it looks.

comment:4 Changed 11 years ago by Dibblah

Status: newassigned

comment:5 Changed 11 years ago by anonymous

Kind of crosspost, but since my original problem led me here. http://svn.mythtv.org/trac/ticket/6068 Extremly bad WAF, and bad mouth bringing.

comment:6 Changed 11 years ago by Anduin Withers

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.