beetkeeper-api-client 0.12.0__py3-none-any.whl
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.
- beetkeeper_api_client/__init__.py +112 -0
- beetkeeper_api_client/_scm_version.py +1 -0
- beetkeeper_api_client/api/__init__.py +9 -0
- beetkeeper_api_client/api/authentication_api.py +758 -0
- beetkeeper_api_client/api/events_api.py +1663 -0
- beetkeeper_api_client/api/imports_api.py +3134 -0
- beetkeeper_api_client/api/monitoring_api.py +377 -0
- beetkeeper_api_client/api/query_api.py +1250 -0
- beetkeeper_api_client/api_client.py +845 -0
- beetkeeper_api_client/api_response.py +21 -0
- beetkeeper_api_client/configuration.py +604 -0
- beetkeeper_api_client/exceptions.py +218 -0
- beetkeeper_api_client/models/__init__.py +44 -0
- beetkeeper_api_client/models/api_album.py +285 -0
- beetkeeper_api_client/models/api_track.py +528 -0
- beetkeeper_api_client/models/beets_event_type.py +40 -0
- beetkeeper_api_client/models/clean_slate_preview.py +147 -0
- beetkeeper_api_client/models/clean_slate_submit_request.py +116 -0
- beetkeeper_api_client/models/current_beets_subject_state.py +140 -0
- beetkeeper_api_client/models/decision_request.py +104 -0
- beetkeeper_api_client/models/event_search_response.py +97 -0
- beetkeeper_api_client/models/event_search_result.py +107 -0
- beetkeeper_api_client/models/event_subject_summary.py +100 -0
- beetkeeper_api_client/models/events_list_response.py +95 -0
- beetkeeper_api_client/models/find_missing_source_path_request.py +100 -0
- beetkeeper_api_client/models/find_missing_source_path_response.py +108 -0
- beetkeeper_api_client/models/health_info.py +101 -0
- beetkeeper_api_client/models/http_validation_error.py +95 -0
- beetkeeper_api_client/models/import_action.py +38 -0
- beetkeeper_api_client/models/import_candidate.py +171 -0
- beetkeeper_api_client/models/import_decision.py +96 -0
- beetkeeper_api_client/models/import_job.py +162 -0
- beetkeeper_api_client/models/import_job_status.py +41 -0
- beetkeeper_api_client/models/import_submit_request.py +104 -0
- beetkeeper_api_client/models/listener_event_details.py +121 -0
- beetkeeper_api_client/models/location_inner.py +138 -0
- beetkeeper_api_client/models/login_request_body.py +90 -0
- beetkeeper_api_client/models/login_response_body.py +100 -0
- beetkeeper_api_client/models/logout_response_body.py +88 -0
- beetkeeper_api_client/models/search_missing_source_path_result.py +106 -0
- beetkeeper_api_client/models/validation_error.py +108 -0
- beetkeeper_api_client/py.typed +0 -0
- beetkeeper_api_client/rest.py +201 -0
- beetkeeper_api_client/sync_helper.py +57 -0
- beetkeeper_api_client-0.12.0.dist-info/METADATA +34 -0
- beetkeeper_api_client-0.12.0.dist-info/RECORD +48 -0
- beetkeeper_api_client-0.12.0.dist-info/WHEEL +5 -0
- beetkeeper_api_client-0.12.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
beetkeeper
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document:
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictBool, StrictBytes, StrictFloat, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
25
|
+
|
|
26
|
+
class APITrack(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Model for the relevant parts of a `beets.library.Item` (track) instance. used during beets plugin client push events for an event tied to a single track ('Item'). For simplicity, we only mark `id` as required, with all other fields as optional (which might not be the case for beets internals). NOTE: This was generated from `build_scripts/code_gen/pydantic_field_info_from_beets_model.py`.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
id: StrictInt
|
|
31
|
+
acoustid_fingerprint: Optional[StrictStr] = ''
|
|
32
|
+
acoustid_id: Optional[StrictStr] = ''
|
|
33
|
+
added: Optional[Union[StrictFloat, StrictInt]] = None
|
|
34
|
+
album: Optional[StrictStr] = ''
|
|
35
|
+
album_id: Optional[StrictInt] = None
|
|
36
|
+
albumartist: Optional[StrictStr] = ''
|
|
37
|
+
albumartist_credit: Optional[StrictStr] = ''
|
|
38
|
+
albumartist_sort: Optional[StrictStr] = ''
|
|
39
|
+
albumartists: Optional[List[Any]] = None
|
|
40
|
+
albumartists_credit: Optional[List[Any]] = None
|
|
41
|
+
albumartists_sort: Optional[List[Any]] = None
|
|
42
|
+
albumdisambig: Optional[StrictStr] = ''
|
|
43
|
+
albumstatus: Optional[StrictStr] = ''
|
|
44
|
+
albumtype: Optional[StrictStr] = ''
|
|
45
|
+
albumtypes: Optional[List[Any]] = None
|
|
46
|
+
arrangers: Optional[List[Any]] = None
|
|
47
|
+
arrangers_ids: Optional[List[Any]] = None
|
|
48
|
+
artist: Optional[StrictStr] = ''
|
|
49
|
+
artist_credit: Optional[StrictStr] = ''
|
|
50
|
+
artist_sort: Optional[StrictStr] = ''
|
|
51
|
+
artists: Optional[List[Any]] = None
|
|
52
|
+
artists_credit: Optional[List[Any]] = None
|
|
53
|
+
artists_ids: Optional[List[Any]] = None
|
|
54
|
+
artists_sort: Optional[List[Any]] = None
|
|
55
|
+
asin: Optional[StrictStr] = ''
|
|
56
|
+
barcode: Optional[StrictStr] = ''
|
|
57
|
+
bitdepth: Optional[StrictInt] = None
|
|
58
|
+
bitrate: Optional[StrictInt] = None
|
|
59
|
+
bitrate_mode: Optional[StrictStr] = ''
|
|
60
|
+
bpm: Optional[StrictInt] = None
|
|
61
|
+
catalognum: Optional[StrictStr] = ''
|
|
62
|
+
channels: Optional[StrictInt] = None
|
|
63
|
+
comments: Optional[StrictStr] = ''
|
|
64
|
+
comp: Optional[StrictBool] = False
|
|
65
|
+
composer_sort: Optional[StrictStr] = ''
|
|
66
|
+
composers: Optional[List[Any]] = None
|
|
67
|
+
composers_ids: Optional[List[Any]] = None
|
|
68
|
+
country: Optional[StrictStr] = ''
|
|
69
|
+
day: Optional[StrictInt] = None
|
|
70
|
+
disc: Optional[StrictInt] = None
|
|
71
|
+
discogs_albumid: Optional[StrictInt] = None
|
|
72
|
+
discogs_artistid: Optional[StrictInt] = None
|
|
73
|
+
discogs_labelid: Optional[StrictInt] = None
|
|
74
|
+
disctitle: Optional[StrictStr] = ''
|
|
75
|
+
disctotal: Optional[StrictInt] = None
|
|
76
|
+
encoder: Optional[StrictStr] = ''
|
|
77
|
+
encoder_info: Optional[StrictStr] = ''
|
|
78
|
+
encoder_settings: Optional[StrictStr] = ''
|
|
79
|
+
format: Optional[StrictStr] = ''
|
|
80
|
+
genres: Optional[List[Any]] = None
|
|
81
|
+
grouping: Optional[StrictStr] = ''
|
|
82
|
+
initial_key: Optional[StrictStr] = ''
|
|
83
|
+
isrc: Optional[StrictStr] = ''
|
|
84
|
+
label: Optional[StrictStr] = ''
|
|
85
|
+
language: Optional[StrictStr] = ''
|
|
86
|
+
length: Optional[Union[StrictFloat, StrictInt]] = None
|
|
87
|
+
lyricists: Optional[List[Any]] = None
|
|
88
|
+
lyricists_ids: Optional[List[Any]] = None
|
|
89
|
+
lyrics: Optional[StrictStr] = ''
|
|
90
|
+
mb_albumartistid: Optional[StrictStr] = ''
|
|
91
|
+
mb_albumartistids: Optional[List[Any]] = None
|
|
92
|
+
mb_albumid: Optional[StrictStr] = ''
|
|
93
|
+
mb_artistid: Optional[StrictStr] = ''
|
|
94
|
+
mb_artistids: Optional[List[Any]] = None
|
|
95
|
+
mb_releasegroupid: Optional[StrictStr] = ''
|
|
96
|
+
mb_releasetrackid: Optional[StrictStr] = ''
|
|
97
|
+
mb_trackid: Optional[StrictStr] = ''
|
|
98
|
+
mb_workid: Optional[StrictStr] = ''
|
|
99
|
+
media: Optional[StrictStr] = ''
|
|
100
|
+
month: Optional[StrictInt] = None
|
|
101
|
+
mtime: Optional[Union[StrictFloat, StrictInt]] = None
|
|
102
|
+
original_day: Optional[StrictInt] = None
|
|
103
|
+
original_month: Optional[StrictInt] = None
|
|
104
|
+
original_year: Optional[StrictInt] = None
|
|
105
|
+
path: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = ''
|
|
106
|
+
r128_album_gain: Optional[Union[StrictFloat, StrictInt]] = None
|
|
107
|
+
r128_track_gain: Optional[Union[StrictFloat, StrictInt]] = None
|
|
108
|
+
release_group_title: Optional[StrictStr] = ''
|
|
109
|
+
releasegroupdisambig: Optional[StrictStr] = ''
|
|
110
|
+
remixers: Optional[List[Any]] = None
|
|
111
|
+
remixers_ids: Optional[List[Any]] = None
|
|
112
|
+
rg_album_gain: Optional[Union[StrictFloat, StrictInt]] = None
|
|
113
|
+
rg_album_peak: Optional[Union[StrictFloat, StrictInt]] = None
|
|
114
|
+
rg_track_gain: Optional[Union[StrictFloat, StrictInt]] = None
|
|
115
|
+
rg_track_peak: Optional[Union[StrictFloat, StrictInt]] = None
|
|
116
|
+
samplerate: Optional[StrictInt] = None
|
|
117
|
+
script: Optional[StrictStr] = ''
|
|
118
|
+
style: Optional[StrictStr] = ''
|
|
119
|
+
subtitle: Optional[StrictStr] = ''
|
|
120
|
+
title: Optional[StrictStr] = ''
|
|
121
|
+
track: Optional[StrictInt] = None
|
|
122
|
+
trackdisambig: Optional[StrictStr] = ''
|
|
123
|
+
tracktotal: Optional[StrictInt] = None
|
|
124
|
+
work: Optional[StrictStr] = ''
|
|
125
|
+
work_disambig: Optional[StrictStr] = ''
|
|
126
|
+
year: Optional[StrictInt] = None
|
|
127
|
+
additional_properties: Dict[str, Any] = {}
|
|
128
|
+
__properties: ClassVar[List[str]] = ["id", "acoustid_fingerprint", "acoustid_id", "added", "album", "album_id", "albumartist", "albumartist_credit", "albumartist_sort", "albumartists", "albumartists_credit", "albumartists_sort", "albumdisambig", "albumstatus", "albumtype", "albumtypes", "arrangers", "arrangers_ids", "artist", "artist_credit", "artist_sort", "artists", "artists_credit", "artists_ids", "artists_sort", "asin", "barcode", "bitdepth", "bitrate", "bitrate_mode", "bpm", "catalognum", "channels", "comments", "comp", "composer_sort", "composers", "composers_ids", "country", "day", "disc", "discogs_albumid", "discogs_artistid", "discogs_labelid", "disctitle", "disctotal", "encoder", "encoder_info", "encoder_settings", "format", "genres", "grouping", "initial_key", "isrc", "label", "language", "length", "lyricists", "lyricists_ids", "lyrics", "mb_albumartistid", "mb_albumartistids", "mb_albumid", "mb_artistid", "mb_artistids", "mb_releasegroupid", "mb_releasetrackid", "mb_trackid", "mb_workid", "media", "month", "mtime", "original_day", "original_month", "original_year", "path", "r128_album_gain", "r128_track_gain", "release_group_title", "releasegroupdisambig", "remixers", "remixers_ids", "rg_album_gain", "rg_album_peak", "rg_track_gain", "rg_track_peak", "samplerate", "script", "style", "subtitle", "title", "track", "trackdisambig", "tracktotal", "work", "work_disambig", "year"]
|
|
129
|
+
|
|
130
|
+
model_config = ConfigDict(
|
|
131
|
+
validate_by_name=True,
|
|
132
|
+
validate_by_alias=True,
|
|
133
|
+
validate_assignment=True,
|
|
134
|
+
protected_namespaces=(),
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
def to_str(self) -> str:
|
|
139
|
+
"""Returns the string representation of the model using alias"""
|
|
140
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
141
|
+
|
|
142
|
+
def to_json(self) -> str:
|
|
143
|
+
"""Returns the JSON representation of the model using alias"""
|
|
144
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
145
|
+
|
|
146
|
+
@classmethod
|
|
147
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
148
|
+
"""Create an instance of APITrack from a JSON string"""
|
|
149
|
+
return cls.from_dict(json.loads(json_str))
|
|
150
|
+
|
|
151
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
152
|
+
"""Return the dictionary representation of the model using alias.
|
|
153
|
+
|
|
154
|
+
This has the following differences from calling pydantic's
|
|
155
|
+
`self.model_dump(by_alias=True)`:
|
|
156
|
+
|
|
157
|
+
* `None` is only added to the output dict for nullable fields that
|
|
158
|
+
were set at model initialization. Other fields with value `None`
|
|
159
|
+
are ignored.
|
|
160
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
161
|
+
"""
|
|
162
|
+
excluded_fields: Set[str] = set([
|
|
163
|
+
"additional_properties",
|
|
164
|
+
])
|
|
165
|
+
|
|
166
|
+
_dict = self.model_dump(
|
|
167
|
+
by_alias=True,
|
|
168
|
+
exclude=excluded_fields,
|
|
169
|
+
exclude_none=True,
|
|
170
|
+
)
|
|
171
|
+
# puts key-value pairs in additional_properties in the top level
|
|
172
|
+
if self.additional_properties is not None:
|
|
173
|
+
for _key, _value in self.additional_properties.items():
|
|
174
|
+
_dict[_key] = _value
|
|
175
|
+
|
|
176
|
+
# set to None if added (nullable) is None
|
|
177
|
+
# and model_fields_set contains the field
|
|
178
|
+
if self.added is None and "added" in self.model_fields_set:
|
|
179
|
+
_dict['added'] = None
|
|
180
|
+
|
|
181
|
+
# set to None if album_id (nullable) is None
|
|
182
|
+
# and model_fields_set contains the field
|
|
183
|
+
if self.album_id is None and "album_id" in self.model_fields_set:
|
|
184
|
+
_dict['album_id'] = None
|
|
185
|
+
|
|
186
|
+
# set to None if albumartists (nullable) is None
|
|
187
|
+
# and model_fields_set contains the field
|
|
188
|
+
if self.albumartists is None and "albumartists" in self.model_fields_set:
|
|
189
|
+
_dict['albumartists'] = None
|
|
190
|
+
|
|
191
|
+
# set to None if albumartists_credit (nullable) is None
|
|
192
|
+
# and model_fields_set contains the field
|
|
193
|
+
if self.albumartists_credit is None and "albumartists_credit" in self.model_fields_set:
|
|
194
|
+
_dict['albumartists_credit'] = None
|
|
195
|
+
|
|
196
|
+
# set to None if albumartists_sort (nullable) is None
|
|
197
|
+
# and model_fields_set contains the field
|
|
198
|
+
if self.albumartists_sort is None and "albumartists_sort" in self.model_fields_set:
|
|
199
|
+
_dict['albumartists_sort'] = None
|
|
200
|
+
|
|
201
|
+
# set to None if albumtypes (nullable) is None
|
|
202
|
+
# and model_fields_set contains the field
|
|
203
|
+
if self.albumtypes is None and "albumtypes" in self.model_fields_set:
|
|
204
|
+
_dict['albumtypes'] = None
|
|
205
|
+
|
|
206
|
+
# set to None if arrangers (nullable) is None
|
|
207
|
+
# and model_fields_set contains the field
|
|
208
|
+
if self.arrangers is None and "arrangers" in self.model_fields_set:
|
|
209
|
+
_dict['arrangers'] = None
|
|
210
|
+
|
|
211
|
+
# set to None if arrangers_ids (nullable) is None
|
|
212
|
+
# and model_fields_set contains the field
|
|
213
|
+
if self.arrangers_ids is None and "arrangers_ids" in self.model_fields_set:
|
|
214
|
+
_dict['arrangers_ids'] = None
|
|
215
|
+
|
|
216
|
+
# set to None if artists (nullable) is None
|
|
217
|
+
# and model_fields_set contains the field
|
|
218
|
+
if self.artists is None and "artists" in self.model_fields_set:
|
|
219
|
+
_dict['artists'] = None
|
|
220
|
+
|
|
221
|
+
# set to None if artists_credit (nullable) is None
|
|
222
|
+
# and model_fields_set contains the field
|
|
223
|
+
if self.artists_credit is None and "artists_credit" in self.model_fields_set:
|
|
224
|
+
_dict['artists_credit'] = None
|
|
225
|
+
|
|
226
|
+
# set to None if artists_ids (nullable) is None
|
|
227
|
+
# and model_fields_set contains the field
|
|
228
|
+
if self.artists_ids is None and "artists_ids" in self.model_fields_set:
|
|
229
|
+
_dict['artists_ids'] = None
|
|
230
|
+
|
|
231
|
+
# set to None if artists_sort (nullable) is None
|
|
232
|
+
# and model_fields_set contains the field
|
|
233
|
+
if self.artists_sort is None and "artists_sort" in self.model_fields_set:
|
|
234
|
+
_dict['artists_sort'] = None
|
|
235
|
+
|
|
236
|
+
# set to None if bitdepth (nullable) is None
|
|
237
|
+
# and model_fields_set contains the field
|
|
238
|
+
if self.bitdepth is None and "bitdepth" in self.model_fields_set:
|
|
239
|
+
_dict['bitdepth'] = None
|
|
240
|
+
|
|
241
|
+
# set to None if bitrate (nullable) is None
|
|
242
|
+
# and model_fields_set contains the field
|
|
243
|
+
if self.bitrate is None and "bitrate" in self.model_fields_set:
|
|
244
|
+
_dict['bitrate'] = None
|
|
245
|
+
|
|
246
|
+
# set to None if bpm (nullable) is None
|
|
247
|
+
# and model_fields_set contains the field
|
|
248
|
+
if self.bpm is None and "bpm" in self.model_fields_set:
|
|
249
|
+
_dict['bpm'] = None
|
|
250
|
+
|
|
251
|
+
# set to None if channels (nullable) is None
|
|
252
|
+
# and model_fields_set contains the field
|
|
253
|
+
if self.channels is None and "channels" in self.model_fields_set:
|
|
254
|
+
_dict['channels'] = None
|
|
255
|
+
|
|
256
|
+
# set to None if composers (nullable) is None
|
|
257
|
+
# and model_fields_set contains the field
|
|
258
|
+
if self.composers is None and "composers" in self.model_fields_set:
|
|
259
|
+
_dict['composers'] = None
|
|
260
|
+
|
|
261
|
+
# set to None if composers_ids (nullable) is None
|
|
262
|
+
# and model_fields_set contains the field
|
|
263
|
+
if self.composers_ids is None and "composers_ids" in self.model_fields_set:
|
|
264
|
+
_dict['composers_ids'] = None
|
|
265
|
+
|
|
266
|
+
# set to None if day (nullable) is None
|
|
267
|
+
# and model_fields_set contains the field
|
|
268
|
+
if self.day is None and "day" in self.model_fields_set:
|
|
269
|
+
_dict['day'] = None
|
|
270
|
+
|
|
271
|
+
# set to None if disc (nullable) is None
|
|
272
|
+
# and model_fields_set contains the field
|
|
273
|
+
if self.disc is None and "disc" in self.model_fields_set:
|
|
274
|
+
_dict['disc'] = None
|
|
275
|
+
|
|
276
|
+
# set to None if discogs_albumid (nullable) is None
|
|
277
|
+
# and model_fields_set contains the field
|
|
278
|
+
if self.discogs_albumid is None and "discogs_albumid" in self.model_fields_set:
|
|
279
|
+
_dict['discogs_albumid'] = None
|
|
280
|
+
|
|
281
|
+
# set to None if discogs_artistid (nullable) is None
|
|
282
|
+
# and model_fields_set contains the field
|
|
283
|
+
if self.discogs_artistid is None and "discogs_artistid" in self.model_fields_set:
|
|
284
|
+
_dict['discogs_artistid'] = None
|
|
285
|
+
|
|
286
|
+
# set to None if discogs_labelid (nullable) is None
|
|
287
|
+
# and model_fields_set contains the field
|
|
288
|
+
if self.discogs_labelid is None and "discogs_labelid" in self.model_fields_set:
|
|
289
|
+
_dict['discogs_labelid'] = None
|
|
290
|
+
|
|
291
|
+
# set to None if disctotal (nullable) is None
|
|
292
|
+
# and model_fields_set contains the field
|
|
293
|
+
if self.disctotal is None and "disctotal" in self.model_fields_set:
|
|
294
|
+
_dict['disctotal'] = None
|
|
295
|
+
|
|
296
|
+
# set to None if genres (nullable) is None
|
|
297
|
+
# and model_fields_set contains the field
|
|
298
|
+
if self.genres is None and "genres" in self.model_fields_set:
|
|
299
|
+
_dict['genres'] = None
|
|
300
|
+
|
|
301
|
+
# set to None if length (nullable) is None
|
|
302
|
+
# and model_fields_set contains the field
|
|
303
|
+
if self.length is None and "length" in self.model_fields_set:
|
|
304
|
+
_dict['length'] = None
|
|
305
|
+
|
|
306
|
+
# set to None if lyricists (nullable) is None
|
|
307
|
+
# and model_fields_set contains the field
|
|
308
|
+
if self.lyricists is None and "lyricists" in self.model_fields_set:
|
|
309
|
+
_dict['lyricists'] = None
|
|
310
|
+
|
|
311
|
+
# set to None if lyricists_ids (nullable) is None
|
|
312
|
+
# and model_fields_set contains the field
|
|
313
|
+
if self.lyricists_ids is None and "lyricists_ids" in self.model_fields_set:
|
|
314
|
+
_dict['lyricists_ids'] = None
|
|
315
|
+
|
|
316
|
+
# set to None if mb_albumartistids (nullable) is None
|
|
317
|
+
# and model_fields_set contains the field
|
|
318
|
+
if self.mb_albumartistids is None and "mb_albumartistids" in self.model_fields_set:
|
|
319
|
+
_dict['mb_albumartistids'] = None
|
|
320
|
+
|
|
321
|
+
# set to None if mb_artistids (nullable) is None
|
|
322
|
+
# and model_fields_set contains the field
|
|
323
|
+
if self.mb_artistids is None and "mb_artistids" in self.model_fields_set:
|
|
324
|
+
_dict['mb_artistids'] = None
|
|
325
|
+
|
|
326
|
+
# set to None if month (nullable) is None
|
|
327
|
+
# and model_fields_set contains the field
|
|
328
|
+
if self.month is None and "month" in self.model_fields_set:
|
|
329
|
+
_dict['month'] = None
|
|
330
|
+
|
|
331
|
+
# set to None if mtime (nullable) is None
|
|
332
|
+
# and model_fields_set contains the field
|
|
333
|
+
if self.mtime is None and "mtime" in self.model_fields_set:
|
|
334
|
+
_dict['mtime'] = None
|
|
335
|
+
|
|
336
|
+
# set to None if original_day (nullable) is None
|
|
337
|
+
# and model_fields_set contains the field
|
|
338
|
+
if self.original_day is None and "original_day" in self.model_fields_set:
|
|
339
|
+
_dict['original_day'] = None
|
|
340
|
+
|
|
341
|
+
# set to None if original_month (nullable) is None
|
|
342
|
+
# and model_fields_set contains the field
|
|
343
|
+
if self.original_month is None and "original_month" in self.model_fields_set:
|
|
344
|
+
_dict['original_month'] = None
|
|
345
|
+
|
|
346
|
+
# set to None if original_year (nullable) is None
|
|
347
|
+
# and model_fields_set contains the field
|
|
348
|
+
if self.original_year is None and "original_year" in self.model_fields_set:
|
|
349
|
+
_dict['original_year'] = None
|
|
350
|
+
|
|
351
|
+
# set to None if r128_album_gain (nullable) is None
|
|
352
|
+
# and model_fields_set contains the field
|
|
353
|
+
if self.r128_album_gain is None and "r128_album_gain" in self.model_fields_set:
|
|
354
|
+
_dict['r128_album_gain'] = None
|
|
355
|
+
|
|
356
|
+
# set to None if r128_track_gain (nullable) is None
|
|
357
|
+
# and model_fields_set contains the field
|
|
358
|
+
if self.r128_track_gain is None and "r128_track_gain" in self.model_fields_set:
|
|
359
|
+
_dict['r128_track_gain'] = None
|
|
360
|
+
|
|
361
|
+
# set to None if remixers (nullable) is None
|
|
362
|
+
# and model_fields_set contains the field
|
|
363
|
+
if self.remixers is None and "remixers" in self.model_fields_set:
|
|
364
|
+
_dict['remixers'] = None
|
|
365
|
+
|
|
366
|
+
# set to None if remixers_ids (nullable) is None
|
|
367
|
+
# and model_fields_set contains the field
|
|
368
|
+
if self.remixers_ids is None and "remixers_ids" in self.model_fields_set:
|
|
369
|
+
_dict['remixers_ids'] = None
|
|
370
|
+
|
|
371
|
+
# set to None if rg_album_gain (nullable) is None
|
|
372
|
+
# and model_fields_set contains the field
|
|
373
|
+
if self.rg_album_gain is None and "rg_album_gain" in self.model_fields_set:
|
|
374
|
+
_dict['rg_album_gain'] = None
|
|
375
|
+
|
|
376
|
+
# set to None if rg_album_peak (nullable) is None
|
|
377
|
+
# and model_fields_set contains the field
|
|
378
|
+
if self.rg_album_peak is None and "rg_album_peak" in self.model_fields_set:
|
|
379
|
+
_dict['rg_album_peak'] = None
|
|
380
|
+
|
|
381
|
+
# set to None if rg_track_gain (nullable) is None
|
|
382
|
+
# and model_fields_set contains the field
|
|
383
|
+
if self.rg_track_gain is None and "rg_track_gain" in self.model_fields_set:
|
|
384
|
+
_dict['rg_track_gain'] = None
|
|
385
|
+
|
|
386
|
+
# set to None if rg_track_peak (nullable) is None
|
|
387
|
+
# and model_fields_set contains the field
|
|
388
|
+
if self.rg_track_peak is None and "rg_track_peak" in self.model_fields_set:
|
|
389
|
+
_dict['rg_track_peak'] = None
|
|
390
|
+
|
|
391
|
+
# set to None if samplerate (nullable) is None
|
|
392
|
+
# and model_fields_set contains the field
|
|
393
|
+
if self.samplerate is None and "samplerate" in self.model_fields_set:
|
|
394
|
+
_dict['samplerate'] = None
|
|
395
|
+
|
|
396
|
+
# set to None if track (nullable) is None
|
|
397
|
+
# and model_fields_set contains the field
|
|
398
|
+
if self.track is None and "track" in self.model_fields_set:
|
|
399
|
+
_dict['track'] = None
|
|
400
|
+
|
|
401
|
+
# set to None if tracktotal (nullable) is None
|
|
402
|
+
# and model_fields_set contains the field
|
|
403
|
+
if self.tracktotal is None and "tracktotal" in self.model_fields_set:
|
|
404
|
+
_dict['tracktotal'] = None
|
|
405
|
+
|
|
406
|
+
# set to None if year (nullable) is None
|
|
407
|
+
# and model_fields_set contains the field
|
|
408
|
+
if self.year is None and "year" in self.model_fields_set:
|
|
409
|
+
_dict['year'] = None
|
|
410
|
+
|
|
411
|
+
return _dict
|
|
412
|
+
|
|
413
|
+
@classmethod
|
|
414
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
415
|
+
"""Create an instance of APITrack from a dict"""
|
|
416
|
+
if obj is None:
|
|
417
|
+
return None
|
|
418
|
+
|
|
419
|
+
if not isinstance(obj, dict):
|
|
420
|
+
return cls.model_validate(obj)
|
|
421
|
+
|
|
422
|
+
_obj = cls.model_validate({
|
|
423
|
+
"id": obj.get("id"),
|
|
424
|
+
"acoustid_fingerprint": obj.get("acoustid_fingerprint") if obj.get("acoustid_fingerprint") is not None else '',
|
|
425
|
+
"acoustid_id": obj.get("acoustid_id") if obj.get("acoustid_id") is not None else '',
|
|
426
|
+
"added": obj.get("added"),
|
|
427
|
+
"album": obj.get("album") if obj.get("album") is not None else '',
|
|
428
|
+
"album_id": obj.get("album_id"),
|
|
429
|
+
"albumartist": obj.get("albumartist") if obj.get("albumartist") is not None else '',
|
|
430
|
+
"albumartist_credit": obj.get("albumartist_credit") if obj.get("albumartist_credit") is not None else '',
|
|
431
|
+
"albumartist_sort": obj.get("albumartist_sort") if obj.get("albumartist_sort") is not None else '',
|
|
432
|
+
"albumartists": obj.get("albumartists"),
|
|
433
|
+
"albumartists_credit": obj.get("albumartists_credit"),
|
|
434
|
+
"albumartists_sort": obj.get("albumartists_sort"),
|
|
435
|
+
"albumdisambig": obj.get("albumdisambig") if obj.get("albumdisambig") is not None else '',
|
|
436
|
+
"albumstatus": obj.get("albumstatus") if obj.get("albumstatus") is not None else '',
|
|
437
|
+
"albumtype": obj.get("albumtype") if obj.get("albumtype") is not None else '',
|
|
438
|
+
"albumtypes": obj.get("albumtypes"),
|
|
439
|
+
"arrangers": obj.get("arrangers"),
|
|
440
|
+
"arrangers_ids": obj.get("arrangers_ids"),
|
|
441
|
+
"artist": obj.get("artist") if obj.get("artist") is not None else '',
|
|
442
|
+
"artist_credit": obj.get("artist_credit") if obj.get("artist_credit") is not None else '',
|
|
443
|
+
"artist_sort": obj.get("artist_sort") if obj.get("artist_sort") is not None else '',
|
|
444
|
+
"artists": obj.get("artists"),
|
|
445
|
+
"artists_credit": obj.get("artists_credit"),
|
|
446
|
+
"artists_ids": obj.get("artists_ids"),
|
|
447
|
+
"artists_sort": obj.get("artists_sort"),
|
|
448
|
+
"asin": obj.get("asin") if obj.get("asin") is not None else '',
|
|
449
|
+
"barcode": obj.get("barcode") if obj.get("barcode") is not None else '',
|
|
450
|
+
"bitdepth": obj.get("bitdepth"),
|
|
451
|
+
"bitrate": obj.get("bitrate"),
|
|
452
|
+
"bitrate_mode": obj.get("bitrate_mode") if obj.get("bitrate_mode") is not None else '',
|
|
453
|
+
"bpm": obj.get("bpm"),
|
|
454
|
+
"catalognum": obj.get("catalognum") if obj.get("catalognum") is not None else '',
|
|
455
|
+
"channels": obj.get("channels"),
|
|
456
|
+
"comments": obj.get("comments") if obj.get("comments") is not None else '',
|
|
457
|
+
"comp": obj.get("comp") if obj.get("comp") is not None else False,
|
|
458
|
+
"composer_sort": obj.get("composer_sort") if obj.get("composer_sort") is not None else '',
|
|
459
|
+
"composers": obj.get("composers"),
|
|
460
|
+
"composers_ids": obj.get("composers_ids"),
|
|
461
|
+
"country": obj.get("country") if obj.get("country") is not None else '',
|
|
462
|
+
"day": obj.get("day"),
|
|
463
|
+
"disc": obj.get("disc"),
|
|
464
|
+
"discogs_albumid": obj.get("discogs_albumid"),
|
|
465
|
+
"discogs_artistid": obj.get("discogs_artistid"),
|
|
466
|
+
"discogs_labelid": obj.get("discogs_labelid"),
|
|
467
|
+
"disctitle": obj.get("disctitle") if obj.get("disctitle") is not None else '',
|
|
468
|
+
"disctotal": obj.get("disctotal"),
|
|
469
|
+
"encoder": obj.get("encoder") if obj.get("encoder") is not None else '',
|
|
470
|
+
"encoder_info": obj.get("encoder_info") if obj.get("encoder_info") is not None else '',
|
|
471
|
+
"encoder_settings": obj.get("encoder_settings") if obj.get("encoder_settings") is not None else '',
|
|
472
|
+
"format": obj.get("format") if obj.get("format") is not None else '',
|
|
473
|
+
"genres": obj.get("genres"),
|
|
474
|
+
"grouping": obj.get("grouping") if obj.get("grouping") is not None else '',
|
|
475
|
+
"initial_key": obj.get("initial_key") if obj.get("initial_key") is not None else '',
|
|
476
|
+
"isrc": obj.get("isrc") if obj.get("isrc") is not None else '',
|
|
477
|
+
"label": obj.get("label") if obj.get("label") is not None else '',
|
|
478
|
+
"language": obj.get("language") if obj.get("language") is not None else '',
|
|
479
|
+
"length": obj.get("length"),
|
|
480
|
+
"lyricists": obj.get("lyricists"),
|
|
481
|
+
"lyricists_ids": obj.get("lyricists_ids"),
|
|
482
|
+
"lyrics": obj.get("lyrics") if obj.get("lyrics") is not None else '',
|
|
483
|
+
"mb_albumartistid": obj.get("mb_albumartistid") if obj.get("mb_albumartistid") is not None else '',
|
|
484
|
+
"mb_albumartistids": obj.get("mb_albumartistids"),
|
|
485
|
+
"mb_albumid": obj.get("mb_albumid") if obj.get("mb_albumid") is not None else '',
|
|
486
|
+
"mb_artistid": obj.get("mb_artistid") if obj.get("mb_artistid") is not None else '',
|
|
487
|
+
"mb_artistids": obj.get("mb_artistids"),
|
|
488
|
+
"mb_releasegroupid": obj.get("mb_releasegroupid") if obj.get("mb_releasegroupid") is not None else '',
|
|
489
|
+
"mb_releasetrackid": obj.get("mb_releasetrackid") if obj.get("mb_releasetrackid") is not None else '',
|
|
490
|
+
"mb_trackid": obj.get("mb_trackid") if obj.get("mb_trackid") is not None else '',
|
|
491
|
+
"mb_workid": obj.get("mb_workid") if obj.get("mb_workid") is not None else '',
|
|
492
|
+
"media": obj.get("media") if obj.get("media") is not None else '',
|
|
493
|
+
"month": obj.get("month"),
|
|
494
|
+
"mtime": obj.get("mtime"),
|
|
495
|
+
"original_day": obj.get("original_day"),
|
|
496
|
+
"original_month": obj.get("original_month"),
|
|
497
|
+
"original_year": obj.get("original_year"),
|
|
498
|
+
"path": obj.get("path") if obj.get("path") is not None else '',
|
|
499
|
+
"r128_album_gain": obj.get("r128_album_gain"),
|
|
500
|
+
"r128_track_gain": obj.get("r128_track_gain"),
|
|
501
|
+
"release_group_title": obj.get("release_group_title") if obj.get("release_group_title") is not None else '',
|
|
502
|
+
"releasegroupdisambig": obj.get("releasegroupdisambig") if obj.get("releasegroupdisambig") is not None else '',
|
|
503
|
+
"remixers": obj.get("remixers"),
|
|
504
|
+
"remixers_ids": obj.get("remixers_ids"),
|
|
505
|
+
"rg_album_gain": obj.get("rg_album_gain"),
|
|
506
|
+
"rg_album_peak": obj.get("rg_album_peak"),
|
|
507
|
+
"rg_track_gain": obj.get("rg_track_gain"),
|
|
508
|
+
"rg_track_peak": obj.get("rg_track_peak"),
|
|
509
|
+
"samplerate": obj.get("samplerate"),
|
|
510
|
+
"script": obj.get("script") if obj.get("script") is not None else '',
|
|
511
|
+
"style": obj.get("style") if obj.get("style") is not None else '',
|
|
512
|
+
"subtitle": obj.get("subtitle") if obj.get("subtitle") is not None else '',
|
|
513
|
+
"title": obj.get("title") if obj.get("title") is not None else '',
|
|
514
|
+
"track": obj.get("track"),
|
|
515
|
+
"trackdisambig": obj.get("trackdisambig") if obj.get("trackdisambig") is not None else '',
|
|
516
|
+
"tracktotal": obj.get("tracktotal"),
|
|
517
|
+
"work": obj.get("work") if obj.get("work") is not None else '',
|
|
518
|
+
"work_disambig": obj.get("work_disambig") if obj.get("work_disambig") is not None else '',
|
|
519
|
+
"year": obj.get("year")
|
|
520
|
+
})
|
|
521
|
+
# store additional fields in additional_properties
|
|
522
|
+
for _key in obj.keys():
|
|
523
|
+
if _key not in cls.__properties:
|
|
524
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
525
|
+
|
|
526
|
+
return _obj
|
|
527
|
+
|
|
528
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
beetkeeper
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document:
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class BeetsEventType(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
Subset of beets listener `event_type`s which the API accepts from our plugin client. See also: https://beets.readthedocs.io/en/stable/dev/plugins/events.html
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
ALBUM_IMPORTED = 'album_imported'
|
|
30
|
+
ALBUM_REMOVED = 'album_removed'
|
|
31
|
+
IMPORT_TASK_FILES = 'import_task_files'
|
|
32
|
+
ITEM_IMPORTED = 'item_imported'
|
|
33
|
+
ITEM_REMOVED = 'item_removed'
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def from_json(cls, json_str: str) -> Self:
|
|
37
|
+
"""Create an instance of BeetsEventType from a JSON string"""
|
|
38
|
+
return cls(json.loads(json_str))
|
|
39
|
+
|
|
40
|
+
|