Closed jamtat closed 6 years ago
Something like this added to the pages function would probably work as a nice fallback:
var season = $('.list-of-seasons').children().length - $(el).closest('.season').index()
The problem is it will not work everywhere, I've long time ago played with that and CR pages are not that consistent. It fix for some, and not for others, or make it worse on some.
This is mainly a problem on CR side more than Crunchy unfortunately. That's why Crunchy try to download a file even if the filename already exist by appending a "-1" in the end of the filename, that was the safest way to make sure that if we haven't already downloaded a specific URL it will be.
I will look at your path to see if it is more consistant than it was month ago, but as I'm planning to retrive metadata in a (probably) better way than parsing a webpage, I don't know it if is really worth to spend too much time there.
I will still have a look, but yes I agree there are room for improvment here, but it is mainly CR fault at first to not properly tag seasons
@Godzil Can you give me a few examples of the troublesome ones, i might have something.. ;)
Using the crunchyroll api it seems that the season numbers make more sense (sometimes they start at 0/1 but atleast its clear)
get session id
http://api.crunchyroll.com/start_session.0.json?device_id=hacks&device_type=com.crunchyroll.winphone&access_token=z6J2faQjApno1A1
anime list
http://api.crunchyroll.com/list_series.0.json?session_id=%SESSIONID%&media_type=anime
magius bride = 271271 series_id
http://api.crunchyroll.com/list_media.0.json?session_id=%SESSIONID%&media_type=anime&series_id=271271
collection ids - magius
season 1 = 22975
season 2 = 23787
My Teen Romantic Comedy SNAFU
series id = 253981
http://api.crunchyroll.com/list_media.0.json?session_id=%SESSIONID%&series_id=253981
collection ids
season 1 = 21023
season 2 = 22205
http://api.crunchyroll.com/info.0.json?session_id=%SESSIONID%&collection_id=21023
http://api.crunchyroll.com/info.0.json?session_id=%SESSIONID%&collection_id=22205
Been working on my own tool and have got the season tagging working nicely soo far. Will be on my git in the next few days~
@jamtat Can you try my downloader with this season?, its geolocked and i don't have access to it atm https://github.com/clienthax/Crunched
I've used the linked too and it seems to be working fine. The only issue I see is that the videos downloaded don't have the series title added similar to the picture above, nor the episode name.
Subs are automatically downloaded and muxed into the final video which is really good.
The video downloaded is max quality which is also a good thing.
An entire season is downloaded from one command line, so no more downloading one by one which is the best feature.
An error popped up during initial run SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
Another issue I noticed is if there is an odd numbered episode lets say 12.5 it will name is 13 instead.
Tested on US account.
@Vigilence Ive uploaded a new release, Can you open an issue on my github for the naming thing as im not able to reproduce it atm :)
@clienthax Sure, I'll take a look tonight.
@clienthax The issue seems to have been resolved with the newest release as well as that error that popped up during the first run.
Running
crunchy http://www.crunchyroll.com/my-teen-romantic-comedy-snafu -v 1
doesn't correctly download season 2.Adding a debug line to series.js to log the produced page gives this:
From what I can tell in the
page
function it attempts to parse a number out of the 'season' header on the page. If it can't find one it just defaults to setting the volume as 1. In an ideal world this should probably fall back to computing the season number based on the number of seasons and the season header's relative ordering in the list of seasons.