Shows some quick stats about your teal.fm records. Kind of like Spotify Wrapped

do checking on invalid records and parse artists right

Natalie B d5c28116 321ccd45

Changed files
+14 -2
src
components
+14 -2
src/components/LookUp.vue
··· 79 79 let inner_tracks = []; 80 80 let inner_artists = []; 81 81 for (const play of plays) { 82 + // spot-check if play is valid 83 + if ( 84 + play.success == false || 85 + play.value == undefined || 86 + play.value.artistName || 87 + play.value.trackName == undefined 88 + ) { 89 + continue; 90 + } 82 91 // new version 92 + console.log(play); 83 93 if (play.value?.artists) { 84 94 for (const artist of play.value?.artists) { 85 95 let alreadyPlayed = inner_artists.find( ··· 111 121 let alreadyPlayed = inner_tracks.find( 112 122 (a) => a.name === play.value.trackName, 113 123 ); 114 - if (!alreadyPlayed) { 124 + if (!alreadyPlayed && play?.value) { 115 125 inner_tracks.push({ 116 126 name: play.value.trackName, 117 - artist: play.value.artistNames[0], 127 + artist: play.value?.artists 128 + ? play.value.artists[0].artistName 129 + : play.value.artistNames[0], 118 130 plays: 1, 119 131 }); 120 132 } else {