From df7b8a2ea286d00eabb72c18bc34e7264f4a80c0 Mon Sep 17 00:00:00 2001 From: Me on Windows Date: Tue, 27 Jul 2021 09:45:00 +0000 Subject: [PATCH] Use dummy player when the URL is not valid --- QuickPlay/Configuration.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/QuickPlay/Configuration.cs b/QuickPlay/Configuration.cs index dae9635..bf7dbdb 100644 --- a/QuickPlay/Configuration.cs +++ b/QuickPlay/Configuration.cs @@ -85,11 +85,12 @@ namespace QuickPlay string filename = playerConfigUrl.Substring("file://".Length); var reader = new StreamReader(filename); cfgProvider = new FileConfigurationProvider(reader); - } else if (playerConfigUrl == "default") { + } else if (playerConfigUrl == "dummy") { cfgProvider = new DummyConfigurationProvider(); } else { - throw new InvalidOperationException("Schema of player config URL not supported"); + Android.Widget.Toast.MakeText(Android.App.Application.Context, "Schema of player config URL not supported, using dummy", Android.Widget.ToastLength.Short).Show(); + cfgProvider = new DummyConfigurationProvider(); } PlayerConfiguration playercfg; try