6 Commits

5 changed files with 34 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.0...3.27) cmake_minimum_required (VERSION 3.0...3.27)
project (nncmpp VERSION 2.0.0 LANGUAGES C) project (nncmpp VERSION 2.1.0 LANGUAGES C)
# Moar warnings # Moar warnings
if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC) if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC)
@@ -68,7 +68,7 @@ if (WITH_PULSE)
list (APPEND extra_libraries ${libpulse_LIBRARIES}) list (APPEND extra_libraries ${libpulse_LIBRARIES})
endif () endif ()
pkg_check_modules (x11 x11 xrender xft fontconfig) pkg_check_modules (x11 x11 xrender xft fontconfig libpng)
add_option (WITH_X11 "Build with X11 support" "${x11_FOUND}") add_option (WITH_X11 "Build with X11 support" "${x11_FOUND}")
if (WITH_X11) if (WITH_X11)
if (NOT x11_FOUND) if (NOT x11_FOUND)
@@ -130,8 +130,22 @@ install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
install (DIRECTORY contrib DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}) install (DIRECTORY contrib DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
install (DIRECTORY info DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}) install (DIRECTORY info DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
if (WITH_X11) if (WITH_X11)
include (IconUtils)
set (icon_base ${PROJECT_BINARY_DIR}/icons)
set (icon_png_list)
foreach (icon_size 16 32 48)
icon_to_png (${PROJECT_NAME} ${PROJECT_SOURCE_DIR}/${PROJECT_NAME}.svg
${icon_size} ${icon_base} icon_png)
list (APPEND icon_png_list ${icon_png})
endforeach ()
add_custom_target (icons ALL DEPENDS ${icon_png_list})
install (FILES ${PROJECT_NAME}.svg install (FILES ${PROJECT_NAME}.svg
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps) DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps)
install (DIRECTORY ${icon_base}
DESTINATION ${CMAKE_INSTALL_DATADIR})
install (FILES ${PROJECT_NAME}.desktop install (FILES ${PROJECT_NAME}.desktop
DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
endif () endif ()

6
NEWS
View File

@@ -1,4 +1,4 @@
Unreleased 2.1.0 (2024-02-11)
* Added ability to look up song lyrics, * Added ability to look up song lyrics,
using a new scriptable extension interface for the Info tab using a new scriptable extension interface for the Info tab
@@ -13,10 +13,14 @@ Unreleased
* X11: fixed rendering of overflowing, partially visible list items * X11: fixed rendering of overflowing, partially visible list items
* X11: fixed a crash when resizing the window to zero dimensions
* Added a "o" binding to select the currently playing song * Added a "o" binding to select the currently playing song
* Added Readline-like M-u, M-l, M-c editor bindings * Added Readline-like M-u, M-l, M-c editor bindings
* Made the scroll wheel work on the elapsed time gauge and the volume display
* Changed volume adjustment bindings to use +/- keys * Changed volume adjustment bindings to use +/- keys
* Changed volume adjustment to go in steps of 5 rather than 10 % * Changed volume adjustment to go in steps of 5 rather than 10 %

View File

@@ -40,10 +40,12 @@ The rest of this README will concern itself with externalities.
Building Building
-------- --------
Build dependencies: CMake, pkg-config, awk, liberty (included), Build-only dependencies: CMake, pkg-config, awk, liberty (included),
termo (included), asciidoctor or asciidoc (recommended but optional) + termo (included), asciidoctor or asciidoc (recommended but optional),
rsvg-convert (X11) +
Runtime dependencies: ncursesw, libunistring, cURL + Runtime dependencies: ncursesw, libunistring, cURL +
Optional runtime dependencies: fftw3, libpulse, x11, xft, Perl + cURL (lyrics) Optional runtime dependencies: fftw3, libpulse, x11 + xft + libpng (X11),
Perl + cURL (lyrics)
$ git clone --recursive https://git.janouch.name/p/nncmpp.git $ git clone --recursive https://git.janouch.name/p/nncmpp.git
$ mkdir nncmpp/build $ mkdir nncmpp/build

Submodule liberty updated: 4c2874649d...2a1f17a8f7

View File

@@ -3843,8 +3843,13 @@ streams_tab_parse_playlist (const char *playlist, const char *content_type,
|| (content_type && is_content_type (content_type, "audio", "x-scpls"))) || (content_type && is_content_type (content_type, "audio", "x-scpls")))
extract_re = "^File[^=]*=(.+)"; extract_re = "^File[^=]*=(.+)";
else if ((lines.len && !strcasecmp_ascii (lines.vector[0], "#EXTM3U")) else if ((lines.len && !strcasecmp_ascii (lines.vector[0], "#EXTM3U"))
|| (content_type && is_content_type (content_type, "audio", "mpegurl"))
|| (content_type && is_content_type (content_type, "audio", "x-mpegurl"))) || (content_type && is_content_type (content_type, "audio", "x-mpegurl")))
extract_re = "^([^#].*)"; // This could be "^([^#].*)", however 1. we would need to resolve
// relative URIs, and 2. relative URIs probably mean a Media Playlist,
// which must be passed to MPD. The better thing to do here would be to
// reject anything with EXT-X-TARGETDURATION, and to resolve the URIs.
extract_re = "^(https?://.+)";
regex_t *re = regex_compile (extract_re, REG_EXTENDED, NULL); regex_t *re = regex_compile (extract_re, REG_EXTENDED, NULL);
hard_assert (re != NULL); hard_assert (re != NULL);
@@ -3867,7 +3872,7 @@ streams_tab_extract_links (struct str *data, const char *content_type,
} }
streams_tab_parse_playlist (data->str, content_type, out); streams_tab_parse_playlist (data->str, content_type, out);
return true; return out->len != 0;
} }
static void static void