File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ app.use(bodyParser.json());
184184
185185 app . getAsync ( '/spotify/recent' , async function ( req , res ) {
186186 const result = await spotifySource . getRecentlyPlayed ( { formatted : true } ) ;
187- const artistTruncFunc = truncateStringToLength ( Math . min ( 30 , longestString ( result . map ( x => x . data . artist ) ) ) ) ;
187+ const artistTruncFunc = truncateStringToLength ( Math . min ( 40 , longestString ( result . map ( x => x . data . artists . join ( ' / ' ) ) . flat ( ) ) ) ) ;
188188 const trackLength = longestString ( result . map ( x => x . data . track ) )
189189 const plays = result . map ( ( x ) => {
190190 const {
@@ -197,7 +197,7 @@ app.use(bodyParser.json());
197197 const buildOpts = {
198198 include : [ 'time' , 'timeFromNow' ] ,
199199 transformers : {
200- artist : a => artistTruncFunc ( a ) . padEnd ( 33 ) ,
200+ artists : a => artistTruncFunc ( a . join ( ' / ' ) ) . padEnd ( 33 ) ,
201201 track : t => t . padEnd ( trackLength )
202202 }
203203 }
You can’t perform that action at this time.
0 commit comments