From ea63b56ba63b503ce86b452f520a38e7b95446ea Mon Sep 17 00:00:00 2001 From: hama3254 <52826614+hama3254@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:26:20 +0100 Subject: [PATCH] fixes, debug information fix #903 added msgbox for stream name check --- .vs/Crunchyroll Downloader/v17/.suo | Bin 221184 -> 215552 bytes Crunchyroll Downloader/Main.vb | 674 +++++++++++++++++- .../My Project/AssemblyInfo.vb | 4 +- 3 files changed, 665 insertions(+), 13 deletions(-) diff --git a/.vs/Crunchyroll Downloader/v17/.suo b/.vs/Crunchyroll Downloader/v17/.suo index 43296a628cd460fcd882396b30df83ad320621e3..c3137fb0ff18e12da8a0a06ad0f7681f2981b590 100644 GIT binary patch delta 10663 zcmeI230zd=`p3`no&g3yBSb_5L?uK79L8ZYmtjp!af#GxmWtq(3o4om#kgeN(#m;_ z*Db}#J8fpl6jNs2u|>@m#mv;okZWBtHB&S-uXBIzFydHI-ah&7{y(34^vm<^>vNv- zp686o(b%-K@snM`EsCP}fGbX?6G9;{2n+|adF!lJn~D~anf0bP-kP;)vT^UzFV;*t zM9(7I=-{*1EUM+_*gSTy5uc^@h8S=zs=13Oa)*5RG!ZA@jgPU>Ilu1_QaWw?Qrd-GLuiYs8-s zK*|Cj3yp+40Xl*dG}r?Y$*yZG!uPx5-$3@_N4hp`_OM5Zs~eUsa{@fKQ>qKUO#R&2 z;izc-A8E(cA%vi_tIf*Jq?TOO4!L%6jc!ysASA*H8w z$auYW$VeA=Ay4g)>5V)(`l)s_Yfw9UWloc;+bG*nh+p!}*Zhk?NrpE%8Yj2*V?_1= z8TRBL(vE@8z&`;m@{7wqiNH7DEch0j0H?tz@Ewp1eD9W?jh#o@58wj0=*~yc`s)hP zoIp`+8~hkEHyQf-2U&3Q2dOCLfJ|SPWsqh`?5U+Fu45Wr9MF%gQ}}9o8$|tWwE_OB zIk=YmZ092U$h<2{>o4c%S;bZyvxqDq%>2>Y{OzWR&(wZIey31i-L3e8Rdy$vgO2rl zW@tQ*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-m2rL)(skZpQFMh0B%}%$rFQg}nq9JL>T*%4*Gs zYaJCocX`Ky=RQ6fOmlFjn144DcPcz(X}6uxOsLD|;SXUjH|62bwnNn6H0kd*Tui8G zjtNx|YlV|obguTp-cimTP{M~VnTBK9R%^H?DuvS4 zR^i^(BAxV^IY!c|cSi+U*{pT4d07ja)%Is8PHRj@hU>wr9>OHLu5jA<&X<;3Y}SGH z`14u^JGE}U`jN?Wc5xFjfWK9Qxp%r+bXK*TOT`ElJ8bFeF6-eish_*3<6=Ll?G^*? zZC*G?RdGE-`#xEk+j6CCS=~sN($b{3ID;V}X@$dyI#_ydL!z~8(ms61SW5@Ljdgmyg&xnTw<4 z#6Ynab*X+CAX|d<*d*sKETi3HyW6DSv>AuGnQ;ciCy2R1XMF3~;%-Y)m!T3=ZYG!Ut%ot57c*SL_rHUBNxvD7!+*latFZ}q ztr;gu6RU6sSl5wq_%WUG#y4PulwE@_0N-!H)qLOM7%jcJ0VmO|!rPcHZmDklGod^%UgS{QP$*tR{qLh2V$~T-qjr3+6rnyRQM=S8hdcrn7Yb5HVcfQ9o zpSpK(zk){^<&{$YN4QCCeI5Pk8d2rhCPTwh-p4FHs|G!#f(EPv9$~>kPP&9jm0#gW zFJAB+Ryq#zyy`F}NDD6E3ko4T#l`taQv4M?y?MYkH1aA5qog@;@@>GeJAE)cwJb=Q pcL7y&2h*kwy?moDHw}{438QG)=vf-+n>4u&C1t$)d(ZZA{smXO2}%F} diff --git a/Crunchyroll Downloader/Main.vb b/Crunchyroll Downloader/Main.vb index ae4c3a0..55fd7fc 100644 --- a/Crunchyroll Downloader/Main.vb +++ b/Crunchyroll Downloader/Main.vb @@ -179,7 +179,6 @@ Public Class Main Public No_Stream As String = "Please make sure that the URL is correct or check if the Anime is available in your country." Dim TaskNotCompleed As String = "Please wait until the current task is completed." Dim Premium_Stream As String = "For Premium episodes you need a premium membership and be logged in the Downloader." - Public LoginReminder As String = "Please make sure that you logged in." Dim Error_Mass_DL As String = "We run into a problem here." + vbNewLine + "You can try to download every episode individually." Dim User_Fault_NoName As String = "no name, fallback solution : " Dim Sub_language_NotFound As String = "Could not find the sub language" + vbNewLine + "please make sure the language is available: " @@ -988,11 +987,19 @@ Public Class Main End Sub Public Sub GetCRVideoProxy(ByVal requesturl As String, ByVal AuthToken As String, ByVal WebsiteURL As String, ByVal RT_count As Integer) - Dim Evaluator = New Thread(Sub() Me.GetCRVideo(requesturl, AuthToken, WebsiteURL, RT_count)) - Evaluator.Start() - End Sub - Public Sub GetCRVideo(ByVal Streams As String, ByVal AuthToken As String, ByVal WebsiteURL As String, ByVal RT_count As Integer) + If CBool(InStr(WebsiteURL, "musicvideo")) = True Or CBool(InStr(WebsiteURL, "/concert/")) = True Then + Dim Evaluator = New Thread(Sub() Me.GetCRMusik(requesturl, AuthToken, WebsiteURL, RT_count)) + Evaluator.Start() + Else + Dim Evaluator = New Thread(Sub() Me.GetCRVideo(requesturl, AuthToken, WebsiteURL, RT_count)) + Evaluator.Start() + End If 'outsourcing + + + End Sub +#Region "Musik" + Public Sub GetCRMusik(ByVal Streams As String, ByVal AuthToken As String, ByVal WebsiteURL As String, ByVal RT_count As Integer) If b = False Then b = True End If @@ -1014,11 +1021,9 @@ Public Class Main Dim CR_episode_duration_ms As String = "60000000" Dim CR_episode2 As String = Nothing Dim CR_Anime_Staffel_int As String = Nothing - Dim CR_episode_int As String = Nothing Dim CR_title As String = Nothing - Dim CR_audio_locale As String = "ja-JP" + Dim CR_audio_locale As String = Nothing Dim CR_audio_isDubbed As Boolean = False - Dim CR_Region As String = "DE" Dim ResoUsed As String = "x" + Reso.ToString Dim ffmpegInput As String = "-i [Subtitles only]" @@ -1082,8 +1087,651 @@ Public Class Main TextBox2_Text = Arti2(0) + " - " + Title2(0) #End Region + Else ' Not needed for Music or concerts + + + End If + +#Region "VideoJson" + Dim VideoJson As String = Nothing + + VideoJson = CurlAuthNew(Streams, Loc_CR_Cookies, Loc_AuthToken) + + + Debug.WriteLine("VideoJson: " + VideoJson) + Debug.WriteLine("VideoStreams: " + Streams) + + + Dim CR_HardSubLang As String = SubSprache.CR_Value + VideoJson = CleanJSON(VideoJson) + + 'MsgBox(VideoJson) +#End Region + + + +#Region "m3u8 suche" + + + + + Dim VideoJObject As JObject = JObject.Parse(VideoJson) + Dim VideoData As List(Of JToken) = VideoJObject.Children().ToList + + Dim download_hls As CR_Beta_Stream = Nothing + + For Each item As JProperty In VideoData + item.CreateReader() + Select Case item.Name + Case "data" 'each record is inside the entries array + For Each Entry As JObject In item.Values + + Dim VideoSubData As List(Of JToken) = Entry.Children().ToList + For Each VideoSubItem As JProperty In VideoSubData + + Dim JsonEntryFormat As String = VideoSubItem.Name + If CBool(InStr(JsonEntryFormat, "drm")) Or CBool(InStr(JsonEntryFormat, "dash")) Or CBool(InStr(JsonEntryFormat, "urls")) Then ' Or CBool(InStr(JsonEntryFormat, "download")) workaround http 502 / false http 400 + Continue For + End If + + Dim SubData As List(Of JToken) = VideoSubItem.Children().ToList + For Each SubItem As JObject In SubData + SubItem.CreateReader() + + Dim StreamFormats As List(Of JToken) = SubItem.Children().ToList + + + For Each HardsubStreams As JProperty In StreamFormats + HardsubStreams.CreateReader() + Dim SubLang As String = HardsubStreams.Name + Dim Url As String = HardsubStreams.Value("url").ToString + If SubLang = Nothing Or SubLang = "" Then + SubLang = "" + End If + + If CBool(InStr(JsonEntryFormat, "download")) Then + download_hls = New CR_Beta_Stream(SubLang, JsonEntryFormat, Url) + Continue For + End If + + CR_Streams.Add(New CR_Beta_Stream(SubLang, JsonEntryFormat, Url)) + + Next + Next + + + Next + If download_hls IsNot Nothing Then + CR_Streams.Add(download_hls) + End If + Next + Case "meta" 'each record is inside the entries array + For Each MetaEntrys As JProperty In item.Values + Select Case MetaEntrys.Name + Case "audio_locale" + If CR_audio_isDubbed = True Then + Dim AudioTag As String = MetaEntrys.Value.ToString + CR_audio_locale = String.Join(" ", AudioTag.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c).Replace(Chr(34), "").Replace("\", "").Replace("/", "").Replace(":", "") + Else + CR_audio_locale = "ja-JP" + End If + + End Select + + Next + + End Select + Next + + Dim CR_URI_Master As New List(Of String) + + + Dim RawStream As New List(Of String) + + + + For c As Integer = 0 To CR_Streams.Count - 1 + Dim i As Integer = c + 'Debug.WriteLine("1457: " + i.ToString + "/" + CR_Streams.Count.ToString + " " + CR_Streams.Item(i).subLang + " " + CR_Streams.Item(i).Format) + If CR_Streams.Item(i).subLang = CR_HardSubLang Then + CR_URI_Master.Add(CR_Streams.Item(i).Url) + ElseIf CR_Streams.Item(i).subLang = "" And CR_HardSubLang = "null" Then + CR_URI_Master.Add(CR_Streams.Item(i).Url) + ElseIf CR_Streams.Item(i).subLang = "" And CR_audio_locale IsNot "ja-JP" And DubMode = True Then 'nothing/raw + RawStream.Add(CR_Streams.Item(i).Url) + End If + Next + + If CR_URI_Master.Count = 0 And RawStream.Count > 0 Then + CR_URI_Master.Clear() + CR_URI_Master.AddRange(RawStream) + + ElseIf CR_URI_Master.Count = 0 Then + Me.Invoke(New Action(Function() As Object + ResoNotFoundString = VideoJson + DialogTaskString = "Language_CR_Beta" + ErrorDialog.ShowDialog() + Return Nothing + End Function)) + If UserCloseDialog = True Then + Throw New System.Exception(Chr(34) + "UserAbort" + Chr(34)) + Else + 'MsgBox(CR_HardSubLang) + CR_HardSubLang = ResoBackString + ResoBackString = Nothing + 'MsgBox(CR_Streams.Count.ToString) + For i As Integer = 0 To CR_Streams.Count - 1 + Debug.WriteLine("1571: " + CR_Streams.Item(i).subLang) + If CR_Streams.Item(i).subLang = CR_HardSubLang Then + CR_URI_Master.Add(CR_Streams.Item(i).Url) + End If + + Next + + End If + End If + + 'MsgBox(CR_URI_Master.Count.ToString) + + If CBool(InStr(CR_URI_Master(0), "master.m3u8")) Then + Me.Invoke(New Action(Function() As Object + Anime_Add.StatusLabel.Text = "Status: m3u8 found, looking for resolution" + Me.Text = "Status: m3u8 found, looking for resolution" + Me.Invalidate() + Return Nothing + End Function)) Else - Dim ObjectsURLBuilder() As String = Streams.Split(New String() {"videos"}, System.StringSplitOptions.RemoveEmptyEntries) + If MessageBox.Show("The Url below failed a check, continue?" + vbNewLine + CR_URI_Master(0), "Mission failed?", MessageBoxButtons.OKCancel) = DialogResult.OK Then + + Else + Throw New System.Exception("Premium Episode") + End If + + End If + +#End Region + +#Region "Name" + + + + CR_FilenName = RemoveExtraSpaces(String.Join(" ", TextBox2_Text.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c)).Replace(Chr(34), "").Replace("\", "").Replace("/", "") 'System.Text.RegularExpressions.Regex.Replace(TextBox2_Text, "[^\w\\-]", " ")) + + + + Debug.WriteLine(CR_FilenName) + + CR_FilenName = String.Join(" ", CR_FilenName.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c).Replace(Chr(34), "").Replace("\", "").Replace("/", "") 'System.Text.RegularExpressions.Regex.Replace(CR_FilenName, "[^\w\\-]", " ") + CR_FilenName = RemoveExtraSpaces(CR_FilenName) + 'My.Computer.FileSystem.WriteAllText("log.log", WebbrowserText, False) + Pfad2 = UseSubfolder(CR_series_title, CR_FolderSeason, Pfad) + If Not Directory.Exists(Path.GetDirectoryName(Pfad2)) Then + ' Nein! Jetzt erstellen... + Try + Directory.CreateDirectory(Path.GetDirectoryName(Pfad2)) + Pfad2 = Chr(34) + Pfad2 + CR_FilenName + VideoFormat + Chr(34) + Catch ex As Exception + ' Ordner wurde nich erstellt + Pfad2 = Chr(34) + Pfad + "\" + CR_FilenName + VideoFormat + Chr(34) + Pfad2 = Pfad2.Replace("\\", "\") + End Try + Else + Pfad2 = Chr(34) + Pfad2 + CR_FilenName + VideoFormat + Chr(34) + End If +#End Region + + + +#Region "lösche doppel download" + 'MsgBox(Pfad2) + Dim Pfad5 As String = Pfad2.Replace(Chr(34), "") + Dim Pfad6 As String = Pfad5 + Dim MergeAudio As Boolean = False + + + If My.Computer.FileSystem.FileExists(Pfad5) Then + Me.Invoke(New Action(Function() As Object + Anime_Add.StatusLabel.Text = "Status: The file already exists." + Me.Text = "Status: The file already exists." + Me.Invalidate() + Return Nothing + End Function)) + If MessageBox.Show("The file " + Pfad5 + " already exists." + vbNewLine + "You want to override it?", "File exists!", MessageBoxButtons.OKCancel) = DialogResult.OK Then + Try + My.Computer.FileSystem.DeleteFile(Pfad5) + Catch ex As Exception + End Try + Else + Grapp_RDY = True + Exit Sub + End If + + End If +#End Region + + +#Region "GetResolution" + + If Reso = 42 And HybridMode = False Then + + ffmpegInput = "-i " + Chr(34) + CR_URI_Master(0) + Chr(34) + + ElseIf DownloadScope = DownloadScopeEnum.SubsOnly Then + ffmpegInput = "-i [Subtitles only]" + Else + + Dim str As String = Nothing + + + + + For i As Integer = 0 To CR_URI_Master.Count - 1 + Dim Count As String = (i + 1).ToString + Try + str = Curl(CR_URI_Master(i)) + If CBool(InStr(str, "curl:")) = False Then + Exit For + End If + Catch ex As Exception + + Me.Invoke(New Action(Function() As Object + Anime_Add.StatusLabel.Text = "failed accessing master.m3u8 " + Count + "/" + CR_URI_Master.Count.ToString + Me.Text = "failed accessing master.m3u8 " + Count + "/" + CR_URI_Master.Count.ToString + Me.Invalidate() + Return Nothing + End Function)) + Debug.WriteLine("Error accessing master #" + i.ToString + " -- " + CR_URI_Master(i)) + Pause(5) + End Try + Next + + + + If CBool(InStr(str, "curl:")) = True Or str = Nothing Then + + Debug.WriteLine("Checked " + CR_URI_Master.Count.ToString) + MsgBox("Unable to get master.m3u8" + vbNewLine + str, MsgBoxStyle.Critical) + Grapp_RDY = True + Exit Sub + + ElseIf DownloadScope = DownloadScopeEnum.AudioOnly Or MergeAudio = True Then + + If CBool(InStr(str, "x480,")) Then + ResoUsed = "x480" + ElseIf CBool(InStr(str, "x" + Reso.ToString + ",")) Then + ResoUsed = "x" + Reso.ToString + End If + + ElseIf CBool(InStr(str, "x" + Reso.ToString + ",")) Then + ResoUsed = "x" + Reso.ToString + Else + If CBool(InStr(str, ResoSave + ",")) Then + ResoUsed = ResoSave + Else + Me.Invoke(New Action(Function() As Object + DialogTaskString = "Resolution" + ResoNotFoundString = str + ErrorDialog.ShowDialog() + Return Nothing + End Function)) + If UserCloseDialog = True Then + Throw New System.Exception(Chr(34) + "UserAbort" + Chr(34)) + Else + ResoUsed = ResoBackString + ResoSave = ResoBackString + End If + End If + End If + + Dim ffmpeg_url_3 As String = Nothing + Dim LineChar As String = vbLf + If CBool(InStr(str, vbCrLf)) Then + LineChar = vbCrLf + ElseIf CBool(InStr(str, vbCr)) Then + LineChar = vbCr + End If + Dim ffmpeg_url_1 As String() = str.Split(New String() {LineChar}, System.StringSplitOptions.RemoveEmptyEntries) + + For i As Integer = 0 To ffmpeg_url_1.Count - 2 'Step 2 + If CBool(InStr(ffmpeg_url_1(i), ResoUsed + ",")) Then + ffmpeg_url_3 = ffmpeg_url_1(i + 1) + End If + Next + + ffmpegInput = "-i " + Chr(34) + ffmpeg_url_3.Trim() + Chr(34) + + End If + + + +#End Region + +#Region "GetSoftsubs" + Dim SoftSubsAvailable As New List(Of String) + Dim CCAvailable As New List(Of String) + + Dim SoftSubsList As New List(Of CR_Subtiles) + + + + + Dim SplitVideo As String() = VideoJson.Split(New String() {Chr(34) + "closed_captions" + Chr(34) + ":"}, System.StringSplitOptions.RemoveEmptyEntries) + + If SoftSubs.Count > 0 And My.Settings.Captions = True Then + For i As Integer = 0 To SoftSubs.Count - 1 + If CBool(InStr(SplitVideo(1), Chr(34) + "locale" + Chr(34) + ":" + Chr(34) + SoftSubs(i) + Chr(34) + "," + Chr(34) + "url" + Chr(34) + ":" + Chr(34))) Then + CCAvailable.Add(SoftSubs(i)) + End If + Next + End If + + If SoftSubs.Count > 0 And CCAvailable.Count = 0 Then + For i As Integer = 0 To SoftSubs.Count - 1 + If CBool(InStr(VideoJson, Chr(34) + "locale" + Chr(34) + ":" + Chr(34) + SoftSubs(i) + Chr(34) + "," + Chr(34) + "url" + Chr(34) + ":" + Chr(34))) Then + SoftSubsAvailable.Add(SoftSubs(i)) + End If + Next + ElseIf SoftSubs.Count > 0 And CCAvailable.Count > 0 Then + SoftSubsAvailable.AddRange(CCAvailable) + End If + + + If DownloadScope = DownloadScopeEnum.AudioOnly Then + + + ffmpegInput = ffmpegInput + " -metadata:s:a:0 language=" + ConvertSubValue(CR_audio_locale, ConvertSubsEnum.MP4CC_ISO_639_2) + " " + ffmpeg_command_temp + + ElseIf MergeAudio = True Then + + ffmpegInput = "-i " + Chr(34) + Pfad6 + Chr(34) + " " + ffmpegInput + " -map 0 -map 1:a" + " -metadata:s:a:" + FFMPEG_Audio(Pfad6).ToString + " language=" + ConvertSubValue(CR_audio_locale, ConvertSubsEnum.MP4CC_ISO_639_2) + " -c copy" + + + ElseIf SoftSubsAvailable.Count > 0 Or CCAvailable.Count > 0 Then + + Dim MergeSubsNow As Boolean = MergeSubs + + If DownloadScope = DownloadScopeEnum.SubsOnly Then + MergeSubsNow = False + End If + + Debug.WriteLine("Softsubs Default: " + DefaultSubCR) + + For i As Integer = 0 To SoftSubsAvailable.Count - 1 + + Dim SubsJson As String = VideoJson + If CCAvailable.Count > 0 Then + SubsJson = SplitVideo(1) + End If + + + Dim SoftSub As String() = SubsJson.Split(New String() {Chr(34) + "locale" + Chr(34) + ":" + Chr(34) + SoftSubsAvailable(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)}) + Dim SoftSub_3 As String = SoftSub_2(0).Replace("&", "&").Replace("/u0026", "&").Replace("\u002F", "/").Replace("\u0026", "&") + SoftSubsList.Add(New CR_Subtiles(SoftSubsAvailable(i), ConvertSubValue(SoftSubsAvailable(i), ConvertSubsEnum.DisplayText), " -i " + Chr(34) + SoftSub_3 + Chr(34), i.ToString, SoftSubsAvailable(i) = DefaultSubCR)) + + Next + + + If MergeSubsNow = True Then + Dim DispositionIndex As Integer = 69 + Dim SoftSubMergeURLs As String = "" + Dim SoftSubMergeMaps As String = " -map 0:v -map 0:a" + Dim SoftSubMergeMetatata As String = "" + Dim IndexMoveMap As Integer = 1 + If CR_MetadataUsage = True Then + IndexMoveMap = 2 + End If + + For i As Integer = 0 To SoftSubsList.Count - 1 + + SoftSubMergeURLs = SoftSubMergeURLs + " " + SoftSubsList(i).Url + SoftSubMergeMaps = SoftSubMergeMaps + " -map " + (i + IndexMoveMap).ToString + SoftSubMergeMetatata = SoftSubMergeMetatata + " -metadata:s:s:" + i.ToString + " language=" + ConvertSubValue(SoftSubsList(i).SubLangValue, ConvertSubsEnum.MP4CC_ISO_639_2) + " -metadata:s:s:" + i.ToString + " title=" + Chr(34) + SoftSubsList(i).SubLangName + Chr(34) + " -metadata:s:s:" + i.ToString + " handler_name=" + Chr(34) + SoftSubsList(i).SubLangName + Chr(34) + + If SoftSubsList(i).DefaultSub = True Then + DispositionIndex = i + End If + + Next + + Debug.WriteLine("-disposition:s: " + DispositionIndex.ToString) + + If DispositionIndex < 69 Then + SoftSubMergeMetatata = SoftSubMergeMetatata + " -disposition:s:" + DispositionIndex.ToString + " default" + End If + + + ffmpegInput = ffmpegInput + " " + SoftSubMergeURLs + SoftSubMergeMaps + " " + ffmpeg_command_temp + " -c:s " + MergeSubsFormat + SoftSubMergeMetatata + " -metadata:s:a:0 language=" + ConvertSubValue(CR_audio_locale, ConvertSubsEnum.MP4CC_ISO_639_2) + + + + Else + + For i As Integer = 0 To SoftSubsList.Count - 1 + Dim SubFormat As String = "ass" + If CCAvailable.Count > 0 Then + SubFormat = "vtt" + End If + Dim i2 As Integer = i + Me.Invoke(New Action(Function() As Object + Anime_Add.StatusLabel.Text = "Status: downloading subtitle file " + SoftSubsList(i2).SubLangName + Me.Text = "Status: downloading subtitle file " + SoftSubsList(i2).SubLangName + Me.Invalidate() + Return Nothing + End Function)) + + Dim SubText As String = "" + SubText = Curl(SoftSubsList(i2).Url.Replace(" -i ", "").Replace(Chr(34), "")) + If My.Settings.SubtitleMod1 = True Then + SubText = AddScaledBorderAndShadow(SubText) + End If + + Dim Pfad3 As String = Pfad2.Replace(Chr(34), "") + Dim FN As String = Path.ChangeExtension(Path.Combine(Path.GetFileNameWithoutExtension(Pfad3) + "." + ConvertSubValue(SoftSubsList(i2).SubLangValue, ConvertSubsEnum.DisplayText) + Path.GetExtension(Pfad3)), SubFormat) + If i = 0 And IncludeLangName = False Then + FN = Path.ChangeExtension(Path.GetFileName(Pfad3), SubFormat) + End If + Dim Pfad4 As String = Path.Combine(Path.GetDirectoryName(Pfad3), FN) + WriteText(Pfad4, SubText) + Pause(3) + + Next + + + ffmpegInput = ffmpegInput + " -metadata:s:a:0 language=" + ConvertSubValue(CR_audio_locale, ConvertSubsEnum.MP4CC_ISO_639_2) + " " + ffmpeg_command_temp 'ConvertSubValue(CR_audio_locale, ConvertSubsEnum.MP4CC_ISO_639_2) + + End If + Else + + + ffmpegInput = ffmpegInput + " -metadata:s:a:0 language=" + ConvertSubValue(CR_audio_locale, ConvertSubsEnum.MP4CC_ISO_639_2) + " " + ffmpeg_command_temp + + End If + + ffmpegInput = RemoveExtraSpaces(ffmpegInput) +#End Region + +#Region "thumbnail" + Dim thumbnail3 As String = "" + + Try + + Dim thumbnail As String() = ObjectJson.Split(New String() {"https://"}, System.StringSplitOptions.RemoveEmptyEntries) + For i As Integer = 0 To thumbnail.Count - 1 + If CBool(InStr(thumbnail(i), ".jpg" + Chr(34))) Then + Dim thumbnail2 As String() = thumbnail(i).Split(New String() {".jpg" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"}) + thumbnail3 = "https://" + thumbnail2(0).Replace("\/", "/") + ".jpg" + Exit For + ElseIf CBool(InStr(thumbnail(i), ".jpeg" + Chr(34))) Then + Dim thumbnail2 As String() = thumbnail(i).Split(New String() {".jpeg" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"}) + thumbnail3 = "https://" + thumbnail2(0).Replace("\/", "/") + ".jpeg" + Exit For + ElseIf CBool(InStr(thumbnail(i), ".jpe" + Chr(34))) Then + Dim thumbnail2 As String() = thumbnail(i).Split(New String() {".jpe" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"}) + thumbnail3 = "https://" + thumbnail2(0).Replace("\/", "/") + ".jpe" + Exit For + ElseIf CBool(InStr(thumbnail(i), ".JPEG" + Chr(34))) Then + Dim thumbnail2 As String() = thumbnail(i).Split(New String() {".JPEG" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"}) + thumbnail3 = "https://" + thumbnail2(0).Replace("\/", "/") + ".JPEG" + Exit For + ElseIf CBool(InStr(thumbnail(i), ".JPG" + Chr(34))) Then + Dim thumbnail2 As String() = thumbnail(i).Split(New String() {".JPG" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"}) + thumbnail3 = "https://" + thumbnail2(0).Replace("\/", "/") + ".JPG" + Exit For + ElseIf CBool(InStr(thumbnail(i), ".JPE" + Chr(34))) Then + Dim thumbnail2 As String() = thumbnail(i).Split(New String() {".JPE" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"}) + thumbnail3 = "https://" + thumbnail2(0).Replace("\/", "/") + ".JPE" + Exit For + End If + Next + + Catch ex As Exception + + End Try +#End Region + +#Region "item constructor" + +#Region "Display Hard_Softsubs" + Dim SubType_Value As String = Nothing + If Not CR_HardSubLang = "" Then + SubType_Value = "Hardsub: " + ConvertSubValue(CR_HardSubLang, ConvertSubsEnum.DisplayText) + End If + If SoftSubsList.Count > 0 And CR_HardSubLang = "" Then + SubType_Value = "Softsubs: " + For i As Integer = 0 To SoftSubsList.Count - 1 + SubType_Value = SubType_Value + SoftSubsList(i).SubLangName + If i < SoftSubsList.Count - 1 Then + SubType_Value = SubType_Value + ", " + End If + Next + End If +#End Region + + +#Region "Display Resolution" + + + Dim ResoHTMLDisplay As String = Nothing + Dim ResoHTML As String() = ResoUsed.Split(New String() {"x"}, System.StringSplitOptions.RemoveEmptyEntries) + If ResoHTML.Count > 1 Then + ResoHTMLDisplay = ResoHTML(1) + "p" + Else + ResoHTMLDisplay = ResoHTML(0) + "p" + End If + + Dim L2Name As String = String.Join(" ", CR_FilenName.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) 'System.Text.RegularExpressions.Regex.Replace(CR_FilenName_Backup, "[^\w\\-]", " ") + + If Reso = 42 And HybridMode = False Then + ResoHTMLDisplay = "[Auto]" + End If +#End Region + + + Dim L1Name_Split As String() = WebsiteURL.Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries) + Dim L1Name As String = L1Name_Split(1).Replace("www.", "") + " | Dub : " + ConvertSubValue(CR_audio_locale, ConvertSubsEnum.DisplayText) + + 'MsgBox(URL_DL) + + + Me.Invoke(New Action(Function() As Object + ListItemAdd(Path.GetFileName(Pfad2.Replace(Chr(34), "")), L1Name, L2Name, ResoHTMLDisplay, SubType_Value, thumbnail3, ffmpegInput, Pfad2) + Return Nothing + End Function)) + 'liList.Add(My.Resources.htmlvorThumbnail + thumbnail3 + My.Resources.htmlnachTumbnail + CR_title + "
" + CR_season_number + " " + CR_episode + My.Resources.htmlvorAufloesung + ResoHTMLDisplay + My.Resources.htmlvorSoftSubs + vbNewLine + SubValuesToDisplay() + My.Resources.htmlvorHardSubs + Subsprache3 + My.Resources.htmlnachHardSubs + "") + 'Form1.RichTextBox1.Text = My.Resources.htmlvorThumbnail + thumbnail3 + My.Resources.htmlnachTumbnail + CR_Anime_Titel + "
" + CR_Anime_Staffel + " " + CR_Anime_Folge + My.Resources.htmlvorAufloesung + ResoHTMLDisplay + My.Resources.htmlvorSoftSubs + vbNewLine + SubValuesToDisplay() + My.Resources.htmlvorHardSubs + Subsprache3 + My.Resources.htmlnachHardSubs + "" +#End Region + Grapp_RDY = True + Me.Invoke(New Action(Function() As Object + Anime_Add.StatusLabel.Text = "Status: idle" + Me.Text = "Crunchyroll Downloader" + ResoBackString = Nothing + Me.Invalidate() + Return Nothing + End Function)) + + Catch ex As Exception + Me.Invoke(New Action(Function() As Object + Anime_Add.StatusLabel.Text = "Status: idle" + Me.Text = "Crunchyroll Downloader" + ResoBackString = Nothing + Me.Invalidate() + Return Nothing + End Function)) + Grapp_RDY = True + If CBool(InStr(ex.ToString, "Could not find the sub language")) Then + MsgBox(Sub_language_NotFound + SubSprache.DisplayText) + ElseIf CBool(InStr(ex.ToString, "RESOLUTION Not Found")) Then + MsgBox(Resolution_NotFound) + ElseIf CBool(InStr(ex.ToString, "Premium Episode")) Then + MsgBox(Premium_Stream, MsgBoxStyle.Information) + ElseIf CBool(InStr(ex.ToString, "System.UnauthorizedAccessException")) Then + MsgBox(ErrorNoPermisson + vbNewLine + ex.ToString, MsgBoxStyle.Information) + ElseIf CBool(InStr(ex.ToString, Chr(34) + "UserAbort" + Chr(34))) Then + MsgBox(ex.ToString, MsgBoxStyle.Information) + ElseIf CBool(InStr(ex.ToString, "Error - Getting")) Then + + MsgBox(ex.ToString) + + Else + MsgBox(ex.ToString, MsgBoxStyle.Information) + End If + End Try ' + End Sub +#End Region + Public Sub GetCRVideo(ByVal Streams As String, ByVal AuthToken As String, ByVal WebsiteURL As String, ByVal RT_count As Integer) + If b = False Then + b = True + End If + 'Debug.WriteLine(Streams) + 'Debug.WriteLine(vbCrLf) + Debug.WriteLine("Website: " + WebsiteURL) + + + + Try + Grapp_RDY = False + Dim ffmpeg_command_temp As String = ffmpeg_command + Dim CR_MetadataUsage As Boolean = False + Dim CR_Streams As New List(Of CR_Beta_Stream) + Dim CR_series_title As String = Nothing + Dim CR_season_number As String = Nothing + Dim CR_FolderSeason As String = Nothing + Dim CR_episode As String = Nothing + Dim CR_episode_duration_ms As String = "60000000" + Dim CR_episode2 As String = Nothing + Dim CR_Anime_Staffel_int As String = Nothing + Dim CR_episode_int As String = Nothing + Dim CR_title As String = Nothing + Dim CR_audio_locale As String = "ja-JP" + Dim CR_audio_isDubbed As Boolean = False + Dim CR_Region As String = "DE" + Dim ResoUsed As String = "x" + Reso.ToString + Dim ffmpegInput As String = "-i [Subtitles only]" + + + Dim Pfad2 As String + Dim TextBox2_Text As String = Nothing + Dim CR_FilenName As String = Nothing + Dim ObjectJson As String = Nothing + Me.Invoke(New Action(Function() As Object + TextBox2_Text = Anime_Add.TextBox2.Text + Return Nothing + End Function)) + + ' + Dim Loc_CR_Cookies = " -H " + Chr(34) + CR_Cookies + Chr(34) + + Dim Loc_AuthToken = " -H " + Chr(34) + "Authorization: " + AuthToken + Chr(34) + + If CBool(InStr(AuthToken, "Authorization")) = True Then + Loc_AuthToken = AuthToken + End If + + Dim CR_EpisodeID As String = "" + + + Dim ObjectsURLBuilder() As String = Streams.Split(New String() {"videos"}, System.StringSplitOptions.RemoveEmptyEntries) Dim ObjectsURLBuilder2() As String = ObjectsURLBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries) Dim ObjectsURLBuilder3() As String = WebsiteURL.Split(New String() {"watch/"}, System.StringSplitOptions.RemoveEmptyEntries) Dim ObjectsURLBuilder4() As String = ObjectsURLBuilder3(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries) @@ -1147,7 +1795,6 @@ Public Class Main End Select Next - End If #Region "VideoJson" @@ -1388,7 +2035,12 @@ Public Class Main Return Nothing End Function)) Else - Throw New System.Exception("Premium Episode") + If MessageBox.Show("The Url below failed a check, continue?" + vbNewLine + CR_URI_Master(0), "Mission failed?", MessageBoxButtons.OKCancel) = DialogResult.OK Then + + Else + Throw New System.Exception("Premium Episode") + End If + 'Throw New System.Exception("Premium Episode") End If #End Region diff --git a/Crunchyroll Downloader/My Project/AssemblyInfo.vb b/Crunchyroll Downloader/My Project/AssemblyInfo.vb index 6545ffd..6fdacce 100644 --- a/Crunchyroll Downloader/My Project/AssemblyInfo.vb +++ b/Crunchyroll Downloader/My Project/AssemblyInfo.vb @@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + +