Skip to content

Commit e839065

Browse files
authored
refactor: move addon to subdirectory (#24)
this helps publishing only the needed files to kodi repo.
1 parent c03d9c3 commit e839065

File tree

29 files changed

+9
-24
lines changed

29 files changed

+9
-24
lines changed

.gitattributes

-15
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,2 @@
11
# Auto detect text files and perform LF normalization
22
* text=auto
3-
4-
# Custom for Visual Studio
5-
*.cs diff=csharp
6-
7-
# Standard to msysgit
8-
*.doc diff=astextplain
9-
*.DOC diff=astextplain
10-
*.docx diff=astextplain
11-
*.DOCX diff=astextplain
12-
*.dot diff=astextplain
13-
*.DOT diff=astextplain
14-
*.pdf diff=astextplain
15-
*.PDF diff=astextplain
16-
*.rtf diff=astextplain
17-
*.RTF diff=astextplain

.github/workflows/publish-addon.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
pip install -q kodi-addon-checker
2121
- name: Check with addon-checker
2222
run: |
23-
kodi-addon-checker --branch $TARGET_KODI_VER --allow-folder-id-mismatch .
23+
kodi-addon-checker --branch $TARGET_KODI_VER --allow-folder-id-mismatch $ADDON_NAME
2424
2525
publish:
2626
runs-on: ubuntu-latest

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ Desktop.ini
1010
__pycache__
1111
.idea
1212
Pipfile.lock
13+
.mypy_cache
14+
.ruff_cache

Pipfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ python_version = "3.11"
1515
[scripts]
1616
pre-commit = "pre-commit install"
1717
lint = "pre-commit run --all"
18-
check = "kodi-addon-checker --branch nexus --allow-folder-id-mismatch ."
18+
check = "kodi-addon-checker --branch nexus --allow-folder-id-mismatch script.service.hyperion-control"

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ target-version = "py310"
3131
src = ["resources"]
3232

3333
[tool.ruff.per-file-ignores]
34-
"resources/lib/player.py" = ["N802"]
35-
"resources/lib/monitor.py" = ["N802"]
34+
"script.service.hyperion-control/resources/lib/player.py" = ["N802"]
35+
"script.service.hyperion-control/resources/lib/monitor.py" = ["N802"]
3636

3737
[tool.ruff.pydocstyle]
3838
convention = "google"
File renamed without changes.

resources/lib/gui.py renamed to script.service.hyperion-control/resources/lib/gui.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ def notify_text(
3737

3838
def do_ssdp_discovery(self) -> None:
3939
"""Perform the SSDP discovery and lets the user choose the service."""
40-
search_target = "urn:hyperion-project.org:device:basic:1"
41-
servers = ssdp.discover(search_target)
40+
servers = ssdp.discover()
4241

4342
if not servers:
4443
self._dialog.ok("Hyperion Control", self._get_localized_string(32104))

resources/lib/ssdp.py renamed to script.service.hyperion-control/resources/lib/ssdp.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,8 @@ def __init__(self, response: bytes) -> None:
7373
self.cache = cache.split("=")[1] if cache else ""
7474

7575

76-
def discover(
77-
service: str, timeout: int = 3, retries: int = 1, mx: int = 2
78-
) -> list[dict[str, Any]]:
76+
def discover(timeout: int = 3, retries: int = 1, mx: int = 2) -> list[dict[str, Any]]:
77+
service = "urn:hyperion-project.org:device:basic:1"
7978
group = ("239.255.255.250", 1900)
8079
lines = [
8180
"M-SEARCH * HTTP/1.1",
File renamed without changes.

0 commit comments

Comments
 (0)