Closed cywteow closed 1 year ago
Nice work! I would prefer if this could be merged to ResolveURL instead. So we can decouple the code from all resolvers. Could you create a PR there and see if it's possible to get it merged? Otherwise, if rejected, we can then proceed with merging in this repository.
It would require to add <import addon="script.module.pycryptodome" version="3.4.3"/>
into their addon.xml. Not sure if they are okay with it.
Furthermore I'm still encountering some issues with kodi ffmpeg trying to play .m3u8 streaming files from different servers.
https://hls26.dracache.com/newvideos/newhls/R16WGobZsGsNjhFNWnKg1g/1661089896/343190_116.15.217.223/6c9aa2af6e59bb8e26c156b384c83347/ep.1.v0.1661027231.m3u8
Workinghttps://hls27.dracache.com/newvideos/newhls/2bI4UlojYoFZ87qEB_sFkw/1661090473/341605_116.15.217.223/59779b3f7f4f981f64a1be0c867d6583/ep.8.v2.1661014124.m3u8
Not working2022-08-21 20:01:11.412 T:1204 DEBUG <general>: ResolveURL: in valid_url https://dembed2.com/streaming.php?id=MzQxNjA1&title=Today%27s+Webtoon+%282022%29+episode+8&typesub=SUB :
2022-08-21 20:01:11.413 T:1204 DEBUG <general>: ResolveURL: Resolving using dembed2 plugin
2022-08-21 20:01:11.428 T:16872 DEBUG <general>: Activating window ID: 10160
2022-08-21 20:01:11.428 T:16872 DEBUG <general>: ------ Window Init (DialogBusy.xml) ------
2022-08-21 20:01:12.606 T:1204 DEBUG <general>: ResolveURL: Setting Headers on UrlOpen: {}
2022-08-21 20:01:18.144 T:16872 DEBUG <general>: ------ Window Deinit (Pointer.xml) ------
2022-08-21 20:01:18.794 T:1204 INFO <general>: CPythonInvoker(16, C:\Users\Wilic\AppData\Roaming\Kodi\addons\plugin.video.dramacool\dramacool\addon.py): script successfully run
2022-08-21 20:01:18.794 T:1204 DEBUG <general>: CPythonInvoker::onExecutionDone(16, C:\Users\Wilic\AppData\Roaming\Kodi\addons\plugin.video.dramacool\dramacool\addon.py)
2022-08-21 20:01:18.809 T:16872 DEBUG <general>: ------ Window Deinit (DialogBusy.xml) ------
2022-08-21 20:01:18.809 T:10188 DEBUG <general>: Thread scriptobs 10188 terminating
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerCoreFactory::GetPlayers(https://hls27.dracache.com/newvideos/newhls/2bI4UlojYoFZ87qEB_sFkw/1661090473/341605_116.15.217.223/59779b3f7f4f981f64a1be0c867d6583/ep.8.v2.1661014124.m3u8)
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerSelectionRule::GetPlayers: considering rule: system rules
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerSelectionRule::GetPlayers: matches rule: system rules
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerSelectionRule::GetPlayers: considering rule: mms/udp
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerSelectionRule::GetPlayers: considering rule: lastfm/shout
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerSelectionRule::GetPlayers: considering rule: rtmp
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerSelectionRule::GetPlayers: considering rule: rtsp
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerSelectionRule::GetPlayers: considering rule: streams
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerSelectionRule::GetPlayers: matches rule: streams
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerSelectionRule::GetPlayers: considering rule: aacp/sdp
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerSelectionRule::GetPlayers: considering rule: mp2
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerSelectionRule::GetPlayers: considering rule: dvd
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerSelectionRule::GetPlayers: considering rule: discimage
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerSelectionRule::GetPlayers: considering rule: sdp/asf
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerSelectionRule::GetPlayers: considering rule: nsv
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerSelectionRule::GetPlayers: considering rule: radio
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerCoreFactory::GetPlayers: matched 0 rules with players
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerCoreFactory::GetPlayers: adding videodefaultplayer (VideoPlayer)
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerCoreFactory::GetPlayers: for video=1, audio=0
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
2022-08-21 20:01:18.811 T:16872 DEBUG <general>: CPlayerCoreFactory::GetPlayers: added 1 players
2022-08-21 20:01:18.812 T:16872 DEBUG <general>: Radio UECP (RDS) Processor - new CDVDRadioRDSData::CDVDRadioRDSData
2022-08-21 20:01:18.812 T:16872 INFO <general>: VideoPlayer::OpenFile: plugin://plugin.video.dramacool/todays-webtoon-2022-episode-8.html
2022-08-21 20:01:18.814 T:1204 DEBUG <general>: .
2022-08-21 20:01:18.832 T:16872 DEBUG <general>: Skipped 1 duplicate messages..
2022-08-21 20:01:18.832 T:16872 DEBUG <general>: XCURL::DllLibCurlGlobal::easy_acquire - Created session to https://hls27.dracache.com
2022-08-21 20:01:18.850 T:1204 INFO <general>: Python interpreter stopped
2022-08-21 20:01:18.850 T:1204 DEBUG <general>: Thread LanguageInvoker 1204 terminating
2022-08-21 20:01:22.395 T:16872 DEBUG <general>: CCurlFile::GetMimeType - https://hls27.dracache.com/newvideos/newhls/2bI4UlojYoFZ87qEB_sFkw/1661090473/341605_116.15.217.223/59779b3f7f4f981f64a1be0c867d6583/ep.8.v2.1661014124.m3u8 -> application/vnd.apple.mpegurl
2022-08-21 20:01:22.395 T:32196 DEBUG <general>: Thread VideoPlayer start, auto delete: false
2022-08-21 20:01:22.395 T:16872 DEBUG <general>: CApplication::OnPlayBackStarted: CApplication::OnPlayBackStarted
2022-08-21 20:01:22.396 T:31040 DEBUG <general>: Thread BackgroundLoader start, auto delete: false
2022-08-21 20:01:22.396 T:32196 INFO <general>: Creating InputStream
2022-08-21 20:01:22.396 T:32196 DEBUG <general>: CurlFile::Open(0xe20783e8a0) https://hls27.dracache.com/newvideos/newhls/2bI4UlojYoFZ87qEB_sFkw/1661090473/341605_116.15.217.223/59779b3f7f4f981f64a1be0c867d6583/ep.8.v2.1661014124.m3u8
2022-08-21 20:01:22.397 T:30320 DEBUG <general>: Loading settings for plugin://plugin.video.dramacool/todays-webtoon-2022-episode-8.html
2022-08-21 20:01:22.397 T:16872 DEBUG <general>: CVideoGUIInfo::InitCurrentItem(plugin://plugin.video.dramacool/todays-webtoon-2022-episode-8.html)
2022-08-21 20:01:22.401 T:16872 DEBUG <general>: CPlayerGUIInfo::InitCurrentItem(plugin://plugin.video.dramacool/todays-webtoon-2022-episode-8.html)
2022-08-21 20:01:22.407 T:31040 DEBUG <general>: Thread BackgroundLoader 31040 terminating
2022-08-21 20:01:22.501 T:16872 DEBUG <general>: ------ Window Init (DialogBusy.xml) ------
2022-08-21 20:01:22.644 T:16872 DEBUG <general>: ------ Window Deinit (DialogBusy.xml) ------
2022-08-21 20:01:39.852 T:32196 INFO <general>: Creating Demuxer
2022-08-21 20:01:44.977 T:32196 ERROR <general>: ffmpeg[0x259128f7070X]: [tcp] Connection to tcp://hls27.dracache.com:443 failed: Error number -138 occurred
2022-08-21 20:01:44.977 T:32196 DEBUG <general>: Error, could not open file https://hls27.dracache.com/newvideos/newhls/2bI4UlojYoFZ87qEB_sFkw/1661090473/341605_116.15.217.223/59779b3f7f4f981f64a1be0c867d6583/ep.8.v2.1661014124.m3u8
2022-08-21 20:01:44.977 T:32196 ERROR <general>: CVideoPlayer::OpenDemuxStream - Error creating demuxer
2022-08-21 20:01:44.977 T:32196 INFO <general>: CVideoPlayer::OnExit()
2022-08-21 20:01:44.977 T:32196 DEBUG <general>: Thread VideoPlayer 32196 terminating
2022-08-21 20:01:44.979 T:1028 DEBUG <general>: CApplication::OnPlayBackStopped: CApplication::OnPlayBackStopped
2022-08-21 20:01:44.994 T:16872 DEBUG <general>: ------ Window Init (DialogConfirm.xml) ------
2022-08-21 20:01:44.994 T:16872 INFO <general>: Loading skin file: DialogConfirm.xml, load type: KEEP_IN_MEMORY
2022-08-21 20:01:45.003 T:16872 INFO <general>: CVideoPlayer::CloseFile()
2022-08-21 20:01:45.003 T:16872 DEBUG <general>: CRenderManager::DeleteRenderer - deleting renderer
2022-08-21 20:01:45.003 T:16872 INFO <general>: VideoPlayer: waiting for threads to exit
2022-08-21 20:01:45.003 T:16872 INFO <general>: VideoPlayer: finished waiting
2022-08-21 20:01:45.004 T:16872 DEBUG <general>: Radio UECP (RDS) Processor - delete CDVDRadioRDSData::~CDVDRadioRDSData
2022-08-21 20:01:47.227 T:16872 DEBUG <general>: ------ Window Init (Pointer.xml) ------
ResolveUrl has their own implementation of https://github.com/Gujal00/ResolveURL/blob/master/script.module.resolveurl/lib/resolveurl/lib/pyaes/aes.py maybe you can reuse that?
Regarding the issue, I haven't tested yet but can do it later.
I have looked into the problem and I'm getting this error code HTTP Code: 500 Msg: _ssl.c:1112: The handshake operation timed out
.
So either there is an issue with the timeout being too low or there is some communication problems with ffmpeg. Since there is an issue with the handshake we could change the resolved url from https to http which seems to fix it.
Haven't tested the changes on other videos but it shouldn't make any difference.
Thanks @groggyegg! Changing the url scheme from https
to http
did solve the problem. I've made the changes and added asianload server. I'm now trying to change the encryption from Cryptodome
to pyaes
.
Closing this PR since it has been fixed in https://github.com/Gujal00/ResolveURL/commit/f03bc918a27d36e40c47bba9e3fe370f4be5c373
Tried to minimize the impact on original code. Remember to increment the version in addon.xml
12