Changeset 2e8ebf09c0fd7949e1582427e051c085a4680ef5
- Timestamp:
- 02/14/08 12:02:55 (11 months ago)
- git-parent:
[2d5fc8dc7dd4d09bb5c0b36509122fee90388494], [ad2b033f75151402c125239e7e9a155e62877e58]
- Files:
-
- plugins/video/video.py (modified) (1 diff)
- pyTivo.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/video/video.py
r2d5fc8d r2e8ebf0 43 43 count = 0 44 44 request_history = {} 45 46 def pre_cache(self, full_path): 47 if Video.video_file_filter(self, full_path): 48 transcode.supported_format(full_path) 45 49 46 50 def video_file_filter(self, full_path, type=None): pyTivo.py
ra49222f rad2b033 3 3 import beacon, httpserver, os, sys 4 4 import config 5 from plugin import GetPlugin 5 6 6 7 port = config.getPort() … … 10 11 for section, settings in config.getShares(): 11 12 httpd.add_container(section, settings) 13 # Precaching of files: does a recursive list of base path 14 if settings.get('precache', 'False').lower() == 'true': 15 plugin = GetPlugin(settings.get('type')) 16 if hasattr(plugin,'pre_cache'): 17 print 'Pre-caching the', section, 'share.' 18 pre_cache_filter = getattr(plugin, 'pre_cache') 19 20 def build_recursive_list(path): 21 for f in os.listdir(path): 22 f = os.path.join(path, f) 23 if os.path.isdir(f): 24 build_recursive_list(f) 25 else: 26 pre_cache_filter(f) 27 28 build_recursive_list(settings.get('path')) 12 29 13 30 b = beacon.Beacon() … … 17 34 b.listen() 18 35 36 print 'pyTivo is ready.' 19 37 try: 20 38 httpd.serve_forever()
