From 08bec55b38920d86103434e46ba9822243d4c983 Mon Sep 17 00:00:00 2001 From: hama3254 <52826614+hama3254@users.noreply.github.com> Date: Sun, 28 Jan 2024 12:09:00 +0100 Subject: [PATCH] fix error handling (CR hardsub), fix season dub selection fix error handling (CR hardsub) #893 fix season dub selection #890 --- .vs/Crunchyroll Downloader/v17/.suo | Bin 230400 -> 221184 bytes Crunchyroll Downloader/Anime_Add.vb | 9 +++- Crunchyroll Downloader/ErrorDialog.vb | 46 ++++++---------- Crunchyroll Downloader/GetData.vb | 4 +- Crunchyroll Downloader/Main.vb | 73 +++++++++++++++++++++++++- 5 files changed, 96 insertions(+), 36 deletions(-) diff --git a/.vs/Crunchyroll Downloader/v17/.suo b/.vs/Crunchyroll Downloader/v17/.suo index db4a800759542221e5e3f2f7203efb2eed8a1539..43296a628cd460fcd882396b30df83ad320621e3 100644 GIT binary patch delta 8825 zcmd5>3tW`dwx6|T7(fOb9s(lZV1xvS!%IMqI*w>+m|&==_&^xa@__{917kR*QhG{e zE8ENzi94E^C1ZR=55KhRaXKCG*h$HQiXKhtbiE!eU&&c}7;V%bwYvB2-|s(b?Z>zG z+H3vy{`R-WT;XMwJy+`QQ(Q}0h2nYAT?toPTU$jj5W)!K2pQ~XUia;V6=1=1(6cb? z?rHe%`11!do8SeiHn91)5Kgl5SmyE^<+rf;$_G%RVC$tGOphARZ0c<9B&wn0&Oqf` zCPs0g93%J^dsw1x`DhP>$UX&j~Qp5hD>Q*+K zv{Zr^dIHHLf{_sJDC;VECiJ5GJp>QZpLEp4klvScJt32j?kE?12{YA{uOuubcn}PP zY=Wq}m!y|M(Md6oltk)i4V&v8Fj73)n@WTfK^0P@8Kghz$e(g57j@rIelEd3W>(O=JnKR9|5T(Dhnp9)oK@MDD@ zX*N~x6{sxCsMF+JFRRQ?x9HQ{L_9=$zV`%#^D`$vYcuQ3P~(G^_+hFp*J@~&P{CKM zB)$xq*!lQT=y84XfP<_g;T4j=~ZhNCS!^bqiUf5r7|eP6%s??#-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rd&7V}5|3qGKd4BPuIN;Y__!JKr!+GR$yMkifr3Um^;z3)-%%3?$$HX(94cyJ%nyZi%ZfZYm(Aq^vUUo zG1`8dw8asbpa!N{ap*FcNCNDW9H%6<8*T&=}CKkrTC&U*d z=f_Sg$d4;*%5&^p%@Y%go(><9p(UuxQXnM+bGW8H+_VDe5SPjp|F2k$k0=~!^x*`Q222o3+Bd? zs{d>As>4U5?|YLDX)ofRW0A^uO`On^C0^^)er3G|Ll zvxbMA@)x>S+01{->g{W>RyW_%)ty`DH1(r{ib`jd&6qe2rw&*5wQcs*Iy%zR)!U+K z80-1lmd!DU-pv(iWjL|s>uxy3{fYx%<}Dup1Jh@e73EKwJ)?N)RCTj8{^m8l^&@Mb z=#aw#nRCG9C3$CD4`RY-Tk;cYo{`&WvPL-eooAOgPM9w{PO75jHI`$pWC7m#;#oyg zi*pMKXWVhN8qvXkdlq@iF2-(TUZVd-c10{*!uE@OBbgRk+_i;9Ul-Mes3Vmfo_5Y? zDQZD`Tk&%&N!c~3gDW7+o&dc+obrDsluh0u>;MZ=;>(ZN{2~jps;jEVbJV9^jzI3o z)woPmC>r3r46cAiDRFTxawoALY;zZ|Wz=%n)9>V?qU8m=%a(k^7K;y7vk2S9tt?w9 zmKU*Mwm!dSvq=35tx*Wd#qq@PpC}X7Gf!SM1^36ej zZsw0z2CrNcU>oxxTkj#3bymLWaBgj28Qt&TtEok;bhq?Xs#<8M$88iHi9GQ7IuW<9 znn)#T*ge2j6sGwUl=2<7rmANsEp0@#2W2?gm8Vx$wzp&{-NhGf6fLqm R=mqiEX%=WZkgW`-{{@4CV(0(> diff --git a/Crunchyroll Downloader/Anime_Add.vb b/Crunchyroll Downloader/Anime_Add.vb index 3d838e7..a25b6f3 100644 --- a/Crunchyroll Downloader/Anime_Add.vb +++ b/Crunchyroll Downloader/Anime_Add.vb @@ -193,7 +193,7 @@ Public Class Anime_Add Dim Pfad_DL As String = Path.Combine(Main.Pfad, Namep2) Dim Service As String = "other" - MsgBox(URL_DL) + 'MsgBox(URL_DL) Main.ItemConstructor(NameKomplett, Namep1, Namep2, Reso, HardSub, ThumbnialURL, URL_DL, Chr(34) + Pfad_DL + Chr(34), Service) @@ -460,6 +460,12 @@ Public Class Anime_Add Dim audio_locale_filter As String = Nothing + For i As Integer = 0 To Main.LangValueEnum.Count - 1 + If Main.LangValueEnum.Item(i).DisplayText = CB_Dub.Text Then + audio_locale_filter = Main.LangValueEnum.Item(i).CR_Value + End If + Next + Dim EpisodeJObject As JObject = JObject.Parse(EpisodeJson) Dim EpisodeData As List(Of JToken) = EpisodeJObject.Children().ToList @@ -551,6 +557,7 @@ Public Class Anime_Add End Try 'My.Computer.Clipboard.SetText(EpisodeJson) + Debug.WriteLine("EpisodeJson: " + EpisodeJson) FillCREpisodes(EpisodeJson) diff --git a/Crunchyroll Downloader/ErrorDialog.vb b/Crunchyroll Downloader/ErrorDialog.vb index ba7bb21..c017c05 100644 --- a/Crunchyroll Downloader/ErrorDialog.vb +++ b/Crunchyroll Downloader/ErrorDialog.vb @@ -98,12 +98,17 @@ Public Class ErrorDialog End If Next SurroundingSub() - Try - ComboBox1.SelectedIndex = 0 - Catch ex As Exception - End Try + End If + + 'check for the first option and error if there are none + If ComboBox1.Items.Count > 0 Then + ComboBox1.SelectedIndex = 0 + Else + MsgBox("Error, no available options found!", MsgBoxStyle.Information) + End If + Delay.Enabled = True End Sub @@ -142,6 +147,7 @@ Public Class ErrorDialog Else If Main.DialogTaskString = "Language_CR_Beta" Then Main.ResoBackString = DisplayToHardSubValues(ComboBox1.SelectedItem.ToString) + 'MsgBox(Main.ResoBackString) Main.UserCloseDialog = False Me.Close() Else @@ -153,35 +159,13 @@ Public Class ErrorDialog End Sub Public Function DisplayToHardSubValues(ByVal HardSub As String) As String - Try - If HardSub = "Deutsch" Then - Return "de-DE" - ElseIf HardSub = "English" Then - Return "en-US" - ElseIf HardSub = "Português (Brasil)" Then - Return "pt-BR" - ElseIf HardSub = "Español (LA)" Then '"(LA)-Español" - Return "es-LA" - ElseIf HardSub = "Español" Then - Return "es-419" - ElseIf HardSub = "Français (France)" Then - Return "fr-FR" - ElseIf HardSub = "العربية (Arabic)" Then - Return "ar-SA" - ElseIf HardSub = "Русский (Russian)" Then - Return "ru-RU" - ElseIf HardSub = "Italiano (Italian)" Then - Return "it-IT" - ElseIf HardSub = "Español (España)" Then - Return "es-ES" - Else - - Return Nothing + For i As Integer = 0 To Main.LangValueEnum.Count - 1 + If Main.LangValueEnum.Item(i).DisplayText = HardSub Then ' does not find "No Hardsubs" but default is correct here anyway. + Return Main.LangValueEnum.Item(i).CR_Value End If + Next - Catch ex As Exception - Return Nothing - End Try + Return "null" ' null as text because CR does so... End Function diff --git a/Crunchyroll Downloader/GetData.vb b/Crunchyroll Downloader/GetData.vb index 35cfaca..d134ec4 100644 --- a/Crunchyroll Downloader/GetData.vb +++ b/Crunchyroll Downloader/GetData.vb @@ -120,12 +120,12 @@ Module GetData Return CurlError ElseIf CBool(InStr(CurlError, "curl:")) Then Debug.WriteLine(CurlError) - Throw New System.Exception("Error - Getting" + vbNewLine + CurlError) + Throw New System.Exception("Error - Getting" + Sender + vbNewLine + CurlError) Return Nothing ElseIf CBool(InStr(CurlOutput, "curl:")) Then Debug.WriteLine(CurlOutput) - Throw New System.Exception("Error - Getting" + vbNewLine + CurlError) + Throw New System.Exception("Error - Getting" + Sender + vbNewLine + CurlError) Return Nothing Else Return CurlOutput diff --git a/Crunchyroll Downloader/Main.vb b/Crunchyroll Downloader/Main.vb index 5796f22..ae4c3a0 100644 --- a/Crunchyroll Downloader/Main.vb +++ b/Crunchyroll Downloader/Main.vb @@ -889,6 +889,7 @@ Public Class Main SeasonJson = CleanJSON(SeasonJson) + 'Debug.WriteLine("SeasonJson: " + SeasonJson) Dim SeasonJObject As JObject = JObject.Parse(SeasonJson) Dim SeasonData As List(Of JToken) = SeasonJObject.Children().ToList @@ -1366,9 +1367,10 @@ Public Class Main 'MsgBox(CR_Streams.Count.ToString) For i As Integer = 0 To CR_Streams.Count - 1 Debug.WriteLine("1280: " + CR_Streams.Item(i).subLang) - If CR_Streams.Item(i).subLang = CR_HardSubLang Then + If CR_Streams.Item(i).subLang = CR_HardSubLang Then 'check for all hardsubs even 'null' + CR_URI_Master.Add(CR_Streams.Item(i).Url) + ElseIf CR_Streams.Item(i).subLang = "" And CR_HardSubLang = "null" Then 'keeping in mind 'null' and a empty string would be CRs style ... CR_URI_Master.Add(CR_Streams.Item(i).Url) - End If Next @@ -4030,6 +4032,73 @@ Public Class Main End Try #End Region + ElseIf CBool(InStr(htmlReq, "m3u8_Url=")) Then + Debug.WriteLine("m3u8_Url mode") + Try + Dim DecodedHTML As String = UrlDecode(htmlReq) + 'MsgBox(DecodedHTML) + If CBool(InStr(DecodedHTML, "&tabName=")) Then + Dim DataSplit() As String = DecodedHTML.Split(New String() {"&tabName="}, System.StringSplitOptions.RemoveEmptyEntries) + + Dim UrlSplit() As String = DataSplit(0).Split(New String() {"m3u8_Url="}, System.StringSplitOptions.RemoveEmptyEntries) + Dim NameSplit() As String = DataSplit(1).Split(New String() {" | "}, System.StringSplitOptions.RemoveEmptyEntries) + + ' CR_title = String.Join(" ", Title.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c).Replace(Chr(34), "").Replace("\", "").Replace("/", "").Replace(":", "") + + + ' MsgBox(URLSplit(1) + vbNewLine + DataSplit(1)) + + Dim NameKomplett As String = Nothing + + Try + NameKomplett = String.Join(" ", NameSplit(0).Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c).Replace(Chr(34), "").Replace("\", "").Replace("/", "").Replace(":", "") + NameKomplett = RemoveExtraSpaces(String.Join(" ", NameKomplett.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c)).Replace(Chr(34), "").Replace("\", "").Replace("/", "") + + Catch ex As Exception + End Try + ' + If NameKomplett = Nothing Or NameKomplett = "Use Custom Name" Then + NameKomplett = GeräteID2().Replace("CRD-Temp-File", "misc_download-#") + End If + + Dim Namep1 As String = "Other" + Dim Namep2 As String = NameKomplett + VideoFormat + Dim Reso As String = "NaN" + Dim HardSub As String = "maybe?" + Dim ThumbnialURL As String = "no" + Dim URL_DL As String = "-i " + Chr(34) + UrlSplit(1).Replace(vbCrLf, "").Replace(vbCr, "").Replace(vbLf, "") + Chr(34) + ffmpeg_command + Dim Pfad_DL As String = Path.Combine(Pfad, Namep2) + Dim Service As String = "other" + + + + Me.Invoke(New Action(Function() As Object + If MessageBox.Show(NameKomplett + vbNewLine + vbNewLine + URL_DL, "Confirm Download", MessageBoxButtons.OKCancel) = DialogResult.OK Then + Else + strRequest = rootPath & "Post_Mass_Sucess.html" 'PostPage + SendHTMLResponse(stream, strRequest) + Return Nothing + Exit Function + End If + + + ItemConstructor(NameKomplett, Namep1, Namep2, Reso, HardSub, ThumbnialURL, URL_DL, Chr(34) + Pfad_DL + Chr(34), Service) + Return Nothing + End Function)) + + + + 'End If + strRequest = rootPath & "Post_Mass_Sucess.html" 'PostPage + SendHTMLResponse(stream, strRequest) + End If + Catch abort As ThreadAbortException + Exit Sub + Catch ex As Exception + Dim ErrorPage As String = My.Resources.Post_error_Top + ex.ToString + My.Resources.Post_error_Bottom + SendHTMLResponse(stream, Nothing, New ServerResponse(ErrorPage, "html")) + + End Try Else strRequest = rootPath & "error_Page_default.html" 'PostPage SendHTMLResponse(stream, strRequest)