mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
commit
86759557fe
3 changed files with 44 additions and 23 deletions
|
|
@ -63,7 +63,9 @@ pub struct Archive {
|
|||
{season_name} → Name of the season\n \
|
||||
{audio} → Audio language of the video\n \
|
||||
{resolution} → Resolution of the video\n \
|
||||
{padded_season_number} → Number of the season padded to double digits\n \
|
||||
{season_number} → Number of the season\n \
|
||||
{padded_episode_number} → Number of the episode padded to double digits\n \
|
||||
{episode_number} → Number of the episode\n \
|
||||
{series_id} → ID of the series\n \
|
||||
{season_id} → ID of the season\n \
|
||||
|
|
|
|||
|
|
@ -41,7 +41,9 @@ pub struct Download {
|
|||
{season_name} → Name of the season\n \
|
||||
{audio} → Audio language of the video\n \
|
||||
{resolution} → Resolution of the video\n \
|
||||
{padded_season_number} → Number of the season padded to double digits\n \
|
||||
{season_number} → Number of the season\n \
|
||||
{padded_episode_number} → Number of the episode padded to double digits\n \
|
||||
{episode_number} → Number of the episode\n \
|
||||
{series_id} → ID of the series\n \
|
||||
{season_id} → ID of the season\n \
|
||||
|
|
|
|||
|
|
@ -77,9 +77,26 @@ pub fn format_string(s: String, format: &Format, sanitize: bool) -> String {
|
|||
.replace("{series_name}", &sanitize_func(&format.series_name))
|
||||
.replace("{season_name}", &sanitize_func(&format.season_title))
|
||||
.replace("{audio}", &sanitize_func(&format.audio.to_string()))
|
||||
.replace("{resolution}", &sanitize_func(&format.stream.resolution.to_string()))
|
||||
.replace("{season_number}", &sanitize_func(&format.season_number.to_string()))
|
||||
.replace("{episode_number}", &sanitize_func(&format.number.to_string()))
|
||||
.replace(
|
||||
"{resolution}",
|
||||
&sanitize_func(&format.stream.resolution.to_string()),
|
||||
)
|
||||
.replace(
|
||||
"{padded_season_number}",
|
||||
&sanitize_func(&format!("{:0>2}", format.season_number.to_string())),
|
||||
)
|
||||
.replace(
|
||||
"{season_number}",
|
||||
&sanitize_func(&format.season_number.to_string()),
|
||||
)
|
||||
.replace(
|
||||
"{padded_episode_number}",
|
||||
&sanitize_func(&format!("{:0>2}", format.number.to_string())),
|
||||
)
|
||||
.replace(
|
||||
"{episode_number}",
|
||||
&sanitize_func(&format.number.to_string()),
|
||||
)
|
||||
.replace("{series_id}", &sanitize_func(&format.series_id))
|
||||
.replace("{season_id}", &sanitize_func(&format.season_id))
|
||||
.replace("{episode_id}", &sanitize_func(&format.id))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue