예제 #1
0
def add_attrs_to_string(meta, partialStr):
    if not meta.has_key('ffmpeg'):
        return partialStr
    ffmpeg = meta['ffmpeg']
    
    for key, val in FFMPEG_INFO_TABLE.iteritems():
        if key in FFMPEG_DONT_PRINT_KEYS:
            continue
        description,regex = val
        if not ffmpeg.has_key(key):
            continue
        partialStr += '<LI><B>' + description + '</B>: '
        partialStr += ryw_view.scrub_js_string(ffmpeg[key])
    return partialStr
예제 #2
0
def container_detail_string(containers):
    """called to spit out the detailed strings in the magnifying
    glass popup window.
    doh! turns out searchFile is not needed here.  well..."""
    
    if containers == []:
        return ''

    ansStr = '<LI><B>Part of series: </B>'
    for container in containers:
        objstr = urllib.quote(container[0])
        title = container[2]
        titleLinkStr = """<A HREF=/cgi-bin/DisplayObject.py?objstr=%(objstr)s>%(title)s</A>"""
        d = {}
        d['objstr'] = objstr
        d['title'] = ryw_view.scrub_js_string(title)
        ansStr += titleLinkStr % d + ', '


    ansStr = ansStr.rstrip()
    ansStr = ansStr.rstrip(',')
    return ansStr