Skip to content

Commit

Permalink
some clean
Browse files Browse the repository at this point in the history
  • Loading branch information
Kosette committed Sep 26, 2024
1 parent fc4fa99 commit c2f200e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
with:
name: danmaku-${{ matrix.arch }}
path: target/release/${{ matrix.artifact }}
retention_days: 3
retention-days: 3
if-no-files-found: error

- name: Get latest tag name
Expand Down
12 changes: 6 additions & 6 deletions src/emby.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub(crate) async fn get_episode_info(video_url: &str) -> Result<EpInfo> {
api_key,
} = match extract_params(video_url) {
Ok(p) => p,
Err(e) => return Err(anyhow!(format!("Error: {}", e))),
Err(e) => return Err(anyhow!("Error: {}", e)),
};

let url = format!("{}/emby/Items?Ids={}&reqformat=json", host, item_id);
Expand Down Expand Up @@ -197,7 +197,7 @@ pub(crate) async fn get_series_info(video_url: &str, series_id: &str) -> Result<

let P3 { host, api_key, .. } = match extract_params(video_url) {
Ok(p) => p,
Err(e) => return Err(anyhow!(format!("Error: {}", e))),
Err(e) => return Err(anyhow!("Error: {}", e)),
};

let seasons_url = format!("{}/emby/Shows/{}/Seasons?reqformat=json", host, series_id);
Expand All @@ -209,10 +209,10 @@ pub(crate) async fn get_series_info(video_url: &str, series_id: &str) -> Result<
.await?;

if !res.status().is_success() {
return Err(anyhow!(format!(
return Err(anyhow!(
"fetch seasons info error, status: {}",
res.status()
)));
));
}

let seasons = res.json::<Seasons>().await?;
Expand All @@ -234,10 +234,10 @@ pub(crate) async fn get_series_info(video_url: &str, series_id: &str) -> Result<
.await?;

if !res.status().is_success() {
return Err(anyhow!(format!(
return Err(anyhow!(
"fetch episodes info error, status: {}",
res.status()
)));
));
}

let episodes = res.json::<Episodes>().await?;
Expand Down

0 comments on commit c2f200e

Please sign in to comment.