[plugin.audio.classicalradio] v1.0.0 - #4837
edouardduliege wants to merge 3 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| line = raw_line.strip() | ||
| if line.lower().startswith("file") and "=" in line: | ||
| candidate = line.split("=", 1)[1].strip() | ||
| if candidate.startswith("http"): |
There was a problem hiding this comment.
Playlist URLs can reach private services If a remote playlist supplies a loopback or private-network URL, or redirects to one, opening the channel makes the Kodi device send a GET to that destination. Checking only that the entry starts with
http does not restrict where the probe goes. Validate destinations, including redirects, before requesting or playing them. How this was verified: Playlist entries flow directly into a redirect-following GET without a host or address check.
| ) | ||
|
|
||
| try: | ||
| response = self.http.get( |
There was a problem hiding this comment.
Redirects can expose session keys If the API redirects an authenticated request to another origin, the request follows that redirect with its custom
X-Session-Key header, exposing the user's session key to the destination. Restrict authenticated redirects to the API origin or remove the header before following them. How this was verified: The authenticated request sets X-Session-Key and follows redirects without checking the destination origin.
|
|
||
| if playing_file != expected_stream: | ||
| xbmc.log( | ||
| "[plugin.audio.classicalradio] playing stream mismatch in service loop: " | ||
| f"getPlayingFile={safe_url_for_log(playing_file)!r}, " | ||
| f"state_stream_url={safe_url_for_log(expected_stream)!r}", | ||
| xbmc.LOGDEBUG, | ||
| ) | ||
| continue |
There was a problem hiding this comment.
Redirected streams may lose metadata If Kodi reports a redirected or normalized playing URL, it will differ from the original playlist URL saved in playback state. This exact comparison then skips every Now Playing update. Test redirected streams against Kodi's reported URL and use a playback check that accommodates the difference.
| if ( | ||
| latest_state.get("mode") != "linear" | ||
| or latest_state.get("channel_key") != channel | ||
| or latest_state.get("stream_url") != state.get("stream_url") | ||
| ): | ||
| return |
There was a problem hiding this comment.
Restarts can receive stale metadata If a channel restarts with the same stream URL while a metadata lookup is in progress, this check treats the new playback as the old one. The earlier lookup can then update the new playing item and its saved track ID. Give each playback a unique identifier and check it before applying the update.
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
PUBLICATION_CHECKLIST.md here as well. |
|
PUBLICATION_CHECKLIST.md has been removed |
Initial submission of the ClassicalRadio community add-on for Kodi.
The add-on provides linear ClassicalRadio playback for AudioAddict account holders, including:
The add-on targets Linux and uses kernel-managed playback-state locking with
flock.This is an unofficial community add-on and is not affiliated with, endorsed by, or supported by ClassicalRadio or AudioAddict.
The add-on uses original community artwork and does not redistribute the official ClassicalRadio logo.