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

Playback doesn't work #2

Closed koanya closed 7 months ago

koanya commented 7 months ago

Thanks for the version ;). I use the addon on a Raspberry pi 3B with librelec. Crunchyroll addon is set to French subtitle. I downloaded the zip from the repository because the alpha pre-release display an error when I open the queue. I can log in, display the queue and use the search but I have 2 problems. First, when I try to start an episode I have an error and the episode doesn't start. Here the log :

2023-12-19 07:54:15.015 T:1112    error <general>: [PLUGIN] Crunchyroll: CrunchyrollError : <class 'Exception'>
2023-12-19 07:54:15.015 T:1112    error <general>: [PLUGIN] Crunchyroll: LoginError : <class 'resources.lib.model.CrunchyrollError'>
2023-12-19 07:54:17.075 T:1112    error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'TypeError'>
                                                   Error Contents: 'NoneType' object is not callable
                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/default.py", line 33, in <module>
                                                       crunchyroll.main(sys.argv)
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/resources/lib/crunchyroll.py", line 106, in main
                                                       check_mode(args, api)
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/resources/lib/crunchyroll.py", line 172, in check_mode
                                                       controller.start_playback(args, api)
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/resources/lib/controller.py", line 484, in start_playback
                                                       req = api.make_request(
                                                             ^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/resources/lib/api.py", line 230, in make_request
                                                       if current_time > utils.str_to_date(expiration):
                                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/resources/lib/utils.py", line 61, in str_to_date
                                                       return datetime.strptime(
                                                              ^^^^^^^^^^^^^^^^^^
                                                   TypeError: 'NoneType' object is not callable
                                                   -->End of Python script error report<--

2023-12-19 07:54:17.371 T:872     error <general>: Playlist Player: skipping unplayable item: 1, path [plugin://plugin.video.crunchyroll/?title=Les+Carnets+de+l%27apothicaire+%2311+-+De+une%2C+de+deux&tvshowtitle=Les+Carnets+de+l%27apothicaire&duration=1370079&playcount=1&episode=11&episode_id=G7PU4MEJN&collection_id=GR09CXPEK&series_id=G3KHEVDJ7&plot=Mao+Mao+revient+sur+les+causes+r%C3%A9elles+du+d%C3%A9c%C3%A8s+du+fils+de+dame+Aduo.+Assassinat+ou+accident+%3F+La+jeune+apothicaire+va+t%C3%A2cher+de+r%C3%A9soudre+ce+myst%C3%A8re+avant+que+la+concubine+ne+quitte+la+cour.&plotoutline=Mao+Mao+revient+sur+les+causes+r%C3%A9elles+du+d%C3%A9c%C3%A8s+du+fils+de+dame+Aduo.+Assassinat+ou+accident+%3F+La+jeune+apothicaire+va+t%C3%A2cher+de+r%C3%A9soudre+ce+myst%C3%A8re+avant+que+la+concubine+ne+quitte+la+cour.&year=2023-12-17&aired=2023-12-17&premiered=2023-12-17&thumb=https%3A%2F%2Fwww.crunchyroll.com%2Fimgsrv%2Fdisplay%2Fthumbnail%2F1920x1080%2Fcatalog%2Fcrunchyroll%2Fd4713e5570dca1746610b30c678f8481.jpe&fanart=https%3A%2F%2Fwww.crunchyroll.com%2Fimgsrv%2Fdisplay%2Fthumbnail%2F1920x1080%2Fcatalog%2Fcrunchyroll%2Fd4713e5570dca1746610b30c678f8481.jpe&mode=videoplay&stream_id=G4GFQ1984&playhead=1274]

After I had this error, if i tried to open the queue or use the search, I have this error :

2023-12-19 08:07:21.101 T:1192    error <general>: [PLUGIN] Crunchyroll: CrunchyrollError : <class 'Exception'>
2023-12-19 08:07:21.101 T:1192    error <general>: [PLUGIN] Crunchyroll: LoginError : <class 'resources.lib.model.CrunchyrollError'>
2023-12-19 08:07:42.719 T:1192    error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'TypeError'>
                                                   Error Contents: 'NoneType' object is not callable
                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/default.py", line 33, in <module>
                                                       crunchyroll.main(sys.argv)
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/resources/lib/crunchyroll.py", line 106, in main
                                                       check_mode(args, api)
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/resources/lib/crunchyroll.py", line 139, in check_mode
                                                       controller.search_anime(args, api)
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/resources/lib/controller.py", line 131, in search_anime
                                                       req = api.make_request(
                                                             ^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/resources/lib/api.py", line 230, in make_request
                                                       if current_time > utils.str_to_date(expiration):
                                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/resources/lib/utils.py", line 61, in str_to_date
                                                       return datetime.strptime(
                                                              ^^^^^^^^^^^^^^^^^^
                                                   TypeError: 'NoneType' object is not callable
                                                   -->End of Python script error report<--

2023-12-19 08:07:43.009 T:1190    error <general>: GetDirectory - Error getting plugin://plugin.video.crunchyroll/?mode=search&title=Recherche
2023-12-19 08:07:43.022 T:872     error <general>: CGUIMediaWindow::GetDirectory(plugin://plugin.video.crunchyroll/?mode=search&title=Recherche) failed

I need to restart the Raspberry to be able to open the queue or use the search without error.

The second problem is with the search (maybe linked to the first problem). When I use the search, the series are displayed but if I tried to open a series I have this error :

2023-12-19 08:35:52.762 T:869      info <general>: Loading skin file: DialogContextMenu.xml, load type: KEEP_IN_MEMORY
2023-12-19 08:35:56.991 T:1031    error <general>: [PLUGIN] Crunchyroll: CrunchyrollError : <class 'Exception'>
2023-12-19 08:35:56.991 T:1031    error <general>: [PLUGIN] Crunchyroll: LoginError : <class 'resources.lib.model.CrunchyrollError'>
2023-12-19 08:35:58.833 T:1031    error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'TypeError'>
                                                   Error Contents: 'NoneType' object is not callable
                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/default.py", line 33, in <module>
                                                       crunchyroll.main(sys.argv)
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/resources/lib/crunchyroll.py", line 106, in main
                                                       check_mode(args, api)
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/resources/lib/crunchyroll.py", line 168, in check_mode
                                                       controller.view_series(args, api)
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/resources/lib/controller.py", line 347, in view_series
                                                       req = api.make_request(
                                                             ^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/resources/lib/api.py", line 230, in make_request
                                                       if current_time > utils.str_to_date(expiration):
                                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/plugin.video.crunchyroll/resources/lib/utils.py", line 61, in str_to_date
                                                       return datetime.strptime(
                                                              ^^^^^^^^^^^^^^^^^^
                                                   TypeError: 'NoneType' object is not callable
                                                   -->End of Python script error report<--

2023-12-19 08:35:59.097 T:1030    error <general>: GetDirectory - Error getting plugin://plugin.video.crunchyroll/?fanart=https%3a%2f%2fwww.crunchyroll.com%2fimgsrv%2fdisplay%2fthumbnail%2f1920x1080%2fcatalog%2fcrunchyroll%2f6aaf36afb57680cdc5812e28a98bb62d.jpe&mode=series&plot=Naofumi%20est%20projet%c3%a9%20dans%20un%20monde%20proche%20en%20tout%20lieu%20d%e2%80%99un%20jeu%20de%20r%c3%b4le%20d%e2%80%99heroic%20fantasy.%20Mais%20alors%20que%20d%e2%80%99autres%20h%c3%a9ros%20ont%20%c3%a9t%c3%a9%20dot%c3%a9s%20d%e2%80%99armes%20offensives%20redoutables%2c%20Naofumi%20h%c3%a9rite%20d%e2%80%99un%20bouclier%20aux%20capacit%c3%a9s%20limit%c3%a9es%20pour%20progresser%20dans%20ce%20jeu%20o%c3%b9%20le%20danger%20peut%20surgir%20%c3%a0%20chaque%20instant.%20Trahi%20par%20sa%20partenaire%20et%20vilipend%c3%a9%20par%20la%20population%2c%20le%20jeune%20homme%20ne%20peut%20d%c3%a9sormais%20compter%20que%20sur%20lui-m%c3%aame%20pour%20survivre%20dans%20cet%20univers%20hostile%e2%80%a6%20et%20peut-%c3%aatre%20sur%20une%20jeune%20fille%20d%c3%a9s%c5%93uvr%c3%a9e%20aux%20ressources%20insoup%c3%a7onn%c3%a9es.&plotoutline=Naofumi%20est%20projet%c3%a9%20dans%20un%20monde%20proche%20en%20tout%20lieu%20d%e2%80%99un%20jeu%20de%20r%c3%b4le%20d%e2%80%99heroic%20fantasy.%20Mais%20alors%20que%20d%e2%80%99autres%20h%c3%a9ros%20ont%20%c3%a9t%c3%a9%20dot%c3%a9s%20d%e2%80%99armes%20offensives%20redoutables%2c%20Naofumi%20h%c3%a9rite%20d%e2%80%99un%20bouclier%20aux%20capacit%c3%a9s%20limit%c3%a9es%20pour%20progresser%20dans%20ce%20jeu%20o%c3%b9%20le%20danger%20peut%20surgir%20%c3%a0%20chaque%20instant.%20Trahi%20par%20sa%20partenaire%20et%20vilipend%c3%a9%20par%20la%20population%2c%20le%20jeune%20homme%20ne%20peut%20d%c3%a9sormais%20compter%20que%20sur%20lui-m%c3%aame%20pour%20survivre%20dans%20cet%20univers%20hostile%e2%80%a6%20et%20peut-%c3%aatre%20sur%20une%20jeune%20fille%20d%c3%a9s%c5%93uvr%c3%a9e%20aux%20ressources%20insoup%c3%a7onn%c3%a9es.&series_id=G6W4QKX0R&thumb=https%3a%2f%2fwww.crunchyroll.com%2fimgsrv%2fdisplay%2fthumbnail%2f1560x2340%2fcatalog%2fcrunchyroll%2fe5d61ac62e1ccf624e1d7507ec1758bb.jpe&title=The%20Rising%20of%20the%20Shield%20Hero&tvshowtitle=The%20Rising%20of%20the%20Shield%20Hero&year=2023
2023-12-19 08:35:59.111 T:869     error <general>: CGUIMediaWindow::GetDirectory(plugin://plugin.video.crunchyroll/?fanart=https%3a%2f%2fwww.crunchyroll.com%2fimgsrv%2fdisplay%2fthumbnail%2f1920x1080%2fcatalog%2fcrunchyroll%2f6aaf36afb57680cdc5812e28a98bb62d.jpe&mode=series&plot=Naofumi%20est%20projet%c3%a9%20dans%20un%20monde%20proche%20en%20tout%20lieu%20d%e2%80%99un%20jeu%20de%20r%c3%b4le%20d%e2%80%99heroic%20fantasy.%20Mais%20alors%20que%20d%e2%80%99autres%20h%c3%a9ros%20ont%20%c3%a9t%c3%a9%20dot%c3%a9s%20d%e2%80%99armes%20offensives%20redoutables%2c%20Naofumi%20h%c3%a9rite%20d%e2%80%99un%20bouclier%20aux%20capacit%c3%a9s%20limit%c3%a9es%20pour%20progresser%20dans%20ce%20jeu%20o%c3%b9%20le%20danger%20peut%20surgir%20%c3%a0%20chaque%20instant.%20Trahi%20par%20sa%20partenaire%20et%20vilipend%c3%a9%20par%20la%20population%2c%20le%20jeune%20homme%20ne%20peut%20d%c3%a9sormais%20compter%20que%20sur%20lui-m%c3%aame%20pour%20survivre%20dans%20cet%20univers%20hostile%e2%80%a6%20et%20peut-%c3%aatre%20sur%20une%20jeune%20fille%20d%c3%a9s%c5%93uvr%c3%a9e%20aux%20ressources%20insoup%c3%a7onn%c3%a9es.&plotoutline=Naofumi%20est%20projet%c3%a9%20dans%20un%20monde%20proche%20en%20tout%20lieu%20d%e2%80%99un%20jeu%20de%20r%c3%b4le%20d%e2%80%99heroic%20fantasy.%20Mais%20alors%20que%20d%e2%80%99autres%20h%c3%a9ros%20ont%20%c3%a9t%c3%a9%20dot%c3%a9s%20d%e2%80%99armes%20offensives%20redoutables%2c%20Naofumi%20h%c3%a9rite%20d%e2%80%99un%20bouclier%20aux%20capacit%c3%a9s%20limit%c3%a9es%20pour%20progresser%20dans%20ce%20jeu%20o%c3%b9%20le%20danger%20peut%20surgir%20%c3%a0%20chaque%20instant.%20Trahi%20par%20sa%20partenaire%20et%20vilipend%c3%a9%20par%20la%20population%2c%20le%20jeune%20homme%20ne%20peut%20d%c3%a9sormais%20compter%20que%20sur%20lui-m%c3%aame%20pour%20survivre%20dans%20cet%20univers%20hostile%e2%80%a6%20et%20peut-%c3%aatre%20sur%20une%20jeune%20fille%20d%c3%a9s%c5%93uvr%c3%a9e%20aux%20ressources%20insoup%c3%a7onn%c3%a9es.&series_id=G6W4QKX0R&thumb=https%3a%2f%2fwww.crunchyroll.com%2fimgsrv%2fdisplay%2fthumbnail%2f1560x2340%2fcatalog%2fcrunchyroll%2fe5d61ac62e1ccf624e1d7507ec1758bb.jpe&title=The%20Rising%20of%20the%20Shield%20Hero&tvshowtitle=The%20Rising%20of%20the%20Shield%20Hero&year=2023) failed

And as with the first problem, after I had this error the queue and search doesn't work anymore and I need to restart the Raspberry.

Last thing, the duration of the episode are wrong in the queue. For example, the real duration of the episode 11 of Tearmoon Empire is 23:39 but in the queue it is displayed 394:26:44.

smirgol commented 7 months ago

@koanya That's super weird. Which system are you using? Plain Kodi / OpenElec / LibreElec? Which version? Matrix? I found some info that this is a bug in older python versions.

I've tried to add a fix for that, but not sure if it works for you.

koanya commented 7 months ago

My bad, i was sure to be on Matrix version but after a check I have the Nexus version. I tested your nexus version and it works like a charm. Thank you so much :)