Goldenfreddy0703 / Otaku

Repository for Otaku Development
GNU General Public License v3.0
103 stars 21 forks source link

Otaku crashes on episode start + #295

Closed OdinIsLord closed 2 months ago

OdinIsLord commented 2 months ago

Hi, so just came back from my vacation and nothing will play with very few exceptions, Otaku returns an error on episode/movie start. It finds links but fails to resolve? Source is Real Debrid and it's working fine on other Add-Ons. Watchlist is Anilist. I have tried clearing cache and rebuilding database, re auth accounts.

kodi_5qJtHAr9Vp

Log error:

2024-06-30 00:41:20.904 T:25464    info <general>: @@@@Otaku log:
                                                   Request-Error: (The read operation timed out) => https://api.real-debrid.com/rest/1.0/torrents/addMagnet
2024-06-30 00:41:20.968 T:25464   error <general>: Traceback (most recent call last):

2024-06-30 00:41:20.968 T:25464   error <general>: 
2024-06-30 00:41:20.969 T:25464   error <general>:   File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.otaku/resources/lib/debrid/real_debrid.py", line 261, in resolve_single_magnet
                                                       torrent = self.addMagnet(magnet)
                                                                 ^^^^^^^^^^^^^^^^^^^^^^

2024-06-30 00:41:20.973 T:25464   error <general>: 
2024-06-30 00:41:20.973 T:25464   error <general>:   File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.otaku/resources/lib/debrid/real_debrid.py", line 179, in addMagnet
                                                       response = self.post_url(url, postData)
                                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2024-06-30 00:41:20.973 T:25464   error <general>: 
2024-06-30 00:41:20.973 T:25464   error <general>:   File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.otaku/resources/lib/debrid/real_debrid.py", line 129, in post_url
                                                       if 'bad_token' in response or 'Bad Request' in response:
                                                          ^^^^^^^^^^^^^^^^^^^^^^^

2024-06-30 00:41:20.973 T:25464   error <general>: 
2024-06-30 00:41:20.973 T:25464   error <general>: TypeError: argument of type 'NoneType' is not iterable

2024-06-30 00:41:20.973 T:25464   error <general>: 
2024-06-30 00:41:40.967 T:22554    info <general>: Loading skin file: /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.otaku/resources/skins/Default/1080i/resolver.xml, load type: LOAD_ON_GUI_INIT
2024-06-30 00:42:01.037 T:25464   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: 'trakt_id'
                                                   Traceback (most recent call last):
                                                     File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.otaku/default.py", line 21, in <module>
                                                       main.Main()
                                                     File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.otaku/resources/lib/main.py", line 2557, in Main
                                                       router_process(control.get_plugin_url(), control.get_plugin_params())
                                                     File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.otaku/resources/lib/ui/router.py", line 70, in router_process
                                                       return route_obj.func(payload, params)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.otaku/resources/lib/main.py", line 2362, in PLAY_MOVIE
                                                       player.play_source(link, anilist_id, watchlist_update_episode, _BROWSER.get_episodeList, 1, source_select=source_select, rescrape=rescrape)
                                                     File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.otaku/resources/lib/ui/player.py", line 504, in play_source
                                                       unique_ids = utils.get_unique_ids(anilist_id)
                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.otaku/resources/lib/ui/utils.py", line 125, in get_unique_ids
                                                       unique_ids = database.get_all_ids(anilist_id)
                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.otaku/resources/lib/ui/database.py", line 795, in get_all_ids
                                                       if mapping['trakt_id'] is not None:
                                                          ~~~~~~~^^^^^^^^^^^^
                                                   KeyError: 'trakt_id'
                                                   -->End of Python script error report<--

And in the very few cases in movies were the content actually resolves, it displays some random numbers instead of the usual Movie title in the player, with no metadata like actors, plot etc..

kodi_8E6VsuzGYv

Also wrong artwork and title for the latest season of Demon Slayer:

kodi_Ro5hXhrrL4

joezito129 commented 2 months ago

mapping doesnt have a key 'trakt_id' if mapping['trakt_id'] is not None: change to if mapping.get('trakt_id') is not None:

Goldenfreddy0703 commented 2 months ago

Hey thank you @joezito129, i have been taking a break from Otaku for a few days but hopefully tomorrow, i will start coding again, reason for this break is cause i significantly improved Last Selected to handle individual sources.

Thank you

Goldenfreddy0703 commented 2 months ago

Hey @OdinIsLord , a new release should be out by now so give it a test and see if that fixes your issue. Thanks.

OdinIsLord commented 2 months ago

@Goldenfreddy0703 I can confirm links resolve after the update. However titles and metadata like plot, cast etc.. still won't work for Movies. But I believe that's because when you click to browse episodes you go inside Otaku unlike for the Movies where it's from said widget.

Goldenfreddy0703 commented 2 months ago

ahh that makes, when it comes to widgets like Next Up or Movies, they are not going to show information sense unless it was in Otaku itself, Im going to go ahead and close this issue sense this is basically resolved, i will put this issue a a duplicate of #29 sense it relates to widgets bugs.

Thank you