Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't play files with "?" in the path after scanning them to library #60

Open
Lahvuun opened this issue Nov 17, 2020 · 2 comments
Open

Comments

@Lahvuun
Copy link

Lahvuun commented Nov 17, 2020

I can play them just fine without scanning if I go to Settings->Media->Library->Videos and select the file manually. But if I scan the file or the directory and try to play them I either get "This file is no longer available" (if I try to do it from the main menu's tv show listing) or if I again go to Settings->Media-Library-Videos and select it manually I get "One or more items failed to play".

I have the following error in my log:

2020-11-18 00:44:41.553 T:10256   ERROR <general>: CVideoPlayer::OpenInputStream - error opening [sftp://debian:22/home/kodi/kodi/anime/tv/Sakamoto Desu ga? (2016)/Sakamoto Desu ga? (2016) S01E01.mkv]

Which corresponds to this line in Kodi's source:

CLog::Log(LOGERROR, "CVideoPlayer::OpenInputStream - error opening [%s]", CURL::GetRedacted(m_item.GetPath()).c_str());

So I tried doing it with curl:

lahvuun@lahvuun ~ curl -u kodi -k 'sftp://debian/home/kodi/kodi/anime/tv/Sakamoto Desu ga? (2016)/Sakamoto Desu ga? (2016) S01E01.mkv'
Enter host password for user 'kodi':
curl: (78) Could not open remote file for reading: No such file or directory

And then encoding the question mark:

lahvuun@lahvuun ~ curl -u kodi -k 'sftp://debian/home/kodi/kodi/anime/tv/Sakamoto Desu ga%3F (2016)/Sakamoto Desu ga%3F (2016) S01E01.mkv'
Enter host password for user 'kodi':
Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: <FILE>" to save to a file.

Which makes the URL work (I piped it to mpv and it worked fine)

@Mynacol
Copy link

Mynacol commented Mar 5, 2022

I believe I encountered the same issue, in my case the file name contains !?!. More details on the referenced issue.

@kostyafarber
Copy link

Hey I would like to contribute here any ideas on where to look/get started for this issue. (where does escaping happen if it does in the lib)?

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

No branches or pull requests

3 participants