From a49d3ff11bcaf028f354fcd1a3f3ad7ec179ea49 Mon Sep 17 00:00:00 2001 From: hama3254 <52826614+hama3254@users.noreply.github.com> Date: Wed, 22 Feb 2023 14:50:53 +0100 Subject: [PATCH] improvents #698 improvents #698 --- .vs/Crunchyroll Downloader/v17/.suo | Bin 176128 -> 199680 bytes Crunchyroll Downloader/Anime_Add.vb | 6 +- Crunchyroll Downloader/App.config | 3 + Crunchyroll Downloader/Main.vb | 19 +++-- .../My Project/Settings.Designer.vb | 12 +++ .../My Project/Settings.settings | 3 + Crunchyroll Downloader/Subfolder.vb | 79 ++++++++++++++++++ 7 files changed, 116 insertions(+), 6 deletions(-) diff --git a/.vs/Crunchyroll Downloader/v17/.suo b/.vs/Crunchyroll Downloader/v17/.suo index ecbc563c2aeccb7249a7924b5b58e3a59cb47a24..373bd8dabd4c25467346903d762e8d4f57b6d479 100644 GIT binary patch delta 11680 zcmds730#!N+23baR+K|T1XPYiQHd_Ni_4{m3nC&xF`lS+pklnjCB!2ri?NAU65UA{ zljc*TR&8v(Heplau?o@F7_X$(*kVxABsFcSR&!XD?>~DWM3SoU>(}<>_uskaoq5ig z=fzmx#<xo%>QT?Ixmv8UVuhrd#r`VpCV2`i%t zeuI^{z9jqdg)Zs5hUq-}Vd&*ysKS%MN$Fqah8(7C@I{*F$j2Zx0BJx3&i^<_<2?_6dEW|7;G zg5`XqKsbd#GQX)X$Uff{1`Ya1VUTT3VQ7PLQ(*{KC?+ZHLmC=|K{C9lFep)W3WI#n zJ;K0Gxpgj+Y;O;Im+f*ybGF;L{v`TJu1k^mF4tS3&dK#`n`Gz9T)SK2HHFJ6UVEJ|vcN@2d~-vux5`z5d3 zrpBxu{JP&VQuBp=5qz_Mu-jtvG6IcnRdr%e8say1EOPaQ_%7fJcm9Jyc*(9zH@V>{ zO*^{>p|j*A9^SB`wsAF~Ew6?zQiq$nsL#8Yywa537}WS$dc|DgwTh~`v#Rl|swXpj z8m{ahXVrWfu9dSFx=rW%fh2ao#h8lW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XTq8l(uYU_k3GlmiXT2z5 zCf-B-S6X7zYw9a!mMyNSs;CIes9IQAAx7oV5HVvXTgKbQtNE&&VDQu32rp$%_~Zkl zdwXzIQ3*ae-C`XnKi9pv58k{{zV6j2qbHF0iWW%Tiohz?hlLL^^VD3SaM4`JTEri! zSh`1{j1bHz%+!Fg#^_PaJ|Y;hp24Czn>n%Yp;u-wx7enMs%7K(!@grh+%{GxJuM7Y zIA&Cv{jzpchFI0b9IkjqDaU@sHK*7+eJpP08D5zseSDl~-@-n+K2X5XX0S**3$Jj} zz>aa4M0C!Up1vLSFj1r}pgq5yIAUze*X)S#-SaGj>`%h~C-aSmM@Z8c{=)-|R&nMV zcGB!6cyvJ=2&#afr+VUuaH0Q_EfO(0ggLgb;wMK#^?YY>xL7@x1^hO^Tlzi4EY zcgvuNCW!e@vW;}(aLcU-{|QuSIpl$s*3jwuCd8-XRgzCrf0q2S2^}XYe@PZd0j0JS?JGKp9&GmL}t?5Hg?9d M@*{@OOk(H%7dv?*O8@`> diff --git a/Crunchyroll Downloader/Anime_Add.vb b/Crunchyroll Downloader/Anime_Add.vb index 73b4f6d..d91899e 100644 --- a/Crunchyroll Downloader/Anime_Add.vb +++ b/Crunchyroll Downloader/Anime_Add.vb @@ -40,7 +40,9 @@ Public Class Anime_Add Private Sub Anime_Add_Load(sender As Object, e As EventArgs) Handles MyBase.Load - DownloadScope.SelectedIndex = 0 + + DownloadScope.SelectedIndex = Main.DownloadScope + Manager.Owner = Me Me.StyleManager = Manager Btn_Close.Image = Main.CloseImg @@ -588,6 +590,8 @@ Public Class Anime_Add Private Sub SubTitlesOnlyCB_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DownloadScope.SelectedIndexChanged Main.DownloadScope = DownloadScope.SelectedIndex + My.Settings.DownloadScope = Main.DownloadScope + My.Settings.Save() End Sub diff --git a/Crunchyroll Downloader/App.config b/Crunchyroll Downloader/App.config index 6142e53..c0b5867 100644 --- a/Crunchyroll Downloader/App.config +++ b/Crunchyroll Downloader/App.config @@ -153,6 +153,9 @@ False + + 0 + diff --git a/Crunchyroll Downloader/Main.vb b/Crunchyroll Downloader/Main.vb index d5562e9..b0e85c6 100644 --- a/Crunchyroll Downloader/Main.vb +++ b/Crunchyroll Downloader/Main.vb @@ -424,13 +424,8 @@ Public Class Main Private Sub Main_Load(sender As Object, e As EventArgs) Handles MyBase.Load - - FillArray() - - - #Region "settings path" Dim mySettings As New DirectorySettings @@ -450,6 +445,7 @@ Public Class Main DarkModeValue = My.Settings.DarkModeValue + DownloadScope = My.Settings.DownloadScope Manager.Style = MetroColorStyle.Orange If DarkModeValue = True Then @@ -1866,9 +1862,16 @@ Public Class Main If DownloadScope = DownloadScopeEnum.AudioOnly Then + If CR_MetadataUsage = False Then + ffmpegInput = ffmpegInput + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command_temp + Else + ffmpegInput = ffmpegInput + " -i " + Chr(34) + Mdata_File + Chr(34) + " -map_metadata 1" + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command_temp + End If 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=" + CCtoMP4CC(CR_audio_locale) + " -c copy" + ElseIf SoftSubsAvailable.Count > 0 Then @@ -1956,7 +1959,13 @@ Public Class Main ffmpegInput = ffmpegInput + " -i " + Chr(34) + Mdata_File + Chr(34) + " -map_metadata 1" + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command_temp End If End If + Else + If CR_MetadataUsage = False Then + ffmpegInput = ffmpegInput + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command_temp + Else + ffmpegInput = ffmpegInput + " -i " + Chr(34) + Mdata_File + Chr(34) + " -map_metadata 1" + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command_temp + End If End If ffmpegInput = RemoveExtraSpaces(ffmpegInput) diff --git a/Crunchyroll Downloader/My Project/Settings.Designer.vb b/Crunchyroll Downloader/My Project/Settings.Designer.vb index 8bb09e3..eff9d7b 100644 --- a/Crunchyroll Downloader/My Project/Settings.Designer.vb +++ b/Crunchyroll Downloader/My Project/Settings.Designer.vb @@ -581,6 +581,18 @@ Namespace My Me("SaveMode") = value End Set End Property + + _ + Public Property DownloadScope() As Integer + Get + Return CType(Me("DownloadScope"),Integer) + End Get + Set + Me("DownloadScope") = value + End Set + End Property End Class End Namespace diff --git a/Crunchyroll Downloader/My Project/Settings.settings b/Crunchyroll Downloader/My Project/Settings.settings index 3fbf1d3..f6e6c10 100644 --- a/Crunchyroll Downloader/My Project/Settings.settings +++ b/Crunchyroll Downloader/My Project/Settings.settings @@ -134,5 +134,8 @@ False + + 0 + \ No newline at end of file diff --git a/Crunchyroll Downloader/Subfolder.vb b/Crunchyroll Downloader/Subfolder.vb index 45cc589..0735e8e 100644 --- a/Crunchyroll Downloader/Subfolder.vb +++ b/Crunchyroll Downloader/Subfolder.vb @@ -155,5 +155,84 @@ Module Subfolder Write(msg & vbCrLf) End Sub End Class + Public Function ShortingName(ByVal FullPath As String) As String + + Dim FileName As String = Path.GetFileNameWithoutExtension(FullPath) + + Dim Segements() As String = FileName.Split(New String() {" "}, System.StringSplitOptions.RemoveEmptyEntries) + + Dim ReturnName As String = Nothing + + For i As Integer = 0 To Segements.Count - 1 + If Segements(i).Count > 5 Then ' 6 chars or more, split at 5 + ReturnName = ReturnName + Segements(i).Substring(0, 3) + ". " + + + ElseIf Segements(i).Count > 3 Then ' 4 or 5 can stay + ReturnName = ReturnName + Segements(i) + " " + End If + Next + + If ReturnName = Nothing Then + ReturnName = FullPath + Else + ReturnName = Path.GetDirectoryName(FullPath) + "\" + ReturnName + Path.GetExtension(FullPath) + End If + + Return ReturnName + End Function + Public Function FFMPEG_Audio(ByVal file As String) As Integer + + Dim proc As New Process + Dim exepath As String = Application.StartupPath + "\ffmpeg.exe" + Dim startinfo As New System.Diagnostics.ProcessStartInfo + Dim sr As StreamReader + + Dim cmd As String = "-i " + Chr(34) + file + Chr(34) 'start ffmpeg with command strFFCMD string + Dim ffmpegOutput As String = Nothing + 'all parameters required to run the process + startinfo.FileName = exepath + startinfo.Arguments = cmd + startinfo.UseShellExecute = False + startinfo.WindowStyle = ProcessWindowStyle.Normal + startinfo.RedirectStandardError = True + startinfo.RedirectStandardOutput = True + startinfo.CreateNoWindow = True + startinfo.StandardOutputEncoding = Encoding.UTF8 + startinfo.StandardErrorEncoding = Encoding.UTF8 + proc.StartInfo = startinfo + proc.Start() ' start the process + sr = proc.StandardError 'standard error is used by ffmpeg + + Dim start, finish, pau As Double + start = CSng(Microsoft.VisualBasic.DateAndTime.Timer) + pau = 5 + finish = start + pau + + + + + Do + ffmpegOutput = ffmpegOutput + sr.ReadToEnd + + Loop Until proc.HasExited Or Microsoft.VisualBasic.DateAndTime.Timer < finish + + + Dim Streams() As String = ffmpegOutput.Split(New String() {"Stream #"}, System.StringSplitOptions.RemoveEmptyEntries) + + Dim Tracks As Integer = 0 + + For i As Integer = 0 To Streams.Count - 1 + If CBool(InStr(Streams(i), ": Audio:")) Then + Tracks = Tracks + 1 + + End If + Next + + Return Tracks + + End Function + + End Module