|
473 | 473 | if screenContent.albumData.items.count() > 0 |
474 | 474 | m.global.queueManager.callFunc("clear") |
475 | 475 | m.global.queueManager.callFunc("resetShuffle") |
476 | | - m.global.queueManager.callFunc("set", CreateInstantMix(screenContent.albumData.items[0].id).Items) |
| 476 | + instantMixData = CreateInstantMix(screenContent.albumData.items[0].id) |
| 477 | + if isValid(instantMixData) and isValid(instantMixData.Items) |
| 478 | + m.global.queueManager.callFunc("set", instantMixData.Items) |
| 479 | + else |
| 480 | + print "Failed to create instant mix for album item: ", screenContent.albumData.items[0].id |
| 481 | + end if |
477 | 482 | m.global.queueManager.callFunc("playQueue") |
478 | 483 |
|
479 | 484 | viewHandled = true |
|
485 | 490 | ' Create instant mix based on selected artist |
486 | 491 | m.global.queueManager.callFunc("clear") |
487 | 492 | m.global.queueManager.callFunc("resetShuffle") |
488 | | - m.global.queueManager.callFunc("set", CreateInstantMix(screenContent.pageContent.id).Items) |
| 493 | + instantMixData = CreateInstantMix(screenContent.pageContent.id) |
| 494 | + if isValid(instantMixData) and isValid(instantMixData.Items) |
| 495 | + m.global.queueManager.callFunc("set", instantMixData.Items) |
| 496 | + else |
| 497 | + print "Failed to create instant mix for artist: ", screenContent.pageContent.id |
| 498 | + end if |
489 | 499 | m.global.queueManager.callFunc("playQueue") |
490 | 500 | end if |
491 | 501 |
|
|
666 | 676 | if group.albumData.items.count() > 0 |
667 | 677 | m.global.queueManager.callFunc("clear") |
668 | 678 | m.global.queueManager.callFunc("resetShuffle") |
669 | | - m.global.queueManager.callFunc("set", CreateInstantMix(group.albumData.items[0].id).Items) |
| 679 | + instantMixData = CreateInstantMix(group.albumData.items[0].id) |
| 680 | + if isValid(instantMixData) and isValid(instantMixData.Items) |
| 681 | + m.global.queueManager.callFunc("set", instantMixData.Items) |
| 682 | + else |
| 683 | + print "Failed to create instant mix for album item: ", group.albumData.items[0].id |
| 684 | + end if |
670 | 685 | m.global.queueManager.callFunc("playQueue") |
671 | 686 |
|
672 | 687 | viewHandled = true |
|
680 | 695 | if isValid(parentWithPageContent) and isValid(parentWithPageContent.pageContent) and isValid(parentWithPageContent.pageContent.id) |
681 | 696 | m.global.queueManager.callFunc("clear") |
682 | 697 | m.global.queueManager.callFunc("resetShuffle") |
683 | | - m.global.queueManager.callFunc("set", CreateInstantMix(parentWithPageContent.pageContent.id).Items) |
| 698 | + instantMixData = CreateInstantMix(parentWithPageContent.pageContent.id) |
| 699 | + if isValid(instantMixData) and isValid(instantMixData.Items) |
| 700 | + m.global.queueManager.callFunc("set", instantMixData.Items) |
| 701 | + else |
| 702 | + print "Failed to create instant mix for artist: ", parentWithPageContent.pageContent.id |
| 703 | + end if |
684 | 704 | m.global.queueManager.callFunc("playQueue") |
685 | 705 | else |
686 | 706 | stopLoadingSpinner() |
|
0 commit comments