Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for only monitoring sessions for specific users #52

Merged
merged 2 commits into from
Oct 20, 2024

Conversation

aksiksi
Copy link
Contributor

@aksiksi aksiksi commented Oct 12, 2024

The idea is users can pass in a comma-separated list of user IDs (static/auto-generated) and user names. We then check against the list before processing a NowPlaying item. If both the user ID and user name do not match any in the list, we skip processing the entry.

Tested:

[nix-shell:~/repos/prefetcharr]$ cargo test
   Compiling prefetcharr v0.7.4 (/home/aksiksi/repos/prefetcharr)
    Finished test [unoptimized + debuginfo] target(s) in 5.35s
     Running unittests src/main.rs (target/debug/deps/prefetcharr-fa9a8069da698fc5)

running 28 tests
test media_server::embyfin::test::bad_url ... ok
test once::test::different_season ... ok
test once::test::different_series ... ok
test once::test::prune_old ... ok
test media_server::embyfin::test::single_session ... ok
test once::test::twice ... ok
test media_server::plex::test::single_session ... ok
test media_server::plex::test::skip_invalid_sessions ... ok
test media_server::plex::test::name_fallback ... ok
test media_server::embyfin::test::skip_invalid_sessions ... ok
test media_server::embyfin::test::jellyfin_auth ... ok
test media_server::embyfin::test::name_fallback_emby ... ok
test sonarr::test::auth ... ok
test media_server::embyfin::test::emby_auth ... ok
test sonarr::test::put_series ... ok
test sonarr::test::series_emtpy ... ok
test sonarr::test::search_season ... ok
test sonarr::test::series_multiple ... ok
test sonarr::test::series_parse_missing_statistics ... ok
test sonarr::test::series_skip_malformed_series ... ok
test sonarr::test::series_v3 ... ok
test once::test::touch ... ok
test media_server::embyfin::test::interval ... ok
test process::test::monitor ... ok
test process::test::pilot ... ok
test process::test::search_next_filter_users ... ok
test process::test::search_next ... ok
test process::test::search_next_skips_unwanted_users ... ok

test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.53s

@p-hueber
Copy link
Owner

Thanks for the contribution! I won't be able to check it for a few days, but I'll get back to you.

@aksiksi aksiksi force-pushed the latest branch 2 times, most recently from f4a10cb to ce390b7 Compare October 13, 2024 17:25
@p-hueber p-hueber changed the base branch from latest to main October 20, 2024 10:22
@p-hueber
Copy link
Owner

@aksiksi looks good to me, thanks!

@p-hueber p-hueber merged commit 9369446 into p-hueber:main Oct 20, 2024
@p-hueber p-hueber mentioned this pull request Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants