|
27 | 27 | Type, |
28 | 28 | ) |
29 | 29 |
|
30 | | -from picard.album import register_album_post_removal_processor |
31 | 30 | from picard.config import ( |
32 | 31 | Config, |
33 | 32 | ConfigSection, |
|
37 | 36 | from picard.extension_points.cover_art_providers import ( |
38 | 37 | register_cover_art_provider, |
39 | 38 | ) |
| 39 | +from picard.extension_points.event_hooks import ( |
| 40 | + register_album_post_removal_processor, |
| 41 | + register_file_post_addition_to_track_processor, |
| 42 | + register_file_post_load_processor, |
| 43 | + register_file_post_removal_from_track_processor, |
| 44 | + register_file_post_save_processor, |
| 45 | +) |
40 | 46 | from picard.extension_points.formats import register_format |
41 | 47 | from picard.extension_points.item_actions import ( |
42 | 48 | BaseAction, |
|
46 | 52 | register_file_action, |
47 | 53 | register_track_action, |
48 | 54 | ) |
49 | | -from picard.extension_points.options_pages import register_options_page |
50 | | -from picard.extension_points.script_functions import register_script_function |
51 | | -from picard.file import ( |
52 | | - File, |
53 | | - register_file_post_addition_to_track_processor, |
54 | | - register_file_post_load_processor, |
55 | | - register_file_post_removal_from_track_processor, |
56 | | - register_file_post_save_processor, |
57 | | -) |
58 | | -from picard.metadata import ( |
| 55 | +from picard.extension_points.metadata import ( |
59 | 56 | register_album_metadata_processor, |
60 | 57 | register_track_metadata_processor, |
61 | 58 | ) |
| 59 | +from picard.extension_points.options_pages import register_options_page |
| 60 | +from picard.extension_points.script_functions import register_script_function |
| 61 | +from picard.file import File |
62 | 62 | from picard.plugin3.manifest import PluginManifest |
63 | | -from picard.plugin import PluginPriority |
64 | 63 | from picard.webservice import WebService |
65 | 64 | from picard.webservice.api_helpers import MBAPIHelper |
66 | 65 |
|
@@ -98,26 +97,26 @@ def plugin_config(self) -> ConfigSection: |
98 | 97 | return self._api_config |
99 | 98 |
|
100 | 99 | # Metadata processors |
101 | | - def register_album_metadata_processor(function: Callable, priority: PluginPriority = PluginPriority.NORMAL) -> None: |
| 100 | + def register_album_metadata_processor(function: Callable, priority: int = 0) -> None: |
102 | 101 | return register_album_metadata_processor(function, priority) |
103 | 102 |
|
104 | | - def register_track_metadata_processor(function: Callable, priority: PluginPriority = PluginPriority.NORMAL) -> None: |
| 103 | + def register_track_metadata_processor(function: Callable, priority: int = 0) -> None: |
105 | 104 | return register_track_metadata_processor(function, priority) |
106 | 105 |
|
107 | 106 | # Event hooks |
108 | | - def register_album_post_removal_processor(function: Callable, priority: PluginPriority = PluginPriority.NORMAL) -> None: |
| 107 | + def register_album_post_removal_processor(function: Callable, priority: int = 0) -> None: |
109 | 108 | return register_album_post_removal_processor(function, priority) |
110 | 109 |
|
111 | | - def register_file_post_load_processor(function: Callable, priority: PluginPriority = PluginPriority.NORMAL) -> None: |
| 110 | + def register_file_post_load_processor(function: Callable, priority: int = 0) -> None: |
112 | 111 | return register_file_post_load_processor(function, priority) |
113 | 112 |
|
114 | | - def register_file_post_addition_to_track_processor(function: Callable, priority: PluginPriority = PluginPriority.NORMAL) -> None: |
| 113 | + def register_file_post_addition_to_track_processor(function: Callable, priority: int = 0) -> None: |
115 | 114 | return register_file_post_addition_to_track_processor(function, priority) |
116 | 115 |
|
117 | | - def register_file_post_removal_from_track_processor(function: Callable, priority: PluginPriority = PluginPriority.NORMAL) -> None: |
| 116 | + def register_file_post_removal_from_track_processor(function: Callable, priority: int = 0) -> None: |
118 | 117 | return register_file_post_removal_from_track_processor(function, priority) |
119 | 118 |
|
120 | | - def register_file_post_save_processor(function: Callable, priority: PluginPriority = PluginPriority.NORMAL) -> None: |
| 119 | + def register_file_post_save_processor(function: Callable, priority: int = 0) -> None: |
121 | 120 | return register_file_post_save_processor(function, priority) |
122 | 121 |
|
123 | 122 | # Cover art |
|
0 commit comments