Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

FTP links not working properly #37

Open
halpz opened this issue Feb 7, 2022 · 4 comments
Open

FTP links not working properly #37

halpz opened this issue Feb 7, 2022 · 4 comments

Comments

@halpz
Copy link

halpz commented Feb 7, 2022

  • macOS 12.2
  • IINA 1.2.0 build 129

when trying to open a file on my FTP server where there are filenames / directories with whitespace or square brackets, the stream fails to open.

SFTP doesnt work at all

i am pasting the link using shift+cmd+O and here are a list of example links (personal info changed:)

Links that work:

ftp://username:[email protected]/files/Vice.Principals.S01/Vice.Principals.S01E03.The.Field.Trip.1080p.AMZN.WEB-DL.DD.5.1.H.265-SiGMA.mkv

ftp://username:[email protected]/files/Beef.House.S01/Beef.House.S01E02.1080p.AMZN.WEB-DL.DD5.1.H.264-NBE.mkv

ftp://username:[email protected]/files/The.Castle.1997.1080p.BluRay.x264.DTS-FGT/The.Castle.1997.1080p.BluRay.x264.DTS-FGT.mkv

ftp://username:[email protected]/files/ren_and_stimpy_show/Series4/4e05b-Hard_Day's_Luck.mkv

links that dont work:

ftp://username:[email protected]/files/Eric_Andre_Show/The.Eric.Andre.Show.S05E02.1080p.WEB.h264-BAE[rarbg]/The.Eric.Andre.Show.S05E02.1080p.WEB.h264-BAE.mkv

ftp://username:[email protected]/files/Eric_Andre_Show/The.Eric.Andre.Show.S05E03.You.Got.Served.1080p.WEB-DL.DD5.1.H264-BTN[rarbg]/The.Eric.Andre.Show.S05E03.You.Got.Served.1080p.iT.WEB-DL.DD5.1.H264-BTN.mkv

ftp://username:[email protected]/files/ren_and_stimpy_show/Series%203/3e03a-Ren's_Pecs.mkv


@CarterLi
Copy link
Owner

CarterLi commented Feb 9, 2022

I guess [ and ] should be URI encoded.

Try

ftp://username:[email protected]/files/Eric_Andre_Show/The.Eric.Andre.Show.S05E02.1080p.WEB.h264-BAE%5Brarbg%5D/The.Eric.Andre.Show.S05E02.1080p.WEB.h264-BAE.mkv

@halpz
Copy link
Author

halpz commented Feb 9, 2022

i was bringing it up as this works in infuse and vlc - and I looked at the code and it should be escaping the strings anyway, but doesnt seem to work still:

in OpenURLWindowController.swift :

guard var urlValue = trimmedUrlString.addingPercentEncoding(withAllowedCharacters: .urlAllowed) else {
      return (nil, false)
    }

@halpz
Copy link
Author

halpz commented Feb 9, 2022

i would test changes, but I cant get the project to build in xcode

@CarterLi
Copy link
Owner

CarterLi commented Feb 14, 2022

They must be encoded separately. For example % in Series%203, you can't know whether it has been encoded or not. With withAllowedCharacters: .urlAllowed, they will be always preserved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants