Compare commits

..

2 Commits

Author SHA1 Message Date
b17718df9b fix(stats): count authors from both author and authors fields
The total_authors stat now combines distinct values from the legacy
author column and the new authors array column.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 21:11:58 +01:00
5c3ddf7819 chore: bump version to 1.2.0 2026-03-16 19:29:43 +01:00
4 changed files with 11 additions and 7 deletions

8
Cargo.lock generated
View File

@@ -51,7 +51,7 @@ checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
[[package]]
name = "api"
version = "1.1.0"
version = "1.2.0"
dependencies = [
"anyhow",
"argon2",
@@ -1122,7 +1122,7 @@ dependencies = [
[[package]]
name = "indexer"
version = "1.1.0"
version = "1.2.0"
dependencies = [
"anyhow",
"axum",
@@ -1624,7 +1624,7 @@ dependencies = [
[[package]]
name = "parsers"
version = "1.1.0"
version = "1.2.0"
dependencies = [
"anyhow",
"flate2",
@@ -2626,7 +2626,7 @@ dependencies = [
[[package]]
name = "stripstream-core"
version = "1.1.0"
version = "1.2.0"
dependencies = [
"anyhow",
"serde",

View File

@@ -9,7 +9,7 @@ resolver = "2"
[workspace.package]
edition = "2021"
version = "1.1.0"
version = "1.2.0"
license = "MIT"
[workspace.dependencies]

View File

@@ -91,7 +91,11 @@ pub async fn get_stats(
COUNT(DISTINCT NULLIF(series, '')) AS total_series,
COUNT(DISTINCT library_id) AS total_libraries,
COALESCE(SUM(page_count), 0)::BIGINT AS total_pages,
COUNT(DISTINCT author) FILTER (WHERE author IS NOT NULL AND author != '') AS total_authors,
(SELECT COUNT(DISTINCT a) FROM (
SELECT DISTINCT UNNEST(authors) AS a FROM books WHERE authors != '{}'
UNION
SELECT DISTINCT author FROM books WHERE author IS NOT NULL AND author != ''
) sub) AS total_authors,
COUNT(*) FILTER (WHERE COALESCE(brp.status, 'unread') = 'unread') AS unread,
COUNT(*) FILTER (WHERE brp.status = 'reading') AS reading,
COUNT(*) FILTER (WHERE brp.status = 'read') AS read

View File

@@ -1,6 +1,6 @@
{
"name": "stripstream-backoffice",
"version": "1.1.0",
"version": "1.2.0",
"private": true,
"scripts": {
"dev": "next dev -p 7082",