diff --git a/Makefile.common b/Makefile.common index 80b14de44d..ba5064da1b 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1733,7 +1733,8 @@ endif OBJ += $(LIBRETRO_COMM_DIR)/formats/bmp/rbmp_encode.o \ $(LIBRETRO_COMM_DIR)/formats/json/jsonsax.o \ $(LIBRETRO_COMM_DIR)/formats/json/jsonsax_full.o \ - $(LIBRETRO_COMM_DIR)/formats/image_transfer.o + $(LIBRETRO_COMM_DIR)/formats/image_transfer.o \ + $(LIBRETRO_COMM_DIR)/formats/m3u/m3u_file.o # Gong embedded core ifeq ($(HAVE_GONG),1) diff --git a/griffin/griffin.c b/griffin/griffin.c index 1716e46b13..e2df73a06d 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -1599,3 +1599,8 @@ MANUAL CONTENT SCAN DISK CONTROL INTERFACE ============================================================ */ #include "../disk_control_interface.c" + +/*============================================================ +MISC FILE FORMATS +============================================================ */ +#include "../libretro-common/formats/m3u/m3u_file.c" diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index f4da77ca47..df57e955c2 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -10451,6 +10451,10 @@ MSG_HASH( MSG_MANUAL_CONTENT_SCAN_IN_PROGRESS, "Scanning: " ) +MSG_HASH( + MSG_MANUAL_CONTENT_SCAN_M3U_CLEANUP, + "Cleaning M3U entries: " + ) MSG_HASH( MSG_MANUAL_CONTENT_SCAN_END, "Scan complete: " diff --git a/libretro-common/formats/m3u/m3u_file.c b/libretro-common/formats/m3u/m3u_file.c new file mode 100644 index 0000000000..7da44b001b --- /dev/null +++ b/libretro-common/formats/m3u/m3u_file.c @@ -0,0 +1,635 @@ +/* Copyright (C) 2010-2020 The RetroArch team + * + * --------------------------------------------------------------------------------------- + * The following license statement only applies to this file (m3u_file.c). + * --------------------------------------------------------------------------------------- + * + * Permission is hereby granted, free of charge, + * to any person obtaining a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#include + +#include +#include +#include +#include + +#include + +/* We parse the following types of entry label: + * - '#LABEL: