Skip to content

Commit 1d7b34f

Browse files
authored
fix(youtube): treat upcoming 'needs_auth' videos as public (#10)
2 parents af28d05 + 19adf10 commit 1d7b34f

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ USER $UID
130130
STOPSIGNAL SIGINT
131131

132132
# Use dumb-init as PID 1 to handle signals properly
133-
ENTRYPOINT [ "dumb-init", "--", "/app/LivestreamRecorderService" ]
133+
# Start bgutil-pot server in background and LivestreamRecorderService in foreground
134+
ENTRYPOINT [ "dumb-init", "--", "sh", "-c", "/usr/bin/bgutil-pot & exec /app/LivestreamRecorderService" ]
134135

135136
ARG VERSION
136137
ARG RELEASE

Helper/YoutubeDLHelper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ public static async Task<RunResult<YtdlpVideoData>> RunVideoDataFetch_Alt(this Y
4949
Exec = "echo outfile: {}",
5050
DumpSingleJson = true,
5151
FlatPlaylist = flat,
52-
WriteComments = fetchComments
52+
WriteComments = fetchComments,
53+
Verbose = true
5354
};
5455

5556
if (overrideOptions != null)

ScopedServices/PlatformService/YoutubeService.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,10 @@ public override async Task UpdateVideoDataAsync(Video video, CancellationToken c
394394
break;
395395
// Copyright Notice
396396
case "needs_auth":
397+
// It seems that we now always get "needs_auth" for upcoming videos.
398+
if (videoData.LiveStatus == "is_upcoming")
399+
goto case "public";
400+
397401
// Not archived
398402
if (video.Status < VideoStatus.Archived)
399403
{

0 commit comments

Comments
 (0)