mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-30 09:13:44 -04:00
Extra error check
This commit is contained in:
parent
85fdceedf5
commit
519a673503
@ -175,6 +175,13 @@ scan_metadata_icy(char *url, struct media_file_info *mfi)
|
|||||||
|
|
||||||
/* TODO https */
|
/* TODO https */
|
||||||
av_url_split(NULL, 0, NULL, 0, ctx->hostname, sizeof(ctx->hostname), &ctx->port, ctx->path, sizeof(ctx->path), ctx->url);
|
av_url_split(NULL, 0, NULL, 0, ctx->hostname, sizeof(ctx->hostname), &ctx->port, ctx->path, sizeof(ctx->path), ctx->url);
|
||||||
|
if ((!ctx->hostname) || (strlen(ctx->hostname) == 0))
|
||||||
|
{
|
||||||
|
DPRINTF(E_LOG, L_SCAN, "Error extracting hostname from playlist URL: %s\n", ctx->url);
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (ctx->port < 0)
|
if (ctx->port < 0)
|
||||||
ctx->port = 80;
|
ctx->port = 80;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user