Compare commits
No commits in common. "4bb0c2966adda6004d4a2a3397a0bf846e6033ed" and "54a3bb8cc7901bd45d2de398e098a070bb499ea7" have entirely different histories.
4bb0c2966a
...
54a3bb8cc7
19
search.py
19
search.py
@ -1,4 +1,3 @@
|
||||
import os
|
||||
import sqlite3
|
||||
from flask import Flask, render_template, request, request, jsonify, session
|
||||
import random
|
||||
@ -124,22 +123,8 @@ def searchcommand():
|
||||
transcript.lower().count(w.lower()) for w in words
|
||||
)
|
||||
record.pop('transcript', None)
|
||||
|
||||
filetype = (record.get('filetype') or '').lower()
|
||||
if filetype == '.sng':
|
||||
record['fulltext_type'] = 'sng'
|
||||
record['fulltext_url'] = f"/media/{quote(record.get('relative_path', ''), safe='/')}"
|
||||
else:
|
||||
record['fulltext_type'] = 'transcript'
|
||||
relative_path = record.get('relative_path', '')
|
||||
filename = record.get('filename', '')
|
||||
name_root = os.path.splitext(filename)[0] if filename else os.path.splitext(os.path.basename(relative_path))[0]
|
||||
parent = os.path.dirname(relative_path)
|
||||
if parent:
|
||||
transcript_rel_path = f"{parent}/Transkription/{name_root}.md"
|
||||
else:
|
||||
transcript_rel_path = f"Transkription/{name_root}.md"
|
||||
record['fulltext_url'] = f"/transcript/{quote(transcript_rel_path, safe='/')}"
|
||||
record['fulltext_url'] = f"/media/{quote(record.get('relative_path', ''), safe='/')}"
|
||||
record['fulltext_type'] = 'sng' if (record.get('filetype') or '').lower() == '.sng' else 'transcript'
|
||||
# convert date to TT.MM.YYYY format
|
||||
if record.get('performance_date'):
|
||||
try:
|
||||
|
||||
@ -1338,6 +1338,6 @@ footer .audio-player-container {
|
||||
}
|
||||
|
||||
.file-access-actions {
|
||||
flex-wrap: wrap;
|
||||
align-content: flex-start;
|
||||
flex-wrap: nowrap;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
const CACHE_NAME = 'gottesdienste-app-v1.3';
|
||||
const CACHE_NAME = 'gottesdienste-app-v1.2';
|
||||
const ASSETS = [
|
||||
'/',
|
||||
'/static/app.css',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user