About this mod
create a radio station quickly and easily for RadioExt.
- Requirements
- Permissions and credits
- Changelogs
The Nexusmods system give me a false flag so i must contact the support. If you dont trust me because a new account maybe you trust me more on Elitepvpers , Hacktec is my Alias they if someone trust me more than here. over 10 Years.
Get the Utility at Elitepvpers
Move the exe to "bin\x64\plugins\cyber_engine_tweaks\mods\radioExt"
Dont Trust me ? Debug it self with Visual Studio .net
form1.vb
Imports System.IO
Imports System.Globalization
Public Class Form1
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
End Sub
Dim folderPath As String
Private Sub AdfdMusicFolder_Click(sender As System.Object, e As System.EventArgs) Handles AdfdMusicFolder.Click
Dim folderDialog As New FolderBrowserDialog()
If folderDialog.ShowDialog() = DialogResult.OK Then
folderPath = folderDialog.SelectedPath
MusicPath.Text = folderDialog.SelectedPath
Dim mp3Files() As String = Directory.GetFiles(folderPath, "*.mp3")
For Each mp3File As String In mp3Files
MusicList.Items.Add(Path.GetFileName(mp3File))
Next
End If
End Sub
Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
If MusicList.SelectedItems.Count > 0 Then
' Schleife durch alle ausgewählten Elemente und sie aus der ListBox entfernen
For i As Integer = MusicList.SelectedItems.Count - 1 To 0 Step -1
MusicList.Items.Remove(MusicList.SelectedItems(i))
Next
Else
MessageBox.Show("you dont Selected some files.")
End If
End Sub
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
CreateMetadata()
End Sub
Dim subfolderPath As String
Dim Installpath As String
Dim Installpathjson As String
Public Sub CreateMetadata()
subfolderPath = Path.Combine(Application.StartupPath, "radios")
Installpath = Path.Combine(Application.StartupPath, "radios", RadioDisplayName.Text)
Installpathjson = Installpath + "\metadata.json"
Dim ursprungstext As String = Blanko.Text
Dim platzhalterWerte As New Dictionary(Of String, String)()
platzhalterWerte.Add("*StaticIcon*", RadioIcon.Text)
Dim culture As CultureInfo = CultureInfo.InvariantCulture
platzhalterWerte.Add("*StaticName*", RadioDisplayName.Text)
platzhalterWerte.Add("*StaticFM*", Radiofm.Value.ToString("0.00", culture))
platzhalterWerte.Add("*StaticVolume*", RadioVolume.Value.ToString("0.0", culture))
platzhalterWerte.Add("*StaticCustomBoolean*", IIf(RadioCustomTrue.Checked, "true", "false"))
platzhalterWerte.Add("*StaticCustomPath*", RadioCustomAtlasPath.Text)
platzhalterWerte.Add("*StaticCustomPart*", RadioCustomAtlasPart.Text)
platzhalterWerte.Add("*StaticStreamUrl*", RadioStreamUrl.Text)
platzhalterWerte.Add("*StaticStreamBoolean*", IIf(RadioStreamTrue.Checked, "true", "false"))
For Each platzhalter As KeyValuePair(Of String, String) In platzhalterWerte
ursprungstext = ursprungstext.Replace(platzhalter.Key, platzhalter.Value)
Next
BlankoReplika.Text = ursprungstext
If Not Directory.Exists(subfolderPath) Then
MsgBox("Move me to 'bin\x64\plugins\cyber_engine_tweaks\mods\radioExt'")
Else
If Not Directory.Exists(Installpath) Then
Directory.CreateDirectory(Installpath)
If Not File.Exists(Installpathjson) Then My.Computer.FileSystem.WriteAllText(Installpathjson, BlankoReplika.Text, True)
If MusicList.Items.Count > 0 Then CopyFiles()
Else
If MessageBox.Show("Folder already Exist,ignore it?", "Alert", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
If File.Exists(Installpathjson) Then
My.Computer.FileSystem.DeleteFile(Installpathjson)
My.Computer.FileSystem.WriteAllText(Installpathjson, BlankoReplika.Text, True)
End If
If Not File.Exists(Installpathjson) Then My.Computer.FileSystem.WriteAllText(Installpathjson, BlankoReplika.Text, True)
If MusicList.Items.Count > 0 Then CopyFiles()
End If
End If
End If
End Sub
Public Sub CopyFiles()
For Each mp3File As String In MusicList.Items
Dim sourcePath As String = folderPath + "\" + mp3File
Dim destinationPath As String = Path.Combine(Installpath, Path.GetFileName(mp3File))
File.Copy(sourcePath, destinationPath, True)
Next
MsgBox("Ready")
End Sub
End Class
Required that make sense
================================================================
RadioExt