Add relative_sequence_number format option (#206, #241, #246)

This commit is contained in:
bytedream 2023-10-15 20:49:03 +02:00
parent 13335c020b
commit 81385ef6ce
5 changed files with 122 additions and 83 deletions

View file

@ -35,17 +35,19 @@ pub struct Download {
#[arg(help = "Name of the output file")]
#[arg(long_help = "Name of the output file.\
If you use one of the following pattern they will get replaced:\n \
{title} Title of the video\n \
{series_name} Name of the series\n \
{season_name} Name of the season\n \
{audio} Audio language of the video\n \
{resolution} Resolution of the video\n \
{season_number} Number of the season\n \
{episode_number} Number of the episode\n \
{relative_episode_number} Number of the episode relative to its season\n \
{series_id} ID of the series\n \
{season_id} ID of the season\n \
{episode_id} ID of the episode")]
{title} Title of the video\n \
{series_name} Name of the series\n \
{season_name} Name of the season\n \
{audio} Audio language of the video\n \
{resolution} Resolution of the video\n \
{season_number} Number of the season\n \
{episode_number} Number of the episode\n \
{relative_episode_number} Number of the episode relative to its season\n \
{sequence_number} Like '{episode_number}' but without possible non-number characters\n \
{relative_sequence_number} Like '{relative_episode_number}' but with support for episode 0's and .5's\n \
{series_id} ID of the series\n \
{season_id} ID of the season\n \
{episode_id} ID of the episode")]
#[arg(short, long, default_value = "{title}.mp4")]
pub(crate) output: String,