From ffcce61e1d2ccb48fa9bc22f0cba2a9bab9919dd Mon Sep 17 00:00:00 2001 From: hama3254 Date: Thu, 4 May 2023 18:48:37 +0200 Subject: [PATCH] added Portuguese (Portugal), Error dialog is set to foreground added Portuguese (Portugal) #737 Error dialog is set to foreground #736 --- .vs/Crunchyroll Downloader/v17/.suo | Bin 190464 -> 210944 bytes Crunchyroll Downloader/Browser.vb | 1 + .../ErrorDialog.Designer.vb | 12 ++++++++-- Crunchyroll Downloader/ErrorDialog.resx | 3 +++ Crunchyroll Downloader/ErrorDialog.vb | 16 ++++++++++++- Crunchyroll Downloader/GetData.vb | 1 + Crunchyroll Downloader/Main.vb | 22 +++++++++++++----- .../My Project/Resources.Designer.vb | 2 -- .../My Project/Resources.resx | 2 -- Crunchyroll Downloader/Subfolder.vb | 3 +++ 10 files changed, 49 insertions(+), 13 deletions(-) diff --git a/.vs/Crunchyroll Downloader/v17/.suo b/.vs/Crunchyroll Downloader/v17/.suo index 09dd541113ada8d6cf1ee826a6d0ac120ca96b92..37ffb1e8d4b00084d1174ec6e67f99c2e6a33f60 100644 GIT binary patch delta 13738 zcmeHN3tW^{+JB$pa35e)97g0aAQCFjfQU$h!&NlAq^=neG75O*A`YfTGG5a(lR3uY zT|`qWbH#C;mhG!a>#OanysX`<49j2HUi!36OV{9g&O0+Wx=?D?{&v3({O8;+&*ePN zdC&Wrj{2C+Dc9)wGRYBClC+4D?u6F1wl-1Ph0u>MfN(EAzvtPy$}47;2Ra_k!u)Kn z9_YS%!3VH}YNg$LKAR6)`2|+%{siU6c=P#PhIIj@#J6mV;5w%C%>_w1Ia)N9Bo7XX zz}lxNl}`vD(3EY%DNZ7k6Z{Bb9sMc3o8UePk4|JOAzbrN|-~qgAhUxWA&w2 zOGqHxL+DP3A`B(mNr;oA6zLz7=tb}*_z=FQjy)+B1I(qEcp@(%kz!v$HbJz>DSeSpMerp?h_Yl#>j6NeCpA5oQs@R9{n^;z)~p z38hVryqg^J&nE|6)dt;;D>tJJwXWJ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z5~-jwcnz8En-l~FG0)x;uU#36ydz*nn~J@)V!0Vno7aiMq8+j3s+^xzG`=jdu>J=XKUcrIrf=jgvda zBudMSw({M6LuG{Cz~ubTGP+C#C9YSGJR`zX`dab1DmW(Il4X*wT|2;TK9UMQQDr`& zJBECy3VlwT#^)LyXBk%Mqx!ZXHaTB&9$=HNz6^Dag=!N>s8tnU3uv)YnJdIFRO*LH z*NRczv+++T`8Z?Tqsc_GDR%D-;ww_eR>3Ve_F%t(DULN+X^1x5 zB@xL#MUGQfGeWTGP_*-f?0@Dq8Q#xVzBMDkK6s0Wcj#l0ncqL8es~V*{loySQTlH% zb7Nl?MrE;yy~M3;R+k&Ybi3~c@g>RpPSJAWS}*k87ri@Z@TM~XX&N83(;zlNWkzqoG2QXy1+h_*!5KHXIvI3o77dVnAbwr@TJ zrpmHTK5|@qfZF?sh`;*6-;1xAYPAm2soZ1mF`HT@C(mI1y0#7jI7j6kreM|YQw%;9 zvt#0~TaSwsI<@RGv6o4Gjv7(w6E>*9KKk!s4^@0Ai0YcXXjyp>c&y`k??6#**aZ!r z<0>-D8ivf9RGwZtiSH3|RAqyRqAje(3(B$z7VN6<&vsAoyy4nvsjt@6j*o91WMAQ{ z%^?+jopzJjR42TC<-1fI7drLz8tkl@72Jn?re0e@r6T2bEv@$T&<0~k z*{Kzu%JO~zs_L)^!invlM(yA6sfitURR^5sb{VxM`dqE45dW)o#B0O&KBrX=SKM&% dFgd)l6#q( Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() Me.ComboBox1 = New MetroFramework.Controls.MetroComboBox() Me.pictureBox3 = New System.Windows.Forms.PictureBox() Me.GroupBox3 = New System.Windows.Forms.GroupBox() Me.PictureBox9 = New System.Windows.Forms.PictureBox() Me.StatusLabel = New MetroFramework.Controls.MetroLabel() + Me.Delay = New System.Windows.Forms.Timer(Me.components) CType(Me.pictureBox3, System.ComponentModel.ISupportInitialize).BeginInit() Me.GroupBox3.SuspendLayout() CType(Me.PictureBox9, System.ComponentModel.ISupportInitialize).BeginInit() @@ -50,7 +52,7 @@ Partial Class ErrorDialog Me.pictureBox3.BackColor = System.Drawing.Color.Transparent Me.pictureBox3.Cursor = System.Windows.Forms.Cursors.Hand Me.pictureBox3.Image = Global.Crunchyroll_Downloader.My.Resources.Resources.main_close - Me.pictureBox3.Location = New System.Drawing.Point(329, 1) + Me.pictureBox3.Location = New System.Drawing.Point(333, -3) Me.pictureBox3.Name = "pictureBox3" Me.pictureBox3.Size = New System.Drawing.Size(50, 40) Me.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize @@ -63,7 +65,7 @@ Partial Class ErrorDialog Me.GroupBox3.Controls.Add(Me.PictureBox9) Me.GroupBox3.Controls.Add(Me.StatusLabel) Me.GroupBox3.Controls.Add(Me.ComboBox1) - Me.GroupBox3.Location = New System.Drawing.Point(13, 43) + Me.GroupBox3.Location = New System.Drawing.Point(13, 60) Me.GroupBox3.Name = "GroupBox3" Me.GroupBox3.Size = New System.Drawing.Size(354, 203) Me.GroupBox3.TabIndex = 38 @@ -98,6 +100,10 @@ Partial Class ErrorDialog Me.StatusLabel.Text = "Status: idle" Me.StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' + 'Delay + ' + Me.Delay.Interval = 2000 + ' 'ErrorDialog ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -106,6 +112,7 @@ Partial Class ErrorDialog Me.Controls.Add(Me.GroupBox3) Me.Controls.Add(Me.pictureBox3) Me.Name = "ErrorDialog" + Me.Text = "CRD-Dialog-Box" CType(Me.pictureBox3, System.ComponentModel.ISupportInitialize).EndInit() Me.GroupBox3.ResumeLayout(False) Me.GroupBox3.PerformLayout() @@ -119,4 +126,5 @@ Partial Class ErrorDialog Private WithEvents PictureBox9 As PictureBox Friend WithEvents ComboBox1 As MetroFramework.Controls.MetroComboBox Public WithEvents StatusLabel As MetroFramework.Controls.MetroLabel + Friend WithEvents Delay As Timer End Class diff --git a/Crunchyroll Downloader/ErrorDialog.resx b/Crunchyroll Downloader/ErrorDialog.resx index 1af7de1..2c036a2 100644 --- a/Crunchyroll Downloader/ErrorDialog.resx +++ b/Crunchyroll Downloader/ErrorDialog.resx @@ -117,4 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + \ No newline at end of file diff --git a/Crunchyroll Downloader/ErrorDialog.vb b/Crunchyroll Downloader/ErrorDialog.vb index d76d5e2..66e13b2 100644 --- a/Crunchyroll Downloader/ErrorDialog.vb +++ b/Crunchyroll Downloader/ErrorDialog.vb @@ -7,8 +7,10 @@ Public Class ErrorDialog Private Sub Reso_Load(sender As Object, e As EventArgs) Handles MyBase.Load + 'Me.TopMost = True Manager.Owner = Me Me.StyleManager = Manager + pictureBox3.Image = Main.CloseImg ComboBox1.Text = Nothing @@ -97,7 +99,7 @@ Public Class ErrorDialog End Try End If - + Delay.Enabled = True End Sub Private Sub SurroundingSub() @@ -208,4 +210,16 @@ Public Class ErrorDialog PictureBox9.Cursor = Cursors.Hand End Sub + Private Sub Delay_Tick(sender As Object, e As EventArgs) Handles Delay.Tick + + Try + Dim hwnd As IntPtr = FindWindow(Nothing, Me.Text) + SetForegroundWindow(hwnd) + + Catch ex As Exception + MsgBox(ex.ToString) + End Try + 'MsgBox(Me.Text) + Delay.Enabled = False + End Sub End Class \ No newline at end of file diff --git a/Crunchyroll Downloader/GetData.vb b/Crunchyroll Downloader/GetData.vb index 5caa5ec..0b1ffd6 100644 --- a/Crunchyroll Downloader/GetData.vb +++ b/Crunchyroll Downloader/GetData.vb @@ -189,6 +189,7 @@ Module GetData Loop Until Proc.HasExited Or Microsoft.VisualBasic.DateAndTime.Timer < finish + If CurlOutput = Nothing Or CBool(InStr(CurlOutput, "curl")) Then Throw New System.Exception("Error - Getting ObjectJson data" + vbNewLine + CurlOutput) Return Nothing diff --git a/Crunchyroll Downloader/Main.vb b/Crunchyroll Downloader/Main.vb index a7de826..2a6e7a5 100644 --- a/Crunchyroll Downloader/Main.vb +++ b/Crunchyroll Downloader/Main.vb @@ -1485,8 +1485,10 @@ Public Class Main ChaptersJson = Nothing Debug.WriteLine("no Chapter data... ignoring") End If - If ChaptersJson IsNot Nothing Then + + If ChaptersJson IsNot Nothing Then + 'MsgBox(ChaptersJson) Dim StartTime As String() = ChaptersJson.Split(New String() {Chr(34) + "startTime" + Chr(34) + ": "}, System.StringSplitOptions.RemoveEmptyEntries) Dim StartTime2 As String() = StartTime(1).Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries) Dim StartTime3 As String() = StartTime2(0).Split(New String() {"."}, System.StringSplitOptions.RemoveEmptyEntries) @@ -1497,7 +1499,8 @@ Public Class Main Next Dim StartTime_ms As String = StartTime3(0) + StartTime4 - + ' + Dim StartTime_int As Integer = CInt(StartTime_ms) Dim EndTime As String() = ChaptersJson.Split(New String() {Chr(34) + "endTime" + Chr(34) + ": "}, System.StringSplitOptions.RemoveEmptyEntries) Dim EndTime2 As String() = EndTime(1).Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries) @@ -1517,15 +1520,20 @@ Public Class Main Dim AfterTime_ms As String = EndTime3(0) + AfterTime Dim Metadata As String = Nothing + If CInt(CR_episode_duration_ms) < CInt(StartTime_ms) Then 'Totaly invalid... + ElseIf CInt(CR_episode_duration_ms) < CInt(EndTime_ms) And StartTime_int = 0 Then + 'the answer is 42... + Debug.WriteLine("Skip Chapters, the answer is 42...") + 'this is pointless ElseIf CInt(CR_episode_duration_ms) < CInt(EndTime_ms) Then 'it's not an Intro it's an outro - Dim DeCh As Integer = CInt(StartTime_ms) - 1 - Metadata = My.Resources.ffmpeg_metadata_out.Replace("[Titel]", CR_FilenName).Replace("[Start-1]", DeCh.ToString).Replace("[Start]", StartTime_ms).Replace("[duration_ms]", CR_episode_duration_ms) + Dim DeCh As Integer = StartTime_int - 1 + Metadata = My.Resources.ffmpeg_metadata_out.Replace("[Start-1]", DeCh.ToString).Replace("[Start]", StartTime_ms).Replace("[duration_ms]", CR_episode_duration_ms) Else - Metadata = My.Resources.ffmpeg_metadata.Replace("[Titel]", CR_FilenName).Replace("[Start]", StartTime_ms).Replace("[END]", EndTime_ms).Replace("[after]", AfterTime_ms).Replace("[duration_ms]", CR_episode_duration_ms) + Metadata = My.Resources.ffmpeg_metadata.Replace("[Start]", StartTime_ms).Replace("[END]", EndTime_ms).Replace("[after]", AfterTime_ms).Replace("[duration_ms]", CR_episode_duration_ms) End If @@ -4235,9 +4243,10 @@ Public Class Main Sub FillArray() ' LangValueEnum.Add(New NameValuePair("[ null ]", "", Nothing)) - LangValueEnum.Add(New NameValuePair("Deutsch", "de-DE", Nothing)) + LangValueEnum.Add(New NameValuePair("Deutsch", "de-DE", Nothing)) ' LangValueEnum.Add(New NameValuePair("English", "en-US", "en")) LangValueEnum.Add(New NameValuePair("Português (Brasil)", "pt-BR", "pt")) + LangValueEnum.Add(New NameValuePair("Português (Portugal)", "pt-PT", Nothing)) LangValueEnum.Add(New NameValuePair("Español (LA)", "es-419", "es")) LangValueEnum.Add(New NameValuePair("Français (France)", "fr-FR", Nothing)) LangValueEnum.Add(New NameValuePair("العربية (Arabic)", "ar-SA", Nothing)) @@ -4488,6 +4497,7 @@ Public Class Main ObjectJson = CurlAuthNew(ObjectsUrl, Loc_CR_Cookies, Auth2) Catch ex As Exception + If CBool(InStr(ex.ToString, "Error - Getting")) Then MsgBox("Error invalid CR respone") Exit Sub diff --git a/Crunchyroll Downloader/My Project/Resources.Designer.vb b/Crunchyroll Downloader/My Project/Resources.Designer.vb index 661faa3..bf9c289 100644 --- a/Crunchyroll Downloader/My Project/Resources.Designer.vb +++ b/Crunchyroll Downloader/My Project/Resources.Designer.vb @@ -338,7 +338,6 @@ Namespace My.Resources ''' ''' Sucht eine lokalisierte Zeichenfolge, die ;FFMETADATA1 - '''title=[Titel] ''' '''[CHAPTER] '''TIMEBASE=1/1000 @@ -359,7 +358,6 @@ Namespace My.Resources ''' ''' Sucht eine lokalisierte Zeichenfolge, die ;FFMETADATA1 - '''title=[Titel] ''' '''[CHAPTER] '''TIMEBASE=1/1000 diff --git a/Crunchyroll Downloader/My Project/Resources.resx b/Crunchyroll Downloader/My Project/Resources.resx index f6bfe99..d42320e 100644 --- a/Crunchyroll Downloader/My Project/Resources.resx +++ b/Crunchyroll Downloader/My Project/Resources.resx @@ -531,7 +531,6 @@ Dialogue: 0,0:00:00.00,0:00:00.00,Default,,0000,0000,0000,,some ideas on how tem ;FFMETADATA1 -title=[Titel] [CHAPTER] TIMEBASE=1/1000 @@ -546,7 +545,6 @@ END=[duration_ms] ;FFMETADATA1 -title=[Titel] [CHAPTER] TIMEBASE=1/1000 diff --git a/Crunchyroll Downloader/Subfolder.vb b/Crunchyroll Downloader/Subfolder.vb index 3769338..36f7db3 100644 --- a/Crunchyroll Downloader/Subfolder.vb +++ b/Crunchyroll Downloader/Subfolder.vb @@ -239,6 +239,9 @@ Module Subfolder End Function + Public Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As IntPtr) As IntPtr + + Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr End Module