New: PreCache Files so TiVo Loads Faster
commit51b0b5e0861235af31b4eb5f82a1543bc61be6ba
authorKRKeegan <kevin@krkeegan.com>
Tue, 12 Feb 2008 04:56:50 +0000 (11 20:56 -0800)
committerKRKeegan <kevin@krkeegan.com>
Tue, 12 Feb 2008 04:56:50 +0000 (11 20:56 -0800)
treed63662497a870686bc3d07a7bf741bb6813dd7cd
parentaa91faa2cce73f966ccb3265a27177d58db24f8c
New: PreCache Files so TiVo Loads Faster

This will cause pyTivo parse all files recursivly in a share to load them into the cache.  Currently this only works in the video plugin, but incorporation into other plugins that use a cache is very easy.

In the video plugin this causes pyTivo to run ffmpeg on EVERY video file in that share and stores that information in the cache.

Benefits: This greatly decreases the load time while browsing on the TiVo. For me a folder with 50 videos would take 18 seconds to load the first time I viewed it.  Now it takes less than 2 seconds.
Drawbacks: This will create a delay in the startup of pyTivo while processing the files.  For me I experienced a delay of nearly 2 minutes to parse 757 video files.

Usage:
Set the precache=true under any share.  If the plugin does not support the precache setting it is ignored.

Example:
In the following conf file the share "Old TV" would be precached while "Movies" and "Photos" would not be.

[Old TV]
type = video
path = /store/TV
precache=true

[Movies]
type = video
path = /store/Movies

[Photos]
type = photo
path = /store/Photos

[Server]
debug = true
ffmpeg = /usr/bin/ffmpeg
hack83 = true
port = 9032
plugins/video/video.py
pyTivo.py