Ignore:
Timestamp:
18/05/2007 21:17:37 (7 years ago)
Author:
olivier <>
Branches:
master, crem, crem2, dev, dev2, diadems, feature/breadcrumbs, feature/ts-0.5, feature/ts-0.5.4, feature/writecache, forma, generic, instru_search, lam, lam2, mapsv3, merge, nlivemulti, production, release/1.4.4, sabiod, security, server, social, storage, telecaster, test, video
Children:
294e691
Parents:
3815c51
git-author:
olivier <> (18/05/2007 21:17:37)
git-committer:
olivier <> (18/05/2007 21:17:37)
Message:
  • added collection playlists in m3u and xspf formats
  • embedded flash mp3 player in both collection and item displays.

Remark: there are two players available, you can switch them in the templates

  • other fixes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • telemeta/views/web.py

    r3815c51 r879d772  
    191191 
    192192        return self.edit_enumeration(request, enumeration_id) 
    193  
    194          
    195      
    196      
    197  
    198      
     193   
     194    def collection_playlist(self, request, collection_id, template, mimetype): 
     195        collection = MediaCollection.objects.get(id__exact=collection_id) 
     196        if not collection: 
     197            raise Http404 
     198 
     199        template = loader.get_template(template) 
     200        context = Context({'collection': collection, 'host': request.META['HTTP_HOST']}) 
     201        return HttpResponse(template.render(context), mimetype=mimetype) 
     202 
     203    def item_playlist(self, request, item_id, template, mimetype): 
     204        item = MediaItem.objects.get(id__exact=item_id) 
     205        if not item: 
     206            raise Http404 
     207 
     208        template = loader.get_template(template) 
     209        context = Context({'item': item, 'host': request.META['HTTP_HOST']}) 
     210        return HttpResponse(template.render(context), mimetype=mimetype) 
     211 
     212         
     213     
     214     
     215 
     216     
Note: See TracChangeset for help on using the changeset viewer.