Open SatoshiMiamoto opened 6 months ago
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:
Is there a way to catch the season? in the case of Demon Slayer gets too discrepant from reality. Season 1 turns into 53
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
From brazil pt-BR i get the url from the webiste
i started using the identifier to get the season numbers - at least for now i haven't had any issues with that
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?
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.
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>
)
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 😅
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.
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
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
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