Changeset 66bbeee
- Timestamp:
- 06/24/11 11:47:35 (2 years ago)
- Branches:
- master, crem, crem2, dev, diadems, forma, generic, instru_search, lam, nlivemulti, production, release/1.4.4, security, social, storage, test, video
- Children:
- a4d12ba
- Parents:
- 305c6d0
- git-author:
- yomguy <yomguy@…> (06/24/11 11:47:35)
- git-committer:
- yomguy <yomguy@…> (06/24/11 11:47:35)
- Location:
- telemeta
- Files:
-
- 2 edited
-
models/dublincore.py (modified) (4 diffs)
-
web/base.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
telemeta/models/dublincore.py
r305c6d0 r66bbeee 34 34 35 35 from telemeta.models.core import Duration 36 from telemeta.models.media import MediaItem, MediaCollection 36 from telemeta.models.media import MediaItem, MediaCollection, MediaItemAnalysis 37 37 from django.contrib.sites.models import Site 38 38 from django.conf import settings … … 178 178 Element('format', duration, 'extent'), 179 179 Element('format', collection.physical_format, 'medium'), 180 #FIXME: audio mime types are missing,181 180 parts 182 181 ) … … 207 206 if item.track: 208 207 title += u' - ' + item.track 208 209 try: 210 analysis = MediaItemAnalysis(item=item, analyzer_id='mime_type') 211 mime_type = analysis.value 212 except: 213 mime_type = 'unknown' 209 214 210 215 resource = Resource( … … 226 231 Element('rights', item.collection.legal_rights, 'license'), 227 232 Element('rights', media_access_rights(item.collection), 'accessRights'), 228 229 233 Element('format', max(item.approx_duration, item.computed_duration()), 'extent'), 230 234 Element('format', item.collection.physical_format, 'medium'), 231 #FIXME: audio mime types are missing,235 Element('format', mime_type, 'MIME type'), 232 236 Element('relation', media_identifier(item.collection), 'isPartOf', item.collection) 233 237 ) -
telemeta/web/base.py
r4d0f2d9 r66bbeee 459 459 item = MediaItem.objects.get(public_id=public_id) 460 460 461 item_public_access = item.public_access == 'none' or item.collection.public_access == 'none'461 item_public_access = item.public_access != 'none' or item.collection.public_access != 'none' 462 462 if not item_public_access and not (request.user.is_staff or request.user.is_superuser): 463 463 mess = ugettext('Access not allowed')
Note: See TracChangeset
for help on using the changeset viewer.
