refactor: type recognition module contracts

This commit is contained in:
jxxghp
2026-08-24 01:58:36 +08:00
parent 3e4e182ff9
commit 19653b1437
3 changed files with 106 additions and 35 deletions
+69 -35
View File
@@ -2958,16 +2958,23 @@
"version": 1
},
"async_match_doubaninfo": {
"aggregation": "legacy",
"aggregation": "first_non_empty",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "media-recognition",
"input_contract": "MediaRecognitionKeywordArguments",
"input_contract": "DoubanMatchRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "MediaRecognitionProviderResult",
"result_shape": "any",
"required_parameters": [
"imdbid",
"mtype",
"name",
"raise_exception",
"season",
"year"
],
"result_contract": "dict[str, Any] | None",
"result_shape": "mapping",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
@@ -2994,16 +3001,21 @@
"version": 1
},
"async_match_tmdbinfo": {
"aggregation": "legacy",
"aggregation": "first_non_empty",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "media-recognition",
"input_contract": "MediaRecognitionKeywordArguments",
"input_contract": "TmdbMatchRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "MediaRecognitionProviderResult",
"result_shape": "any",
"required_parameters": [
"mtype",
"name",
"season",
"year"
],
"result_contract": "dict[str, Any] | None",
"result_shape": "mapping",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
@@ -3590,16 +3602,19 @@
"version": 1
},
"async_update_recognize_cache": {
"aggregation": "legacy",
"aggregation": "first_non_empty",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "media-recognition",
"input_contract": "MediaRecognitionKeywordArguments",
"input_contract": "RecognitionCacheUpdateRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "MediaRecognitionProviderResult",
"result_shape": "any",
"required_parameters": [
"mediainfo",
"meta"
],
"result_contract": "bool | None",
"result_shape": "boolean",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
@@ -4321,16 +4336,20 @@
"version": 1
},
"filter_torrents": {
"aggregation": "legacy",
"aggregation": "ordered_list_merge",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "downloader",
"input_contract": "DownloaderKeywordArguments",
"input_contract": "TorrentFilterRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "DownloaderProviderResult",
"result_shape": "any",
"required_parameters": [
"mediainfo",
"rule_groups",
"torrent_list"
],
"result_contract": "list[TorrentInfo]",
"result_shape": "list",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
@@ -4569,16 +4588,23 @@
"version": 1
},
"match_doubaninfo": {
"aggregation": "legacy",
"aggregation": "first_non_empty",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "media-recognition",
"input_contract": "MediaRecognitionKeywordArguments",
"input_contract": "DoubanMatchRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "MediaRecognitionProviderResult",
"result_shape": "any",
"required_parameters": [
"imdbid",
"mtype",
"name",
"raise_exception",
"season",
"year"
],
"result_contract": "dict[str, Any] | None",
"result_shape": "mapping",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
@@ -4605,16 +4631,21 @@
"version": 1
},
"match_tmdbinfo": {
"aggregation": "legacy",
"aggregation": "first_non_empty",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "media-recognition",
"input_contract": "MediaRecognitionKeywordArguments",
"input_contract": "TmdbMatchRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "MediaRecognitionProviderResult",
"result_shape": "any",
"required_parameters": [
"mtype",
"name",
"season",
"year"
],
"result_contract": "dict[str, Any] | None",
"result_shape": "mapping",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
@@ -6281,16 +6312,19 @@
"version": 1
},
"update_recognize_cache": {
"aggregation": "legacy",
"aggregation": "first_non_empty",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "media-recognition",
"input_contract": "MediaRecognitionKeywordArguments",
"input_contract": "RecognitionCacheUpdateRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "MediaRecognitionProviderResult",
"result_shape": "any",
"required_parameters": [
"mediainfo",
"meta"
],
"result_contract": "bool | None",
"result_shape": "boolean",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",