Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/MP1-4982-Remove_hard_sto…
Browse files Browse the repository at this point in the history
…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 1bd905e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 10 deletions.
46 changes: 37 additions & 9 deletions mediaportal/Core/guilib/TexturePacker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion mediaportal/MediaPortal.Application/MediaPortal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 1bd905e

Please sign in to comment.