File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
api/src/processing/services Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -113,17 +113,16 @@ export default async function(obj) {
113
113
114
114
if ( ! file ) return { error : "fetch.empty" } ;
115
115
116
- const title = json . title . trim ( ) ;
117
116
const artist = json . user . username . trim ( ) ;
118
117
const fileMetadata = {
119
- title,
120
- album : json . publisher_metadata . album_title ?. trim ( ) ?? title ,
118
+ title : json . title . trim ( ) ,
119
+ album : json . publisher_metadata ? .album_title ?. trim ( ) ,
121
120
artist,
122
121
album_artist : artist ,
123
- composer : json . publisher_metadata . writer_composer ?. trim ( ) ,
124
- genre : json . genre . trim ( ) ,
125
- date : json . display_date . slice ( 0 , 4 ) ,
126
- copyright : json . license . trim ( ) ,
122
+ composer : json . publisher_metadata ? .writer_composer ?. trim ( ) ,
123
+ genre : json . genre ? .trim ( ) ,
124
+ date : json . display_date ?. trim ( ) . slice ( 0 , 10 ) ,
125
+ copyright : json . license ? .trim ( ) ,
127
126
}
128
127
129
128
return {
You can’t perform that action at this time.
0 commit comments