Explorar o código

Do not overwrite pre-calculated dates
(And consider using PublishedAt timestamps in metadata files)

Zachary Kotlarek %!s(int64=11) %!d(string=hai) anos
pai
achega
471bf294d1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      yt/subscribe.pl

+ 1 - 1
yt/subscribe.pl

@@ -1005,7 +1005,7 @@ sub parseVideoData($) {
 sub calcVideoData($) {
 	my ($video) = @_;
 
-	if ($video->{'publishedAt'}) {
+	if ($video->{'publishedAt'} && !$video->{'date'}) {
 		$video->{'date'} = str2time($video->{'publishedAt'});
 	}
 	if ($video->{'date'}) {