-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change how monitored entities are computed (#677)
* ci: attach correct label to image * refactor(backend): change input for media monitor * fix(frontend): adapt to new gql schema * feat(backend): param to force media monitor value * feat(frontend): monitor media if it was added to watchlist * feat(database): migration to monitor media * chore(backend): change query to get monitored metadata * fix(frontend): default value for select input * feat: add basic changes for remix pwa feat: add more pwa config * Revert "feat: add basic changes for remix pwa" This reverts commit b09968e. * fix(frontend): use correct check for rest timer * build(backend): bump version * docs: add additonal plugins * chore(backend): remove useless line * refactor(backend): change order of functions * feat(backend): start monitoring media when show in progress * feat(backend): stop monitoring non shows/podcasts after then are complete
- Loading branch information
Showing
13 changed files
with
141 additions
and
67 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,7 @@ COPY . . | |
RUN ./apps/backend/ci/build-app.sh | ||
|
||
FROM $NODE_BASE_IMAGE | ||
LABEL org.opencontainers.image.source="https://github.com/IgnisDa/ryot" | ||
COPY --from=caddy:2.7.5 /usr/bin/caddy /usr/local/bin/caddy | ||
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates && rm -rf /var/lib/apt/lists/* | ||
RUN npm install --global [email protected] && concurrently --version | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
libs/database/src/migrations/m20240302_monitor_media_in_progress_or_watchlist.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use sea_orm_migration::prelude::*; | ||
|
||
#[derive(DeriveMigrationName)] | ||
pub struct Migration; | ||
|
||
#[async_trait::async_trait] | ||
impl MigrationTrait for Migration { | ||
async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { | ||
let db = manager.get_connection(); | ||
db.execute_unprepared( | ||
r#" | ||
UPDATE user_to_entity | ||
SET media_monitored = true | ||
FROM collection_to_entity cte | ||
JOIN collection c ON cte.collection_id = c.id | ||
WHERE (c.name = 'In Progress' OR c.name = 'Watchlist') | ||
AND (user_to_entity.metadata_id = cte.metadata_id OR user_to_entity.person_id = cte.person_id); | ||
"#, | ||
) | ||
.await?; | ||
Ok(()) | ||
} | ||
|
||
async fn down(&self, _manager: &SchemaManager) -> Result<(), DbErr> { | ||
Ok(()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.