Skip to content
Permalink
Browse files

Merge remote-tracking branch 'remotes/origin/MP1-4982-Remove_hard_sto…

…p_when_Caching_Graphics_not_found_folders' into MP_1.23.100_Pre_Release_Test5
  • Loading branch information
Azzuro committed Jan 7, 2020
2 parents 2bf493b + a92d7d7 commit 1bd905e5fdfa2dbbd71a85f7218902f038c82ecb
Showing with 39 additions and 10 deletions.
  1. +37 −9 mediaportal/Core/guilib/TexturePacker.cs
  2. +2 −1 mediaportal/MediaPortal.Application/MediaPortal.cs
@@ -352,17 +352,45 @@ public void PackSkinGraphics(string skinName)
Log.Debug("TexurePacker:PackSkinGraphics: {0}", ex.Message);
}

string[] tvLogos = Directory.GetFiles(Config.GetSubFolder(Config.Dir.Thumbs, @"tv\logos"), "*.png", SearchOption.AllDirectories);
files.AddRange(tvLogos);

string[] radioLogos = Directory.GetFiles(Config.GetSubFolder(Config.Dir.Thumbs, "Radio"), "*.png", SearchOption.AllDirectories);
files.AddRange(radioLogos);
try
{
string[] tvLogos = Directory.GetFiles(Config.GetSubFolder(Config.Dir.Thumbs, @"tv\logos"), "*.png", SearchOption.AllDirectories);
files.AddRange(tvLogos);
}
catch (DirectoryNotFoundException)
{
Log.Warn("TexturePacker: Folder not found: " + Config.GetSubFolder(Config.Dir.Thumbs, @"tv\logos"));
}

string[] weatherFiles = Directory.GetFiles(String.Format(@"{0}\media\weather", skinName), "*.png");
files.AddRange(weatherFiles);
try
{
string[] radioLogos = Directory.GetFiles(Config.GetSubFolder(Config.Dir.Thumbs, "Radio"), "*.png", SearchOption.AllDirectories);
files.AddRange(radioLogos);
}
catch (DirectoryNotFoundException)
{
Log.Warn("TexturePacker: Folder not found: " + Config.GetSubFolder(Config.Dir.Thumbs, "Radio"));
}

string[] tetrisFiles = Directory.GetFiles(String.Format(@"{0}\media\tetris", skinName), "*.png");
files.AddRange(tetrisFiles);
try
{
string[] weatherFiles = Directory.GetFiles(String.Format(@"{0}\media\weather", skinName), "*.png");
files.AddRange(weatherFiles);
}
catch (DirectoryNotFoundException)
{
Log.Warn("TexturePacker: Folder not found: " + String.Format(@"{0}\media\weather", skinName));
}

try
{
string[] tetrisFiles = Directory.GetFiles(String.Format(@"{0}\media\tetris", skinName), "*.png");
files.AddRange(tetrisFiles);
}
catch (DirectoryNotFoundException)
{
Log.Warn("TexturePacker: Folder not found: " + String.Format(@"{0}\media\tetris", skinName));
}

// Determine maximum texture dimensions
try
@@ -3661,7 +3661,8 @@ protected override void InitializeDeviceObjects()
catch (Exception exs)
{
// ReSharper disable LocalizableElement
MessageBox.Show(String.Format("Failed to load your skin! Aborting startup...\n\n{0}", exs.Message), "Critical error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
// MessageBox.Show(String.Format("Failed to load your skin! Aborting startup...\n\n{0}", exs.Message), "Critical error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
Log.Error("Startup: Failed to Caching Graphics! {0}", exs.Message);
// ReSharper restore LocalizableElement
Close();
}

0 comments on commit 1bd905e

Please sign in to comment.
You can’t perform that action at this time.