From 7939cb02735e0326268fde4e932d6e9ed0adb767 Mon Sep 17 00:00:00 2001 From: hama3254 <52826614+hama3254@users.noreply.github.com> Date: Wed, 28 Sep 2022 13:21:52 +0200 Subject: [PATCH] added CR-Beta chapters added CR-Beta chapters #531 --- .vs/Crunchyroll Downloader/v17/.suo | Bin 144896 -> 153600 bytes Crunchyroll Downloader/Main.vb | 106 ++++++++++++++++-- .../My Project/Resources.Designer.vb | 21 ++++ .../My Project/Resources.resx | 15 +++ 4 files changed, 132 insertions(+), 10 deletions(-) diff --git a/.vs/Crunchyroll Downloader/v17/.suo b/.vs/Crunchyroll Downloader/v17/.suo index 639eced0fbf2cbefc79cc8cb5fbf08281e7d0f9e..71357843c1e2b797c07cdfb833bc5bdaff534122 100644 GIT binary patch delta 7844 zcmds63sjudwf^@%Gcdy|gAhUp&xFSWX2=W-!_#CK28L3k%8fn7nBiW z8kcE>*^#5MDxs;`^j-~4&EMKwJCWShK33&w>b1F74YsScYL!^BT3i~s&&)tbtTByd zE!&^<&Dm$4bM`rB@3Z$l|Bv%MrSphtK%XMaK59WoC0a%}H#0NC*+57lEJQG_9c`-x zm$(Mxm?S2s#wCwN`^sxjh+SeI#NkcvmE~>{~#2co1oS&zqGK8QY6!>|3sFCO;gd)PVgf7Br(pVZMD)z5w zrJ9}4MrbEE2pxn@0$)-$mD>p02|Wb=V!TD)yt zMRKwHxg6E2XpE9@*{Z+(OH)05qFR>{P2LbiSVZ7kUrc2TVTr%adFMv!?*o^*6Bc5Z zx|}-zti-eGJ_Xm=YWI$a8$bp8obUt7T?MBi_qifd!9-SFj2^8~wUET!ORd6}G%4-~ z|AtFbq5|#%T!-FiJ2h(+g2-#f3|gGhR4BO_xYc~k%h#%eJgTMpIU%$vZ)l)Ga9PK2 zOl^QVJZmjic%9BGrn7V{j@@{zD{}1OP1aS(xwmoI3KfZZ9j7C7=QpkJZW^c4ZurzP zE0lbdW&Xkc^h(1@RNk}8gM)YW(?rzaj<8*z#Is@LD&X;shYa3Iv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8*Vn6Tw@L-7^cDGUmGC0ajqy$kMambE{ft2eil&ymMMjPIg8b$-*uzBoA_$kaZigj6U!5?I zM8x3opN@y2vek$Y++@H6WNoG_)B@IBj%Hx#b56L5%S7iVc=`Zt!B^Kv8Cbb;q)Ax4 zEcoAqr6=BL>76}^Bn8S98$}T8?UNIz@ofYpLg%Hrn%U^~eAdYuIo6u|6 zQTpH(!UGzESVeFU)`4A^u9I)KDbGT)74_p$@a&5BVV~7H`{Dqfs^8l=; zXGw<|{?g_kJpW8Q;0|%33zmqjsm$!D$LEXU)T+0J{xA zbQJs$8Oc{~2@>H!=pg!F_TDZO3uG3;+JKC?P_%@yEwIIPM0F?|OMdZ%FpgloqPG*n z-FO*{;$j%ni_f&|Fn)^3Nd1{pwFA|JpF+tGe3{!1&V(~xIuyQs0`i2fhNJ#f#LG}vFt^k zwkT9(CaH4aIoK=vC*TG`u^;8#lf(+iEKS1L4XGr#4r0XehuCy6^mnjLTnc01vO0-P z_TV#~njsvCEM64$K!Dtv%+8=Cf^pBn|HSH9&;vuMk_Dlb`#l1` 0 Then If MergeSubs = True And SubsOnly = False Then Dim DispositionIndex As Integer For i As Integer = 0 To SoftSubs2.Count - 1 Debug.WriteLine(SoftSubs2(i)) If SoftSubs2(i) = DefaultSubCR Then - DispositionIndex = i + DispositionIndex = i + IndexMoveI End If Dim SoftSub As String() = VideoJson.Split(New String() {Chr(34) + "locale" + Chr(34) + ":" + Chr(34) + ConvertCC(SoftSubs2(i)) + Chr(34) + "," + Chr(34) + "url" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) Dim SoftSub_2 As String() = SoftSub(1).Split(New [Char]() {Chr(34)}) @@ -2029,11 +2099,11 @@ Public Class Main Else SoftSubMergeURLs = SoftSubMergeURLs + " -i " + Chr(34) + SoftSub_3 + Chr(34) End If - SoftSubMergeMaps = SoftSubMergeMaps + " -map " + (i + 1).ToString + SoftSubMergeMaps = SoftSubMergeMaps + " -map " + (i + IndexMoveMap).ToString If SoftSubMergeMetatata = Nothing Then - SoftSubMergeMetatata = " -metadata:s:s:" + i.ToString + " language=" + CCtoMP4CC(SoftSubs2(i)) + " -metadata:s:s:" + i.ToString + " title=" + Chr(34) + HardSubValuesToDisplay(SoftSubs2(i)) + Chr(34) + " -metadata:s:s:" + i.ToString + " handler_name=" + Chr(34) + HardSubValuesToDisplay(SoftSubs2(i)) + Chr(34) + SoftSubMergeMetatata = " -metadata:s:s:" + (i + IndexMoveI).ToString + " language=" + CCtoMP4CC(SoftSubs2(i)) + " -metadata:s:s:" + (i + IndexMoveI).ToString + " title=" + Chr(34) + HardSubValuesToDisplay(SoftSubs2(i)) + Chr(34) + " -metadata:s:s:" + (i + IndexMoveI).ToString + " handler_name=" + Chr(34) + HardSubValuesToDisplay(SoftSubs2(i)) + Chr(34) Else - SoftSubMergeMetatata = SoftSubMergeMetatata + " -metadata:s:s:" + i.ToString + " language=" + CCtoMP4CC(SoftSubs2(i)) + " -metadata:s:s:" + i.ToString + " title=" + Chr(34) + HardSubValuesToDisplay(SoftSubs2(i)) + Chr(34) + " -metadata:s:s:" + i.ToString + " handler_name=" + Chr(34) + HardSubValuesToDisplay(SoftSubs2(i)) + Chr(34) + SoftSubMergeMetatata = SoftSubMergeMetatata + " -metadata:s:s:" + (i + IndexMoveI).ToString + " language=" + CCtoMP4CC(SoftSubs2(i)) + " -metadata:s:s:" + (i + IndexMoveI).ToString + " title=" + Chr(34) + HardSubValuesToDisplay(SoftSubs2(i)) + Chr(34) + " -metadata:s:s:" + (i + IndexMoveI).ToString + " handler_name=" + Chr(34) + HardSubValuesToDisplay(SoftSubs2(i)) + Chr(34) End If Next If DispositionIndex = Nothing Then @@ -2207,10 +2277,15 @@ Public Class Main If SubsOnly = False Then If Reso = 42 And HybridMode = False Then - If MergeSubs = True Then + If MergeSubs = True And CR_MetadataUsage = False Then URL_DL = "-i " + Chr(34) + CR_URI_Master + Chr(34) + SoftSubMergeURLs + SoftSubMergeMaps + " " + ffmpeg_command_temp + " -c:s " + MergeSubsFormat + SoftSubMergeMetatata + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) - Else + ElseIf MergeSubs = False And CR_MetadataUsage = False Then URL_DL = "-i " + Chr(34) + CR_URI_Master + Chr(34) + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command_temp + ElseIf MergeSubs = True And CR_MetadataUsage = True Then + URL_DL = "-i " + Chr(34) + CR_URI_Master + Chr(34) + "-i " + Chr(34) + Mdata_File + Chr(34) + "-map_metadata 1" + SoftSubMergeURLs + SoftSubMergeMaps + " " + ffmpeg_command_temp + " -c:s " + MergeSubsFormat + SoftSubMergeMetatata + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + ElseIf MergeSubs = False And CR_MetadataUsage = True Then + URL_DL = "-i " + Chr(34) + CR_URI_Master + Chr(34) + "-i " + Chr(34) + Mdata_File + Chr(34) + "-map_metadata 1" + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command_temp + End If 'MsgBox(URL_DL) Else @@ -2246,12 +2321,23 @@ Public Class Main Dim ffmpeg_url_2 As String() = ffmpeg_url_1(1).Split(New [Char]() {Chr(34)}) ffmpeg_url_3 = ffmpeg_url_2(2).Split(New [Char]() {System.Convert.ToChar("#")}) Debug.WriteLine("Line 2120-CR_audio_locale: " + CR_audio_locale) - If MergeSubs = True Then - URL_DL = "-i " + Chr(34) + ffmpeg_url_3(0).Trim() + Chr(34) + SoftSubMergeURLs + SoftSubMergeMaps + " " + ffmpeg_command + " -c:s " + MergeSubsFormat + SoftSubMergeMetatata + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) - 'URL_DL = "-i " + Chr(34) + ffmpeg_url_3(0).Trim() + Chr(34) + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command - Else + + If MergeSubs = True And CR_MetadataUsage = False Then + URL_DL = "-i " + Chr(34) + ffmpeg_url_3(0).Trim() + Chr(34) + SoftSubMergeURLs + SoftSubMergeMaps + " " + ffmpeg_command_temp + " -c:s " + MergeSubsFormat + SoftSubMergeMetatata + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + ElseIf MergeSubs = False And CR_MetadataUsage = False Then URL_DL = "-i " + Chr(34) + ffmpeg_url_3(0).Trim() + Chr(34) + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command_temp + ElseIf MergeSubs = True And CR_MetadataUsage = True Then + URL_DL = "-i " + Chr(34) + ffmpeg_url_3(0).Trim() + Chr(34) + " -i " + Chr(34) + Mdata_File + Chr(34) + SoftSubMergeURLs + SoftSubMergeMaps + " -map_metadata 1" + " " + ffmpeg_command_temp + " -c:s " + MergeSubsFormat + SoftSubMergeMetatata + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + ElseIf MergeSubs = False And CR_MetadataUsage = True Then + URL_DL = "-i " + Chr(34) + ffmpeg_url_3(0).Trim() + Chr(34) + " -i " + Chr(34) + Mdata_File + Chr(34) + " -map_metadata 1" + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command_temp + End If + + 'If MergeSubs = True And CR_MetadataUsage = False Then + ' URL_DL = "-i " + Chr(34) + ffmpeg_url_3(0).Trim() + Chr(34) + SoftSubMergeURLs + SoftSubMergeMaps + " " + ffmpeg_command + " -c:s " + MergeSubsFormat + SoftSubMergeMetatata + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + 'Else + ' URL_DL = "-i " + Chr(34) + ffmpeg_url_3(0).Trim() + Chr(34) + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command_temp + 'End If End If End If #Region "thumbnail" diff --git a/Crunchyroll Downloader/My Project/Resources.Designer.vb b/Crunchyroll Downloader/My Project/Resources.Designer.vb index 42d0202..06d9e53 100644 --- a/Crunchyroll Downloader/My Project/Resources.Designer.vb +++ b/Crunchyroll Downloader/My Project/Resources.Designer.vb @@ -336,6 +336,27 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Zeichenfolge, die ;FFMETADATA1 + '''title=[Titel] + ''' + '''[CHAPTER] + '''TIMEBASE=1/1000 + '''START=[Start] + '''END=[END] + '''title=Opening + ''' + '''[CHAPTER] + '''TIMEBASE=1/1000 + '''START=[after] + '''END=[duration_ms] ähnelt. + ''' + Friend ReadOnly Property ffmpeg_metadata() As String + Get + Return ResourceManager.GetString("ffmpeg_metadata", resourceCulture) + End Get + End Property + ''' ''' Sucht eine lokalisierte Zeichenfolge, die "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0" ähnelt. ''' diff --git a/Crunchyroll Downloader/My Project/Resources.resx b/Crunchyroll Downloader/My Project/Resources.resx index 791df32..0e2956b 100644 --- a/Crunchyroll Downloader/My Project/Resources.resx +++ b/Crunchyroll Downloader/My Project/Resources.resx @@ -532,4 +532,19 @@ Dialogue: 0,0:00:00.00,0:00:00.00,Default,,0000,0000,0000,,some ideas on how tem ..\Resources\main_button_download-deactivate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ;FFMETADATA1 +title=[Titel] + +[CHAPTER] +TIMEBASE=1/1000 +START=[Start] +END=[END] +title=Opening + +[CHAPTER] +TIMEBASE=1/1000 +START=[after] +END=[duration_ms] + \ No newline at end of file