This commit is contained in:
2026-09-19 12:50:56 +02:00
parent 1477d56658
commit 15628739b1
12 changed files with 303 additions and 66 deletions
+1
View File
@@ -740,6 +740,7 @@
"settings": "Einstellungen",
"filters": "Filter",
"volume": "Lautstärke",
"clear_filter": "Filter löschen",
"reset_all": "Alles zurücksetzen",
"rating": "Bewertung",
"all": "Alle",
+1
View File
@@ -740,6 +740,7 @@
"settings": "Settings",
"filters": "Filters",
"volume": "Volume",
"clear_filter": "Clear filter",
"reset_all": "Reset all",
"rating": "Rating",
"all": "All",
+1
View File
@@ -736,6 +736,7 @@
"settings": "Instellingen",
"filters": "Filters",
"volume": "Volume",
"clear_filter": "Filter wissen",
"reset_all": "Alles resetten",
"rating": "Beoordeling",
"all": "Alles",
+1
View File
@@ -736,6 +736,7 @@
"settings": "Einstellungen",
"filters": "Filter",
"volume": "Lautstärke",
"clear_filter": "Filter entfernen",
"reset_all": "Alles zurücksetzen",
"rating": "Bewertung",
"all": "Alle",
+19 -7
View File
@@ -323,6 +323,9 @@ export default router => {
}
}
const nsflTagRow = await db`SELECT id FROM tags WHERE normalized = 'nsfl' LIMIT 1`;
const nsflId = nsflTagRow.length > 0 ? nsflTagRow[0].id : (cfg.nsfl_tag_id || 11517);
try {
let tagid = (await db`
select id
@@ -331,13 +334,21 @@ export default router => {
`)?.[0]?.id;
if (!tagid) { // create new tag
tagid = (await db`
insert into "tags" ${db({
tag: tagname
})
}
returning id
`)[0].id;
try {
tagid = (await db`
insert into "tags" ${db({
tag: tagname
})
}
returning id
`)[0].id;
} catch (e) {
tagid = (await db`
select id
from "tags"
where normalized = slugify(${tagname})
`)?.[0]?.id;
}
}
if (albumItemId) {
@@ -383,6 +394,7 @@ export default router => {
`;
}
} catch (err) {
console.error('[ADD_TAG_ERROR]', err);
const isDuplicate = err.code === '23505' || err.constraint?.includes('tags_assign');
return res.json({
success: false,
+11 -2
View File
@@ -1939,7 +1939,7 @@ process.on('uncaughtException', err => {
upload_limit: cfg.main.upload_limit ?? 69,
meme_creator: !!cfg.websrv.meme_creator,
custom_favicon: cfg.websrv.custom_favicon || "",
custom_brand_image: Array.isArray(cfg.websrv.custom_brand_image) ? cfg.websrv.custom_brand_image[0] : (cfg.websrv.custom_brand_image || ""),
get custom_brand_image() { return getBrandImageUrl(); },
custom_navbar_brand_text: cfg.websrv.custom_navbar_brand_text || "",
default_font: cfg.websrv.default_font || "",
site_description: cfg.websrv.description || "The webs dumpster",
@@ -1999,7 +1999,16 @@ process.on('uncaughtException', err => {
return JSON.stringify(cfg.websrv.koepfe || []);
}
},
custom_brand_images_json: JSON.stringify(getBrandImageUrl() ? [getBrandImageUrl()] : []),
get custom_brand_images_json() {
const current = getBrandImageUrl();
if (current) {
if (Array.isArray(cfg.websrv.custom_brand_image) && cfg.websrv.custom_brand_image.length > 1 && cfg.websrv.custom_brand_image.includes(current)) {
return JSON.stringify(cfg.websrv.custom_brand_image);
}
return JSON.stringify([current]);
}
return JSON.stringify([]);
},
allowed_comment_images: cfg.websrv.allowed_comment_images || [],
allowed_comment_images_json: JSON.stringify(cfg.websrv.allowed_comment_images || []),
paths_images: cfg.websrv.paths?.images || '/b',