Bug 449744 - Opening a video from an smb:// location downloads the file rather than streaming
Summary: Opening a video from an smb:// location downloads the file rather than streaming
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 21.12.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-07 13:09 UTC by Mike Lothian
Modified: 2022-02-07 17:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2022-02-07 13:09:22 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1.  Using dolphin browse to a video on an smb:// share 
2.  Open video

OBSERVED RESULT

kioexec copies the file locally then begins playing with the selected media player (smplayer in this instance)

EXPECTED RESULT

Video should start streaming with the selected media player

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma:  
(available in About System)
KDE Plasma Version:  5.23.5
KDE Frameworks Version:  5.90
Qt Version:  5.15.2

ADDITIONAL INFORMATION

If I run smplayer smb://path/to/video from the command line, the app steams just fine

From the command line I get the following messages:

dolphin
Qt: Session management error: networkIdsList argument is NULL
Qt: Session management error: networkIdsList argument is NULL
Could not find video stream
command= "smplayer %U" args= ("smplayer %U", "smb://atomic//Media/test.avi")
Copying QUrl("smb://atomic/Media/test.avi")  to QUrl("file:///home/fireburn/.cache/kioexec/krun/1173878_0/test.avi")
"/home/fireburn/.cache/kioexec/krun/1173878_0/test.avi"
"/home/fireburn/.cache/kioexec/krun/1173878_0/test.part"
Comment 1 Nicolas Fella 2022-02-07 13:47:00 UTC
This behavior is somewhat intentional, but of course not ideal. The challenge is this:
When setting up a SMB share in Dolphin it will save the credentials so that you don't have to enter them all the time. KDE apps/apps using KIO all can read these credentials, so e.g. when opening an image on a SMB share in Gwenview works without entering the credentials in Gwenview again. 

The problem arises with apps that don't use KIO but understand smb URLs, like smplayer or VLC. Dolphin could directly pass the smb URL to smplayer, but then smplayer would need to ask you for the share's password, which isn't ideal. Therefore Dolphin triggers kioexec to download the file and pass that to smplayer. However that's trading one issue for another :/

That said, there is a better alternative in place, KIOFuse. Instead of downloading the whole thing an passing it as a local file like kioexec KIOFuse exposes a virtual file system. This should solve both problems. The question here is why KIOFuse wasn't triggered in your case. Can you make sure you have KIOFuse installed?
Comment 2 Nicolas Fella 2022-02-07 13:48:43 UTC
I think https://bugs.kde.org/show_bug.cgi?id=436553 is related here
Comment 3 Mike Lothian 2022-02-07 14:05:25 UTC
It is changed behaviour however, things used to stream, and I also don't have any authentication set up on this share
Comment 4 Mike Lothian 2022-02-07 14:59:14 UTC
(In reply to Nicolas Fella from comment #2)
> I think https://bugs.kde.org/show_bug.cgi?id=436553 is related here

That commit was to kio 5.66.0, I'm pretty sure this hasn't been happening for a year
Comment 5 Mike Lothian 2022-02-07 17:09:18 UTC
(In reply to Nicolas Fella from comment #1)
> This behavior is somewhat intentional, but of course not ideal. The
> challenge is this:
> When setting up a SMB share in Dolphin it will save the credentials so that
> you don't have to enter them all the time. KDE apps/apps using KIO all can
> read these credentials, so e.g. when opening an image on a SMB share in
> Gwenview works without entering the credentials in Gwenview again. 
> 
> The problem arises with apps that don't use KIO but understand smb URLs,
> like smplayer or VLC. Dolphin could directly pass the smb URL to smplayer,
> but then smplayer would need to ask you for the share's password, which
> isn't ideal. Therefore Dolphin triggers kioexec to download the file and
> pass that to smplayer. However that's trading one issue for another :/
> 
> That said, there is a better alternative in place, KIOFuse. Instead of
> downloading the whole thing an passing it as a local file like kioexec
> KIOFuse exposes a virtual file system. This should solve both problems. The
> question here is why KIOFuse wasn't triggered in your case. Can you make
> sure you have KIOFuse installed?

I've installed kio-fuse and things work again, any idea when this became a requirement?