dict(template='telemeta/mediaitem_copy.html'), name="telemeta-item-copy"),
url(r'^item/add/$', web_view.item_add,
dict(template='telemeta/mediaitem_add.html'), name="telemeta-item-add"),
- url(r'^items/(?P<public_id>[A-Za-z0-9._-]+)/marker/(?P<marker_id>[A-Za-z0-9]+)/$', web_view.item_detail,
- name="telemeta-item-detail-marker"),
# collections
url(r'^collections/$', 'django.views.generic.list_detail.object_list',
# Playlists
url(r'^playlists/(?P<public_id>[a-zA-Z0-9]+)/csv/$', web_view.playlist_csv_export, name="telemeta-playlist-csv-export"),
+ # Markers
+ url(r'^markers/(?P<marker_id>[A-Za-z0-9]+)/$', web_view.item_detail, name="telemeta-item-detail-marker"),
+
# RSS feeds
url(r'rss/$', web_view.rss, name="telemeta-rss"),
)
next = item.public_id
return previous, next
- def item_detail(self, request, public_id, marker_id=None, template='telemeta/mediaitem_detail.html'):
+ def item_detail(self, request, public_id=None, marker_id=None, template='telemeta/mediaitem_detail.html'):
"""Show the details of a given item"""
- item = MediaItem.objects.get(public_id=public_id)
+ if not public_id and marker_id:
+ marker = MediaItemMarker(public_id=marker_id)
+ item = marker.item
+ else:
+ item = MediaItem.objects.get(public_id=public_id)
# Get TimeSide processors
formats = []