Skip to content

Commit ba5472e

Browse files
committed
update
1 parent 064b71a commit ba5472e

File tree

4 files changed

+28
-30
lines changed

4 files changed

+28
-30
lines changed

soda_resource_tools_lib/src/soda/tmdb.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,9 @@ fn find_tv_by_name_and_year(tvs: &Vec<Value>, title_cn: &str, title_en: &str, fi
337337
pub(crate) fn recognize_mt(mt_infos: &mut HashMap<String, MTInfo>, mt_meta: &mut MTMetadata) -> Result<String, SodaError> {
338338
if mt_meta.is_tv() {
339339
return recognize_mt_tv(mt_infos, mt_meta);
340+
} else if mt_meta.is_movie() {
341+
return recognize_mt_movie(mt_infos, mt_meta);
340342
}
341-
342-
// else if mt_meta.is_movie() {
343-
// return recognize_mt_movie(mt_infos, mt_meta);
344-
// }
345343
return Err(SodaError::Str("not support recognize mt"));
346344
}
347345

soda_resource_tools_lib/tests/integration_1_soda_test.rs

+26-26
Original file line numberDiff line numberDiff line change
@@ -949,40 +949,40 @@ mod soda_tests {
949949
);
950950
}
951951

952-
// #[test]
953-
// fn test_scrape_movie() {
954-
// use soda_resource_tools_lib::soda::{
955-
// self,
956-
// entity::{ResourceType, TransferType},
957-
// };
952+
#[test]
953+
fn test_scrape_movie() {
954+
use soda_resource_tools_lib::soda::{
955+
self,
956+
entity::{ResourceType, TransferType},
957+
};
958958

959-
// init_tracing();
959+
init_tracing();
960960

961-
// default_lib_config();
962-
// let scrape_config = default_scrape_config();
961+
default_lib_config();
962+
let scrape_config = default_scrape_config();
963963

964-
// let test_dir = tests_dir().join("test_scrape_movie");
965-
// clean_dir(&test_dir);
964+
let test_dir = tests_dir().join("test_scrape_movie");
965+
clean_dir(&test_dir);
966966

967-
// create_file(&test_dir.join("Spider-Man.Across.the.Spider-Verse.2023.2160p.MA.WEB-DL.DDP5.1.Atmos.DV.HDR.H.265-FLUX.mkv"));
967+
create_file(&test_dir.join("Spider-Man.Across.the.Spider-Verse.2023.2160p.MA.WEB-DL.DDP5.1.Atmos.DV.HDR.H.265-FLUX.mkv"));
968968

969-
// soda::scrape(
970-
// ResourceType::MT,
971-
// TransferType::Copy,
972-
// scrape_config.clone(),
973-
// test_dir.to_str().unwrap().to_string(),
974-
// test_dir.to_str().unwrap().to_string(),
975-
// );
969+
soda::scrape(
970+
ResourceType::MT,
971+
TransferType::Copy,
972+
scrape_config.clone(),
973+
test_dir.to_str().unwrap().to_string(),
974+
test_dir.to_str().unwrap().to_string(),
975+
);
976976

977-
// let target_file: std::path::PathBuf = test_dir
978-
// .join("Taiwan.Taste")
979-
// .join("Taiwan.Taste.2012.S01.1080p.WEB-DL.H.264.AAC-HHWEB")
980-
// .join("Taiwan.Taste.2012.S01E07.1080p.WEB-DL.H.264.AAC-HHWEB.mkv");
977+
let target_file: std::path::PathBuf = test_dir
978+
.join("Taiwan.Taste")
979+
.join("Taiwan.Taste.2012.S01.1080p.WEB-DL.H.264.AAC-HHWEB")
980+
.join("Taiwan.Taste.2012.S01E07.1080p.WEB-DL.H.264.AAC-HHWEB.mkv");
981981

982-
// assert_eq!(true, target_file.exists());
982+
assert_eq!(true, target_file.exists());
983983

984-
// clean_dir(&test_dir);
985-
// }
984+
clean_dir(&test_dir);
985+
}
986986

987987
fn test_scrape_tv(tag: &str, title: &str, root: &str, season: &str, episode: &str) {
988988
use soda_resource_tools_lib::soda::entity::{ResourceType, TransferType};

soda_resource_tools_lib/tests/test_scrape_movie/Spider-Man.Across.the.Spider-Verse.2023.2160p.MA.WEB-DL.DDP5.1.Atmos.DV.HDR.H.265-FLUX.mkv

Whitespace-only changes.

soda_resource_tools_lib/tests/test_scrape_movie/蜘蛛侠:纵横宇宙.Spider.Man.Across.the.Spider.Verse.2023.2160p.WEB-DL.H.265.DDP.5.1.Atmos/蜘蛛侠:纵横宇宙.Spider.Man.Across.the.Spider.Verse.2023.2160p.WEB-DL.H.265.DDP.5.1.Atmos.mkv

Whitespace-only changes.

0 commit comments

Comments
 (0)