mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-28 08:05:56 -05:00
[artwork] Remove some superfluous checks
Credit lgtm.com
This commit is contained in:
parent
a0876e532c
commit
d9177dfb25
@ -554,13 +554,13 @@ rescale_calculate(int *target_w, int *target_h, int width, int height, int max_w
|
|||||||
*target_h = max_h;
|
*target_h = max_h;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((*target_h > max_h) && (max_h > 0))
|
if (*target_h > max_h)
|
||||||
*target_h = max_h;
|
*target_h = max_h;
|
||||||
|
|
||||||
/* PNG prefers even row count */
|
/* PNG prefers even row count */
|
||||||
*target_w += *target_w % 2;
|
*target_w += *target_w % 2;
|
||||||
|
|
||||||
if ((*target_w > max_w) && (max_w > 0))
|
if (*target_w > max_w)
|
||||||
*target_w = max_w - (max_w % 2);
|
*target_w = max_w - (max_w % 2);
|
||||||
|
|
||||||
DPRINTF(E_DBG, L_ART, "Rescale required, destination width %d height %d\n", *target_w, *target_h);
|
DPRINTF(E_DBG, L_ART, "Rescale required, destination width %d height %d\n", *target_w, *target_h);
|
||||||
@ -2033,9 +2033,6 @@ artwork_file_is_artwork(const char *filename)
|
|||||||
if (strcmp(artwork, filename) == 0)
|
if (strcmp(artwork, filename) == 0)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (j < ARRAY_SIZE(cover_extension))
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user