mirror of
https://github.com/hama3254/Crunchyroll-Downloader-v3.0.git
synced 2024-12-23 22:51:48 +01:00
hybride now caches key files
hybride now caches key files
This commit is contained in:
parent
22745b152a
commit
2859645e0d
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -266,7 +266,13 @@ Public Class CRD_List_Item
|
||||
Dim wc_ts As New WebClient
|
||||
wc_ts.DownloadFile(New Uri(DL_URL), DL_Pfad)
|
||||
Catch ex As Exception
|
||||
Debug.WriteLine(ex.ToString + vbNewLine + DL_Pfad + vbNewLine + DL_URL)
|
||||
Try
|
||||
Dim wc_ts As New WebClient
|
||||
wc_ts.DownloadFile(New Uri(DL_URL), DL_Pfad)
|
||||
Catch ex2 As Exception
|
||||
Debug.WriteLine("Download error #2: " + DL_Pfad + vbNewLine + ex.ToString + vbNewLine + DL_URL)
|
||||
End Try
|
||||
Debug.WriteLine("Download error #1: " + DL_Pfad)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
@ -357,6 +363,9 @@ Public Class CRD_List_Item
|
||||
|
||||
|
||||
End If
|
||||
Dim LoadedKeys As New List(Of String)
|
||||
LoadedKeys.Add("Nothing")
|
||||
Dim KeyFileCache As String = Nothing
|
||||
Dim textLenght() As String = text.Split(New String() {vbLf}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim Fragments() As String = text.Split(New String() {".ts"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim FragmentsInt As Integer = Fragments.Count - 2
|
||||
@ -448,6 +457,27 @@ Public Class CRD_List_Item
|
||||
ElseIf InStr(textLenght(i), "URI=" + Chr(34)) Then
|
||||
Dim KeyLine As String = textLenght(i)
|
||||
If InStr(KeyLine, "https://") Then
|
||||
|
||||
Dim KeyFile() As String = KeyLine.Split(New String() {"URI=" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim KeyFile2() As String = KeyFile(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
If LoadedKeys.Item(LoadedKeys.Count - 1) = KeyFile2(0) Then
|
||||
Else
|
||||
Dim KeyClient As New WebClient
|
||||
KeyClient.Encoding = Encoding.UTF8
|
||||
If Main.WebbrowserCookie = Nothing Then
|
||||
Else
|
||||
KeyClient.Headers.Add(HttpRequestHeader.Cookie, Main.WebbrowserCookie)
|
||||
End If
|
||||
Dim KeyFile3 As String = einstellungen.GeräteID() + ".key"
|
||||
KeyFileCache = KeyFile3
|
||||
KeyClient.DownloadFile(KeyFile2(0), Application.StartupPath + "\" + KeyFile3)
|
||||
LoadedKeys.Add(KeyFile2(0))
|
||||
End If
|
||||
If KeyFile2.Count > 1 Then
|
||||
KeyLine = KeyFile(0) + "URI=" + Chr(34) + KeyFileCache + Chr(34) + KeyFile2(1)
|
||||
Else
|
||||
KeyLine = KeyFile(0) + "URI=" + Chr(34) + KeyFileCache + Chr(34)
|
||||
End If
|
||||
'ElseIf InStr(KeyLine, "../") Then
|
||||
' Dim countDot() As String = KeyLine.Split(New String() {"./"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
@ -457,6 +487,7 @@ Public Class CRD_List_Item
|
||||
' path = path + c(i3)
|
||||
' Next
|
||||
' KeyLine = path + countDot(countDot.Count - 1)
|
||||
|
||||
Else
|
||||
Dim c() As String = New Uri(m3u8_url_3).Segments
|
||||
Dim path As String = "https://" + New Uri(m3u8_url_3).Host
|
||||
@ -464,7 +495,26 @@ Public Class CRD_List_Item
|
||||
path = path + c(i3)
|
||||
Next
|
||||
KeyLine = KeyLine.Replace("URI=" + Chr(34), "URI=" + Chr(34) + path) 'path + textLenght(i)
|
||||
Debug.WriteLine(vbNewLine + KeyLine)
|
||||
Dim KeyFile() As String = KeyLine.Split(New String() {"URI=" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim KeyFile2() As String = KeyFile(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
If LoadedKeys.Item(LoadedKeys.Count - 1) = KeyFile2(0) Then
|
||||
Else
|
||||
Dim KeyClient As New WebClient
|
||||
KeyClient.Encoding = Encoding.UTF8
|
||||
If Main.WebbrowserCookie = Nothing Then
|
||||
Else
|
||||
KeyClient.Headers.Add(HttpRequestHeader.Cookie, Main.WebbrowserCookie)
|
||||
End If
|
||||
Dim KeyFile3 As String = einstellungen.GeräteID() + ".key"
|
||||
KeyFileCache = KeyFile3
|
||||
KeyClient.DownloadFile(KeyFile2(0), Application.StartupPath + "\" + KeyFile3)
|
||||
LoadedKeys.Add(KeyFile2(0))
|
||||
End If
|
||||
If KeyFile2.Count > 1 Then
|
||||
KeyLine = KeyFile(0) + "URI=" + Chr(34) + KeyFileCache + Chr(34) + KeyFile2(1)
|
||||
Else
|
||||
KeyLine = KeyFile(0) + "URI=" + Chr(34) + KeyFileCache + Chr(34)
|
||||
End If
|
||||
End If
|
||||
m3u8FFmpeg = m3u8FFmpeg + KeyLine + vbLf
|
||||
Else
|
||||
@ -492,7 +542,7 @@ Public Class CRD_List_Item
|
||||
Dim exepath As String = Application.StartupPath + "\ffmpeg.exe"
|
||||
Dim startinfo As New System.Diagnostics.ProcessStartInfo
|
||||
|
||||
Dim cmd As String = "-protocol_whitelist file,crypto,http,https,tcp,tls " + DL_URL + " " + DL_Pfad '+ " " + ffmpeg_command + " " + DL_Pfad 'start ffmpeg with command strFFCMD string
|
||||
Dim cmd As String = "-allowed_extensions ALL " + DL_URL + " " + DL_Pfad '+ " " + ffmpeg_command + " " + DL_Pfad 'start ffmpeg with command strFFCMD string
|
||||
|
||||
If Debug2 = True Then
|
||||
MsgBox(cmd)
|
||||
@ -656,6 +706,7 @@ Public Class CRD_List_Item
|
||||
Return Nothing
|
||||
End Function))
|
||||
If HybridMode = True Then
|
||||
Thread.Sleep(1000)
|
||||
System.IO.Directory.Delete(HybridModePath, True)
|
||||
End If
|
||||
End If
|
||||
|
@ -2273,12 +2273,12 @@ Public Class Main
|
||||
UsedSub = SubTitle2(SubTitle2.Count - 1) + ".dfxp"
|
||||
Else
|
||||
If MessageBox.Show("No Subtitle found in the website, a logfile was created." + vbNewLine + "Press 'Yes' to download the video without subtitle", "No Subtitle", MessageBoxButtons.YesNo) = DialogResult.Yes Then
|
||||
File.WriteAllText(Path.Combine(Application.StartupPath + "No Subtitle for" + DownloadPfad.Replace(".mp4", ".log")), PlayerPage, Encoding.UTF8)
|
||||
File.WriteAllText(DownloadPfad.Replace(".mp4", "-no subtitle.log"), PlayerPage, Encoding.UTF8)
|
||||
Else
|
||||
File.WriteAllText(Path.Combine(Application.StartupPath + "No Subtitle for" + DownloadPfad.Replace(".mp4", ".log")), PlayerPage, Encoding.UTF8)
|
||||
File.WriteAllText(DownloadPfad.Replace(".mp4", "-no subtitle.log"), PlayerPage, Encoding.UTF8)
|
||||
Exit Sub
|
||||
End If
|
||||
'MsgBox("No Subtitle found in the website, a logfile was created.", MsgBoxStyle.OkCancel, "No Subtitle")
|
||||
'MsgBox("No Subtitle found In the website, a logfile was created.", MsgBoxStyle.OkCancel, "No Subtitle")
|
||||
End If
|
||||
|
||||
Else
|
||||
@ -2308,9 +2308,9 @@ Public Class Main
|
||||
UsedSub = Subs_in_dfxp.Item(0)
|
||||
End If
|
||||
End If
|
||||
|
||||
If MergeSubstoMP4 = True Then
|
||||
If HardSubFunimation = True Then
|
||||
If UsedSub = Nothing Then
|
||||
ElseIf MergeSubstoMP4 = True Then
|
||||
If HardSubFunimation = True Then
|
||||
Dim SubText As String = client0.DownloadString(UsedSub)
|
||||
Dim SubtitelFormat As String = ".srt"
|
||||
If InStr(UsedSub, ".vtt") Then
|
||||
@ -2350,7 +2350,15 @@ Public Class Main
|
||||
#End Region
|
||||
|
||||
#Region "SubsToMP4"
|
||||
If HardSubFunimation = True Then
|
||||
If UsedSub = Nothing Then
|
||||
If FunimationDub = "japanese" Then
|
||||
Dim DubMetatata As String = " -metadata:s:a:0 language=jpn"
|
||||
Funimation_m3u8_final = "-i " + Chr(34) + Funimation_m3u8_final + Chr(34) + DubMetatata + " " + ffmpeg_command
|
||||
Else
|
||||
Dim DubMetatata As String = " -metadata:s:a:0 language=eng"
|
||||
Funimation_m3u8_final = "-i " + Chr(34) + Funimation_m3u8_final + Chr(34) + DubMetatata + " " + ffmpeg_command
|
||||
End If
|
||||
ElseIf HardSubFunimation = True Then
|
||||
Dim ffmpeg_hardsub As String = Nothing
|
||||
If InStr(ffmpeg_command, "-c copy") Then
|
||||
ffmpeg_hardsub = "-bsf:a aac_adtstoasc"
|
||||
|
@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("3.5.2")>
|
||||
<Assembly: AssemblyFileVersion("3.5.2")>
|
||||
<Assembly: AssemblyVersion("3.5.3")>
|
||||
<Assembly: AssemblyFileVersion("3.5.3")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
Binary file not shown.
Binary file not shown.
@ -28,6 +28,34 @@
|
||||
<body id="bodypage" class="main-bg" >
|
||||
<img alt="image error" src="balken.png" class="class-balken">
|
||||
|
||||
<div class="div-episode">
|
||||
|
||||
<img alt="image error" src="https://derf9v1xhwwx1.cloudfront.net/image/upload/c_fill,q_60,h_630,w_1290/oth/FunimationStoreFront/1536737/English/1536737_English_KeyArt-OfficialVideoImage_f945041c-4952-e911-8175-020165574d09.jpg" class="imagestyle">
|
||||
|
||||
<div>
|
||||
|
||||
<span class="titel" dir="auto">Overlord <br> Season 1 Episode 1</span>
|
||||
|
||||
<div class="progressbar">
|
||||
|
||||
<div class="progressbar-value" style="width:100%"></div>
|
||||
|
||||
</div>
|
||||
<span dir="auto" class='percenttext'>Finished - 1439,81MB</span>
|
||||
<div>
|
||||
<br>
|
||||
<span dir="auto" class="resotext">1080p</span>
|
||||
|
||||
<a href="#" class="cc-wert" title="Softsubs:
|
||||
"> <img alt="image error" src="cc.png" class="class-cc">null</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<img alt="image error" src="balken.png" class="class-balken"><!-- Overlord Season 1 Episode 1-->
|
||||
<script>
|
||||
|
||||
setInterval(function loadXMLDoc() {
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user