Skip to content

[plugin.audio.ampache@matrix] 3.2.5+matrix.1#4763

Closed
lusum wants to merge 1 commit intoxbmc:matrixfrom
lusum:matrix
Closed

[plugin.audio.ampache@matrix] 3.2.5+matrix.1#4763
lusum wants to merge 1 commit intoxbmc:matrixfrom
lusum:matrix

Conversation

@lusum
Copy link
Copy Markdown

@lusum lusum commented Mar 27, 2026

Description

  • TLS/SSL updates
  • Connection timeout now in config
  • Code improvements and refactoring
  • Bug fix
  • API update
  • Add swedish translation ( thanks to @Yaeger )
  • Updated spanish translation
  • Added german and spanish translations

Checklist:

  • My code follows the add-on rules and piracy stance of this project.
  • I have read the CONTRIBUTING document
  • Each add-on submission should be a single commit with using the following style: [plugin.video.foo] v1.0.0

Additional information :

  • Submitting your add-on to this specific branch makes it available to any Kodi version equal or higher than the branch name with the applicable Kodi dependencies limits.
  • add-on development wiki page.
  • Kodi pydocs provide information about the Python API
  • PEP8 codingstyle which is considered best practice but not mandatory.
  • This add-on repository has automated code guideline check which could help you improve your coding. You can find the results of these check at Codacy. You can create your own account as well to continuously monitor your python coding before submitting to repo.
  • Development questions can be asked in the add-on development section on the Kodi forum.
  • If you see no activity on your PR after a week (so at least one weekend has passed) then please go to the #kodi-dev freenode IRC channel to reach out to the team

@kodiai
Copy link
Copy Markdown

kodiai Bot commented Mar 27, 2026

Kodiai Review Summary

What Changed

This PR updates the Ampache plugin to version 3.2.5+matrix.1, adding TLS/SSL improvements, configurable connection timeout, refactoring, bug fixes, API updates, and translations (Swedish, German, Spanish).

Reviewed: core logic

Strengths

  • ✅ Improved exception handling throughout the codebase (ampache_monitor.py:1897-1953, ampache_plugin.py:2087-2139)
  • ✅ Better defensive coding with None checks for connectionData (ampache_connect.py:32-36, 101-102)

Observations

Impact

[CRITICAL] plugin.audio.ampache/resources/lib/ampache_connect.py (140, 145, 150, 155, 159): Type mismatch causes timeout parameter to fail
The timeout setting retrieved from getSetting() returns a string, but urllib.request.urlopen() expects an integer or float. When a string is passed, Python will raise a TypeError, causing connection attempts to fail.

[MAJOR] plugin.audio.ampache/resources/lib/ampache_connect.py (148-150): Incorrect SSL context timeout assignment
At line 149, gcontext.timeout = timeout attempts to set a timeout attribute on an SSLContext object, but SSLContext does not have a timeout attribute. The timeout must be passed to urlopen() directly. This causes an AttributeError when SSL verification is disabled in Python 3.

Suggestions

  • Optional: Consider adding input validation for the connection_timeout setting to ensure it's within a reasonable range (e.g., 1-600 seconds)

Verdict

🔴 Address before merging -- [2] blocking issue(s) found (CRITICAL/MAJOR)

Review Details
  • Files reviewed: 15
  • Lines changed: +1453 -233
  • Profile: minimal (auto, lines changed: 1686)
  • Author: newcomer (adapted tone)
  • Findings: 1 critical, 1 major, 0 medium, 0 minor (includes 2 from summary observations)
  • Review completed: 2026-03-27T18:07:28.471Z
  • Keyword parsing:
    • focus hints: [PLUGIN.AUDIO.AMPACHE@MATRIX]

@lusum lusum closed this Mar 27, 2026
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.

1 participant