Changeset 967eadd64907871282c80412987568bb38b2f481

Show
Ignore:
Timestamp:
11/26/06 15:47:22 (2 years ago)
Author:
Jason Michalski <armooo@armooo.net>
git-committer:
Jason Michalski <armooo@armooo.net> 1164577642 +0000
git-parent:

[e250e35f133bc57bd8bbfbc922879d2fa2efca92]

git-author:
Jason Michalski <armooo@armooo.net> 1164577642 +0000
Message:

pyTivo
-Fixed subsubfolder support

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • httpserver.py

    rf838e68 r967eadd  
    6767                if folder == '..': 
    6868                    return 
    69                 path = path + '/' + folder 
     69                path = os.path.join(path, folder) 
    7070            
    71             def isdir(file): 
    72                 path = container['path'] + '/' + file 
    73                 return os.path.isdir(path) 
     71 
    7472            
    7573            files = os.listdir(path) 
    7674 
    77             files = filter(lambda f: os.path.isdir(path+'/'+f) or transcode.suported_format(path+'/'+f), files) 
     75            files = filter(lambda f: os.path.isdir(os.path.join(path, f)) or transcode.suported_format(path+'/'+f), files) 
    7876             
    7977            totalFiles = len(files) 
    80             
     78  
     79            def isdir(file): 
     80                print os.path.join(path, file) 
     81                return os.path.isdir(os.path.join(path, file))                      
     82 
    8183            index = 0 
    8284            if query.has_key('ItemCount'): 
     
    9799                    index = index +  int(query['AnchorOffset'][0]) 
    98100                files = files[index:index + count] 
    99              
    100             def isdir(file): 
    101                 path = container['path'] + '/' + file 
    102                 return os.path.isdir(path) 
     101            
     102 
    103103             
    104104            t = Template(file=os.path.join(SCRIPTDIR,'templates', 'container.tmpl'))