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

[Linux][udisks] Always mount optical media by default #20840

Merged
merged 1 commit into from
Jan 16, 2022

Conversation

enen92
Copy link
Member

@enen92 enen92 commented Jan 11, 2022

Description

Currently the experience for optical discs (e.g. physical DVDs) is far from optimal on Linux. By default, once you insert a physical disc on your drive the default skin will show you have a DISC with options to play or eject:

image

However, to be able to play the disc you have to mount it manually on your desktop environment. This is only true is Kodi is not running standalone (e.g. without providing the --standalone arg or running kodi-standalone.sh). If running standalone, the handlemounting advanced setting will be set to true automatically and any discs will be automounted by kodi (all of them, including DVDs/BRs). While I understand the reason for this distinction so distros like Libreleec that run kodi standalone can handle generic disc mounting (while modern DEs automatically mount media for us) I think that by default Kodi should have an exception for optical discs. DEs like gnome, for example, do not automount DVDs by default without further settings/configs by the user.

IMHO if kodi, as a GUI application, shows in the UI that a disc is available for playback, it should be able to play it. It should handle the mounting of the optical disk on behalf of the user. This behaviour should be default... and at most... advanced users could disable it via an advancedsetting (not the opposite).

That's what this PR does, by default Kodi (udisks and udisks2 storage providers) mounts optical media unless "automountopticalmedia" advanced setting is set to false. "handleautomounting" bypasses this setting since it mounts ALL discs (optical or not).

Motivation and context

Improve UX, make it simpler for users to watch their media without having to dive into the code or read 1500 wikis and forum posts :). For example the handlemounting advanced setting was not even documented anywhere.

@enen92 enen92 added RFC PR submitted for gathering feedback Type: Improvement non-breaking change which improves existing functionality Platform: Linux v19 Matrix Component: Content labels Jan 11, 2022
@enen92 enen92 added this to the Nexus 20.0 Alpha 1 milestone Jan 11, 2022
@DaVukovic
Copy link
Member

I've tested this PR and it does what it should ;-)

DVDs are mounted automatically and are not mounted if I set advancedsettings.xml to:

<advancedsettings>
  <automountopticalmedia>false</automountopticalmedia>
</advancedsettings>

Just as a suggestion. The "Disc" menu option is still shown if I set the advancedsettings.xml to not automount it. I'm not too sure if this is something we can cover with this PR, but for me it would make sense if that disc menu is only shown if Kodi has successfully mounted the disc. Otherwise you can't do anything with that menu.

The rest is fine and a 👍 from my side

@enen92
Copy link
Member Author

enen92 commented Jan 13, 2022

You can eject it just like today :)

@enen92 enen92 removed the RFC PR submitted for gathering feedback label Jan 13, 2022
@enen92 enen92 requested a review from howie-f January 13, 2022 16:18
Copy link
Contributor

@howie-f howie-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an accident

Copy link
Contributor

@howie-f howie-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks

@enen92 enen92 closed this Jan 13, 2022
@enen92 enen92 reopened this Jan 13, 2022
@enen92 enen92 reopened this Jan 16, 2022
@enen92 enen92 merged commit 387df84 into xbmc:master Jan 16, 2022
@KarellenX
Copy link
Member

@enen92

I assume this needs to be added to the advancedsettings.xml in here... https://kodi.wiki/view/Advancedsettings.xml#File_system_settings ?

And is it as follows for the default setting?

<advancedsettings version="1.0">
  <automountopticalmedia>true</automountopticalmedia>
</advancedsettings>

While I am at it, I note that detectasudf and handlemounting don't have the code added to the wiki page.
Same as the above example, but using <detectasudf> and <handlemounting> instead?

@enen92
Copy link
Member Author

enen92 commented Nov 21, 2023

@KarellenX yes, default is true but it's only used currently on Linux:

Only used in linux for the udisks and udisks2 providers
defines if kodi should automount optical discs

I also plan to kill it at some point. Dvds already work without being mounted the main issue is blurays but I'll get there eventually

@KarellenX
Copy link
Member

I also plan to kill it at some point.

Near future? If yes, I'll just leave it out. If no, I'll add it but if you can remember to add the wiki needed tag when you kill it.

I'll make note its for Linux only.
Thanks.

@enen92
Copy link
Member Author

enen92 commented Nov 21, 2023

I also plan to kill it at some point.

Near future? If yes, I'll just leave it out. If no, I'll add it but if you can remember to add the wiki needed tag when you kill it.

I'll make note its for Linux only. Thanks.

Definitely not for v21 so please add it. Thanks for looking into this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Content Platform: Linux Type: Improvement non-breaking change which improves existing functionality v20 Nexus Wiki: Done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants