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

Use file browser dialog for local path #951

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sundermann
Copy link

Use a file browser dialog instead of a basic plaintext dialog for the local path. Kodi returns credentials for instance in smb paths selected using a browser dialog. It's better to strip these out so they do not become visible in the list.

@@ -487,6 +488,13 @@ def set_addon_mode():
LOG.info("Add-on playback: %s", settings("useDirectPaths") == "0")


def strip_credentials(url):
Copy link
Member

Choose a reason for hiding this comment

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

I want this function in the test suite, so I'd minimum need a list of URLs to test, both with and without credentials in them.
http(s), cifs/smb, nfs and (s)ftp come to mind, there are probably others I'm forgetting.

I can write the tests myself, but I need help gathering a diverse set of example URLs (that represent your real world application) – take what you have, but replace with example/documentation IP addresses and domain names, and anonymize paths if needed (but keep the overall structure).

The above is a note for anyone using native mode, especially those with more esoteric setups.

Copy link

codecov bot commented Dec 15, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 21.88%. Comparing base (6259e57) to head (cfc5323).
Report is 16 commits behind head on master.

Files with missing lines Patch % Lines
jellyfin_kodi/helper/utils.py 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #951      +/-   ##
==========================================
+ Coverage   21.83%   21.88%   +0.04%     
==========================================
  Files          63       63              
  Lines        8677     8682       +5     
  Branches     1411     1411              
==========================================
+ Hits         1895     1900       +5     
  Misses       6763     6763              
  Partials       19       19              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
6 Security Hotspots

See analysis details on SonarQube Cloud

@sundermann
Copy link
Author

I added some test cases. Personally I could only test nfs and smb but I don't see why the other types would not work.

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

Successfully merging this pull request may close these issues.

2 participants