File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 22 "name" : " feedr" ,
33 "module" : " src/index.ts" ,
44 "type" : " module" ,
5- "version" : " 2.0.0-dev " ,
5+ "version" : " 2.0.0-hotfix.1 " ,
66 "devDependencies" : {
77 "@types/bun" : " 1.2.21" ,
88 "@types/pg" : " ^8.11.14" ,
Original file line number Diff line number Diff line change @@ -117,15 +117,30 @@ export default async function fetchLatestUploads() {
117117
118118 let contentType : PlaylistType | null = null ;
119119
120+ if ( videoId == longVideoId . videoId ) {
121+ contentType = PlaylistType . Video ;
122+ } else if ( videoId == shortVideoId . videoId ) {
123+ contentType = PlaylistType . Short ;
124+ } else if ( videoId == streamVideoId . videoId ) {
125+ contentType = PlaylistType . Stream ;
126+ } else {
127+ console . error (
128+ "Video ID does not match any fetched video IDs for channel" ,
129+ channelId ,
130+ ) ;
131+ }
132+
120133 const videoIdMap = {
121134 [ PlaylistType . Video ] : longVideoId ,
122135 [ PlaylistType . Short ] : shortVideoId ,
123136 [ PlaylistType . Stream ] : streamVideoId ,
124137 } ;
125138
126- contentType = Object . entries ( videoIdMap ) . find (
127- ( [ , id ] ) => id ,
128- ) ?. [ 0 ] as PlaylistType | null ;
139+ // contentType = Object.entries(videoIdMap).find(
140+ // ([, id]) => id,
141+ // )?.[0] as PlaylistType | null;
142+
143+ console . log ( "Determined content type:" , contentType ) ;
129144
130145 if ( contentType ) {
131146 console . log (
You can’t perform that action at this time.
0 commit comments