diff --git a/pandora/config.pandora.jsonc b/pandora/config.pandora.jsonc index aaf7c4fa..bebe351c 100644 --- a/pandora/config.pandora.jsonc +++ b/pandora/config.pandora.jsonc @@ -351,11 +351,11 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution. "type": "enum", "columnWidth": 90, "format": {"type": "ColorLevel", "args": [ - ["Public", "Restricted", "Private"] + ["Public", "Out of Copyright", "Under Copyright", "Private"] ]}, "sort": true, "sortOperator": "+", - "values": ["Public", "Restricted", "Private", "Unknown"] + "values": ["Public", "Out of Copyright", "Under Copyright", "Private", "Unknown"] } ], /* diff --git a/pandora/mobile/views.py b/pandora/mobile/views.py index 57a19053..1fc87e6f 100644 --- a/pandora/mobile/views.py +++ b/pandora/mobile/views.py @@ -66,25 +66,10 @@ def index(request, fragment): clips = _order_clips(edit, sort) else: clips = edit.get_clips(request.user) - - preview = None - - if len(parts) >= 3 and ':' in parts[-1]: - ts = ox.parse_timecode(parts[-1]) - position = 0 - for clip in clips: - c = clip.json() - if ts > position and ts < position + c['duration']: - start = ts - position + c.get('in', 0) - preview = '/%s/%sp%0.03f.jpg' % (clip.item.public_id, resolution, float(start)) - break - position += c['duration'] - if not preview: - clip = clips.first() - if clip: - start = clip.json()['in'] - preview = '/%s/%sp%0.03f.jpg' % (clip.item.public_id, resolution, float(start)) - if preview: + clip = clips.first() + if clip: + start = clip.json()['in'] + preview = '/%s/%sp%0.03f.jpg' % (clip.item.public_id, resolution, float(start)) context['preview'] = request.build_absolute_uri(preview) else: type = 'item' diff --git a/static/js/infoView.js b/static/js/infoView.js index 3bc015c0..7e841f7b 100644 --- a/static/js/infoView.js +++ b/static/js/infoView.js @@ -543,9 +543,7 @@ pandora.ui.infoView = function(data, isMixed) { function formatValue(key, value) { var ret; - if (key == 'date' && (!value || value.split('-').length < 4)) { - ret = pandora.formatDate(value); - elif (nameKeys.indexOf(key) > -1) { + if (nameKeys.indexOf(key) > -1) { ret = formatLink(value.split(', '), 'name'); } else if ( listKeys.indexOf(key) > -1 && Ox.getObjectById(pandora.site.itemKeys, key).type[0] == 'date' diff --git a/static/mobile/js/VideoPlayer.js b/static/mobile/js/VideoPlayer.js index af219c54..93e4a2f2 100644 --- a/static/mobile/js/VideoPlayer.js +++ b/static/mobile/js/VideoPlayer.js @@ -18,9 +18,6 @@ window.VideoPlayer = function(options) { self.controls = document.createElement('div') self.controls.classList.add('mx-controls') - if (options.poster) { - self.controls.classList.add('poster') - } //self.controls.style.display = "none" if (self.options.controls) { var ratio = `aspect-ratio: ${self.options.aspectratio};` @@ -48,13 +45,6 @@ window.VideoPlayer = function(options) { margin: auto; } - .mx-controls.poster { - background-image: url(${self.options.poster}); - background-repeat: no-repeat; - background-size: contain; - background-blend-mode: overlay; - } - .mx-controls .toggle { display: flex; flex: 1; @@ -170,7 +160,6 @@ window.VideoPlayer = function(options) { event.preventDefault() event.stopPropagation() if (that.paused) { - self.controls.classList.remove('poster') that.play() } else { that.pause() @@ -204,7 +193,6 @@ window.VideoPlayer = function(options) { }) } if (that.paused && !failed) { - self.controls.classList.remove('poster') that.play() } } else { @@ -326,7 +314,6 @@ window.VideoPlayer = function(options) { toggle.querySelector('div').innerHTML = icon.pause self.controls.style.opacity = '0' unblock.remove() - self.controls.classList.remove('poster') that.play() } }) diff --git a/static/mobile/js/edits.js b/static/mobile/js/edits.js index 1d148773..cdf7df1f 100644 --- a/static/mobile/js/edits.js +++ b/static/mobile/js/edits.js @@ -90,21 +90,6 @@ async function sortClips(edit, sort) { } } -function getClip(edit, position) { - const response = {} - let pos = 0 - edit.clips.forEach(function(clip) { - if (clip.position < position && clip.position + clip.duration > position) { - response.item = clip.item - response.position = position - clip.position - if (clip['in']) { - response.position += clip['in'] - } - } - }); - return response -} - async function loadEdit(id, args) { var data = window.data = {} data.id = id @@ -122,7 +107,7 @@ async function loadEdit(id, args) { } } data.edit = response['data'] - if (data.edit.status !== 'public') { + if (['public', 'featured'].indexOf(data.edit) == -1) { return { site: data.site, error: { @@ -212,15 +197,6 @@ async function loadEdit(id, args) { }) }) }) - if (data.layers[pandora.subtitleLayer]) { - var previous; - data.layers[pandora.subtitleLayer].forEach(annotation => { - if (previous) { - previous.out = annotation['in'] - } - previous = annotation - }) - } var value = [] pandora.layerKeys.forEach(layer => { if (!data.layers[layer]) { @@ -239,26 +215,14 @@ async function loadEdit(id, args) { `) }) - var layerClass = "" - if (layerData.isSubtitles) { - layerClass = " is-subtitles" - } - value.push('