]> git.parisson.com Git - telemeta.git/commitdiff
add telemeta.get_marker_id JSON method
authoryomguy <yomguy@parisson.com>
Wed, 11 May 2011 11:06:30 +0000 (13:06 +0200)
committeryomguy <yomguy@parisson.com>
Wed, 11 May 2011 11:06:30 +0000 (13:06 +0200)
telemeta/web/base.py

index c9159f40bdfdb8073859c7b9dbff94d965bff611..3931ac2578d8dabcef33f93ba4d73400fd995122 100644 (file)
@@ -918,6 +918,11 @@ class WebView(object):
         else:
             raise 'Error : Bad marker dictionnary'
  
+    @jsonrpc_method('telemeta.get_marker_id')
+    def get_marker_id(request, public_id):
+        marker = MediaItemMarker.objects.get(public_id=public_id)
+        return marker.id
+    
     # PLAYLISTS
     @jsonrpc_method('telemeta.add_playlist')
     def add_playlist(request, playlist):