Changeset 2c4c2e5b


Ignore:
Timestamp:
Apr 6, 2012 10:13:17 AM (2 years ago)
Author:
yomguy <yomguy@…>
Branches:
master, crem, crem2, dev, dev2, diadems, feature/breadcrumbs, feature/ts-0.5, feature/ts-0.5.4, feature/writecache, generic, instru_search, lam, lam2, mapsv3, merge, nlivemulti, production, release/1.4.4, sabiod, security, server, social, storage, telecaster, test
Children:
e5778ef
Parents:
4fa6f4b
git-author:
yomguy <yomguy@…> (06/04/2012 10:13:17)
git-committer:
yomguy <yomguy@…> (06/04/2012 10:13:17)
Message:

increase streaming chunk size, fix mimetype for mp4 when editing

Location:
telemeta
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • telemeta/templates/telemeta/base.html

    rd36c84a r2c4c2e5b  
    6565{% else %} 
    6666<a href="{% url telemeta-flatpage "help" %}">{% trans "Help" %}</a> | 
    67 <a href="{% url telemeta-login %}?next={{ request.path|urlencode }}">{% trans "Sign in" %}</a> 
     67<a href="{% url telemeta-login %}">{% trans "Sign in" %}</a> 
    6868{% endif %} 
    6969</div> 
  • telemeta/views/base.py

    r4fa6f4b r2c4c2e5b  
    102102 
    103103def stream_from_file(__file): 
    104     chunk_size = 0x10000 
     104    chunk_size = 0x100000 
    105105    f = open(__file, 'r') 
    106106    while True: 
     
    683683        previous, next = self.item_previous_next(item) 
    684684        mime_type = self.item_analyze(item) 
     685        #FIXME: use mimetypes.guess_type 
     686        if 'quicktime' in mime_type: 
     687            mime_type = 'video/mp4' 
    685688 
    686689        if request.method == 'POST': 
     
    975978                    pass 
    976979            response = HttpResponse(stream_from_file(audio), mimetype = mime_type) 
     980#            fsock = open(audio, 'r') 
     981#            response = HttpResponse(fsock, mimetype = mime_type) 
    977982        else: 
    978983            media = self.cache_export.dir + os.sep + file 
Note: See TracChangeset for help on using the changeset viewer.