Changeset 528

Show
Ignore:
Timestamp:
02/08/10 17:51:02 (5 weeks ago)
Author:
olivier
Message:

fix apparent item title (track number now always appear because of duplicate titles)

Location:
trunk/telemeta
Files:
10 modified

Legend:

Unmodified
Added
Removed
  • trunk/telemeta/models/crem.py

    r523 r528  
    200200 
    201201    def __unicode__(self): 
     202        if self.title: 
     203            return self.title 
     204 
    202205        return self.code 
    203206 
     
    366369 
    367370    def __unicode__(self): 
    368         if self.code: 
    369             return self.code 
    370         return self.old_code 
     371        if self.title and not re.match('^ *N *$', self.title): 
     372            title = self.title 
     373        else: 
     374            title = unicode(self.collection) 
     375 
     376        if self.track: 
     377            title += ' ' + self.track 
     378 
     379        return title 
    371380 
    372381class MediaPart(MediaResource): 
  • trunk/telemeta/templates/telemeta_default/collection.m3u

    r510 r528  
    11#EXTM3U{% load telemeta_utils %}{% for item in collection.items.all %} 
    2 #EXTINF:{{ item.get_duration }},{{ item.title }} 
     2#EXTINF:{{ item.get_duration }},{{ item }} 
    33http://{{ host }}{% url telemeta-item-export item.public_id,"mp3" %}{% endfor %} 
  • trunk/telemeta/templates/telemeta_default/collection_detail.html

    r523 r528  
    1515 
    1616{% block content %} 
    17     <h3>Collection: {{ collection.title }}</h3> 
     17    <h3>Collection: {{ collection }}</h3> 
    1818    <div class="{% if collection.has_mediafile %}with-rightcol{% endif %}"> 
    1919        {% if collection.has_mediafile %} 
  • trunk/telemeta/templates/telemeta_default/collection_detail_dc.html

    r510 r528  
    44{% if collection %} 
    55{% block submenu %} 
    6     <h3>Collection: {{ collection.title }}</h3> 
     6    <h3>Collection: {{ collection }}</h3> 
    77    <div><a href="{% url telemeta-collection-detail collection.public_id %}">Normal View</a></div> 
    88{% endblock %} 
  • trunk/telemeta/templates/telemeta_default/collection_xspf.xml

    r510 r528  
    1313{% for item in collection.ordered_items %} 
    1414    <track> 
    15       <title>{{ item.title }}</title> 
     15      <title>{{ item }}</title> 
    1616      <meta rel="type">mp3</meta> 
    1717      <location>http://{{ host }}{% url telemeta-item-export item.public_id,"mp3" %}</location> 
  • trunk/telemeta/templates/telemeta_default/inc/collection_list.html

    r527 r528  
    1010    <ul> 
    1111    {% for p in collections %} 
    12         <li><a href="{% url telemeta-collection-detail p.public_id %}">{{ p.title }}</a> 
     12        <li><a href="{% url telemeta-collection-detail p.public_id %}">{{ p }}</a> 
    1313            </li> 
    1414    {% endfor %} 
  • trunk/telemeta/templates/telemeta_default/inc/mediaitem_list.html

    r527 r528  
    1010    <ul> 
    1111    {% for p in items %} 
    12         <li><a href="{% url telemeta-item-detail p.public_id %}">{{ p.title }}</a></li> 
     12        <li><a href="{% url telemeta-item-detail p.public_id %}">{{ p }}</a></li> 
    1313    {% endfor %} 
    1414    {% if more_items %} <li>[...]</li> {% endif %} 
  • trunk/telemeta/templates/telemeta_default/mediaitem_detail.html

    r523 r528  
    3535{% block content %} 
    3636 
    37 <h3>Item : {{ item.title }}</h3> 
     37<h3>Item : {{ item }}</h3> 
    3838<div class="{% if item.file %}with-rightcol{% endif %}"> 
    3939 
     
    132132            {% dl_field item "alt_title" %} 
    133133            {% dl_field item "collector" %} 
    134             {% if item.collection.title %} 
    135                 <dt>{% trans "Collection title" %}</dt> 
    136                 <dd>{{ item.collection.title }}</dd> 
    137             {% endif %} 
     134            {% dl_field item "collection" %} 
    138135            {% if item.recorded_from_date %} 
    139136                <dt>{% trans "Recording date" %}</dt> 
  • trunk/telemeta/templates/telemeta_default/mediaitem_detail_dc.html

    r509 r528  
    44{% if item %} 
    55{% block submenu %} 
    6     <h3>Item: {{ item.title }}</h3> 
     6    <h3>Item: {{ item }}</h3> 
    77    <div><a href="{% url telemeta-item-detail item.id|urlencode %}">Normal View</a></div> 
    88{% endblock %} 
  • trunk/telemeta/templates/telemeta_default/mediaitem_xspf.xml

    r510 r528  
    44{% block tracklist %} 
    55    <track> 
    6       <title>{{ item.title }}</title> 
     6      <title>{{ item }}</title> 
    77      <meta rel="type">mp3</meta> 
    88      <location>http://{{ host }}{% url telemeta-item-export item.public_id,"mp3" %}</location>