refactor: delegate Miruro playback resolution to Terebi
This commit is contained in:
+13
-2
@@ -534,8 +534,19 @@ mod subprocesses {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn player_launch_rejects_unsafe_video_ids_before_spawning() {
|
||||
for id in ["", "--help", "jNQXAC9IVRw&list=other", "日本語"] {
|
||||
fn player_launch_rejects_invalid_provider_ids_before_registration_or_spawning() {
|
||||
for id in [
|
||||
"",
|
||||
"--help",
|
||||
"jNQXAC9IVRw&list=other",
|
||||
"日本語",
|
||||
"miruro:opaque_Show-1:0",
|
||||
"miruro:opaque_Show-1:01",
|
||||
"miruro:opaque_Show-1:2147483648",
|
||||
"miruro:../other:1",
|
||||
"miruro:opaque_Show-1:1&ep=2",
|
||||
"miruro-series:opaque_Show-1",
|
||||
] {
|
||||
assert!(matches!(
|
||||
PlayerLaunch::start(id, OsStr::new("terebi"), Path::new("progress.jsonl")),
|
||||
Err(error) if error.kind() == io::ErrorKind::InvalidInput
|
||||
|
||||
Reference in New Issue
Block a user