@@ -71,7 +71,7 @@ export const generateImage = async (outputPath: string, content: string) => {
7171
7272export const processVideo = (
7373 outputPath : string ,
74- song : Pick < PickedTrack , 'duration' | 'download_url' | 'stream_url '> ,
74+ song : Pick < PickedTrack , 'duration' | 'uri ' > ,
7575 image : string
7676) : Promise < void > => {
7777 videoLogger ( 'Starting to process video' ) ;
@@ -82,10 +82,7 @@ export const processVideo = (
8282 . inputFPS ( 30 )
8383 . loop ( )
8484 . withSize ( '1920x1080' )
85- . input (
86- ( song . download_url || song . stream_url ) +
87- `?client_id=${ config . SOUNDCLOUD_CLIENT_ID } `
88- )
85+ . input ( `${ song . uri } /download?client_id=${ config . SOUNDCLOUD_CLIENT_ID } ` )
8986 . outputOption ( '-shortest' )
9087 . videoCodec ( 'libx264' )
9188 . videoBitrate ( 10000 , true )
@@ -116,19 +113,15 @@ export const getDescription = (
116113 imageData : IUnsplashResponse
117114) => `${ songTitle }
118115
119- ⭐️ DatSongBot brings you another fresh, new music by ${
120- song . user . username
121- } for you to enjoy!
116+ ⭐️ DatSongBot brings you another fresh, new music by ${ song . user . username } for you to enjoy!
122117
123118Listen to this song on Soundcloud:
124119▶️${ song . permalink_url }
125120
126121Follow ${ song . user . username } on Soundcloud:
127122🔉${ song . user . permalink_url }
128123
129- The background image used in this video is provided by ${
130- imageData . user . name
131- } from Unsplash:
124+ The background image used in this video is provided by ${ imageData . user . name } from Unsplash:
132125🔗Follow ${ imageData . user . name } on Unsplash - ${ imageData . user . links . html }
133126📂Download this background - ${ imageData . links . html }
134127
0 commit comments