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

add season_sequence_number to a episode output #430

Open
SatoshiMiamoto opened this issue May 24, 2024 · 11 comments
Open

add season_sequence_number to a episode output #430

SatoshiMiamoto opened this issue May 24, 2024 · 11 comments
Labels
enhancement New feature or request

Comments

@SatoshiMiamoto
Copy link

When I download anime episodes, some series have very incorrect numbering. Looking at the episode requests on the site

https://www.crunchyroll.com/content/v2/cms/seasons/GY3VWX3MR/episodes

I noticed that there is a property called season_sequence_number that would solve this problem. Is it possible to implement this in the episode outputs?

thanks
image

@SatoshiMiamoto SatoshiMiamoto added the enhancement New feature or request label May 24, 2024
@bytedream
Copy link
Member

This isn't possible, sadly season_sequence_number does not like you'd expect it, it has nothing to do with the actual season number.

E.g. season 2 of Ancient Magus Bride:
image

@SatoshiMiamoto
Copy link
Author

Is there a way to catch the season? in the case of Demon Slayer gets too discrepant from reality. Season 1 turns into 53

@bytedream
Copy link
Member

From which country did you do the request? I want to look a bit further into the api response for Demon Slayer, but I get no data when using the url you provided; probably caused by geo-locking

@SatoshiMiamoto
Copy link
Author

From brazil pt-BR i get the url from the webiste

@Elwador
Copy link

Elwador commented May 26, 2024

i started using the identifier to get the season numbers - at least for now i haven't had any issues with that

@SatoshiMiamoto
Copy link
Author

i started using the identifier to get the season numbers - at least for now i haven't had any issues with that

the season_number identifier?

@Elwador
Copy link

Elwador commented May 26, 2024

Every season has an identifier. For example, for the Demon Slayer seasons:

  • GY5P48XEY|S1
  • GY5P48XEY|S2C1
  • GY5P48XEY|S2C2
  • GY5P48XEY|S3
  • GY5P48XEY|S4

This way, it is relatively easy to get season numbers that are not strange, like 53, even though there are only 5 seasons. It also helps with the One Piece season numbers since I had a lot of duplicates there as well. I have had no problems using this method to get the season numbers, at least for now. Still need to test it more, but I haven't received any complaints that it doesn't work.

@bytedream
Copy link
Member

Oh yea I totally forgot about this. When the --experimental-fixes flag is set, the season number from the identifier is used, at least if it can be parsed to a number. Unfortunately the last time when I touched it was 1+ year ago, so it does not work when the identifier is e.g. S2C1, M2 (so basically it can only parse if the season in the identifier is S<number>)

@Elwador
Copy link

Elwador commented May 26, 2024

Yeah, I think M is for movies, and then there is also OVA for some. Maybe there are even more variants; who knows, it is Crunchyroll 😅

@SatoshiMiamoto
Copy link
Author

I went to run a test without the flag and it returned correctly; for some reason, it seems they fixed the references internally. Via CLI it is now correct, but looking at the request directly from the site, it's still showing the value 53. I'm not exactly sure what happened, but I will start using the flag --experimental-fixes.

image
image

@SatoshiMiamoto
Copy link
Author

I discovered the problem, but I don't know the cause. When I use the flag --audio ja-JP in the search, it returns the values with the incorrect season.

./crunchy-cli search --output "{{series.title}} {{season.number}} {{episode.number}} {{episode.sequence_number}} {{episode.id}} {{episode.title}}" https://www.crunchyroll.com/series/GY5P48XEY/demon-slayer-kimetsu-no-yaiba --audio ja-JP

image

However, when I don't specify the audio flag, it shows the seasons correctly.

 ./crunchy-cli search  --output "{{series.title}} {{season.number}} {{episode.number}} {{episode.sequence_number}} {{episode.id}} {{episode
.title}}"  https://www.crunchyroll.com/series/GY5P48XEY/demon-slayer-kimetsu-no-yaiba

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants