Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Commit

Permalink
Fix missing identifier on newer simulcast titles (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
bytedream committed Jul 12, 2023
1 parent 5133538 commit 9ad2710
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion crunchy-cli-core/src/utils/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,18 @@ impl SingleFormat {
relative_episode_number: Option<u32>,
) -> Self {
Self {
identifier: episode.identifier.clone(),
identifier: if episode.identifier.is_empty() {
// crunchyroll sometimes leafs the identifier field empty so we have to build it
// ourself. it's not 100% save that the identifier which is built here is the same
// as if crunchyroll would deliver it (because the variables used here may also be
// wrong delivered by crunchy), but it's the best thing i can do at the moment
format!(
"{}|S{}|E{}",
episode.series_id, episode.season_number, episode.sequence_number
)
} else {
episode.identifier.clone()
},
title: episode.title.clone(),
description: episode.description.clone(),
audio: episode.audio_locale.clone(),
Expand Down

0 comments on commit 9ad2710

Please sign in to comment.