improve logging
This commit is contained in:
@ -179,7 +179,7 @@ export class TimelineReader {
|
||||
}
|
||||
}
|
||||
const spotify: Platform = 'spotify';
|
||||
return {
|
||||
const songInfo = {
|
||||
...info,
|
||||
pageUrl: odesliInfo.pageUrl,
|
||||
youtubeUrl: odesliInfo.linksByPlatform[platform]?.url,
|
||||
@ -187,6 +187,10 @@ export class TimelineReader {
|
||||
spotifyUri: odesliInfo.linksByPlatform[spotify]?.nativeAppUriDesktop,
|
||||
postedUrl: url.toString()
|
||||
} as SongInfo;
|
||||
if (songInfo.youtubeUrl && !songInfo.spotifyUrl) {
|
||||
this.logger.warn('SongInfo with YT, but no spotify URL', odesliInfo);
|
||||
}
|
||||
return songInfo;
|
||||
} catch (e) {
|
||||
if (e instanceof Error && e.cause === 429) {
|
||||
this.logger.warn('song.link rate limit reached. Trying again in 10 seconds');
|
||||
|
Reference in New Issue
Block a user