lint
This commit is contained in:
parent
ff4f8fa246
commit
fb059ae5d1
6 changed files with 24 additions and 22 deletions
|
|
@ -25,9 +25,7 @@
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<a class="button is-info"
|
<a class="button is-info" :disabled="!active"> Search </a>
|
||||||
:disabled="!active"
|
|
||||||
> Search </a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,18 @@
|
||||||
<span class="mediatype">{{ item.media_type }}</span>
|
<span class="mediatype">{{ item.media_type }}</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="score imdb-score tag is-large" :title="`IMDb rating (1-10) / ${item.imdb_votes} votes`">{{ imdb_rating(item.imdb_score) }}</span>
|
<span
|
||||||
<span class="score tag is-info is-large" :title="`User rating (1-10) / ${item.user_scores.length} votes / σ = ${imdb_stdev(item.user_scores)}`">{{ avg_imdb_rating(item.user_scores) }}</span>
|
class="score imdb-score tag is-large"
|
||||||
|
:title="`IMDb rating (1-10) / ${item.imdb_votes} votes`"
|
||||||
|
>{{ imdb_rating(item.imdb_score) }}</span
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="score tag is-info is-large"
|
||||||
|
:title="`User rating (1-10) / ${
|
||||||
|
item.user_scores.length
|
||||||
|
} votes / σ = ${imdb_stdev(item.user_scores)}`"
|
||||||
|
>{{ avg_imdb_rating(item.user_scores) }}</span
|
||||||
|
>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span>{{ duration(item.runtime) }}</span>
|
<span>{{ duration(item.runtime) }}</span>
|
||||||
|
|
@ -46,7 +56,6 @@
|
||||||
import { defineComponent } from "vue"
|
import { defineComponent } from "vue"
|
||||||
import { mean, pstdev } from "../utils.ts"
|
import { mean, pstdev } from "../utils.ts"
|
||||||
|
|
||||||
|
|
||||||
function avg_imdb_rating(scores) {
|
function avg_imdb_rating(scores) {
|
||||||
return imdb_rating(scores.length === 0 ? null : mean(scores))
|
return imdb_rating(scores.length === 0 ? null : mean(scores))
|
||||||
}
|
}
|
||||||
|
|
@ -125,6 +134,5 @@ export default defineComponent({
|
||||||
background-color: rgb(245, 197, 24);
|
background-color: rgb(245, 197, 24);
|
||||||
}
|
}
|
||||||
.user-score {
|
.user-score {
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,7 @@
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="control">
|
<p class="control">
|
||||||
<button
|
<button class="button is-primary is-small" :disabled="!active" @click="login">
|
||||||
class="button is-primary is-small"
|
|
||||||
:disabled="!active"
|
|
||||||
@click="login"
|
|
||||||
>
|
|
||||||
Login
|
Login
|
||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -319,9 +319,6 @@ async def add_movie(request):
|
||||||
not_implemented()
|
not_implemented()
|
||||||
|
|
||||||
|
|
||||||
import_lock = asyncio.Lock()
|
|
||||||
|
|
||||||
|
|
||||||
@route("/movies/_reload_imdb", methods=["GET"])
|
@route("/movies/_reload_imdb", methods=["GET"])
|
||||||
@requires(["authenticated", "admin"])
|
@requires(["authenticated", "admin"])
|
||||||
async def progress_for_load_imdb_movies(request):
|
async def progress_for_load_imdb_movies(request):
|
||||||
|
|
@ -352,11 +349,14 @@ async def progress_for_load_imdb_movies(request):
|
||||||
return JSONResponse(resp)
|
return JSONResponse(resp)
|
||||||
|
|
||||||
|
|
||||||
|
_import_lock = asyncio.Lock()
|
||||||
|
|
||||||
|
|
||||||
@route("/movies/_reload_imdb", methods=["POST"])
|
@route("/movies/_reload_imdb", methods=["POST"])
|
||||||
@requires(["authenticated", "admin"])
|
@requires(["authenticated", "admin"])
|
||||||
async def load_imdb_movies(request):
|
async def load_imdb_movies(request):
|
||||||
|
|
||||||
async with import_lock:
|
async with _import_lock:
|
||||||
progress = await db.get_import_progress()
|
progress = await db.get_import_progress()
|
||||||
if progress and not progress.stopped:
|
if progress and not progress.stopped:
|
||||||
return JSONResponse(
|
return JSONResponse(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue