nanozuki / dantalian

A nfo file generator for your anime. Source from Bangumi.
GNU General Public License v3.0
86 stars 7 forks source link

Feature request: episode_offset #56

Closed Mythologyli closed 1 year ago

Mythologyli commented 1 year ago

For some animations, the ep in Bangumi is different from the ep in file name.

Example: Bangumi: ep 25, https://bangumi.tv/ep/1227512 File name: Jujutsu.Kaisen.S02E01.2023.1080p.CR.WEB-DL.x264.AAC-ADWeb.mkv

We can fix this by adding an episode_offset in config.

laxect commented 1 year ago

I think a transform option with basic math support is better? Not sure if the offset is enough.

laxect commented 1 year ago

Something like ep-transform = "./trans.sh"

Mythologyli commented 1 year ago

I think a transform option with basic math support is better? Not sure if the offset is enough.

I agree. In addition, for some complex situations, is it better to have a map from file name to ep?

laxect commented 1 year ago

@nanozuki what's your opinion?

nanozuki commented 1 year ago

The current version of "dantalina", can't deal with a filename like "File name: Jujutsu.Kaisen.S02E01.2023.1080p.CR.WEB-DL.x264.AAC-ADWeb.mkv". Adding an episode offset is not enough. Do you use other configs for the scene?

In the current version, suggestion usage is to rename the file to: 呪術廻戦 第2期 25.mkv or 咒术回战 第二季 25.mkv. This may not be a good way to use it. You are welcome to give me more suggestions.

nanozuki commented 1 year ago

Something like ep-transform = "./trans.sh"

This would result in users being able to perform anything with dantalian, which I'm not sure is reasonable. Is it possible to continue the name template functionality that was previously planned.

Mythologyli commented 1 year ago

The current version of "dantalina", can't deal with a filename like "File name: Jujutsu.Kaisen.S02E01.2023.1080p.CR.WEB-DL.x264.AAC-ADWeb.mkv". Adding an episode offset is not enough. Do you use other configs for the scene?

In the current version, suggestion usage is to rename the file to: 呪術廻戦 第2期 25.mkv or 咒术回战 第二季 25.mkv. This may not be a good way to use it. You are welcome to give me more suggestions.

I have created my own fork here with a simple offset function. My config is:

subject_id = 369304
episode_re = ".*S02E(?P<ep>\\d\\d).*.mkv$"
ep_bias = 24

Changing the file name is not a good choice for me because I need to seed at the same time.

nanozuki commented 1 year ago

Awesome! Can you give me a PR? And I think the name "episode_offset" is better.

Mythologyli commented 1 year ago

I'd love to help, but I know almost nothing about Rust. I think it would be better if you implemented this. Thanks again for this awesome tool!

nanozuki commented 1 year ago

That's also nice! Please wait for me for several hours.

nanozuki commented 1 year ago

solved by #57 , version 0.4.4