mirror of
https://github.com/zoriya/Opus.git
synced 2025-12-06 06:26:15 +00:00
Adding a try catch block and debug messages for the blurred bitmap creation for the queue background.
This commit is contained in:
@@ -159,7 +159,7 @@ namespace Opus
|
||||
{
|
||||
drawable = Picasso.With(Application.Context).Load(current.Album).Error(Resource.Drawable.noAlbum).Placeholder(Resource.Drawable.noAlbum).Transform(new RemoveBlackBorder(true)).Get();
|
||||
}
|
||||
catch (Exception)
|
||||
catch
|
||||
{
|
||||
drawable = Picasso.With(Application.Context).Load(Resource.Drawable.noAlbum).Get();
|
||||
}
|
||||
@@ -176,7 +176,7 @@ namespace Opus
|
||||
{
|
||||
drawable = Picasso.With(Application.Context).Load(iconURI).Error(Resource.Drawable.noAlbum).Placeholder(Resource.Drawable.noAlbum).NetworkPolicy(NetworkPolicy.Offline).Get();
|
||||
}
|
||||
catch (Exception)
|
||||
catch
|
||||
{
|
||||
drawable = Picasso.With(Application.Context).Load(Resource.Drawable.noAlbum).Get();
|
||||
}
|
||||
@@ -187,6 +187,8 @@ namespace Opus
|
||||
Palette.From(drawable).MaximumColorCount(28).Generate(this);
|
||||
|
||||
if (albumArt.Width > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
//The width of the view in pixel (we'll multiply this by 0.75f because the drawer has a width of 75%)
|
||||
int width = (int)(albumArt.Width * (float)drawable.Height / albumArt.Height);
|
||||
@@ -207,6 +209,12 @@ namespace Opus
|
||||
|
||||
output.CopyTo(blured);
|
||||
MainActivity.instance.FindViewById<ImageView>(Resource.Id.queueBackground).SetImageBitmap(blured);
|
||||
Console.WriteLine("&Bitmap set to image view");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("&Queue background error: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
if (bar != null)
|
||||
|
||||
Reference in New Issue
Block a user