gets everything settled up to the suggest page

This commit is contained in:
Effie 2023-07-04 15:56:57 +10:00
parent 3e3d318134
commit 297a20f3e0
12 changed files with 32 additions and 25 deletions

2
app.py
View File

@ -329,7 +329,7 @@ def songpage(id):
song_info = db.execute('''
select
name, name_jp
name, name_jp, location
from
song
where

View File

@ -37,7 +37,7 @@ for song, motif, start, duration, album, track in db.execute('''
# get clip filename
destination = f'static/clip/{song:04}-{motif:03}.flac'
destination = f'static/clip/{song:04}-{motif:03}.mp3'
print(destination)

View File

@ -15,13 +15,13 @@ clipdata = pyexcel_odsr.get_data('reference_clips.ods', skip_empty_rows=True)
# import song
cur.executemany(
'insert or ignore into song(id,name,name_jp) values(?, ?, ?)',
((row[0],row[3],row[4]) for row in data['Song'][1:])
'insert or ignore into song(id,name,name_jp,location) values(?, ?, ?, ?)',
((row[0],row[3],row[4],'' if len(row)<11 else row[10]) for row in data['Song'][1:])
)
# import album
cur.executemany(
'insert into album(id,name,date,code) values (?, ?, ?, ?)',
'insert into album(id,name,date,code,description,updates) values (?, ?, ?, ?, ?, ?)',
data['Album'][1:]
)

3
db.sql
View File

@ -4,6 +4,7 @@ create table song(
id int primary key,
name text not null,
name_jp text not null,
location text not null,
unique(name,name_jp)
);
@ -11,6 +12,8 @@ create table album(
id int primary key,
name text not null,
date date not null,
description text not null,
updates text not null,
code char(3) not null
);

Binary file not shown.

Binary file not shown.

View File

@ -372,6 +372,7 @@ footer{
.sort-header{
border-style: solid; border-top: 0; border-left: 0; border-right: 0; border-width: 1px; border-color: var(--thin-border);
font-size: calc(1.1rem + .1vw);
}
.sort-header.album{
@ -586,12 +587,14 @@ footer{
display: flex; flex-direction: column;
width: 100%;
justify-content: center;
margin-left: 1.2rem; margin-right: 1.2rem;
}
.song-location h2{
text-align: center;
margin-bottom: 1.2rem;
}
.entrypage-connections{
display: flex; flex-direction: column;
width: 100%;

View File

@ -1,7 +1,7 @@
<li class="entrypage-clip">
<audio
controls
src = "{{ url_for('static', filename='clip/') }}{{ '%04d' % song_id }}-{{ '%03d' % motif_id }}.flac" type="audio/flac">
src = "{{ url_for('static', filename='clip/') }}{{ '%04d' % song_id }}-{{ '%03d' % motif_id }}.mp3" type="audio/flac">
</audio>
<span class="clip-pointer">

View File

@ -9,7 +9,7 @@
<hgroup class="home-title">
<h1>The Eorzea Songbook</h1>
<h3>An unofficial library of motifs in the Final Fantasy XIV soundtrack.</h3>
<p>Last updated: 26/06/2023</p>
<!-- <p>Last updated: 26/06/2023</p> -->
</hgroup>
<div class="home-nav">
@ -32,7 +32,7 @@
<div class="entrypage-clip">
<audio
controls
src = "{{ url_for('static', filename='clip/') }}0288-024.flac" type="audio/flac">
src = "{{ url_for('static', filename='clip/') }}0288-024.mp3" type="audio/flac">
</audio>
<span class="clip-pointer">
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" class="connection-icon"/>
@ -43,7 +43,7 @@
<div class="entrypage-clip">
<audio
controls
src = "{{ url_for('static', filename='clip/') }}0317-024.flac" type="audio/flac">
src = "{{ url_for('static', filename='clip/') }}0317-024.mp3" type="audio/flac">
</audio>
<span class="clip-pointer">
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" class="connection-icon"/>
@ -54,7 +54,7 @@
<div class="entrypage-clip">
<audio
controls
src = "{{ url_for('static', filename='clip/') }}0294-024.flac" type="audio/flac">
src = "{{ url_for('static', filename='clip/') }}0294-024.mp3" type="audio/flac">
</audio>
<span class="clip-pointer">
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" class="connection-icon"/>
@ -65,7 +65,7 @@
<div class="entrypage-clip">
<audio
controls
src = "{{ url_for('static', filename='clip/') }}0337-024.flac" type="audio/flac">
src = "{{ url_for('static', filename='clip/') }}0337-024.mp3" type="audio/flac">
</audio>
<span class="clip-pointer">
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" class="connection-icon"/>

View File

@ -1,7 +1,7 @@
<li class="entrypage-clip">
<audio
controls
src = "{{ url_for('static', filename='clip/') }}{{ '%04d' % song_id }}-{{ '%03d' % motif_id }}.flac" type="audio/flac">
src = "{{ url_for('static', filename='clip/') }}{{ '%04d' % song_id }}-{{ '%03d' % motif_id }}.mp3" type="audio/flac">
</audio>
<span class="clip-pointer">
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" class="connection-icon"/>

Binary file not shown.

View File

@ -1,6 +1,6 @@
{% extends "base.html" %}
{% block title %}
{% for name, _ in song_info %}{{ name }}{% endfor %}
{% for name, _, _ in song_info %}{{ name }}{% endfor %}
{% endblock %}
{% set clipmode = "motif" %}
@ -11,7 +11,7 @@
<hgroup class="title-box">
<div class="eng-title">
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" />
{% for name, name_jp in song_info %}
{% for name, name_jp, _ in song_info %}
<h1>{{ name }}</h1>
{% endfor %}
<h3 class="title-album">
@ -20,7 +20,7 @@
{% endfor %}
</h3>
</div>
{% for name, name_jp in song_info %}
{% for name, name_jp, _ in song_info %}
{% if name_jp %}
<h2 class="title-jp">{{name_jp}}</h2>
{% endif %}
@ -28,9 +28,9 @@
</hgroup>
<!-- Artist info -->
<div class="track-info" >
<!-- Artist info -->
<div class="songpage-detail">
<h2 >Artist: </h2>
<ul>
@ -60,13 +60,14 @@
<!-- Location -->
{% if description %}
<div class="song-location">
<h2>Used In:</h2>
</div>
{% endif %}
{% for _, _, location in song_info %}
{% if location %}
<div class="song-location">
<h2>Appearances:</h2>
<p class="songpage-location">{{ location }}</p>
</div>
{% endif %}
{% endfor %}
<!-- Motifs -->