@@ -31,7 +31,7 @@ public partial class MainWindow : Window
3131
3232 int MajorV = 1 ;
3333 int MinorV = 0 ;
34- int PatchV = 1 ;
34+ int PatchV = 2 ;
3535 Boolean Preview = false ;
3636
3737 String IP = "" ;
@@ -242,10 +242,12 @@ public Boolean CheckIP()
242242 {
243243 return false ;
244244 }
245- IP = IP . Replace ( "50000" , "" ) ;
246- IP = IP . Replace ( "5000" , "" ) ;
247- IP = IP . Replace ( "500" , "" ) ;
248- IP = IP . Replace ( "500" , "" ) ;
245+ IP = IP . Replace ( ":5000000" , "" ) ;
246+ IP = IP . Replace ( ":500000" , "" ) ;
247+ IP = IP . Replace ( ":50000" , "" ) ;
248+ IP = IP . Replace ( ":5000" , "" ) ;
249+ IP = IP . Replace ( ":500" , "" ) ;
250+ IP = IP . Replace ( ":500" , "" ) ;
249251 IP = IP . Replace ( ":50" , "" ) ;
250252 IP = IP . Replace ( ":5" , "" ) ;
251253
@@ -341,6 +343,7 @@ public void PlaylistsR()
341343 o . Property ( "SyncConfig" ) . Remove ( ) ;
342344 o . Property ( "IsCommitted" ) . Remove ( ) ;
343345 o . Property ( "BeatSaberVersion" ) . Remove ( ) ;
346+
344347
345348 JProperty lrs = o . Property ( "Config" ) ;
346349 o . Add ( lrs . Value . Children < JProperty > ( ) ) ;
@@ -357,10 +360,9 @@ public void PlaylistsR()
357360 }
358361 catch
359362 {
360- txtbox . AppendText ( "\n \n \n An error occured. Check following:" ) ;
363+ txtbox . AppendText ( "\n \n \n An error occured (Code: BMBF100). Couldn't access BMBF Check following:" ) ;
361364 txtbox . AppendText ( "\n \n - Your Quest is on and BMBF opened" ) ;
362365 txtbox . AppendText ( "\n \n - You put in the Quests IP right." ) ;
363- txtbox . AppendText ( "\n \n - You've choosen the right Source path" ) ;
364366 }
365367 }
366368
@@ -403,6 +405,7 @@ public void Upload(String Path)
403405 txtbox . AppendText ( "\n \n Syncing to Beat Saber" ) ;
404406 Application . Current . Dispatcher . Invoke ( DispatcherPriority . Background , new Action ( delegate { } ) ) ;
405407 Sync ( ) ;
408+ System . Threading . Thread . Sleep ( 2000 ) ;
406409 }
407410 }
408411 Sync ( ) ;
@@ -571,9 +574,8 @@ public void PlaylistB()
571574 }
572575 catch
573576 {
574- txtbox . AppendText ( "\n \n \n An error occured. Check following:" ) ;
577+ txtbox . AppendText ( "\n \n \n An error occured (Code: BMBF100). Couldn't access BMBF . Check following:" ) ;
575578 txtbox . AppendText ( "\n \n - You put in the Quests IP right." ) ;
576- txtbox . AppendText ( "\n \n - You've choosen a Backup Name." ) ;
577579 txtbox . AppendText ( "\n \n - Your Quest is on." ) ;
578580
579581 }
@@ -779,7 +781,14 @@ public void QSE()
779781
780782 txtbox . AppendText ( "\n " ) ;
781783 txtbox . AppendText ( "\n " ) ;
782- txtbox . AppendText ( "\n Finished! Backed up " + exported + " Songs" ) ;
784+
785+ if ( exported == 0 )
786+ {
787+ txtbox . AppendText ( "\n error (Code: QSE110). " ) ;
788+ } else
789+ {
790+ txtbox . AppendText ( "\n Finished! Backed up " + exported + " Songs." ) ;
791+ }
783792 txtbox . ScrollToEnd ( ) ;
784793 }
785794
@@ -922,7 +931,7 @@ public void adb(String Argument)
922931 catch
923932 {
924933 // Log error.
925- txtbox . AppendText ( "\n \n \n An Error Occured. Check following" ) ;
934+ txtbox . AppendText ( "\n \n \n An error Occured (Code: ADB100) . Check following" ) ;
926935 txtbox . AppendText ( "\n \n - Your Quest is connected and USB Debugging enabled." ) ;
927936 txtbox . AppendText ( "\n \n - You have adb installed." ) ;
928937 }
@@ -940,7 +949,15 @@ public void Update()
940949 //Download Update.txt
941950 using ( WebClient client = new WebClient ( ) )
942951 {
943- client . DownloadFile ( "https://raw.githubusercontent.com/ComputerElite/BMBF-BS-Backup-Utility/main/Update.txt" , exe + "\\ tmp\\ Update.txt" ) ;
952+ try
953+ {
954+ client . DownloadFile ( "https://raw.githubusercontent.com/ComputerElite/BMBF-BS-Backup-Utility/main/Update.txt" , exe + "\\ tmp\\ Update.txt" ) ;
955+ }
956+ catch
957+ {
958+ txtbox . AppendText ( "\n \n \n An error Occured (Code: UD100). Couldn't check for Updates. Check following" ) ;
959+ txtbox . AppendText ( "\n \n - Your PC has internet." ) ;
960+ }
944961 }
945962 StreamReader VReader = new StreamReader ( exe + "\\ tmp\\ Update.txt" ) ;
946963
@@ -1030,7 +1047,7 @@ private void Start_Update(object sender, RoutedEventArgs e)
10301047 catch
10311048 {
10321049 // Log error.
1033- txtbox . AppendText ( "\n An Error Occured" ) ;
1050+ txtbox . AppendText ( "\n \n \ n An error Occured (Code: UD200). Couldn't download Update. " ) ;
10341051 }
10351052 }
10361053
0 commit comments