Changeset 7aae9a0a0b4f7b0956ead1dbaa1ef2268c075df7

Show
Ignore:
Timestamp:
01/26/08 10:13:44 (1 year ago)
Author:
William McBrine <wmcbrine@gmail.com>
git-committer:
William McBrine <wmcbrine@gmail.com> 1201364024 -0500
git-parent:

[201c11ba03d5ea416988c3afe2aebfe9ec5317ef]

git-author:
William McBrine <wmcbrine@gmail.com> 1201364024 -0500
Message:

Work correctly with "Recurse=Yes" video requests (made when folders are off).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/video/templates/container.tmpl

    r143ca8f r7aae9a0  
    4141                <ContentType>video/x-tivo-mpeg</ContentType> 
    4242                    <AcceptsParams>No</AcceptsParams> 
    43                     <Url>/$quote($name)/$quote($video.name)</Url> 
     43                    <Url>/$quote($container)$quote($video.part_path)</Url> 
    4444                </Content> 
    4545                <CustomIcon> 
     
    5151                <ContentType>text/xml</ContentType> 
    5252                <AcceptsParams>No</AcceptsParams> 
    53                 <Url>/TiVoConnect?Command=TVBusQuery&amp;Container=$escape($name)&amp;File=$quote($video.name)</Url> 
     53                <Url>/TiVoConnect?Command=TVBusQuery&amp;Container=$escape($container)&amp;File=$quote($video.part_path)</Url> 
    5454            </TiVoVideoDetails> 
    5555        </Links> 
  • plugins/video/video.py

    r201c11b r7aae9a0  
    141141 
    142142        videos = [] 
     143        local_base_path = self.get_local_base_path(handler, query) 
    143144        for file in files: 
    144145            video = VideoDetails() 
    145146            video['name'] = os.path.split(file)[1] 
    146147            video['path'] = file 
     148            video['part_path'] = file.replace(local_base_path, '', 1) 
    147149            video['title'] = os.path.split(file)[1] 
    148150            video['is_dir'] = self.__isdir(file) 
     
    155157        handler.end_headers() 
    156158        t = Template(file=os.path.join(SCRIPTDIR,'templates', 'container.tmpl')) 
     159        t.container = cname 
    157160        t.name = subcname 
    158161        t.total = total 
     
    168171        file = query['File'][0] 
    169172        path = self.get_local_path(handler, query) 
    170         file_path = os.path.join(path, file) 
    171          
     173        file_path = path + file 
     174 
    172175        file_info = VideoDetails() 
    173176        file_info.update(self.__metadata(file_path, tsn))