PlexKodiConnect icon indicating copy to clipboard operation
PlexKodiConnect copied to clipboard

Direct Play from GDrive escaping existing mounts

Open kb85 opened this issue 7 years ago • 9 comments

I'm trying to get direct paths to work with Google Drive but there is still a problem escaping special characters. https://github.com/croneter/PlexKodiConnect/pull/645

At the moment PKC is escaping after the ':' before the port number. Problem is The google drive addon is now mounting the drive as follows. http://localhost:8587/source/Google%20Drive/My%20Name/

The escaped characters need to begin after the /Google%20Drive/My%20FullName/ and at the moment using the setting in PKC is escaping the already escaped characters which are set on mount.

kb85 avatar Mar 14 '19 11:03 kb85

Could you please share a "correct" complete path as well as what you're getting with PKC?

I can't reproduce here and this increases the chance that I get it right the first time

croneter avatar Mar 14 '19 16:03 croneter

This may help.

2019-03-15 08:57:50.172 T:14052 ERROR: [plugin.googledrive][service-source-request-14052]: [source.service] code 400, message Bad request syntax ('HEAD /source/Google%20Drive/My%20Name/Movies/127 Hours (2010)/127 Hours (2010) h264-1080p AAC-2ch.mp4 HTTP/1.1') 2019-03-15 08:57:50.174 T:7116 ERROR: CCurlFile::Exists - Failed: Weird server reply(8) for http://localhost:8587/source/Google%20Drive/My%20Name/Movies/127 Hours (2010)/127 Hours (2010) h264-1080p AAC-2ch.mp4 2019-03-15 08:57:50.178 T:7116 WARNING: PLEX.plex_api: Cannot access file: http://localhost:8587/source/Google%20Drive/My%20Name/Movies/127 Hours (2010)/127 Hours (2010) h264-1080p AAC-2ch.mp4

If I use the escape special characters settings I am getting this.

http://localhost:8587/source/Google%2520Drive/My%2520Name/Movies/127%20Hours%20%282010%29/127%20Hours%20%282010%29%20h264-1080p%20AAC-2ch.mp4

kb85 avatar Mar 15 '19 01:03 kb85

Can you somehow get a correct path from somewhere else, not PKC or Kodi? I don't think the errors you posted will help

croneter avatar Mar 15 '19 05:03 croneter

What would help is a correct URL from plugin.googledrive

croneter avatar Mar 15 '19 05:03 croneter

This is the path when playing direct from the google drive addon 2019-03-15 19:53:41.281 T:8464 NOTICE: VideoPlayer::OpenFile: plugin://plugin.googledrive/?item_id=1DzKiGwxwiTVTBW-vF1AcfVI-1Okyd66Y&driveid=10029760682354523715&item_driveid=10029760682354523715&action=play&content_type=video

When playing direct from kodi's file manager from the folder which the google drive addon mounts I get this. NOTICE: VideoPlayer::OpenFile: http://localhost:8587/source/Google%20Drive/My%20Name/Movies/127%20Hours%20%282010%29/127%20Hours%20%282010%29%20h264-1080p%20AAC-2ch.mp4

kb85 avatar Mar 15 '19 11:03 kb85

Eeeeehm - how about simply deactivating "Escape special characters in path (e.g. space to %20)"? Seems like your path is now escaped twice

croneter avatar Mar 17 '19 12:03 croneter

You will need to reset the Kodi database to re-scan all your paths though!

croneter avatar Mar 17 '19 12:03 croneter

Hmm, no, that won't work.

Would you have any idea how PKC could retrieve the info from Kodi/the OS that your Google drive is mounted at http://localhost:8587/source/Google%20Drive/My%20Name/? Otherwise I'd need to add another setting; this will be rather error prone

croneter avatar Mar 17 '19 12:03 croneter

I have tried setting the direct path in PKC without the %20 already set then using the escape characters setting but it isn't finding the mount that way and is throwing python errors.

I've tried mounting a few different google drives and they all mount in the same /Google%20Drive/User%20Name/ format with the latest Google Drive addon version. PKC really only needs to escape special characters found after those 2 mounted "folders".

kb85 avatar Mar 17 '19 12:03 kb85