Allow {genres} and {styles} for sharing album on fediverse
This commit is contained in:
parent
68414e3e71
commit
5b2758afca
5 changed files with 10 additions and 2 deletions
|
@ -40,6 +40,8 @@ if (typeof item !== "undefined") {
|
||||||
this.shareMessageTransformed = message
|
this.shareMessageTransformed = message
|
||||||
.replaceAll("{artist}", this.item.artists[0].name)
|
.replaceAll("{artist}", this.item.artists[0].name)
|
||||||
.replaceAll("{format}", this.item.formats[0].name)
|
.replaceAll("{format}", this.item.formats[0].name)
|
||||||
|
.replaceAll("{genres}", this.item.genres.join())
|
||||||
|
.replaceAll("{styles}", this.item.styles.join())
|
||||||
.replaceAll("{year}", this.item.year)
|
.replaceAll("{year}", this.item.year)
|
||||||
.replaceAll("{video}", video)
|
.replaceAll("{video}", video)
|
||||||
.replaceAll("{album}", this.item.title);
|
.replaceAll("{album}", this.item.title);
|
||||||
|
|
|
@ -9,7 +9,7 @@ import MongoStore from "connect-mongo";
|
||||||
|
|
||||||
import passportConfig from "./libs/passport";
|
import passportConfig from "./libs/passport";
|
||||||
|
|
||||||
import config, { env, mongoDbUri, secret } from "./config";
|
import config, { env, mongoDbUri, port, secret } from "./config";
|
||||||
|
|
||||||
import { isXhr } from "./helpers";
|
import { isXhr } from "./helpers";
|
||||||
|
|
||||||
|
@ -150,6 +150,6 @@ app.use((error, req, res, next) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("Server ready!");
|
console.log(`Server listening on port ${port}!`);
|
||||||
|
|
||||||
export default app;
|
export default app;
|
||||||
|
|
|
@ -83,6 +83,8 @@ class Albums extends Pages {
|
||||||
)
|
)
|
||||||
.replaceAll("{artist}", data.artists[0].name)
|
.replaceAll("{artist}", data.artists[0].name)
|
||||||
.replaceAll("{format}", data.formats[0].name)
|
.replaceAll("{format}", data.formats[0].name)
|
||||||
|
.replaceAll("{genres}", data.genres.join())
|
||||||
|
.replaceAll("{styles}", data.styles.join())
|
||||||
.replaceAll("{year}", data.year)
|
.replaceAll("{year}", data.year)
|
||||||
.replaceAll("{video}", video)
|
.replaceAll("{video}", video)
|
||||||
.replaceAll("{album}", data.title)}
|
.replaceAll("{album}", data.title)}
|
||||||
|
|
|
@ -118,6 +118,8 @@
|
||||||
<li>{format}, exemple : Cassette</li>
|
<li>{format}, exemple : Cassette</li>
|
||||||
<li>{year}, exemple: 1984</li>
|
<li>{year}, exemple: 1984</li>
|
||||||
<li>{video}, exemple : https://www.youtube.com/watch?v=Qx0s8OqgBIw</li>
|
<li>{video}, exemple : https://www.youtube.com/watch?v=Qx0s8OqgBIw</li>
|
||||||
|
<li>{genres}, exemple : Rock</li>
|
||||||
|
<li>{styles}, exemple : Hard Rock, Heavy Metal</li>
|
||||||
</ul>
|
</ul>
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -79,6 +79,8 @@
|
||||||
<li>{format}, exemple : Cassette</li>
|
<li>{format}, exemple : Cassette</li>
|
||||||
<li>{year}, exemple: 1984</li>
|
<li>{year}, exemple: 1984</li>
|
||||||
<li>{video}, exemple : https://www.youtube.com/watch?v=Qx0s8OqgBIw</li>
|
<li>{video}, exemple : https://www.youtube.com/watch?v=Qx0s8OqgBIw</li>
|
||||||
|
<li>{genres}, exemple : Rock</li>
|
||||||
|
<li>{styles}, exemple : Hard Rock, Heavy Metal</li>
|
||||||
</ul>
|
</ul>
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue