mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
fix(notif): include year in Media Available notifications (#1672)
This commit is contained in:
@@ -31,7 +31,9 @@ export class MediaSubscriber implements EntitySubscriberInterface {
|
|||||||
relatedRequests.forEach((request) => {
|
relatedRequests.forEach((request) => {
|
||||||
notificationManager.sendNotification(Notification.MEDIA_AVAILABLE, {
|
notificationManager.sendNotification(Notification.MEDIA_AVAILABLE, {
|
||||||
notifyUser: request.requestedBy,
|
notifyUser: request.requestedBy,
|
||||||
subject: movie.title,
|
subject: `${movie.title}${
|
||||||
|
movie.release_date ? ` (${movie.release_date.slice(0, 4)})` : ''
|
||||||
|
}`,
|
||||||
message: movie.overview,
|
message: movie.overview,
|
||||||
media: entity,
|
media: entity,
|
||||||
image: `https://image.tmdb.org/t/p/w600_and_h900_bestv2${movie.poster_path}`,
|
image: `https://image.tmdb.org/t/p/w600_and_h900_bestv2${movie.poster_path}`,
|
||||||
@@ -84,7 +86,9 @@ export class MediaSubscriber implements EntitySubscriberInterface {
|
|||||||
);
|
);
|
||||||
const tv = await tmdb.getTvShow({ tvId: entity.tmdbId });
|
const tv = await tmdb.getTvShow({ tvId: entity.tmdbId });
|
||||||
notificationManager.sendNotification(Notification.MEDIA_AVAILABLE, {
|
notificationManager.sendNotification(Notification.MEDIA_AVAILABLE, {
|
||||||
subject: tv.name,
|
subject: `${tv.name}${
|
||||||
|
tv.first_air_date ? ` (${tv.first_air_date.slice(0, 4)})` : ''
|
||||||
|
}`,
|
||||||
message: tv.overview,
|
message: tv.overview,
|
||||||
notifyUser: request.requestedBy,
|
notifyUser: request.requestedBy,
|
||||||
image: `https://image.tmdb.org/t/p/w600_and_h900_bestv2${tv.poster_path}`,
|
image: `https://image.tmdb.org/t/p/w600_and_h900_bestv2${tv.poster_path}`,
|
||||||
|
Reference in New Issue
Block a user