Browse Source

refactor(processor): remove a duplication function call

As youtubeVideoID is assigned to getVideoIDFromYouTubeURL(entry.URL),
there is no need to call the latter again when we can simly use youtubeVideoID
instead.
jvoisin 9 months ago
parent
commit
5cff4d7117
1 changed files with 1 additions and 1 deletions
  1. 1 1
      internal/reader/processor/youtube.go

+ 1 - 1
internal/reader/processor/youtube.go

@@ -94,7 +94,7 @@ func fetchYouTubeWatchTimeInBulk(entries []*model.Entry) {
 			continue
 			continue
 		}
 		}
 
 
-		videosEntriesMapping[getVideoIDFromYouTubeURL(entry.URL)] = entry
+		videosEntriesMapping[youtubeVideoID] = entry
 		videoIDs = append(videoIDs, youtubeVideoID)
 		videoIDs = append(videoIDs, youtubeVideoID)
 	}
 	}