Changeset 48e5447199435cb9695489516056d65842b74acc

Show
Ignore:
Timestamp:
03/01/08 17:37:53 (10 months ago)
Author:
KRKeegan <-NOSPAM-kevin@krkeegan.com>
git-committer:
KRKeegan <-NOSPAM-kevin@krkeegan.com> 1204414673 -0800
git-parent:

[f1e76d8061669097cf6aae05d118690c87853181], [13846522caa6199e6c12e614475b80438432e08d]

git-author:
KRKeegan <-NOSPAM-kevin@krkeegan.com> 1204414673 -0800
Message:

Merge branch 'master' of git://repo.or.cz/pyTivo/wgw

Conflicts:

plugins/video/transcode.py
plugins/video/video.py

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • httpserver.py

    rdcebed3 r48e5447  
    77import config 
    88from xml.sax.saxutils import escape 
     9from debug import debug_write, fn_attr 
    910 
    1011SCRIPTDIR = os.path.dirname(__file__) 
    1112 
    12 debug = config.getDebug() 
    1313hack83 = config.getHack83() 
    14  
    15 def debug_write(data): 
    16     if debug: 
    17         debug_out = [] 
    18         debug_out.append('httpserver.py - ') 
    19         for x in data: 
    20             debug_out.append(str(x)) 
    21         fdebug = open('debug.txt', 'a') 
    22         fdebug.write(' '.join(debug_out)) 
    23         fdebug.close() 
    2414 
    2515class TivoHTTPServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer): 
     
    134124    def unsupported(self, query): 
    135125        if hack83 and 'Command' in query and 'Filter' in query: 
    136             debug_write(['Unsupported request,', 
    137                          'checking to see if it is video.\n']) 
     126            debug_write(__name__, fn_attr(), ['Unsupported request,', 
     127                         'checking to see if it is video.']) 
    138128            command = query['Command'][0] 
    139129            plugin = GetPlugin('video') 
    140130            if ''.join(query['Filter']).find('video') >= 0 and \ 
    141131               hasattr(plugin, command): 
    142                 debug_write(['Unsupported request,', 
     132                debug_write(__name__, fn_attr(), ['Unsupported request,', 
    143133                             'yup it is video', 
    144                              'send to video plugin for it to sort out.\n']) 
     134                             'send to video plugin for it to sort out.']) 
    145135                method = getattr(plugin, command) 
    146136                method(self, query) 
  • plugins/video/transcode.py

    rf1e76d8 r48e5447  
    11import subprocess, shutil, os, re, sys, ConfigParser, time, lrucache 
    22import config 
     3from debug import debug_write, fn_attr 
    34 
    45info_cache = lrucache.LRUCache(1000) 
     6videotest = os.path.join(os.path.dirname(__file__), 'videotest.mpg') 
    57 
    68def ffmpeg_path(): 
    79    return config.get('Server', 'ffmpeg') 
    8  
    9 videotest = os.path.join(os.path.dirname(__file__), 'videotest.mpg') 
    10  
    11 def debug_write(data): 
    12     if config.getDebug(): 
    13         debug_out = [] 
    14         for x in data: 
    15             debug_out.append(str(x)) 
    16         fdebug = open('debug.txt', 'a') 
    17         fdebug.write(' '.join(debug_out)) 
    18         fdebug.close() 
    1910 
    2011# XXX BIG HACK 
     
    3425def output_video(inFile, outFile, tsn=''): 
    3526    if tivo_compatable(inFile, tsn): 
    36         debug_write(['output_video: ', inFile, ' is tivo compatible\n']) 
     27        debug_write(__name__, fn_attr(), [inFile, ' is tivo compatible']) 
    3728        f = file(inFile, 'rb') 
    3829        shutil.copyfileobj(f, outFile) 
    3930        f.close()  
    4031    else: 
    41         debug_write(['output_video: ', inFile, ' is not tivo compatible\n']) 
     32        debug_write(__name__, fn_attr(), [inFile, ' is not tivo compatible']) 
    4233        transcode(inFile, outFile, tsn) 
    4334 
     
    5647 
    5748    cmd = [ffmpeg_path(), '-i', inFile] + cmd_string.split() 
     49    print 'transcoding to tivo model '+tsn[:3]+' using ffmpeg command:' 
    5850    print cmd 
    59     debug_write(['transcode: ffmpeg command is ', ' '.join(cmd), '\n']) 
     51    debug_write(__name__, fn_attr(), ['ffmpeg command is ', ' '.join(cmd)]) 
    6052    ffmpeg = subprocess.Popen(cmd, stdout=subprocess.PIPE) 
    6153    try: 
     
    9991    type, width, height, fps, millisecs, kbps, akbps, acodec, afreq =  video_info(inFile) 
    10092 
    101     debug_write(['tsn:', tsn, '\n']) 
     93    debug_write(__name__, fn_attr(), ['tsn:', tsn]) 
    10294 
    10395    aspect169 = config.get169Setting(tsn) 
    10496 
    105     debug_write(['aspect169:', aspect169, '\n']) 
     97    debug_write(__name__, fn_attr(), ['aspect169:', aspect169]) 
    10698 
    10799    optres = config.getOptres() 
    108100 
    109     debug_write(['optres:', optres, '\n']) 
     101    debug_write(__name__, fn_attr(), ['optres:', optres]) 
    110102 
    111103    if optres: 
     
    121113    rheight, rwidth = height/d, width/d 
    122114 
    123     debug_write(['select_aspect: File=', inFile, ' Type=', type, ' width=', width, ' height=', height, ' fps=', fps, ' millisecs=', millisecs, ' ratio=', ratio, ' rheight=', rheight, ' rwidth=', rwidth, ' TIVO_HEIGHT=', TIVO_HEIGHT, 'TIVO_WIDTH=', TIVO_WIDTH, '\n']) 
     115    debug_write(__name__, fn_attr(), ['File=', inFile, ' Type=', type, ' width=', width, ' height=', height, ' fps=', fps, ' millisecs=', millisecs, ' ratio=', ratio, ' rheight=', rheight, ' rwidth=', rwidth, ' TIVO_HEIGHT=', TIVO_HEIGHT, 'TIVO_WIDTH=', TIVO_WIDTH]) 
    124116 
    125117    multiplier16by9 = (16.0 * TIVO_HEIGHT) / (9.0 * TIVO_WIDTH) 
     
    130122                # else, optres is enabled and resizes SD video to the "S2" standard on S3/HD. 
    131123    elif (rwidth, rheight) in [(4, 3), (10, 11), (15, 11), (59, 54), (59, 72), (59, 36), (59, 54)]: 
    132         debug_write(['select_aspect: File is within 4:3 list.\n']) 
     124        debug_write(__name__, fn_attr(), ['File is within 4:3 list.']) 
    133125        return ['-aspect', '4:3', '-s', str(TIVO_WIDTH) + 'x' + str(TIVO_HEIGHT)] 
    134126    elif ((rwidth, rheight) in [(16, 9), (20, 11), (40, 33), (118, 81), (59, 27)]) and aspect169: 
    135         debug_write(['select_aspect: File is within 16:9 list and 16:9 allowed.\n']) 
     127        debug_write(__name__, fn_attr(), ['File is within 16:9 list and 16:9 allowed.']) 
    136128        return ['-aspect', '16:9', '-s', str(TIVO_WIDTH) + 'x' + str(TIVO_HEIGHT)] 
    137129    else: 
     
    162154                        settings.append('-s') 
    163155                        settings.append(str(TIVO_WIDTH) + 'x' + str(TIVO_HEIGHT)) 
    164                     debug_write(['select_aspect: 16:9 aspect allowed, file is wider than 16:9 padding top and bottom\n', ' '.join(settings), '\n']) 
     156                    debug_write(__name__, fn_attr(), ['16:9 aspect allowed, file is wider than 16:9 padding top and bottom', ' '.join(settings)]) 
    165157                else: #too skinny needs padding on left and right. 
    166158                    endWidth = int((TIVO_HEIGHT*width)/(height*multiplier16by9)) 
     
    185177                        settings.append('-s') 
    186178                        settings.append(str(TIVO_WIDTH) + 'x' + str(TIVO_HEIGHT)) 
    187                     debug_write(['select_aspect: 16:9 aspect allowed, file is narrower than 16:9 padding left and right\n', ' '.join(settings), '\n']) 
     179                    debug_write(__name__, fn_attr(), ['16:9 aspect allowed, file is narrower than 16:9 padding left and right\n', ' '.join(settings)]) 
    188180            else: #this is a 4:3 file or 16:9 output not allowed 
    189181                settings.append('-aspect') 
     
    208200                    settings.append('-s') 
    209201                    settings.append(str(TIVO_WIDTH) + 'x' + str(TIVO_HEIGHT)) 
    210                 debug_write(['select_aspect: File is wider than 4:3 padding top and bottom\n', ' '.join(settings), '\n']) 
     202                debug_write(__name__, fn_attr(), ['File is wider than 4:3 padding top and bottom\n', ' '.join(settings)]) 
    211203 
    212204            return settings 
     
    236228                settings.append(str(TIVO_WIDTH) + 'x' + str(TIVO_HEIGHT)) 
    237229 
    238             debug_write(['select_aspect: File is taller than 4:3 padding left and right\n', ' '.join(settings), '\n']) 
     230            debug_write(__name__, fn_attr(), ['File is taller than 4:3 padding left and right\n', ' '.join(settings)]) 
    239231             
    240232            return settings 
     
    246238 
    247239    if (inFile[-5:]).lower() == '.tivo': 
    248         debug_write(['tivo_compatible: ', inFile, ' ends with .tivo\n']) 
     240        debug_write(__name__, fn_attr(), ['TRUE, ends with .tivo.', inFile]) 
    249241        return True 
    250242 
    251243    if not type == 'mpeg2video': 
    252244        #print 'Not Tivo Codec' 
    253         debug_write(['tivo_compatible: ', inFile, ' is not mpeg2video it is ', type, '\n']) 
     245        debug_write(__name__, fn_attr(), ['FALSE, type', type, 'not mpeg2video.', inFile]) 
    254246        return False 
    255247 
    256248    if (inFile[-3:]).lower() == '.ts': 
    257         debug_write(['tivo_compatible: ', inFile, ' transport stream not supported ', '\n']) 
     249        debug_write(__name__, fn_attr(), ['FALSE, transport stream not supported.', inFile]) 
    258250        return False 
    259251 
    260252    if not akbps or int(akbps) > config.getMaxAudioBR(tsn): 
    261         debug_write(['tivo_compatible: ', inFile, ' max audio bitrate exceeded it is ', akbps, '\n']) 
     253        debug_write(__name__, fn_attr(), ['FALSE,', akbps, 'kbps exceeds max audio bitrate.', inFile]) 
    262254        return False 
    263255 
    264256    if not kbps or int(kbps)-int(akbps) > config.strtod(config.getMaxVideoBR())/1000: 
    265         debug_write(['tivo_compatible: ', inFile, ' max video bitrate exceeded it is ', kbps, '\n']) 
     257        debug_write(__name__, fn_attr(), ['FALSE,', kbps, 'kbps exceeds max video bitrate.', inFile]) 
    266258        return False 
    267259 
    268260    if config.isHDtivo(tsn): 
    269         debug_write(['tivo_compatible: ', inFile, ' you have a S3 skiping the rest of the tests', '\n']) 
     261        debug_write(__name__, fn_attr(), ['TRUE, HD Tivo detected, skipping remaining tests', inFile]) 
    270262        return True 
    271263 
    272264    if not fps == '29.97': 
    273265        #print 'Not Tivo fps' 
    274         debug_write(['tivo_compatible: ', inFile, ' is not correct fps it is ', fps, '\n']) 
     266        debug_write(__name__, fn_attr(), ['FALSE,', fps, 'fps, should be 29.97.', inFile]) 
    275267        return False 
    276268 
     
    278270        if (mode[0], mode[1]) == (width, height): 
    279271            #print 'Is TiVo!' 
    280             debug_write(['tivo_compatible: ', inFile, ' has correct width of ', width, ' and height of ', height, '\n']) 
     272            debug_write(__name__, fn_attr(), ['TRUE,', width, 'x', height, 'is valid.', inFile]) 
    281273            return True 
    282274        #print 'Not Tivo dimensions' 
     
    287279    if inFile != videotest: 
    288280        if inFile in info_cache and info_cache[inFile][0] == mtime: 
    289             debug_write(['video_info: ', inFile, ' cache hit!', '\n']) 
     281            debug_write(__name__, fn_attr(), ['CACHE HIT!', inFile]) 
    290282            return info_cache[inFile][1] 
    291283 
    292284    if (inFile[-5:]).lower() == '.tivo': 
    293285        info_cache[inFile] = (mtime, (True, True, True, True, True, True, True, True, True)) 
    294         debug_write(['video_info: ', inFile, ' ends in .tivo.\n']) 
     286        debug_write(__name__, fn_attr(), ['VALID, ends in .tivo.', inFile]) 
    295287        return True, True, True, True, True, True, True, True, True 
    296288 
     
    310302 
    311303    output = ffmpeg.stderr.read() 
    312     debug_write(['video_info: ffmpeg output=', output, '\n']) 
     304    debug_write(__name__, fn_attr(), ['ffmpeg output=', output]) 
    313305 
    314306    rezre = re.compile(r'.*Video: ([^,]+),.*') 
     
    318310    else: 
    319311        info_cache[inFile] = (mtime, (None, None, None, None, None, None, None, None, None)) 
    320         debug_write(['video_info: failed at codec\n']) 
     312        debug_write(__name__, fn_attr(), ['failed at video codec']) 
    321313        return None, None, None, None, None, None, None, None, None 
    322314 
     
    328320    else: 
    329321        info_cache[inFile] = (mtime, (None, None, None, None, None, None, None, None, None)) 
    330         debug_write(['video_info: failed at width/height\n']) 
     322        debug_write(__name__, fn_attr(), ['failed at width/height']) 
    331323        return None, None, None, None, None, None, None, None, None 
    332324 
     
    337329    else: 
    338330        info_cache[inFile] = (mtime, (None, None, None, None, None, None, None, None, None)) 
    339         debug_write(['video_info: failed at fps\n']) 
     331        debug_write(__name__, fn_attr(), ['failed at fps']) 
    340332        return None, None, None, None, None, None, None, None, None 
    341333 
     
    346338        x = rezre.search(output.lower() ) 
    347339        if x: 
    348             debug_write(['video_info: film source: 29.97 setting fps to 29.97\n']) 
     340            debug_write(__name__, fn_attr(), ['film source: 29.97 setting fps to 29.97']) 
    349341            fps = '29.97' 
    350342        else: 
    351343            # for build 8047: 
    352344            rezre = re.compile(r'.*frame rate differs from container frame rate: 29.97.*') 
    353             debug_write(['video_info: Bug in VideoReDo\n']) 
     345            debug_write(__name__, fn_attr(), ['Bug in VideoReDo']) 
    354346            x = rezre.search(output.lower() ) 
    355347            if x: 
     
    370362    else: 
    371363        kbps = None 
    372         debug_write(['video_info: failed at kbps\n']) 
     364        debug_write(__name__, fn_attr(), ['failed at kbps']) 
    373365 
    374366    #get audio bitrate of source for tivo compatibility test. 
     
    379371    else: 
    380372        akbps = None 
    381         debug_write(['video_info: failed at akbps\n']) 
     373        debug_write(__name__, fn_attr(), ['failed at akbps']) 
    382374 
    383375    #get audio codec of source for tivo compatibility test. 
     
    388380    else: 
    389381        acodec = None 
    390         debug_write(['video_info: failed at acodec\n']) 
     382        debug_write(__name__, fn_attr(), ['failed at acodec']) 
    391383 
    392384    #get audio frequency of source for tivo compatibility test. 
     
    397389    else: 
    398390        afreq = None 
    399         debug_write(['video_info: failed at afreq\n']) 
     391        debug_write(__name__, fn_attr(), ['failed at afreq']) 
    400392 
    401393    info_cache[inFile] = (mtime, (codec, width, height, fps, millisecs, kbps, akbps, acodec, afreq)) 
    402     debug_write(['video_info: Codec=', codec, ' width=', width, ' height=', height, ' fps=', fps, ' millisecs=', millisecs, ' kbps=', kbps, ' akbps=', akbps, ' acodec=', acodec, ' afreq=', afreq, '\n']) 
     394    debug_write(__name__, fn_attr(), ['Codec=', codec, ' width=', width, ' height=', height, ' fps=', fps, ' millisecs=', millisecs, ' kbps=', kbps, ' akbps=', akbps, ' acodec=', acodec, ' afreq=', afreq]) 
    403395    return codec, width, height, fps, millisecs, kbps, akbps, acodec, afreq 
    404396 
     
    417409        return True 
    418410    else: 
    419         debug_write(['supported_format: ', inFile, ' is not supported\n']) 
     411        debug_write(__name__, fn_attr(), ['FALSE, file not supported', inFile]) 
    420412        return False 
    421413 
    422414def kill(pid): 
    423     debug_write(['kill: killing pid=', str(pid), '\n']) 
     415    debug_write(__name__, fn_attr(), ['killing pid=', str(pid)]) 
    424416    if mswindows: 
    425417        win32kill(pid) 
  • plugins/video/video.py

    rf1e76d8 r48e5447  
    99import config 
    1010import time 
     11from debug import debug_write, fn_attr 
    1112 
    1213SCRIPTDIR = os.path.dirname(__file__) 
     
    2021    extensions = None 
    2122 
    22 def debug_write(data): 
    23     if config.getDebug(): 
    24         debug_out = [] 
    25         debug_out.append('Video.py - ') 
    26         for x in data: 
    27             debug_out.append(str(x)) 
    28         fdebug = open('debug.txt', 'a') 
    29         fdebug.write(' '.join(debug_out)) 
    30         fdebug.close() 
     23if config.getHack83(): 
     24    debug_write(__name__, fn_attr(), ['Hack83 is enabled.']) 
    3125 
    3226class Video(Plugin): 
     
    5145 
    5246    def hack(self, handler, query, subcname): 
    53         debug_write(['Hack new request ------------------------\n']) 
    54         debug_write(['Hack TiVo request is: \n', query, '\n']) 
     47        debug_write(__name__, fn_attr(), ['new request ------------------------']) 
     48        debug_write(__name__, fn_attr(), ['TiVo request is: \n', query]) 
    5549        queryAnchor = '' 
    5650        rightAnchor = '' 
     
    6054        # not a tivo 
    6155        if not tsn: 
    62             debug_write(['Hack this was not a TiVo request.', 
    63                          'Using default tsn.\n']) 
     56            debug_write(__name__, fn_attr(), ['this was not a TiVo request.', 
     57                         'Using default tsn.']) 
    6458            tsn = '123456789' 
    6559 
     
    7468                queryAnchor = queryAnchor.split('/', 1)[-1] 
    7569            leftAnchor, rightAnchor = queryAnchor.rsplit('/', 1) 
    76             debug_write(['Hack queryAnchor: ', queryAnchor, 
     70            debug_write(__name__, fn_attr(), ['queryAnchor: ', queryAnchor, 
    7771                         ' leftAnchor: ', leftAnchor, 
    78                          ' rightAnchor: ', rightAnchor, '\n']) 
     72                         ' rightAnchor: ', rightAnchor]) 
    7973        try: 
    8074            path, state = self.request_history[tsn] 
    8175        except KeyError: 
    8276            # Never seen this tsn, starting new history 
    83             debug_write(['New TSN.\n']) 
     77            debug_write(__name__, fn_attr(), ['New TSN.']) 
    8478            path = [] 
    8579            state = {} 
     
    8983            state['time'] = int(time.time()) + 1000 
    9084 
    91         debug_write(['Hack our saved request is: \n', state['query'], '\n']) 
     85        debug_write(__name__, fn_attr(), ['our saved request is: \n', state['query']]) 
    9286 
    9387        current_folder = subcname.split('/')[-1] 
     
    9892        # 1. at the root - This request is always accurate 
    9993        if len(subcname.split('/')) == 1: 
    100             debug_write(['Hack we are at the root.', 
    101                          'Saving query, Clearing state[page].\n']) 
     94            debug_write(__name__, fn_attr(), ['we are at the root.', 
     95                         'Saving query, Clearing state[page].']) 
    10296            path[:] = [current_folder] 
    10397            state['query'] = query 
     
    109103        # entering a new folder. 
    110104        if 'AnchorItem' not in query: 
    111             debug_write(['Hack we are entering a new folder.', 
    112                          'Saving query, setting time, setting state[page].\n']) 
     105            debug_write(__name__, fn_attr(), ['we are entering a new folder.', 
     106                         'Saving query, setting time, setting state[page].']) 
    113107            path[:] = subcname.split('/') 
    114108            state['query'] = query 
     
    125119        # we know this is the proper page 
    126120        if ''.join(query['AnchorItem']) == 'Hack8.3': 
    127             debug_write(['Hack requested page from 302 code.', 
    128                          'Returning saved query,\n']) 
     121            debug_write(__name__, fn_attr(), ['requested page from 302 code.', 
     122                         'Returning saved query.']) 
    129123            return state['query'], path 
    130124 
    131125        # 4. this is a request for a file 
    132126        if 'ItemCount' in query and int(''.join(query['ItemCount'])) == 1: 
    133             debug_write(['Hack requested a file', '\n']) 
     127            debug_write(__name__, fn_attr(), ['requested a file']) 
    134128            # Everything in this request is right except the container 
    135129            query['Container'] = ['/'.join(path)] 
     
    143137        # Sleep just in case the erroneous request came first this  
    144138        # allows a proper request to be processed first 
    145         debug_write(['Hack maybe erroneous request, sleeping.\n']) 
     139        debug_write(__name__, fn_attr(), ['maybe erroneous request, sleeping.']) 
    146140        time.sleep(.25) 
    147141 
     
    151145        # First we have to figure out if we are scrolling 
    152146        if 'AnchorOffset' in query: 
    153             debug_write(['Hack Anchor offset was in query.', 
    154                          'leftAnchor needs to match ', '/'.join(path), '\n']) 
     147            debug_write(__name__, fn_attr(), ['Anchor offset was in query.', 
     148                         'leftAnchor needs to match ', '/'.join(path)]) 
    155149            if leftAnchor == str('/'.join(path)): 
    156                 debug_write(['Hack leftAnchor matched.', '\n']) 
     150                debug_write(__name__, fn_attr(), ['leftAnchor matched.']) 
    157151                query['Container'] = ['/'.join(path)] 
    158152                files, total, start = self.get_files(handler, query,  
    159153                                                     self.video_file_filter) 
    160                 debug_write(['Hack saved page is= ', state['page'], 
    161                              ' top returned file is= ', files[0], '\n']) 
     154                debug_write(__name__, fn_attr(), ['saved page is= ', state['page'], 
     155                             ' top returned file is= ', files[0]]) 
    162156                # If the first file returned equals the top of the page 
    163157                # then we haven't scrolled pages 
    164158                if files[0] != str(state['page']): 
    165                     debug_write(['Hack this is scrolling within a folder.\n']) 
     159                    debug_write(__name__, fn_attr(), ['this is scrolling within a folder.']) 
    166160                    state['page'] = files[0] 
    167161                    return query, path                
     
    174168        # request. 
    175169        if (int(time.time()) - state['time']) <= 1: 
    176             debug_write(['Hack erroneous request, send a 302 error', '\n']) 
     170            debug_write(__name__, fn_attr(), ['erroneous request, send a 302 error']) 
    177171            return None, path 
    178172 
     
    180174        # this request came by itself; it must be to exit a folder 
    181175        else: 
    182             debug_write(['Hack over 1 second,', 
    183                          'must be request to exit folder\n']) 
     176            debug_write(__name__, fn_attr(), ['over 1 second,', 
     177                         'must be request to exit folder']) 
    184178            path.pop() 
    185179            state['query'] = {'Command': query['Command'], 
     
    191185 
    192186        # just in case we missed something. 
    193         debug_write(['Hack ERROR, should not have made it here. ', 
    194                      'Trying to recover.\n']) 
     187        debug_write(__name__, fn_attr(), ['ERROR, should not have made it here. ', 
     188                     'Trying to recover.']) 
    195189        return state['query'], path 
    196190 
     
    337331            hackPath = '/'.join(hackPath) 
    338332            print 'Tivo said:', subcname, '|| Hack said:', hackPath 
    339             debug_write(['Hack Tivo said: ', subcname, ' || Hack said: ', 
    340                          hackPath, '\n']) 
     333            debug_write(__name__, fn_attr(), ['Tivo said: ', subcname, ' || Hack said: ', 
     334                         hackPath]) 
    341335            subcname = hackPath 
    342336 
    343337            if not query: 
    344                 debug_write(['Hack sending 302 redirect page', '\n']) 
     338                debug_write(__name__, fn_attr(), ['sending 302 redirect page']) 
    345339                handler.send_response(302) 
    346340                handler.send_header('Location ', 'http://' + 
  • pyTivo.py

    r7018122 r75822c9  
    33import beacon, httpserver, os, sys 
    44import config 
     5from debug import print_conf, fn_attr 
    56from plugin import GetPlugin 
    67 
     
    3435    b.listen() 
    3536 
     37print_conf(__name__, fn_attr()) 
    3638print 'pyTivo is ready.' 
    3739try: