mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
audioplayer: allow to add https:// urls from playlist
This commit is contained in:
committed by
Jacek Jendrzej
parent
7955467a77
commit
163815a2e0
@@ -4,6 +4,7 @@
|
|||||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||||
Copyright (C) 2002-2008 the tuxbox project contributors
|
Copyright (C) 2002-2008 the tuxbox project contributors
|
||||||
Copyright (C) 2008 Novell, Inc. Author: Stefan Seyfried
|
Copyright (C) 2008 Novell, Inc. Author: Stefan Seyfried
|
||||||
|
Copyright (C) 2011-2013,2015,2017 Stefan Seyfried
|
||||||
Copyright (C) 2017 Sven Hoefer
|
Copyright (C) 2017 Sven Hoefer
|
||||||
|
|
||||||
License: GPL
|
License: GPL
|
||||||
@@ -1076,9 +1077,13 @@ void CAudioPlayerGui::processPlaylistUrl(const char *url, const char *name, cons
|
|||||||
if (line[0] != '#')
|
if (line[0] != '#')
|
||||||
{
|
{
|
||||||
//printf("chunk: line = %s\n", line);
|
//printf("chunk: line = %s\n", line);
|
||||||
ptr = strstr(line, "http://");
|
const char *schemes[] = {"http://", "https://", NULL };
|
||||||
if (ptr != NULL)
|
const char **scheme = schemes;
|
||||||
{
|
while (*scheme) {
|
||||||
|
ptr = strstr(line, *scheme);
|
||||||
|
scheme++;
|
||||||
|
if (ptr == NULL)
|
||||||
|
continue;
|
||||||
char *tmp;
|
char *tmp;
|
||||||
// strip \n and \r characters from url
|
// strip \n and \r characters from url
|
||||||
tmp = strchr(line, '\r');
|
tmp = strchr(line, '\r');
|
||||||
@@ -1088,6 +1093,7 @@ void CAudioPlayerGui::processPlaylistUrl(const char *url, const char *name, cons
|
|||||||
if (tmp != NULL)
|
if (tmp != NULL)
|
||||||
*tmp = '\0';
|
*tmp = '\0';
|
||||||
addUrl2Playlist(ptr, name, tim);
|
addUrl2Playlist(ptr, name, tim);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user