music-assistant-server

21.6 KBAMBR
test_parsers.ambr
21.6 KB783 lines • plaintext
1# serializer version: 1
2# name: test_parse_albums[infest]
3  dict({
4    'album_type': 'unknown',
5    'artists': list([
6      dict({
7        'available': True,
8        'external_ids': list([
9        ]),
10        'image': None,
11        'is_playable': True,
12        'item_id': 'e439648e08ade14e27d5de48fa97c88e',
13        'media_type': 'artist',
14        'name': 'Papa Roach',
15        'provider': 'xx-instance-id-xx',
16        'sort_name': 'papa roach',
17        'translation_key': None,
18        'uri': 'xx-instance-id-xx://artist/e439648e08ade14e27d5de48fa97c88e',
19        'version': '',
20        'year': None,
21      }),
22    ]),
23    'date_added': None,
24    'external_ids': list([
25      list([
26        'musicbrainz_albumid',
27        'bf25b030-0cbb-495a-8d79-6c7fee20a089',
28      ]),
29      list([
30        'musicbrainz_releasegroupid',
31        '0193355a-cdfb-3936-afd2-44d651eb006d',
32      ]),
33    ]),
34    'favorite': False,
35    'is_playable': True,
36    'item_id': '70b7288088b42d318f75dbcc41fd0091',
37    'media_type': 'album',
38    'metadata': dict({
39      'chapters': None,
40      'copyright': None,
41      'description': None,
42      'explicit': None,
43      'genres': None,
44      'grouping': None,
45      'images': list([
46        dict({
47          'path': 'http://localhost:1234/Items/70b7288088b42d318f75dbcc41fd0091/Images/Primary?api_key=ACCESS_TOKEN',
48          'provider': 'xx-instance-id-xx',
49          'remotely_accessible': False,
50          'type': 'thumb',
51        }),
52      ]),
53      'label': None,
54      'languages': None,
55      'last_refresh': None,
56      'links': None,
57      'lrc_lyrics': None,
58      'lyrics': None,
59      'mood': None,
60      'performers': None,
61      'popularity': None,
62      'preview': None,
63      'release_date': None,
64      'review': None,
65      'style': None,
66    }),
67    'name': 'Infest',
68    'position': None,
69    'provider': 'jellyfin',
70    'provider_mappings': list([
71      dict({
72        'audio_format': dict({
73          'bit_depth': 16,
74          'bit_rate': 0,
75          'channels': 2,
76          'codec_type': '?',
77          'content_type': '?',
78          'output_format_str': '?',
79          'sample_rate': 44100,
80        }),
81        'available': True,
82        'details': None,
83        'in_library': None,
84        'is_unique': None,
85        'item_id': '70b7288088b42d318f75dbcc41fd0091',
86        'provider_domain': 'jellyfin',
87        'provider_instance': 'xx-instance-id-xx',
88        'url': None,
89      }),
90    ]),
91    'sort_name': 'infest',
92    'translation_key': None,
93    'uri': 'jellyfin://album/70b7288088b42d318f75dbcc41fd0091',
94    'version': '',
95    'year': 2000,
96  })
97# ---
98# name: test_parse_albums[this_is_christmas]
99  dict({
100    'album_type': 'unknown',
101    'artists': list([
102      dict({
103        'available': True,
104        'external_ids': list([
105        ]),
106        'image': None,
107        'is_playable': True,
108        'item_id': '555b36f7d310d1b7405557a8775c6878',
109        'media_type': 'artist',
110        'name': 'Emmy the Great & Tim Wheeler',
111        'provider': 'xx-instance-id-xx',
112        'sort_name': 'emmy the great & tim wheeler',
113        'translation_key': None,
114        'uri': 'xx-instance-id-xx://artist/555b36f7d310d1b7405557a8775c6878',
115        'version': '',
116        'year': None,
117      }),
118    ]),
119    'date_added': None,
120    'external_ids': list([
121      list([
122        'musicbrainz_albumid',
123        'b13a174d-527d-44a1-b8f8-a4c78b03b7d9',
124      ]),
125      list([
126        'musicbrainz_releasegroupid',
127        'f002d6b7-17af-4f9e-8d30-5486548ffe6f',
128      ]),
129    ]),
130    'favorite': False,
131    'is_playable': True,
132    'item_id': '32ed6a0091733dcff57eae67010f3d4b',
133    'media_type': 'album',
134    'metadata': dict({
135      'chapters': None,
136      'copyright': None,
137      'description': None,
138      'explicit': None,
139      'genres': None,
140      'grouping': None,
141      'images': list([
142        dict({
143          'path': 'http://localhost:1234/Items/32ed6a0091733dcff57eae67010f3d4b/Images/Primary?api_key=ACCESS_TOKEN',
144          'provider': 'xx-instance-id-xx',
145          'remotely_accessible': False,
146          'type': 'thumb',
147        }),
148      ]),
149      'label': None,
150      'languages': None,
151      'last_refresh': None,
152      'links': None,
153      'lrc_lyrics': None,
154      'lyrics': None,
155      'mood': None,
156      'performers': None,
157      'popularity': None,
158      'preview': None,
159      'release_date': None,
160      'review': None,
161      'style': None,
162    }),
163    'name': 'This Is Christmas',
164    'position': None,
165    'provider': 'jellyfin',
166    'provider_mappings': list([
167      dict({
168        'audio_format': dict({
169          'bit_depth': 16,
170          'bit_rate': 0,
171          'channels': 2,
172          'codec_type': '?',
173          'content_type': '?',
174          'output_format_str': '?',
175          'sample_rate': 44100,
176        }),
177        'available': True,
178        'details': None,
179        'in_library': None,
180        'is_unique': None,
181        'item_id': '32ed6a0091733dcff57eae67010f3d4b',
182        'provider_domain': 'jellyfin',
183        'provider_instance': 'xx-instance-id-xx',
184        'url': None,
185      }),
186    ]),
187    'sort_name': 'this is christmas',
188    'translation_key': None,
189    'uri': 'jellyfin://album/32ed6a0091733dcff57eae67010f3d4b',
190    'version': '',
191    'year': 2011,
192  })
193# ---
194# name: test_parse_albums[yesterday_when_i_was_mad]
195  dict({
196    'album_type': 'unknown',
197    'artists': list([
198      dict({
199        'available': True,
200        'external_ids': list([
201        ]),
202        'image': None,
203        'is_playable': True,
204        'item_id': '[unknown]',
205        'media_type': 'artist',
206        'name': '[unknown]',
207        'provider': 'jellyfin',
208        'sort_name': 'unknown]',
209        'translation_key': None,
210        'uri': 'jellyfin://artist/[unknown]',
211        'version': '',
212        'year': None,
213      }),
214    ]),
215    'date_added': None,
216    'external_ids': list([
217    ]),
218    'favorite': False,
219    'is_playable': True,
220    'item_id': '7c8d0bd55291c7fc0451d17ebef30017',
221    'media_type': 'album',
222    'metadata': dict({
223      'chapters': None,
224      'copyright': None,
225      'description': None,
226      'explicit': None,
227      'genres': None,
228      'grouping': None,
229      'images': list([
230      ]),
231      'label': None,
232      'languages': None,
233      'last_refresh': None,
234      'links': None,
235      'lrc_lyrics': None,
236      'lyrics': None,
237      'mood': None,
238      'performers': None,
239      'popularity': None,
240      'preview': None,
241      'release_date': None,
242      'review': None,
243      'style': None,
244    }),
245    'name': 'Yesterday, When I Was Mad [Disc 2]',
246    'position': None,
247    'provider': 'jellyfin',
248    'provider_mappings': list([
249      dict({
250        'audio_format': dict({
251          'bit_depth': 16,
252          'bit_rate': 0,
253          'channels': 2,
254          'codec_type': '?',
255          'content_type': '?',
256          'output_format_str': '?',
257          'sample_rate': 44100,
258        }),
259        'available': True,
260        'details': None,
261        'in_library': None,
262        'is_unique': None,
263        'item_id': '7c8d0bd55291c7fc0451d17ebef30017',
264        'provider_domain': 'jellyfin',
265        'provider_instance': 'xx-instance-id-xx',
266        'url': None,
267      }),
268    ]),
269    'sort_name': 'yesterday when i was mad [disc 0000000002]',
270    'translation_key': None,
271    'uri': 'jellyfin://album/7c8d0bd55291c7fc0451d17ebef30017',
272    'version': '',
273    'year': None,
274  })
275# ---
276# name: test_parse_artists[ash]
277  dict({
278    'date_added': None,
279    'external_ids': list([
280      list([
281        'musicbrainz_artistid',
282        '99164692-c02d-407c-81c9-25d338dd21f4',
283      ]),
284    ]),
285    'favorite': False,
286    'is_playable': True,
287    'item_id': 'dd954bbf54398e247d803186d3585b79',
288    'media_type': 'artist',
289    'metadata': dict({
290      'chapters': None,
291      'copyright': None,
292      'description': None,
293      'explicit': None,
294      'genres': None,
295      'grouping': None,
296      'images': list([
297        dict({
298          'path': 'http://localhost:1234/Items/dd954bbf54398e247d803186d3585b79/Images/Backdrop/0?api_key=ACCESS_TOKEN',
299          'provider': 'xx-instance-id-xx',
300          'remotely_accessible': False,
301          'type': 'fanart',
302        }),
303        dict({
304          'path': 'http://localhost:1234/Items/dd954bbf54398e247d803186d3585b79/Images/Primary?api_key=ACCESS_TOKEN',
305          'provider': 'xx-instance-id-xx',
306          'remotely_accessible': False,
307          'type': 'thumb',
308        }),
309        dict({
310          'path': 'http://localhost:1234/Items/dd954bbf54398e247d803186d3585b79/Images/Logo?api_key=ACCESS_TOKEN',
311          'provider': 'xx-instance-id-xx',
312          'remotely_accessible': False,
313          'type': 'logo',
314        }),
315      ]),
316      'label': None,
317      'languages': None,
318      'last_refresh': None,
319      'links': None,
320      'lrc_lyrics': None,
321      'lyrics': None,
322      'mood': None,
323      'performers': None,
324      'popularity': None,
325      'preview': None,
326      'release_date': None,
327      'review': None,
328      'style': None,
329    }),
330    'name': 'Ash',
331    'position': None,
332    'provider': 'jellyfin',
333    'provider_mappings': list([
334      dict({
335        'audio_format': dict({
336          'bit_depth': 16,
337          'bit_rate': 0,
338          'channels': 2,
339          'codec_type': '?',
340          'content_type': '?',
341          'output_format_str': '?',
342          'sample_rate': 44100,
343        }),
344        'available': True,
345        'details': None,
346        'in_library': None,
347        'is_unique': None,
348        'item_id': 'dd954bbf54398e247d803186d3585b79',
349        'provider_domain': 'jellyfin',
350        'provider_instance': 'xx-instance-id-xx',
351        'url': None,
352      }),
353    ]),
354    'sort_name': 'ash',
355    'translation_key': None,
356    'uri': 'jellyfin://artist/dd954bbf54398e247d803186d3585b79',
357    'version': '',
358  })
359# ---
360# name: test_parse_tracks[do_i_wanna_know]
361  dict({
362    'album': dict({
363      'available': True,
364      'external_ids': list([
365      ]),
366      'image': None,
367      'is_playable': True,
368      'item_id': 'd42d74e134693184e7adc73106238e89',
369      'media_type': 'album',
370      'name': 'AM',
371      'provider': 'xx-instance-id-xx',
372      'sort_name': 'am',
373      'translation_key': None,
374      'uri': 'xx-instance-id-xx://album/d42d74e134693184e7adc73106238e89',
375      'version': '',
376      'year': None,
377    }),
378    'artists': list([
379      dict({
380        'available': True,
381        'external_ids': list([
382        ]),
383        'image': None,
384        'is_playable': True,
385        'item_id': 'cc940aeb8a99149f159fe9794f136071',
386        'media_type': 'artist',
387        'name': 'Arctic Monkeys',
388        'provider': 'xx-instance-id-xx',
389        'sort_name': 'arctic monkeys',
390        'translation_key': None,
391        'uri': 'xx-instance-id-xx://artist/cc940aeb8a99149f159fe9794f136071',
392        'version': '',
393        'year': None,
394      }),
395    ]),
396    'date_added': None,
397    'disc_number': 1,
398    'duration': 272,
399    'external_ids': list([
400    ]),
401    'favorite': False,
402    'is_playable': True,
403    'item_id': 'da9c458e425584680765ddc3a89cbc0c',
404    'last_played': 0,
405    'media_type': 'track',
406    'metadata': dict({
407      'chapters': None,
408      'copyright': None,
409      'description': None,
410      'explicit': None,
411      'genres': None,
412      'grouping': None,
413      'images': list([
414        dict({
415          'path': 'http://localhost:1234/Items/da9c458e425584680765ddc3a89cbc0c/Images/Primary?api_key=ACCESS_TOKEN',
416          'provider': 'xx-instance-id-xx',
417          'remotely_accessible': False,
418          'type': 'thumb',
419        }),
420      ]),
421      'label': None,
422      'languages': None,
423      'last_refresh': None,
424      'links': None,
425      'lrc_lyrics': None,
426      'lyrics': None,
427      'mood': None,
428      'performers': None,
429      'popularity': None,
430      'preview': None,
431      'release_date': None,
432      'review': None,
433      'style': None,
434    }),
435    'name': 'Do I Wanna Know?',
436    'position': 1,
437    'provider': 'xx-instance-id-xx',
438    'provider_mappings': list([
439      dict({
440        'audio_format': dict({
441          'bit_depth': 24,
442          'bit_rate': 1546,
443          'channels': 2,
444          'codec_type': '?',
445          'content_type': 'flac',
446          'output_format_str': 'flac',
447          'sample_rate': 44100,
448        }),
449        'available': True,
450        'details': None,
451        'in_library': None,
452        'is_unique': None,
453        'item_id': 'da9c458e425584680765ddc3a89cbc0c',
454        'provider_domain': 'jellyfin',
455        'provider_instance': 'xx-instance-id-xx',
456        'url': 'http://localhost:1234/Audio/da9c458e425584680765ddc3a89cbc0c/universal?userId=USER_ID&deviceId=X&maxStreamingBitrate=140000000&api_key=ACCESS_TOKEN',
457      }),
458    ]),
459    'sort_name': 'do i wanna know?',
460    'track_number': 1,
461    'translation_key': None,
462    'uri': 'xx-instance-id-xx://track/da9c458e425584680765ddc3a89cbc0c',
463    'version': '',
464  })
465# ---
466# name: test_parse_tracks[thrown_away]
467  dict({
468    'album': dict({
469      'available': True,
470      'external_ids': list([
471      ]),
472      'image': None,
473      'is_playable': True,
474      'item_id': '70b7288088b42d318f75dbcc41fd0091',
475      'media_type': 'album',
476      'name': 'Unknown Album (70b7288088b42d318f75dbcc41fd0091)',
477      'provider': 'xx-instance-id-xx',
478      'sort_name': 'unknown album (70b7288088b42d318f75dbcc41fd0091)',
479      'translation_key': None,
480      'uri': 'xx-instance-id-xx://album/70b7288088b42d318f75dbcc41fd0091',
481      'version': '',
482      'year': None,
483    }),
484    'artists': list([
485      dict({
486        'available': True,
487        'external_ids': list([
488        ]),
489        'image': None,
490        'is_playable': True,
491        'item_id': '[unknown]',
492        'media_type': 'artist',
493        'name': '[unknown]',
494        'provider': 'jellyfin',
495        'sort_name': 'unknown]',
496        'translation_key': None,
497        'uri': 'jellyfin://artist/[unknown]',
498        'version': '',
499        'year': None,
500      }),
501    ]),
502    'date_added': None,
503    'disc_number': 0,
504    'duration': 577,
505    'external_ids': list([
506    ]),
507    'favorite': False,
508    'is_playable': True,
509    'item_id': 'b5319fb11cde39fca2023184fcfa9862',
510    'last_played': 0,
511    'media_type': 'track',
512    'metadata': dict({
513      'chapters': None,
514      'copyright': None,
515      'description': None,
516      'explicit': None,
517      'genres': None,
518      'grouping': None,
519      'images': list([
520      ]),
521      'label': None,
522      'languages': None,
523      'last_refresh': None,
524      'links': None,
525      'lrc_lyrics': None,
526      'lyrics': None,
527      'mood': None,
528      'performers': None,
529      'popularity': None,
530      'preview': None,
531      'release_date': None,
532      'review': None,
533      'style': None,
534    }),
535    'name': '11 Thrown Away',
536    'position': 0,
537    'provider': 'xx-instance-id-xx',
538    'provider_mappings': list([
539      dict({
540        'audio_format': dict({
541          'bit_depth': 16,
542          'bit_rate': 156,
543          'channels': 2,
544          'codec_type': '?',
545          'content_type': 'mp3',
546          'output_format_str': 'mp3',
547          'sample_rate': 44100,
548        }),
549        'available': True,
550        'details': None,
551        'in_library': None,
552        'is_unique': None,
553        'item_id': 'b5319fb11cde39fca2023184fcfa9862',
554        'provider_domain': 'jellyfin',
555        'provider_instance': 'xx-instance-id-xx',
556        'url': 'http://localhost:1234/Audio/b5319fb11cde39fca2023184fcfa9862/universal?userId=USER_ID&deviceId=X&maxStreamingBitrate=140000000&api_key=ACCESS_TOKEN',
557      }),
558    ]),
559    'sort_name': '11 thrown away',
560    'track_number': 0,
561    'translation_key': None,
562    'uri': 'xx-instance-id-xx://track/b5319fb11cde39fca2023184fcfa9862',
563    'version': '',
564  })
565# ---
566# name: test_parse_tracks[where_the_bands_are]
567  dict({
568    'album': None,
569    'artists': list([
570      dict({
571        'available': True,
572        'external_ids': list([
573        ]),
574        'image': None,
575        'is_playable': True,
576        'item_id': '94875b0dd58cbf5245a135982133651a',
577        'media_type': 'artist',
578        'name': 'Dead Like Harry',
579        'provider': 'xx-instance-id-xx',
580        'sort_name': 'dead like harry',
581        'translation_key': None,
582        'uri': 'xx-instance-id-xx://artist/94875b0dd58cbf5245a135982133651a',
583        'version': '',
584        'year': None,
585      }),
586    ]),
587    'date_added': None,
588    'disc_number': 1,
589    'duration': 246,
590    'external_ids': list([
591    ]),
592    'favorite': False,
593    'is_playable': True,
594    'item_id': '54918f75ee8f6c8b8dc5efd680644f29',
595    'last_played': 0,
596    'media_type': 'track',
597    'metadata': dict({
598      'chapters': None,
599      'copyright': None,
600      'description': None,
601      'explicit': None,
602      'genres': None,
603      'grouping': None,
604      'images': list([
605        dict({
606          'path': 'http://localhost:1234/Items/54918f75ee8f6c8b8dc5efd680644f29/Images/Primary?api_key=ACCESS_TOKEN',
607          'provider': 'xx-instance-id-xx',
608          'remotely_accessible': False,
609          'type': 'thumb',
610        }),
611      ]),
612      'label': None,
613      'languages': None,
614      'last_refresh': None,
615      'links': None,
616      'lrc_lyrics': None,
617      'lyrics': None,
618      'mood': None,
619      'performers': None,
620      'popularity': None,
621      'preview': None,
622      'release_date': None,
623      'review': None,
624      'style': None,
625    }),
626    'name': 'Where the Bands Are',
627    'position': 1,
628    'provider': 'xx-instance-id-xx',
629    'provider_mappings': list([
630      dict({
631        'audio_format': dict({
632          'bit_depth': 16,
633          'bit_rate': 278,
634          'channels': 2,
635          'codec_type': '?',
636          'content_type': 'aac',
637          'output_format_str': 'aac',
638          'sample_rate': 44100,
639        }),
640        'available': True,
641        'details': None,
642        'in_library': None,
643        'is_unique': None,
644        'item_id': '54918f75ee8f6c8b8dc5efd680644f29',
645        'provider_domain': 'jellyfin',
646        'provider_instance': 'xx-instance-id-xx',
647        'url': 'http://localhost:1234/Audio/54918f75ee8f6c8b8dc5efd680644f29/universal?userId=USER_ID&deviceId=X&maxStreamingBitrate=140000000&api_key=ACCESS_TOKEN',
648      }),
649    ]),
650    'sort_name': 'where the bands are',
651    'track_number': 1,
652    'translation_key': None,
653    'uri': 'xx-instance-id-xx://track/54918f75ee8f6c8b8dc5efd680644f29',
654    'version': '2018 Version',
655  })
656# ---
657# name: test_parse_tracks[zombie_christmas]
658  dict({
659    'album': dict({
660      'available': True,
661      'external_ids': list([
662      ]),
663      'image': None,
664      'is_playable': True,
665      'item_id': '32ed6a0091733dcff57eae67010f3d4b',
666      'media_type': 'album',
667      'name': 'This Is Christmas',
668      'provider': 'xx-instance-id-xx',
669      'sort_name': 'this is christmas',
670      'translation_key': None,
671      'uri': 'xx-instance-id-xx://album/32ed6a0091733dcff57eae67010f3d4b',
672      'version': '',
673      'year': None,
674    }),
675    'artists': list([
676      dict({
677        'available': True,
678        'external_ids': list([
679        ]),
680        'image': None,
681        'is_playable': True,
682        'item_id': 'a0c459294295710546c81c20a8d9abfc',
683        'media_type': 'artist',
684        'name': 'Emmy the Great',
685        'provider': 'xx-instance-id-xx',
686        'sort_name': 'emmy the great',
687        'translation_key': None,
688        'uri': 'xx-instance-id-xx://artist/a0c459294295710546c81c20a8d9abfc',
689        'version': '',
690        'year': None,
691      }),
692      dict({
693        'available': True,
694        'external_ids': list([
695        ]),
696        'image': None,
697        'is_playable': True,
698        'item_id': '1952db245ddef4e41dcd016475379190',
699        'media_type': 'artist',
700        'name': 'Tim Wheeler',
701        'provider': 'xx-instance-id-xx',
702        'sort_name': 'tim wheeler',
703        'translation_key': None,
704        'uri': 'xx-instance-id-xx://artist/1952db245ddef4e41dcd016475379190',
705        'version': '',
706        'year': None,
707      }),
708    ]),
709    'date_added': None,
710    'disc_number': 1,
711    'duration': 224,
712    'external_ids': list([
713      list([
714        'musicbrainz_recordingid',
715        '17d1019d-d4f4-326c-b4bb-d8aec2607bd7',
716      ]),
717    ]),
718    'favorite': False,
719    'is_playable': True,
720    'item_id': 'fb12a77f49616a9fc56a6fab2b94174c',
721    'last_played': 0,
722    'media_type': 'track',
723    'metadata': dict({
724      'chapters': None,
725      'copyright': None,
726      'description': None,
727      'explicit': None,
728      'genres': None,
729      'grouping': None,
730      'images': list([
731        dict({
732          'path': 'http://localhost:1234/Items/fb12a77f49616a9fc56a6fab2b94174c/Images/Primary?api_key=ACCESS_TOKEN',
733          'provider': 'xx-instance-id-xx',
734          'remotely_accessible': False,
735          'type': 'thumb',
736        }),
737      ]),
738      'label': None,
739      'languages': None,
740      'last_refresh': None,
741      'links': None,
742      'lrc_lyrics': None,
743      'lyrics': None,
744      'mood': None,
745      'performers': None,
746      'popularity': None,
747      'preview': None,
748      'release_date': None,
749      'review': None,
750      'style': None,
751    }),
752    'name': 'Zombie Christmas',
753    'position': 8,
754    'provider': 'xx-instance-id-xx',
755    'provider_mappings': list([
756      dict({
757        'audio_format': dict({
758          'bit_depth': 16,
759          'bit_rate': 267,
760          'channels': 2,
761          'codec_type': '?',
762          'content_type': 'aac',
763          'output_format_str': 'aac',
764          'sample_rate': 44100,
765        }),
766        'available': True,
767        'details': None,
768        'in_library': None,
769        'is_unique': None,
770        'item_id': 'fb12a77f49616a9fc56a6fab2b94174c',
771        'provider_domain': 'jellyfin',
772        'provider_instance': 'xx-instance-id-xx',
773        'url': 'http://localhost:1234/Audio/fb12a77f49616a9fc56a6fab2b94174c/universal?userId=USER_ID&deviceId=X&maxStreamingBitrate=140000000&api_key=ACCESS_TOKEN',
774      }),
775    ]),
776    'sort_name': 'zombie christmas',
777    'track_number': 8,
778    'translation_key': None,
779    'uri': 'xx-instance-id-xx://track/fb12a77f49616a9fc56a6fab2b94174c',
780    'version': '',
781  })
782# ---
783