@@ -217,7 +217,7 @@ def test_sort_by_depth(self):
217217 "prefer_specific" : False ,
218218 "count" : 10 ,
219219 },
220- "Blues" ,
220+ [ "Blues" ] ,
221221 {
222222 "album" : ["Jazz" ],
223223 },
@@ -233,7 +233,7 @@ def test_sort_by_depth(self):
233233 "canonical" : False ,
234234 "prefer_specific" : False ,
235235 },
236- "original unknown, Blues" ,
236+ [ "original unknown" , " Blues"] ,
237237 {
238238 "album" : ["Jazz" ],
239239 },
@@ -249,7 +249,7 @@ def test_sort_by_depth(self):
249249 "canonical" : False ,
250250 "prefer_specific" : False ,
251251 },
252- "" ,
252+ [] ,
253253 {
254254 "album" : ["Jazz" ],
255255 },
@@ -265,7 +265,7 @@ def test_sort_by_depth(self):
265265 "canonical" : False ,
266266 "prefer_specific" : False ,
267267 },
268- "original unknown, Blues" ,
268+ [ "original unknown" , " Blues"] ,
269269 {
270270 "album" : ["Jazz" ],
271271 "artist" : ["Pop" ],
@@ -282,7 +282,7 @@ def test_sort_by_depth(self):
282282 "canonical" : False ,
283283 "prefer_specific" : False ,
284284 },
285- "any genre" ,
285+ [ "any genre" ] ,
286286 {
287287 "album" : ["Jazz" ],
288288 },
@@ -298,7 +298,7 @@ def test_sort_by_depth(self):
298298 "canonical" : False ,
299299 "prefer_specific" : False ,
300300 },
301- "" ,
301+ [] ,
302302 {
303303 "album" : ["Jazzin" ],
304304 },
@@ -314,7 +314,7 @@ def test_sort_by_depth(self):
314314 "canonical" : False ,
315315 "prefer_specific" : False ,
316316 },
317- "unknown genre" ,
317+ [ "unknown genre" ] ,
318318 {
319319 "track" : None ,
320320 "album" : None ,
@@ -334,7 +334,7 @@ def test_sort_by_depth(self):
334334 "canonical" : False ,
335335 "prefer_specific" : False ,
336336 },
337- "any existing" ,
337+ [ "any existing" ] ,
338338 {
339339 "track" : None ,
340340 "album" : None ,
@@ -354,7 +354,7 @@ def test_sort_by_depth(self):
354354 "canonical" : False ,
355355 "prefer_specific" : False ,
356356 },
357- "Jazz" ,
357+ [ "Jazz" ] ,
358358 {
359359 "track" : None ,
360360 "album" : None ,
@@ -374,7 +374,7 @@ def test_sort_by_depth(self):
374374 "canonical" : False ,
375375 "prefer_specific" : False ,
376376 },
377- "Jazz" ,
377+ [ "Jazz" ] ,
378378 {
379379 "track" : None ,
380380 "album" : None ,
@@ -393,7 +393,7 @@ def test_sort_by_depth(self):
393393 "canonical" : False ,
394394 "prefer_specific" : False ,
395395 },
396- "" ,
396+ [] ,
397397 {
398398 "track" : None ,
399399 "album" : None ,
@@ -412,7 +412,7 @@ def test_sort_by_depth(self):
412412 "canonical" : False ,
413413 "prefer_specific" : False ,
414414 },
415- "original unknown, Blues, Rock, Folk, Metal" ,
415+ [ "original unknown" , " Blues" , " Rock" , " Folk" , " Metal"] ,
416416 {
417417 "album" : ["Jazz" , "Bebop" , "Hardbop" ],
418418 },
@@ -433,7 +433,7 @@ def test_sort_by_depth(self):
433433 "canonical" : False ,
434434 "prefer_specific" : False ,
435435 },
436- "not whitelisted original" ,
436+ [ "not whitelisted original" ] ,
437437 {
438438 "track" : None ,
439439 "album" : None ,
@@ -455,7 +455,7 @@ def test_sort_by_depth(self):
455455 "prefer_specific" : False ,
456456 "count" : 10 ,
457457 },
458- "" ,
458+ [] ,
459459 {
460460 "album" : ["acid techno" ],
461461 },
@@ -478,7 +478,7 @@ def test_sort_by_depth(self):
478478 "count" : 10 ,
479479 "extended_debug" : True ,
480480 },
481- "detroit techno" ,
481+ [ "detroit techno" ] ,
482482 {
483483 "album" : ["acid house" ],
484484 },
@@ -509,7 +509,7 @@ def test_sort_by_depth(self):
509509 "prefer_specific" : False ,
510510 "count" : 10 ,
511511 },
512- "Cosmic Disco" ,
512+ [ "Cosmic Disco" ] ,
513513 {
514514 "album" : ["Detroit Techno" ],
515515 },
@@ -571,13 +571,7 @@ def mock_fetch_artist_genre(self, artist):
571571 plugin .setup () # Loads default whitelist and canonicalization tree
572572
573573 item = _common .item ()
574- if item_genre :
575- if ", " in item_genre :
576- item .genres = [g .strip () for g in item_genre .split (", " )]
577- else :
578- item .genres = [item_genre ]
579- else :
580- item .genres = []
574+ item .genres = item_genre
581575
582576 # Run
583577 assert plugin ._get_genre (item ) == expected_result
0 commit comments