Skip to content

Commit fe647d1

Browse files
authored
Email notification (#678)
* ci: add mailpit configuration * feat(config): add mail related config * feat(backend): allow adding email notifications * feat(frontend): allow adding email as notification * build(backend): add lettre deps * feat(backend): send email notification * chore(config): remove default value * build(backend): bump version * chore(config): change name of config param * fix(backend): no need for different code in development * refactor(frontend): extract to common variable * feat(frontend): add hint to config param * fix(backend): send language for person query * refactor(backend): change name of function * refactor(backend): change order of funcs * chore(config): change default value of config * feat(config,backend): remove useless config param * refactor(frontend): get docs link from backend * feat(backend): config param to disable videos * refactor(frontend): change order of inputs * feat(frontend): switch for new config param * fix(frontend): respect new config param * refactor(frontend): remove duplicated code * chore(frontend): remove useless ignore statements * refactor(frontend): remove usages of biome ignore * feat(migrations): add `watch_providers` field to metadata * refactor(backend): change name of common func * feat(backend): get details for watch providers * feat(backend): save watch providers to database * feat(backend): return watch providers from `mediaDetails` * feat(backend): save all languages for watch providers * fix(backend): do not duplicate langs for watch providers * feat(frontend): display watch providers * chore(backend): add logging to integration webhook * feat(frontend): change layout of link * fix(frontend): change wording * fix(frontend): remove useless wrapper component usage * feat(backend): config param to disable watch providers * feat(frontend): add preference setting for watch provider * feat(frontend): respect watch provider config param
1 parent 5fa024b commit fe647d1

36 files changed

+748
-262
lines changed

.devcontainer/docker-compose.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ services:
3232
POSTGRES_PASSWORD: postgres
3333
POSTGRES_USER: postgres
3434
POSTGRES_DB: postgres
35-
command: postgres -c log_statement=all -c log_destination=stderr -c log_min_messages=debug1 -c log_line_prefix="%m [%p] " -c log_duration=on -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all
35+
36+
mail:
37+
image: axllent/mailpit
38+
ports:
39+
- 8025:8025
40+
environment:
41+
MP_SMTP_AUTH_ACCEPT_ANY: "1"
42+
MP_SMTP_AUTH_ALLOW_INSECURE: "1"
43+
MP_VERBOSE: "1"
3644

3745
volumes:
3846
minio_storage:

Cargo.lock

+149-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/backend/Cargo.toml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ryot"
3-
version = "4.2.14"
3+
version = "4.2.15"
44
edition = "2021"
55
repository = "https://github.com/IgnisDa/ryot"
66
license = "GPL-3.0"
@@ -46,6 +46,11 @@ isolang = { version = "2.4.0", features = ["list_languages"] }
4646
itertools = "0.12.1"
4747
jsonwebtoken = { version = "9.2.0", default-features = false }
4848
kinded = "0.3.0"
49+
lettre = { version = "0.11.4", features = [
50+
"rustls-tls",
51+
"smtp-transport",
52+
"builder",
53+
], default-features = false }
4954
markdown = "1.0.0-alpha.15"
5055
nanoid = "0.4.0"
5156
rand = "0.8.5"

apps/backend/src/entities/metadata.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize};
99
use crate::models::media::{
1010
AnimeSpecifics, AudioBookSpecifics, BookSpecifics, MangaSpecifics, MetadataFreeCreator,
1111
MetadataImage, MetadataVideo, MovieSpecifics, PodcastSpecifics, ShowSpecifics,
12-
VideoGameSpecifics, VisualNovelSpecifics,
12+
VideoGameSpecifics, VisualNovelSpecifics, WatchProvider,
1313
};
1414

1515
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize, Default)]
@@ -29,14 +29,16 @@ pub struct Model {
2929
pub original_language: Option<String>,
3030
pub publish_year: Option<i32>,
3131
pub publish_date: Option<NaiveDate>,
32+
pub production_status: Option<String>,
33+
pub provider_rating: Option<Decimal>,
3234
#[sea_orm(column_type = "Json")]
3335
pub images: Option<Vec<MetadataImage>>,
3436
#[sea_orm(column_type = "Json")]
3537
pub videos: Option<Vec<MetadataVideo>>,
36-
pub production_status: Option<String>,
37-
pub provider_rating: Option<Decimal>,
3838
#[sea_orm(column_type = "Json")]
3939
pub free_creators: Option<Vec<MetadataFreeCreator>>,
40+
#[sea_orm(column_type = "Json")]
41+
pub watch_providers: Option<Vec<WatchProvider>>,
4042
pub audio_book_specifics: Option<AudioBookSpecifics>,
4143
pub book_specifics: Option<BookSpecifics>,
4244
pub movie_specifics: Option<MovieSpecifics>,

0 commit comments

Comments
 (0)