Skip to content

Commit

Permalink
Merged v0.2.9 development branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ebruck committed Nov 10, 2024
1 parent c7f5bd0 commit acd292c
Show file tree
Hide file tree
Showing 33 changed files with 207 additions and 152 deletions.
29 changes: 4 additions & 25 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,9 @@ commonStepsUbuntu: &commonStepsUbuntu
- store_artifacts:
path: /artifacts

commonStepsFedora: &commonStepsFedora
steps:
# Each step starts in the checked-out source directory.
- checkout
- run: git fetch --tags && git tag
- run:
name: Make project
command: 'mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=RPM && make package'
- run:
name: Copy artifacts to tmp
command: 'mkdir /artifacts && cd build && cp *.rpm /artifacts'
- store_artifacts:
path: /artifacts

version: 2.1

jobs:
Ubuntu-18_04-build:
<<: *commonStepsUbuntu
docker:
- image: "radiotrayng/circleci:ubuntu-18.04"
environment:
- CI_OS: linux
Ubuntu-20_04-build:
<<: *commonStepsUbuntu
docker:
Expand All @@ -47,17 +27,16 @@ jobs:
- image: "radiotrayng/circleci:ubuntu-22.04"
environment:
- CI_OS: linux
Fedora-34-build:
<<: *commonStepsFedora
Ubuntu-24_04-build:
<<: *commonStepsUbuntu
docker:
- image: "radiotrayng/circleci:fedora-34"
- image: "radiotrayng/circleci:ubuntu-24.04"
environment:
- CI_OS: linux
workflows:
version: 2
build:
jobs:
- Ubuntu-18_04-build
- Ubuntu-20_04-build
- Ubuntu-22_04-build
- Fedora-34-build
- Ubuntu-24_04-build
17 changes: 11 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
cmake_minimum_required(VERSION 3.10)

if(POLICY CMP0167)
cmake_policy(SET CMP0167 OLD)
endif()

project(radiotray-ng CXX)

# workaround for Eclipse
Expand All @@ -13,7 +17,7 @@ endif()
# version for user agent creation
set(PROJECT_VERSION_MAJOR 0)
set(PROJECT_VERSION_MINOR 2)
set(PROJECT_VERSION_PATCH 8)
set(PROJECT_VERSION_PATCH 9)
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")

# output dir
Expand Down Expand Up @@ -55,7 +59,7 @@ endif(NOT APPLE)
set(CMAKE_CXX_STANDARD 14)
add_definitions("-DBOOST_LOG_DYN_LINK")
add_compile_options("-fdiagnostics-color=auto")
set(warnings "-Wall -Wextra -Werror -Wpedantic")
set(warnings "-Wall -Wextra -Werror -Wpedantic -Wno-deprecated-declarations")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${warnings}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${warnings}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
Expand All @@ -70,7 +74,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
if (NOT APPINDICATOR_FOUND)
pkg_search_module(APPINDICATOR REQUIRED ayatana-appindicator3-0.1)
if (APPINDICATOR_FOUND)
set(AYATANA_APPINDICATOR true)
set(AYATANA_APPINDICATOR true CACHE BOOL "ayatana-appindicator")
endif()
endif()
if (NOT APPINDICATOR_FOUND)
Expand All @@ -92,16 +96,17 @@ if (BUILD_TESTS)

ExternalProject_Add(googletest
PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest"
URL https://github.com/google/googletest/archive/release-1.8.1.tar.gz
URL_HASH SHA256=9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c
URL https://github.com/google/googletest/releases/download/v1.15.2/googletest-1.15.2.tar.gz
URL_HASH SHA256=7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926
DOWNLOAD_EXTRACT_TIMESTAMP true
TIMEOUT 30
DOWNLOAD_NO_PROGRESS true
INSTALL_COMMAND "")

ExternalProject_Get_Property(googletest SOURCE_DIR)
include_directories(${SOURCE_DIR}/googlemock/include ${SOURCE_DIR}/googletest/include)
ExternalProject_Get_Property(googletest BINARY_DIR)
link_directories(${BINARY_DIR}/googlemock ${BINARY_DIR}/googlemock/gtest)
link_directories(${BINARY_DIR}/lib)
set(GMOCK_BOTH_LIBRARIES gmock_main gmock gtest)
set_property(DIRECTORY PROPERTY CLEAN_NO_CUSTOM "${CMAKE_CURRENT_BINARY_DIR}/googletest")
unset(SOURCE_DIR)
Expand Down
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ A config (radiotray-ng.json) is created in your ~/.config/radiotray-ng directory
"split-title" : true,
"track-info-copy" : false,
"ihr-title" : true,
"tag-info-in-label" : false,
"tag-info-in-label-len" : 80,
"tag-info-in-label-artist": true,
"tag-info-verbose" : false,
"volume-level" : 100,
"volume-step" : 1,
Expand Down Expand Up @@ -97,14 +100,17 @@ A config (radiotray-ng.json) is created in your ~/.config/radiotray-ng directory
compact-menu : enable/disable the use of menu separators
debug-logging: enable/disable verbose debug logging
disable-logging: enable/disable logging
file-monitor: enable/disable notifcation of bookmark file changes
file-monitor: enable/disable notification of bookmark file changes
file-monitor-interval: time in seconds to poll for bookmark file changes
invert-menu : menu rendered in reverse order
notification-verbose: more status information than normal
notifications: turns on/off notification messages
sleep-timer: value is in minutes
split-title: attempts to reformat the notification into title/artist
ihr-title: extra parsing for iheartradio formatting (requires split-title)
tag-info-in-label: display title & artist next to icon
tag-info-in-label-len: maximum title & artist line length
tag-info-in-label-artist: include artist in icon label
tag-info-verbose: displays in the menu stream information such as bitrate etc.
track-info-copy: enable/disable track clicking to copy into clipboard
volume-step: value used to increment/decrement the volume level
Expand Down Expand Up @@ -240,15 +246,20 @@ $ dnf install radiotray-ng

Install these packages:
```
lsb-release libcurl4-openssl-dev libjsoncpp-dev libxdg-basedir-dev libnotify-dev libboost-filesystem-dev libgstreamer1.0-dev libboost-log-dev libboost-program-options-dev libgtk-3-dev libnotify-dev lsb-release libbsd-dev libncurses5-dev libglibmm-2.4-dev cmake
# before ubuntu 22.04:
libappindicator3-dev libwxgtk3.0-gtk3-dev libwxgtk3.0-gtk3-0v5
# For Ubuntu 22.04 install:
libayatana-appindicator3-dev libwxgtk3.0-gtk3-dev libwxgtk3.0-gtk3-0v5
lsb-release libcurl4-openssl-dev libjsoncpp-dev libxdg-basedir-dev libnotify-dev libboost-filesystem-dev libgstreamer1.0-dev libboost-log-dev libboost-program-options-dev libgtk-3-dev libnotify-dev lsb-release libbsd-dev libglibmm-2.4-dev cmake
```
# For Ubuntu 23.10 and newer install:
```
libayatana-appindicator3-dev libwxgtk3.2-dev
```
# For Ubuntu 22.04 install:
```
libayatana-appindicator3-dev libwxgtk3.0-gtk3-dev libwxgtk3.0-gtk3-0v5
```
# Before ubuntu 22.04:
```
libappindicator3-dev libwxgtk3.0-gtk3-dev libwxgtk3.0-gtk3-0v5
```

## Build Radiotray-NG & Debian Package ##
```
Expand Down
6 changes: 6 additions & 0 deletions cmake/user-agent.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ if (LSB_RELEASE_EXECUTABLE)
execute_process(COMMAND lsb_release -i -s OUTPUT_VARIABLE USER_AGENT_DISTRO OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND lsb_release -c -s OUTPUT_VARIABLE USER_AGENT_DISTRO_CODENAME OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND lsb_release -r -s OUTPUT_VARIABLE USER_AGENT_DISTRO_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE)

# handle distros that identify release as n/a...
if (USER_AGENT_DISTRO_RELEASE STREQUAL "n/a")
set(USER_AGENT_DISTRO_RELEASE "NA")
endif()

else()
if (APPLE)
execute_process(COMMAND sw_vers -productName OUTPUT_VARIABLE USER_AGENT_DISTRO OUTPUT_STRIP_TRAILING_WHITESPACE)
Expand Down
28 changes: 4 additions & 24 deletions data/bookmarks.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
{
"name" : "Top Latino Radio",
"url" : "http://online.radiodifusion.net:8020/listen.pls"
},
{
"name" : "Reggaeton 24/7",
"url" : "http://cc.net2streams.com/tunein.php/reggaeton/playlist.pls"
}
]
},
Expand All @@ -32,10 +28,6 @@
"name" : "181.FM Classic Hits",
"url" : "http://www.181.fm/winamp.pls?station=181-greatoldies&file=181-greatoldies.pls"
},
{
"name" : ".977 Classic Rock",
"url" : "http://www.977music.com/tunein/web/classicrock.asx"
},
{
"name" : "Covers",
"url" : "http://somafm.com/covers.pls"
Expand All @@ -49,10 +41,6 @@
"name" : "KDFC",
"url" : "http://provisioning.streamtheworld.com/pls/KDFCFM.pls"
},
{
"name" : "Classic FM",
"url" : "http://media-ice.musicradio.com/ClassicFMMP3.m3u"
},
{
"name" : "WCPE",
"url" : "http://www.ibiblio.org/wcpe/wcpe.pls"
Expand All @@ -64,10 +52,6 @@
{
"name" : "WQXR",
"url" : "http://www.wqxr.org/stream/wqxr/mp3.pls"
},
{
"name" : "BBC Radio 3",
"url" : "http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio3_mf_p"
}
]
},
Expand All @@ -79,8 +63,8 @@
"url" : "http://www.radioparadise.com/musiclinks/rp_128.m3u"
},
{
"name" : ".977 The Hitz Channel",
"url" : "http://www.977music.com/tunein/web/hitz.asx"
"name" : "SoftRockRadio.net",
"url" : "https://gold.streamguys1.com/softrock.mp3"
},
{
"name" : "Indie Pop Rocks!",
Expand Down Expand Up @@ -109,7 +93,7 @@
},
{
"name" : "WNAR-AM Radio",
"url" : "http://live.wnar-am.com:8500/listen.pls"
"url" : "https://streaming.live365.com/a91284"
}
]
},
Expand Down Expand Up @@ -178,10 +162,6 @@
"name" : "Black Rock FM",
"url" : "http://somafm.com/brfm.pls"
},
{
"name" : "New Dance Radio",
"url" : "http://jbstream.net/tunein.php/blackoutworm/playlist.asx"
},
{
"name" : "DubStep Beyond",
"url" : "http://somafm.com/play/dubstep32"
Expand All @@ -193,7 +173,7 @@
"stations" : [
{
"name" : "Jupiter Broadcasting",
"url" : "http://jblive.stream/"
"url" : "http://jblive.fm/"
}
]
}
Expand Down
4 changes: 1 addition & 3 deletions data/radiotray-ng.desktop
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
[Desktop Entry]
Categories=AudioVideo;Audio;Player;GTK;
Comment=Internet Radio Player for Linux
Exec=/usr/bin/radiotray-ng
Hidden=false
Exec=env GDK_BACKEND=x11 /usr/bin/radiotray-ng
Icon=/usr/share/icons/hicolor/256x256/apps/radiotray-ng-notification.png
Name=Radiotray-NG
StartupNotify=false
Terminal=false
Type=Application

2 changes: 0 additions & 2 deletions data/rtng-bookmark-editor.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
Categories=AudioVideo;Audio;Player;GTK;
Comment=Bookmark editor for Radiotray-NG
Exec=/usr/bin/rtng-bookmark-editor
Hidden=false
Icon=/usr/share/icons/hicolor/256x256/apps/radiotray-ng-notification.png
Name=Radiotray-NG Bookmark Editor
StartupNotify=false
Terminal=false
Type=Application

6 changes: 0 additions & 6 deletions docker/fedora/34/Dockerfile

This file was deleted.

7 changes: 2 additions & 5 deletions docker/rebuild_and_publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@

set -xe

docker build -t radiotrayng/circleci:ubuntu-18.04 - <ubuntu/18.04/Dockerfile
docker push radiotrayng/circleci:ubuntu-18.04

docker build -t radiotrayng/circleci:ubuntu-20.04 - <ubuntu/20.04/Dockerfile
docker push radiotrayng/circleci:ubuntu-20.04

docker build -t radiotrayng/circleci:ubuntu-22.04 - <ubuntu/22.04/Dockerfile
docker push radiotrayng/circleci:ubuntu-22.04

docker build -t radiotrayng/circleci:fedora-34 - <fedora/34/Dockerfile
docker push radiotrayng/circleci:fedora-34
docker build -t radiotrayng/circleci:ubuntu-24.04 - <ubuntu/24.04/Dockerfile
docker push radiotrayng/circleci:ubuntu-24.04
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
FROM ubuntu:18.04
FROM ubuntu:24.04

RUN set -ex; \
apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates gcc g++ cmake curl wget git openssh-client \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates gcc g++ make cmake curl wget git openssh-client \
lsb-release \
libcurl4-openssl-dev \
libjsoncpp-dev \
libxdg-basedir-dev \
libnotify-dev \
libboost-filesystem-dev \
libgstreamer1.0-dev \
libappindicator3-dev \
libayatana-appindicator3-dev \
libboost-log-dev \
libboost-program-options-dev \
libgtk-3-dev \
Expand All @@ -19,6 +19,6 @@ RUN set -ex; \
libbsd-dev \
libncurses5-dev \
libglibmm-2.4-dev \
libwxgtk3.0-dev \
libwxgtk3.0-0v5 \
libwxgtk3.2-dev \
libwxgtk3.2-1t64 \
&& rm -rf /var/lib/apt/lists/*
10 changes: 8 additions & 2 deletions include/radiotray-ng/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ using playlist_t = std::vector<std::string>;
#define LAST_STATION_KEY "last-station"
#define LAST_STATION_NOTIFICATION_KEY "last-station-notifications"
#define MEDIA_KEY_MAPPING_KEY "media-key-mapping"
#define MEDIA_KEY_NEXT_STAITON_KEY "media-key-next-station"
#define MEDIA_KEY_NEXT_STATION_KEY "media-key-next-station"
#define MEDIA_KEY_PREVIOUS_STATION_KEY "media-key-previous-station"
#define MEDIA_KEY_VOLUME_DOWN_KEY "media-key-volume-down"
#define MEDIA_KEY_VOLUME_UP_KEY "media-key-volume-up"
Expand All @@ -94,6 +94,9 @@ using playlist_t = std::vector<std::string>;
#define SLEEP_TIMER_KEY "sleep-timer"
#define SPLIT_TITLE_KEY "split-title"
#define IHR_TITLE_KEY "ihr-title"
#define TAG_INFO_IN_LABEL_KEY "tag-info-in-label"
#define TAG_INFO_IN_LABEL_LEN_KEY "tag-info-in-label-len"
#define TAG_INFO_IN_LABEL_ARTIST_KEY "tag-info-in-label-artist"
#define TAG_INFO_VERBOSE_KEY "tag-info-verbose"
#define TRACK_INFO_COPY_KEY "track-info-copy"
#define VOLUME_LEVEL_KEY "volume-level"
Expand All @@ -112,7 +115,7 @@ using playlist_t = std::vector<std::string>;
#define ROOT_BOOKMARK_GROUP "root"
#define APP_NAME_DISPLAY "Radiotray-NG"
#define APP_NAME "radiotray-ng"
#define APP_COPYRIGHT "Copyright © 2017-2021 - The Radiotray-NG Authors"
#define APP_COPYRIGHT "Copyright © 2017-2024 - The Radiotray-NG Authors"
#define APP_AUTHOR "Edward G. Bruck"
#define APP_WEBSITE "https://www.github.com/ebruck/radiotray-ng"
#define RADIOTRAY_NG_LOGO_ICON "radiotray-ng.png"
Expand Down Expand Up @@ -144,6 +147,9 @@ using playlist_t = std::vector<std::string>;
#define DEFAULT_SPLIT_TITLE_VALUE (true)
#define DEFAULT_IHR_TITLE_KEY_VALUE (true)
#define DEFAULT_STATION_IMAGE_VALUE ""
#define DEFAULT_TAG_INFO_IN_LABEL_VALUE (false)
#define DEFAULT_TAG_INFO_IN_LABEL_LEN_VALUE (80)
#define DEFAULT_TAG_INFO_IN_LABEL_ARTIST_VALUE (true)
#define DEFAULT_TAG_INFO_VERBOSE_VALUE (false)
#define DEFAULT_STATION_NOTIFICATION_VALUE (true)
#define DEFAULT_TRACK_INFO_COPY_VALUE (false)
Expand Down
2 changes: 1 addition & 1 deletion include/radiotray-ng/i_playlist_decoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class IPlaylistDecoder
public:
virtual ~IPlaylistDecoder() = default;

virtual bool is_url_direct_stream(const std::string& url) = 0;
virtual bool is_url_direct_stream(const std::string& url, const std::string& content_type) = 0;

virtual bool is_decodable(const std::string& content_type, const std::string& content) = 0;

Expand Down
Loading

0 comments on commit acd292c

Please sign in to comment.