harmony-plugin-api 0.1.1__tar.gz → 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/PKG-INFO +1 -1
- {harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/pyproject.toml +1 -1
- {harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/src/harmony_plugin_api/lyrics.py +6 -1
- {harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/src/harmony_plugin_api/manifest.py +7 -0
- {harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/src/harmony_plugin_api.egg-info/PKG-INFO +1 -1
- {harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/README.md +0 -0
- {harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/setup.cfg +0 -0
- {harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/src/harmony_plugin_api/__init__.py +0 -0
- {harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/src/harmony_plugin_api/context.py +0 -0
- {harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/src/harmony_plugin_api/cover.py +0 -0
- {harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/src/harmony_plugin_api/media.py +0 -0
- {harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/src/harmony_plugin_api/online.py +0 -0
- {harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/src/harmony_plugin_api/plugin.py +0 -0
- {harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/src/harmony_plugin_api/registry_types.py +0 -0
- {harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/src/harmony_plugin_api.egg-info/SOURCES.txt +0 -0
- {harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/src/harmony_plugin_api.egg-info/dependency_links.txt +0 -0
- {harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/src/harmony_plugin_api.egg-info/top_level.txt +0 -0
|
@@ -6,7 +6,7 @@ from typing import Protocol
|
|
|
6
6
|
|
|
7
7
|
@dataclass(frozen=True)
|
|
8
8
|
class PluginLyricsResult:
|
|
9
|
-
|
|
9
|
+
id: str
|
|
10
10
|
title: str
|
|
11
11
|
artist: str
|
|
12
12
|
album: str = ""
|
|
@@ -17,6 +17,11 @@ class PluginLyricsResult:
|
|
|
17
17
|
accesskey: str | None = None
|
|
18
18
|
supports_yrc: bool = False
|
|
19
19
|
|
|
20
|
+
@property
|
|
21
|
+
def song_id(self) -> str:
|
|
22
|
+
"""Backward-compatible alias for pre-id plugin implementations."""
|
|
23
|
+
return self.id
|
|
24
|
+
|
|
20
25
|
|
|
21
26
|
class PluginLyricsSource(Protocol):
|
|
22
27
|
source_id: str
|
|
@@ -47,6 +47,7 @@ class PluginManifest:
|
|
|
47
47
|
capabilities: tuple[str, ...]
|
|
48
48
|
min_app_version: str
|
|
49
49
|
max_app_version: str | None = None
|
|
50
|
+
requires_restart_on_toggle: bool = False
|
|
50
51
|
|
|
51
52
|
@classmethod
|
|
52
53
|
def from_dict(cls, data: dict[str, Any]) -> "PluginManifest":
|
|
@@ -85,6 +86,11 @@ class PluginManifest:
|
|
|
85
86
|
raise PluginManifestError(
|
|
86
87
|
"Manifest field 'max_app_version' must be a string if provided"
|
|
87
88
|
)
|
|
89
|
+
requires_restart_on_toggle = data.get("requires_restart_on_toggle", False)
|
|
90
|
+
if not isinstance(requires_restart_on_toggle, bool):
|
|
91
|
+
raise PluginManifestError(
|
|
92
|
+
"Manifest field 'requires_restart_on_toggle' must be a bool if provided"
|
|
93
|
+
)
|
|
88
94
|
|
|
89
95
|
return cls(
|
|
90
96
|
id=_require_str(data, "id"),
|
|
@@ -96,4 +102,5 @@ class PluginManifest:
|
|
|
96
102
|
capabilities=capabilities,
|
|
97
103
|
min_app_version=_require_str(data, "min_app_version"),
|
|
98
104
|
max_app_version=max_app_version,
|
|
105
|
+
requires_restart_on_toggle=requires_restart_on_toggle,
|
|
99
106
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/src/harmony_plugin_api/registry_types.py
RENAMED
|
File without changes
|
{harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/src/harmony_plugin_api.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{harmony_plugin_api-0.1.1 → harmony_plugin_api-0.1.3}/src/harmony_plugin_api.egg-info/top_level.txt
RENAMED
|
File without changes
|