Closed shinji257 closed 7 years ago
Added a commit to correct guest logins failing. At least on my end "logging in" as guest gave a 200 response code so the check was updated to include that specifically for guest logins. 302 is still the expected response code for any other login. If you get a 200 when trying to login to an actual account it will still fail the way it is supposed to.
Tested by logging into a couple of accounts with varied subscription status and by downloading an episode while logged in as guest. In particular this one: http://www.crunchyroll.com/galaxy-express-999/episode-26-the-skeletons-song-512670 referenced on https://github.com/jaw20/Crunchyroll-XML-Decoder/issues/12
Oops. Somehow a certain edit didn't make it into the last commit but that's fixed. Pushed a new commit then squashed them so there is only one now.
Move the Premium+ check to outside the Premium check (regex is looking for exact match).
This fix was tested against a Free Member, Premium (free trial), Premium+ (30 day pass), and Premium+ (48 hour guest pass) account and should be safe to commit if you want to do so.
The old patch would of broken Premium detection since it didn't look at the right place for it. Well it would of at least for trials since that one drops "freetrial" in dimension5. I still need to see a subscribed Premium to know for sure later on but this should be safe no matter what.
EDIT: Paid Premium as "premium" on dimension5. This is consistent with my theory however the current method works fine. If we want a more sure fire method then there is another insert later on that flags premium and premium+ directly.