Skip to content

Commit fd0ee78

Browse files
committed
fix: ytarchive dockerfile path changed
- Added a new key-value entry in the `LivestreamRecorderService.sln.DotSettings` file - Updated commands in `FC2LiveDLService.cs`, `YtarchiveService.cs` and `YtdlpService.cs` files located in both the `SingletonServices/ACI/Downloader/` and `SingletonServices/Kubernetes/Downloader/` directories. It appears that the commands have been restructured to be more compact. - Fixed a comment in `YtdlpService.cs` files from "Workground for twitcasting" to "Workaround for twitcasting". The same change has been implemented in both the `SingletonServices/ACI/Downloader/` and `SingletonServices/Kubernetes/Downloader/` directories. This likely improves the understanding of the underlying issue. Signed-off-by: 陳鈞 <[email protected]>
1 parent 45f2fc6 commit fd0ee78

File tree

7 files changed

+31
-46
lines changed

7 files changed

+31
-46
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:Boolean x:Key="/Default/UserDictionary/Words/=sharedvolume/@EntryIndexedValue">True</s:Boolean>
23
<s:Boolean x:Key="/Default/UserDictionary/Words/=telop/@EntryIndexedValue">True</s:Boolean>
34
<s:Boolean x:Key="/Default/UserDictionary/Words/=twitcasting/@EntryIndexedValue">True</s:Boolean>
45
<s:Boolean x:Key="/Default/UserDictionary/Words/=ytarchive/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

SingletonServices/ACI/Downloader/FC2LiveDLService.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,14 @@ Task<ArmOperation<ArmDeploymentResource>> doWithImage(string imageName)
5555
string[] command = useCookiesFile
5656
?
5757
[
58-
"dumb-init",
59-
"--",
60-
"sh",
61-
"-c",
58+
"dumb-init", "--",
59+
"sh", "-c",
6260
$"fc2-live-dl --latency high --threads 1 -o '{Path.ChangeExtension(filename, ".%(ext)s")}' --log-level trace --cookies /sharedvolume/cookies/{video.ChannelId}.txt 'https://live.fc2.com/{NameHelper.ChangeId.ChannelId.PlatformType(video.ChannelId, Name)}' && mv '/recordings/{filename}' /sharedvolume/"
6361
]
6462
:
6563
[
66-
"dumb-init",
67-
"--",
68-
"sh",
69-
"-c",
64+
"dumb-init", "--",
65+
"sh", "-c",
7066
$"fc2-live-dl --latency high --threads 1 -o '{Path.ChangeExtension(filename, ".%(ext)s")}' --log-level trace 'https://live.fc2.com/{NameHelper.ChangeId.ChannelId.PlatformType(video.ChannelId, Name)}' && mv '/recordings/{filename}' /sharedvolume/"
7167
];
7268

SingletonServices/ACI/Downloader/YtarchiveService.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ Task<ArmOperation<ArmDeploymentResource>> doWithImage(string imageName)
4545
string[] command = useCookiesFile
4646
?
4747
[
48-
"sh",
49-
"-c",
50-
$"/bin/ytarchive --add-metadata --merge --retry-frags 30 --thumbnail -o '{filename.Replace(".mp4", "")}' -c /sharedvolume/cookies/{video.ChannelId}.txt '{url}' best && mv *.mp4 /sharedvolume/"
48+
"dumb-init", "--",
49+
"sh", "-c",
50+
$"ytarchive --add-metadata --merge --retry-frags 30 --thumbnail -o '{filename.Replace(".mp4", "")}' -c /sharedvolume/cookies/{video.ChannelId}.txt '{url}' best && mv *.mp4 /sharedvolume/"
5151
]
5252
:
5353
[
54-
"sh",
55-
"-c",
56-
$"/bin/ytarchive --add-metadata --merge --retry-frags 30 --thumbnail -o '{filename.Replace(".mp4", "")}' '{url}' best && mv *.mp4 /sharedvolume/"
54+
"dumb-init", "--",
55+
"sh", "-c",
56+
$"ytarchive --add-metadata --merge --retry-frags 30 --thumbnail -o '{filename.Replace(".mp4", "")}' '{url}' best && mv *.mp4 /sharedvolume/"
5757
];
5858

5959
return CreateResourceAsync(

SingletonServices/ACI/Downloader/YtdlpService.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,18 @@ Task<ArmOperation<ArmDeploymentResource>> doWithImage(string imageName)
4545
string[] command = useCookiesFile
4646
?
4747
[
48-
"dumb-init",
49-
"--",
50-
"sh",
51-
"-c",
48+
"dumb-init", "--",
49+
"sh", "-c",
5250
$"yt-dlp --ignore-config --retries 30 --concurrent-fragments 16 --merge-output-format mp4 -S '+proto:http,+codec:h264' --embed-thumbnail --embed-metadata --no-part --cookies /sharedvolume/cookies/{video.ChannelId}.txt -o '{filename}' '{url}' && mv *.mp4 /sharedvolume/"
5351
]
5452
:
5553
[
56-
"dumb-init",
57-
"--",
58-
"sh",
59-
"-c",
54+
"dumb-init", "--",
55+
"sh", "-c",
6056
$"yt-dlp --ignore-config --retries 30 --concurrent-fragments 16 --merge-output-format mp4 -S '+proto:http,+codec:h264' --embed-thumbnail --embed-metadata --no-part -o '{filename}' '{url}' && mv *.mp4 /sharedvolume/"
6157
];
6258

63-
// Workground for twitcasting ERROR: Initialization fragment found after media fragments, unable to download
59+
// Workaround for twitcasting ERROR: Initialization fragment found after media fragments, unable to download
6460
// https://github.com/yt-dlp/yt-dlp/issues/5497
6561
if (url.Contains("twitcasting.tv"))
6662
{

SingletonServices/Kubernetes/Downloader/FC2LiveDLService.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,14 @@ Task<V1Job> doWithImage(string imageName)
4040
string[] command = useCookiesFile
4141
?
4242
[
43-
"dumb-init",
44-
"--",
45-
"sh",
46-
"-c",
43+
"dumb-init", "--",
44+
"sh", "-c",
4745
$"fc2-live-dl --latency high --threads 1 -o '{Path.ChangeExtension(filename, ".%(ext)s")}' --log-level trace --cookies /sharedvolume/cookies/{video.ChannelId}.txt 'https://live.fc2.com/{NameHelper.ChangeId.ChannelId.PlatformType(video.ChannelId, Name)}' && mv '/recordings/{filename}' /sharedvolume/"
4846
]
4947
:
5048
[
51-
"dumb-init",
52-
"--",
53-
"sh",
54-
"-c",
49+
"dumb-init", "--",
50+
"sh", "-c",
5551
$"fc2-live-dl --latency high --threads 1 -o '{Path.ChangeExtension(filename, ".%(ext)s")}' --log-level trace 'https://live.fc2.com/{NameHelper.ChangeId.ChannelId.PlatformType(video.ChannelId, Name)}' && mv '/recordings/{filename}' /sharedvolume/"
5652
];
5753

SingletonServices/Kubernetes/Downloader/YtarchiveService.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ Task<V1Job> doWithImage(string imageName)
4242
string[] command = useCookiesFile
4343
?
4444
[
45-
"sh",
46-
"-c",
47-
$"/bin/ytarchive --add-metadata --merge --retry-frags 30 --thumbnail -o '{filename.Replace(".mp4", "")}' -c /sharedvolume/cookies/{video.ChannelId}.txt '{url}' best && mv *.mp4 /sharedvolume/"
45+
"dumb-init", "--",
46+
"sh", "-c",
47+
$"ytarchive --add-metadata --merge --retry-frags 30 --thumbnail -o '{filename.Replace(".mp4", "")}' -c /sharedvolume/cookies/{video.ChannelId}.txt '{url}' best && mv *.mp4 /sharedvolume/"
4848
]
4949
:
5050
[
51-
"sh",
52-
"-c",
53-
$"/bin/ytarchive --add-metadata --merge --retry-frags 30 --thumbnail -o '{filename.Replace(".mp4", "")}' '{url}' best && mv *.mp4 /sharedvolume/"
51+
"dumb-init", "--",
52+
"sh", "-c",
53+
$"ytarchive --add-metadata --merge --retry-frags 30 --thumbnail -o '{filename.Replace(".mp4", "")}' '{url}' best && mv *.mp4 /sharedvolume/"
5454
];
5555

5656
return CreateInstanceAsync(

SingletonServices/Kubernetes/Downloader/YtdlpService.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,18 @@ Task<V1Job> doWithImage(string imageName)
4242
string[] command = useCookiesFile
4343
?
4444
[
45-
"dumb-init",
46-
"--",
47-
"sh",
48-
"-c",
45+
"dumb-init", "--",
46+
"sh", "-c",
4947
$"yt-dlp --ignore-config --retries 30 --concurrent-fragments 16 --merge-output-format mp4 -S '+proto:http,+codec:h264' --embed-thumbnail --embed-metadata --no-part --cookies /sharedvolume/cookies/{video.ChannelId}.txt -o '{filename}' '{url}' && mv *.mp4 /sharedvolume/"
5048
]
5149
:
5250
[
53-
"dumb-init",
54-
"--",
55-
"sh",
56-
"-c",
51+
"dumb-init", "--",
52+
"sh", "-c",
5753
$"yt-dlp --ignore-config --retries 30 --concurrent-fragments 16 --merge-output-format mp4 -S '+proto:http,+codec:h264' --embed-thumbnail --embed-metadata --no-part -o '{filename}' '{url}' && mv *.mp4 /sharedvolume/"
5854
];
5955

60-
// Workground for twitcasting ERROR: Initialization fragment found after media fragments, unable to download
56+
// Workaround for twitcasting ERROR: Initialization fragment found after media fragments, unable to download
6157
// https://github.com/yt-dlp/yt-dlp/issues/5497
6258
if (url.Contains("twitcasting.tv"))
6359
{

0 commit comments

Comments
 (0)