Skip to content

Commit

Permalink
fix media type
Browse files Browse the repository at this point in the history
  • Loading branch information
bkbilly committed Feb 1, 2025
1 parent b24a926 commit 9ed8878
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions lnxlink/modules/battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,17 @@ def _get_devices(self):
devices = {}
for device in self.get_batteries():
native_path = device["NativePath"].split("/")[-1]
name = " ".join(
[
device["Vendor"],
device["Model"],
device["Serial"].replace(":", ""),
]
).strip().replace("'", "_")
name = (
" ".join(
[
device["Vendor"],
device["Model"],
device["Serial"].replace(":", ""),
]
)
.strip()
.replace("'", "_")
)
if name == "":
name = native_path
if name != "":
Expand Down
2 changes: 1 addition & 1 deletion lnxlink/modules/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def play_media(self, data):
elif "video" in data["media_type"]:
media_type = "video"
elif "image" in data["media_type"]:
media_type = "video"
media_type = "image"

if media_type not in options["supported_media"]:
continue
Expand Down

0 comments on commit 9ed8878

Please sign in to comment.