Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
albaintor committed Jul 13, 2024
1 parent 0cd8b54 commit fa315ab
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ jobs:
run: |
cp dist/intg-zidoo artifacts/
cp driver.json artifacts/
cp orange.png artifacts/
echo "ARTIFACT_NAME=uc-intg-${{ env.INTG_NAME }}-${{ env.VERSION }}-aarch64" >> $GITHUB_ENV
- name: Create upload artifact
Expand Down
28 changes: 15 additions & 13 deletions intg-zidoo/zidooaio.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,8 +861,10 @@ async def _get_music_playing_info(self) -> json:
return_value["date"] = result.get("date")
return_value["uri"] = result.get("uri")
return_value["bitrate"] = result.get("bitrate")
return_value["audio"] = (f"{result.get('extension')}: {result.get('channels')}"
f" channels {result.get('bits')} bits {result.get('SampleRate')} Hz")
return_value["audio"] = (
f"{result.get('extension')}: {result.get('channels')}"
f" channels {result.get('bits')} bits {result.get('SampleRate')} Hz"
)
self._music_id = result.get("id")
self._music_type = result.get("type")

Expand Down Expand Up @@ -1091,9 +1093,7 @@ async def start_app(self, app_name: str, log_errors=True) -> bool:
if len(self._app_list) == 0:
self._app_list = await self.get_app_list(log_errors)
if app_name in self._app_list:
return await self._start_app(
self._app_list[app_name]
)
return await self._start_app(self._app_list[app_name])
return False

async def _start_app(self, app_id) -> bool:
Expand Down Expand Up @@ -1159,9 +1159,7 @@ async def get_collection_list(self, movie_id) -> json:
json
raw API response if successful
"""
response = await self._req_json(
f"ZidooPoster/getCollection?id={movie_id}"
)
response = await self._req_json(f"ZidooPoster/getCollection?id={movie_id}")

if response is not None and response.get("status") == 200:
return response
Expand Down Expand Up @@ -1737,9 +1735,11 @@ def _generate_music_image_url(
Returns
url for image
"""
url = (f"http://{self._host}/ZidooMusicControl/v2/getImage?id={music_id}"
f"&music_type={ZMUSIC_IMAGETYPE[music_type]}"
f"&type={music_type}&target={ZMUSIC_IMAGETARGET[music_type]}")
url = (
f"http://{self._host}/ZidooMusicControl/v2/getImage?id={music_id}"
f"&music_type={ZMUSIC_IMAGETYPE[music_type]}"
f"&type={music_type}&target={ZMUSIC_IMAGETARGET[music_type]}"
)

return url

Expand All @@ -1762,8 +1762,10 @@ def generate_current_image_url(self, width: int = 1080, height: int = 720) -> st
url = f"http://{self._host}/ZidooPoster/getFile/getBackdrop?id={self._video_id}&w={width}&h={height}"

if self._current_source == ZCONTENT_MUSIC and self._music_id > 0:
url = (f"http://{self._host}/ZidooMusicControl/v2/getImage?"
f"id={self._music_id}&music_type={self._music_type}&type=4&target=16")
url = (
f"http://{self._host}/ZidooMusicControl/v2/getImage?"
f"id={self._music_id}&music_type={self._music_type}&type=4&target=16"
)

# _LOGGER.debug("zidoo getting current image: url-{}".format(url))
return url
Expand Down

0 comments on commit fa315ab

Please sign in to comment.