smirgol / plugin.video.crunchyroll

Watch videos from the anime platform Crunchyroll.com on Kodi
GNU Affero General Public License v3.0
46 stars 11 forks source link

alpha add-on installs and logs in, but upon selecting the "queue" list it crashes #1

Closed the-cucco closed 7 months ago

the-cucco commented 7 months ago

Log is below. I'm on matrix kodi via OSMC on a RPi 3B+. I installed by downloading the repository as a .zip and adding it via the "install from zip file" option.

023-12-18 14:12:02.231 T:852     error <general>: GetDirectory - Error getting plugin://plugin.video.crunchyroll-smirgol/?mode=queue&title=Queue
2023-12-18 14:12:02.244 T:428     error <general>: CGUIMediaWindow::GetDirectory(plugin://plugin.video.crunchyroll-smirgol/?mode=queue&title=Queue) failed
2023-12-18 14:12:02.874 T:428      info <general>: Loading skin file: DialogTextViewer.xml, load type: KEEP_IN_MEMORY
2023-12-18 14:12:03.072 T:428     error <general>: Control 61 in window 10147 has been asked to focus, but it can't
2023-12-18 14:12:13.941 T:428     error <general>: Control 61 in window 10147 has been asked to focus, but it can't
2023-12-18 14:12:17.669 T:428      info <general>: Loading skin file: MyVideoNav.xml, load type: KEEP_IN_MEMORY
2023-12-18 14:12:17.957 T:847     error <general>: GetDirectory - Error getting -
2023-12-18 14:12:21.811 T:862     error <general>: [PLUGIN] Crunchyroll: CrunchyrollError : <class 'Exception'>
2023-12-18 14:12:21.811 T:862     error <general>: [PLUGIN] Crunchyroll: LoginError : <class 'resources.lib.model.CrunchyrollError'>
2023-12-18 14:12:23.241 T:862   warning <general>: Setting most video properties through ListItem.setInfo() is deprecated and might be removed in future Kodi versions. Please use the respective setter in InfoTagVideo.
2023-12-18 14:12:23.430 T:862     error <general>: Skipped 37 duplicate messages..
2023-12-18 14:12:23.430 T:862     error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'KeyError'>
                                                   Error Contents: 'episode_metadata'
                                                   Traceback (most recent call last):
                                                     File "/home/osmc/.kodi/addons/plugin.video.crunchyroll-smirgol/default.py", line 33, in <module>
                                                       crunchyroll.main(sys.argv)
                                                     File "/home/osmc/.kodi/addons/plugin.video.crunchyroll-smirgol/resources/lib/crunchyroll.py", line 108, in main
                                                       check_mode(args, api)
                                                     File "/home/osmc/.kodi/addons/plugin.video.crunchyroll-smirgol/resources/lib/crunchyroll.py", line 139, in check_mode
                                                       controller.showQueue(args, api)
                                                     File "/home/osmc/.kodi/addons/plugin.video.crunchyroll-smirgol/resources/lib/controller.py", line 72, in showQueue
                                                       meta = item["panel"]["episode_metadata"]
                                                   KeyError: 'episode_metadata'
                                                   -->End of Python script error report<--`
smirgol commented 7 months ago

interesting. Yes, you could download it as a zip and install that as well. So, since it added the addon, this seems to have worked. I assume that you have configured it and entered your login data to the addon.

Do you have anything in your watchlist, that is not an anime series? Like a drama or something like these, uhm how did they call it, "real life anime", which they had in the past?

smirgol commented 7 months ago

I've added some dumping of the api data to the watchlist. If you re-install the addon, it will now show more data in the logs, that help me to find out what kind of data you receive and why you get that error.

Note that when you re-install the addon, it will replace/update the old original Crunchyroll addon by MrKrabat. Please then check the settings and replace your username with your crunchyroll email address, if required. You then can delete my "Crunchyroll 2" addon.

mlidbom commented 7 months ago

Just now, before adding this comment, I also downloaded the repository as zip and installed. For me the queue works. As does playback. With that everything that I really use is back to working and I am not forced to use the website(which I really dislike) for watching shows in my queue.

@the-cucco Since both versions now have the same name, I felt it safest to uninstall the old version first. This could potentially be relevant to why it works for me. Perhaps you might try that and then installing the latest version of the repo as a zip?

@smirgol A huge thank you for getting this back up so fast :) Kudos!

smirgol commented 7 months ago

Thank you for the kind words. :) I also really needed to get this working again, I'm missing my daily fix of anime and my backlog isn't shrinking with me being unable to watch. :-D

the-cucco did download the version before I've renamed my dev addon back to the original name, so it's some kind of issue with one or more items in his watchlist. Not sure yet why, but a fresh log with the dump of the api data that I've added temporarily will help. Installing now from the zip will just update the existing one, it should not be necessary to uninstall the old version, but it doesn't hurt either. :)

the-cucco commented 7 months ago

I did indeed have 1 drama in my watchlist! I still got an error, but here's what I did:

If this is all I ever get It'll be enough for me. It's HARD to get crunchyroll to run on a CRT without connecting a PC with a transcoder and special drivers. Thank you so much for working on this it really means a lot.

-- The log, attached because it's LONG and I want to save folks from having to scroll past it in the future. kodi.log

smirgol commented 7 months ago

@the-cucco Thank you, that was very helpful. It indeed was the movie entry. It should be fixed now, just try to install it and it should update - don't think you need to de-install first.

I leave this issue open for now, in case there are more issues, who knows? :)

the-cucco commented 7 months ago

Unfortunately I still get an error when trying to open "queue," though much less in the log this time (below). Installed it over the old version first, then did a clean install and got the same result. No worries if you don't get to this. like I said, I'm just happy i can get playback through the search function. I thought It was the end of the road for CRT anime.

2023-12-18 20:19:41.904 T:613     error <general>: [PLUGIN] Crunchyroll: CrunchyrollError : <class 'Exception'>
2023-12-18 20:19:41.905 T:613     error <general>: [PLUGIN] Crunchyroll: LoginError : <class 'resources.lib.model.CrunchyrollError'>
2023-12-18 20:19:43.334 T:613   warning <general>: Setting most video properties through ListItem.setInfo() is deprecated and might be removed in future Kodi versions. Please use the respective setter in InfoTagVideo.
2023-12-18 20:19:48.230 T:649     error <general>: Skipped 1 duplicate messages..
2023-12-18 20:19:48.230 T:649     error <general>: [PLUGIN] Crunchyroll: CrunchyrollError : <class 'Exception'>
2023-12-18 20:19:48.230 T:649     error <general>: [PLUGIN] Crunchyroll: LoginError : <class 'resources.lib.model.CrunchyrollError'>
2023-12-18 20:19:49.745 T:649   warning <general>: Setting most video properties through ListItem.setInfo() is deprecated and might be removed in future Kodi versions. Please use the respective setter in InfoTagVideo.
2023-12-18 20:19:49.960 T:649     error <general>: Skipped 29 duplicate messages..
2023-12-18 20:19:49.960 T:649     error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'KeyError'>
                                                   Error Contents: 'season_title'
                                                   Traceback (most recent call last):
                                                     File "/home/osmc/.kodi/addons/plugin.video.crunchyroll/default.py", line 33, in <module>
                                                       crunchyroll.main(sys.argv)
                                                     File "/home/osmc/.kodi/addons/plugin.video.crunchyroll/resources/lib/crunchyroll.py", line 106, in main
                                                       check_mode(args, api)
                                                     File "/home/osmc/.kodi/addons/plugin.video.crunchyroll/resources/lib/crunchyroll.py", line 137, in check_mode
                                                       controller.show_queue(args, api)
                                                     File "/home/osmc/.kodi/addons/plugin.video.crunchyroll/resources/lib/controller.py", line 86, in show_queue
                                                       "title": meta["season_title"] + " #" + meta["episode"] + " - " + item["panel"]["title"],
                                                   KeyError: 'season_title'
                                                   -->End of Python script error report<--

2023-12-18 20:19:50.154 T:648     error <general>: GetDirectory - Error getting plugin://plugin.video.crunchyroll/?mode=queue&title=Queue
2023-12-18 20:19:50.168 T:457     error <general>: CGUIMediaWindow::GetDirectory(plugin://plugin.video.crunchyroll/?mode=queue&title=Queue) failed
2023-12-18 20:19:50.809 T:457      info <general>: Loading skin file: DialogTextViewer.xml, load type: KEEP_IN_MEMORY
2023-12-18 20:19:50.997 T:457     error <general>: Control 61 in window 10147 has been asked to focus, but it can't
smirgol commented 7 months ago

Looks like I need to change some more things, sorry. I'll have a look at it in a couple of hours, gotta catch some sleep first. :)

smirgol commented 7 months ago

@the-cucco Okay, should work now. I've tested it with the movie you have in your watchlist and just in case I added an exception handling to handle any other unknown types of content.

the-cucco commented 7 months ago

Everything works! I updated with the latest repository zip and the queue, search, and history functions work flawlessly. playback is perfect.

You're a beautiful soul and a wizard. Thank you so much.

GajoOptimus commented 7 months ago

Well.... I am seeing great reviews🤣 gonna try it later and give you a feedback but you should make a second release for the Nexus Kodi 🫣😅

smirgol commented 7 months ago

I'm looking into it, it's just that it's more work to update both version at the same time. and real men use matrix, anyway. xD