plugin.video.crunchyroll
plugin.video.crunchyroll copied to clipboard
Go directly to the episodes if an anime only has a single season
Hello.
before anything I want to say that I really love your plugin and I was using it for a while now on my HTPC without a problem.
However, there was a small thing that always bothered me which is when you go to an anime that only has a single season. the plugin will list all the seasons of the show (just 1) then ask you to choose which one you want but really this isn't needed since there is just a single season.
I think if you handle shows with only one season the same way Kodi does (if the show has a one season open it directly without asking) it will make the plugin feel much more fluid.
that's said I didn't want to come here and ask you to improve it without me trying to do it myself first lol. so I downloaded the source and in "controller.py" under the "viewSeries()" function definition I added:
if len(req["data"]) == 1:
setattr(args, "collection_id", req["data"][0]["collection_id"])
viewEpisodes(args)
return True
after the error check which does exactly what I described and it seems to work without a problem. But I'm sure that there are some more stuff that needs to be done for example I didn't know what to do with args._argv (maybe because I was working at 5:00 am) but I think it has something to do with the media type maybe ??.
thank you in advance and best regards
In my tests this code work ok.