瀏覽代碼

Only truncate names with non-whitespace after the \n

Zachary Kotlarek 9 年之前
父節點
當前提交
5bda29d850
共有 1 個文件被更改,包括 3 次插入 和 1 次删除
  1. 3 1
      yt/subscribe.pl

+ 3 - 1
yt/subscribe.pl

@@ -436,7 +436,9 @@ FETCH_LOOP: foreach my $id (keys(%{$videos})) {
 					warn('Error executing youtube-dl for name: ' . $NAME . '/' . $id . ' (' . $EXITVAL . ")\n");
 					next FETCH_LOOP;
 				}
-				$file =~ s/^.*\n//;
+				if ($file =~ /\n\S/) {
+					$file =~ s/^.*\n//;
+				}
 				$file =~ s/^\s+//;
 				$file =~ s/\s+$//;