@@ -1129,7 +1129,6 @@ def _load_plugins(options, config):
1129
1129
plugin_list = config ['plugins' ].as_str_seq ()
1130
1130
1131
1131
plugins .load_plugins (plugin_list )
1132
- plugins .send ("pluginload" )
1133
1132
return plugins
1134
1133
1135
1134
@@ -1145,16 +1144,6 @@ def _setup(options, lib=None):
1145
1144
1146
1145
plugins = _load_plugins (options , config )
1147
1146
1148
- # Get the default subcommands.
1149
- from beets .ui .commands import default_commands
1150
-
1151
- subcommands = list (default_commands )
1152
- subcommands .extend (plugins .commands ())
1153
-
1154
- if lib is None :
1155
- lib = _open_library (config )
1156
- plugins .send ("library_opened" , lib = lib )
1157
-
1158
1147
# Add types and queries defined by plugins.
1159
1148
plugin_types_album = plugins .types (library .Album )
1160
1149
library .Album ._types .update (plugin_types_album )
@@ -1166,6 +1155,18 @@ def _setup(options, lib=None):
1166
1155
library .Item ._queries .update (plugins .named_queries (library .Item ))
1167
1156
library .Album ._queries .update (plugins .named_queries (library .Album ))
1168
1157
1158
+ plugins .send ("pluginload" )
1159
+
1160
+ # Get the default subcommands.
1161
+ from beets .ui .commands import default_commands
1162
+
1163
+ subcommands = list (default_commands )
1164
+ subcommands .extend (plugins .commands ())
1165
+
1166
+ if lib is None :
1167
+ lib = _open_library (config )
1168
+ plugins .send ("library_opened" , lib = lib )
1169
+
1169
1170
return subcommands , plugins , lib
1170
1171
1171
1172
0 commit comments