Set # for share on fediverse

This commit is contained in:
Damien Broqua 2024-08-05 17:54:11 +02:00
parent 948ccf9419
commit e3f47a7bf7
7 changed files with 34 additions and 8 deletions

View file

@ -13,6 +13,7 @@ import UsersModel from "../models/users";
import ErrorEvent from "../libs/error";
import { getAlbumDetails, getAllDistincts } from "../helpers";
import { setHashTags } from "../libs/format";
/**
* Classe permettant la gestion des albums d'un utilisateur
@ -86,8 +87,9 @@ class Albums extends Pages {
)
.replaceAll("{artist}", data.artists[0].name)
.replaceAll("{format}", data.formats[0].name)
.replaceAll("{genres}", data.genres.join())
.replaceAll("{styles}", data.styles.join())
.replaceAll("{#genres}", setHashTags(data.genres))
.replaceAll("{styles}", data.styles.join(", "))
.replaceAll("{#styles}", setHashTags(data.styles))
.replaceAll("{year}", data.year)
.replaceAll("{video}", video)
.replaceAll("{album}", data.title)}

View file

@ -123,8 +123,8 @@ class Export {
ws.cell(currentRow, 1).string(artists_sort).style(style);
ws.cell(currentRow, 2).string(title).style(style);
ws.cell(currentRow, 3).string(genres.join()).style(style);
ws.cell(currentRow, 4).string(styles.join()).style(style);
ws.cell(currentRow, 3).string(genres.join(", ")).style(style);
ws.cell(currentRow, 4).string(styles.join(", ")).style(style);
if (country) {
ws.cell(currentRow, 5).string(country).style(style);
}

View file

@ -13,6 +13,7 @@ import UsersModel from "../models/users";
import ErrorEvent from "../libs/error";
import { getAlbumDetails, getAllDistincts } from "../helpers";
import { setHashTags } from "../libs/format";
/**
* Classe permettant la gestion da la liste de souhaits d'un utilisateur
@ -86,8 +87,10 @@ class Wantlist extends Pages {
)
.replaceAll("{artist}", data.artists[0].name)
.replaceAll("{format}", data.formats[0].name)
.replaceAll("{genres}", data.genres.join())
.replaceAll("{styles}", data.styles.join())
.replaceAll("{genres}", data.genres.join(", "))
.replaceAll("{#genres}", setHashTags(data.genres))
.replaceAll("{styles}", data.styles.join(", "))
.replaceAll("{#styles}", setHashTags(data.styles))
.replaceAll("{year}", data.year)
.replaceAll("{video}", video)
.replaceAll("{album}", data.title)}