-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
Add System Bridge Media Source #72865
Add System Bridge Media Source #72865
Conversation
Python cache having issues. Will rebase later |
96d2c8b
to
fd8b508
Compare
fd8b508
to
34ac1a0
Compare
1a50f09
to
d9d4d84
Compare
925882e
to
f662ec0
Compare
973972a
to
d6eb26a
Compare
Updated package to use futures as suggested https://github.com/timmo001/system-bridge/releases/tag/3.3.1 |
2aeefcd
to
2e41384
Compare
2e41384
to
38348ca
Compare
To replace with all avaliable entries under "System Bridge" title
2c2850d
to
aa65303
Compare
entry: ConfigEntry, | ||
) -> str: | ||
"""Build base url for System Bridge media.""" | ||
return f"http://{entry.data[CONF_HOST]}:{entry.data[CONF_PORT]}/api/media/file/data?apiKey={entry.data[CONF_API_KEY]}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please split long strings around 88 characters per line.
domain=DOMAIN, | ||
identifier=f"{path}/{media_file.name}{ext}", | ||
media_class=MEDIA_CLASS_DIRECTORY | ||
if media_file.is_directory or media_file.mime_type is None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A ternary operator expression inside an instantiating multi-line call like this is really hard to read. Please rewrite it.
"""Build individual media item.""" | ||
ext = ( | ||
f"~~{media_file.mime_type}" | ||
if media_file.is_file and media_file.mime_type is not None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use ternary operator expressions that span more than one line.
Proposed change
Adds media source to System Bridge integration.
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: