@author: Guillaume Pellerin <pellerin@parisson.com>
@author: Olivier Guilyardi <olivier@samalyse.com>
@author: David Lipszyc <davidlipszyc@gmail.com>
+@author: Riccardo Zaccarelli <riccardo.zaccarelli@gmail.com>
"""
__docformat__ = 'epytext en'
-__version__ = '0.6.0'
+__version__ = '0.7.0'
__url__ = 'http://telemeta.org'
-__copyright__ = '(C) 2007-2010 Parisson SARL and Samalyse SARL'
+__copyright__ = '(C) 2007-2011 Parisson'
__license__ = 'CeCILL-2'
__license_long__ = """
-Copyright Parisson SARL (2010)
+Copyright Parisson SARL (2007-2011)
-<guillaume.<pellerin@parisson.com>
+<yomguy@parisson.com>
<olivier@samalyse.com>
This software is a computer program whose purpose is to backup, analyse,
{% for resource in playlist.resources %}
<tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
<td>
- {% if resource.type == "item" %}
+ {% if resource.type == "item" and not resource.element == None %}
<a href="{% url telemeta-item-detail resource.element.public_id %}">{{ resource.element }}</a>
{% endif %}
- {% if resource.type == "collection" %}
+ {% if resource.type == "collection" and not resource.element == None %}
<a href="{% url telemeta-collection-detail resource.element.public_id %}">{{ resource.element }}</a>
{% endif %}
- {% if resource.type == "marker" %}
+ {% if resource.type == "marker" and not resource.element == None %}
<a href="{% url telemeta-item-detail-marker resource.element.public_id %}">{{ resource.element }}</a>
{% endif %}
+ {% if resource.element == None %}<b>deleted</b>{% endif %}
</td>
<td>{{ resource.type }}</td>
<td>
playlist_resources = PlaylistResource.objects.filter(playlist=playlist)
resources = []
for resource in playlist_resources:
- if resource.resource_type == 'item':
- element = MediaItem.objects.get(public_id=resource.resource_id)
- if resource.resource_type == 'collection':
- element = MediaCollection.objects.get(public_id=resource.resource_id)
- if resource.resource_type == 'marker':
- element = MediaItemMarker.objects.get(public_id=resource.resource_id)
+ try:
+ if resource.resource_type == 'item':
+ element = MediaItem.objects.get(public_id=resource.resource_id)
+ if resource.resource_type == 'collection':
+ element = MediaCollection.objects.get(public_id=resource.resource_id)
+ if resource.resource_type == 'marker':
+ element = MediaItemMarker.objects.get(public_id=resource.resource_id)
+ except:
+ element = None
resources.append({'element': element, 'type': resource.resource_type, 'public_id': resource.public_id })
playlists.append({'playlist': playlist, 'resources': resources})
return playlists