Skip to content

Commit

Permalink
added Download Path
Browse files Browse the repository at this point in the history
  • Loading branch information
timtester123 committed Dec 6, 2020
1 parent c3782ed commit 64c54b1
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 27 deletions.
3 changes: 3 additions & 0 deletions M3U_IPTV_CatchUp_Downloader/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<setting name="EPG_URL" serializeAs="String">
<value />
</setting>
<setting name="DownloadPath" serializeAs="String">
<value />
</setting>
</M3U_IPTV_CatchUp_Downloader.My.MySettings>
</userSettings>
</configuration>
77 changes: 58 additions & 19 deletions M3U_IPTV_CatchUp_Downloader/Form1.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions M3U_IPTV_CatchUp_Downloader/Form1.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@
<metadata name="MenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 17</value>
</metadata>
<metadata name="FolderBrowserDialog_DownloadPath.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>240, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Expand Down
28 changes: 22 additions & 6 deletions M3U_IPTV_CatchUp_Downloader/Form1.vb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Imports System.Net
Public Class Form1


Public local_M3U As String = Application.StartupPath() & "\Downloads\M3U.m3u"
Public local_EPG As String = Application.StartupPath() & "\Downloads\EPG.XML"
Public local_M3U As String = Path.GetTempPath() & "\M3U.m3u"
Public local_EPG As String = Path.GetTempPath() & "\EPG.XML"
Public EPG_XML As String


Expand Down Expand Up @@ -37,14 +37,24 @@ Public Class Form1
Private Sub save_settings()
My.Settings.EPG_URL = TextBox_EPG_URL.Text
My.Settings.M3U_URL = TextBox_M3U_URL.Text
My.Settings.DownloadPath = TextBox_Download_Path.Text
My.Settings.Save()
End Sub
Private Sub load_settings()
Dim M3U_URL As String = My.Settings.M3U_URL
Dim EPG_URL As String = My.Settings.EPG_URL
Dim DownloadPath As String = My.Settings.DownloadPath
TextBox_EPG_URL.Text = EPG_URL
TextBox_M3U_URL.Text = M3U_URL

If DownloadPath = "" Then
TextBox_Download_Path.Text = Application.StartupPath()
Else
TextBox_Download_Path.Text = DownloadPath
End If



M3U_URL_Download(TextBox_M3U_URL.Text)

End Sub
Expand Down Expand Up @@ -144,6 +154,10 @@ Public Class Form1

Private Sub Button_Download_Click(sender As Object, e As EventArgs) Handles Button_Download.Click

If My.Computer.FileSystem.DirectoryExists(TextBox_Download_Path.Text) = False Then
MsgBox("Please check the download path: " & TextBox_Download_Path.Text)
Exit Sub
End If

'Download
If (ListBox.SelectedIndices.Count > 0) Then
Expand All @@ -156,7 +170,7 @@ Public Class Form1
Dim timeshift_URL As String = get_timeshift_URL(title, start_time_str, name)

'Create Folder and download
Dim folder As String = Application.StartupPath() & "\Downloads\" & name
Dim folder As String = TextBox_Download_Path.Text & "\" & name
My.Computer.FileSystem.CreateDirectory(folder)
Dim DownloadFile As String = folder + "\" & RemoveIllegalFileNameChars(name & " - " & title + " - " & start_time_str, "") & ".mkv"

Expand Down Expand Up @@ -427,7 +441,9 @@ Public Class Form1

End Sub




Private Sub Button_choose_Download_path_Click(sender As Object, e As EventArgs) Handles Button_choose_Download_path.Click
FolderBrowserDialog_DownloadPath.ShowDialog()
Dim DownloadPath As String = FolderBrowserDialog_DownloadPath.SelectedPath
TextBox_Download_Path.Text = DownloadPath
End Sub
End Class
4 changes: 2 additions & 2 deletions M3U_IPTV_CatchUp_Downloader/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' indem Sie "*" wie unten gezeigt eingeben:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("1.2.1.0")>
<Assembly: AssemblyFileVersion("1.2.1.0")>
<Assembly: AssemblyVersion("1.2.2.0")>
<Assembly: AssemblyFileVersion("1.2.2.0")>
12 changes: 12 additions & 0 deletions M3U_IPTV_CatchUp_Downloader/My Project/Settings.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions M3U_IPTV_CatchUp_Downloader/My Project/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
<Setting Name="EPG_URL" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="DownloadPath" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings>
</SettingsFile>

0 comments on commit 64c54b1

Please sign in to comment.