Skip to content

Commit

Permalink
Merged v0.2.5 development branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ebruck committed Mar 16, 2019
1 parent 4e0804a commit 02d6b3c
Show file tree
Hide file tree
Showing 70 changed files with 613 additions and 476 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,5 @@ local.properties
.vscode/

build/

cmake-build-debug/
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10)

project(radiotray-ng VERSION 0.2.4 LANGUAGES CXX)
project(radiotray-ng VERSION 0.2.5 LANGUAGES CXX)

# workaround for Eclipse
if (${CMAKE_EXTRA_GENERATOR} MATCHES "Eclipse CDT4")
Expand All @@ -13,7 +13,7 @@ endif()
# version for user agent creation
set(PROJECT_VERSION_MAJOR 0)
set(PROJECT_VERSION_MINOR 2)
set(PROJECT_VERSION_PATCH 4)
set(PROJECT_VERSION_PATCH 5)
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")

# output dir
Expand Down Expand Up @@ -131,7 +131,7 @@ add_custom_command(
-D PROJECT_VERSION=${PROJECT_VERSION}
-D CMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
-D CMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}
-P ${PROJECT_SOURCE_DIR}/user-agent.cmake
-P ${PROJECT_SOURCE_DIR}/cmake/user-agent.cmake
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
)

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ The version here is what "I" wanted out of RadioTray.
* RadioTray functionality
* Theme support
* Debian packaging
* Cross compile on Mac (via brew packages) using a very simple ncurses interface.
* Full AppIndicator support
* No groups within groups by design to keep the interface clean.
* Volume up/down support using mouse wheel (left/right can also be used)
Expand All @@ -33,7 +32,7 @@ The version here is what "I" wanted out of RadioTray.
## Future: ##

* ~~Cross platform bookmark editor application.~~
* Mac support (icons, menu, media keys etc.)
* Cross compile on Mac (via brew packages) with icons, menu, media keys etc.
* ~~Script to convert RadioTray's bookmarks.xml to the new format.~~

**Icons:** [http://www.iconsplace.com/]
Expand Down Expand Up @@ -193,6 +192,7 @@ Available commands:
volume_down
set_volume 'level'
play
play_url 'url'
stop
quit
previous_station
Expand Down Expand Up @@ -264,3 +264,5 @@ Install these packages:
```
redhat-lsb cmake libcurl-devel boost-devel wxGTK3-devel jsoncpp-devel gstreamer1-devel libxdg-basedir-devel libbsd-devel libappindicator-gtk3-devel libnotify-devel glibmm24-devel
```
### Thank you JetBrains for providing a free open source license for [CLion](https://www.jetbrains.com/clion/).

File renamed without changes.
2 changes: 1 addition & 1 deletion user-agent.cmake → cmake/user-agent.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if (NOT RTNG_GIT_VERSION)
endif()

set(RTNG_USER_AGENT "${CMAKE_PROJECT_NAME}/${PROJECT_VERSION} (${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR}; ${USER_AGENT_DISTRO}/${USER_AGENT_DISTRO_RELEASE} (${USER_AGENT_DISTRO_CODENAME}))")
configure_file(${PROJECT_SOURCE_DIR}/rtng_user_agent.hpp.in ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/rtng_user_agent.hpp.tmp)
configure_file(${PROJECT_SOURCE_DIR}/cmake/rtng_user_agent.hpp.in ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/rtng_user_agent.hpp.tmp)

execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/rtng_user_agent.hpp.tmp ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/rtng_user_agent.hpp)
execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/rtng_user_agent.hpp.tmp)
Expand Down
23 changes: 19 additions & 4 deletions data/bookmarks.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@
"image" : null,
"name" : "CINEMIX",
"url" : "http://cinemix.us/cine.asx"
},
{
"image" : null,
"name" : "WQXR",
"url" : "http://www.wqxr.org/stream/wqxr/mp3.pls"
},
{
"image" : null,
"name" : "BBC Radio 3",
"url" : "http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio3_mf_p"
}
]
},
Expand Down Expand Up @@ -110,17 +120,22 @@
"stations" : [
{
"image" : null,
"name" : "AM 1710",
"url" : "http://lin2.ash.fast-serv.com:9022/listen.pls"
"name" : "ABN Antioch OTR",
"url" : "http://radio.macinmind.com/listen.m3u"
},
{
"image" : null,
"name" : "AM 600",
"name" : "AM600 Conyers OTR",
"url" : "http://www.conyersradio.net/listen.m3u"
},
{
"image" : null,
"name" : "WNAR",
"name" : "Rumsey Retro Radio",
"url" : "https://www.rumseyretro.ca/assets/rumseyretro.pls"
},
{
"image" : null,
"name" : "WNAR-AM Radio",
"url" : "http://live.wnar-am.com:8500/listen.pls"
}
]
Expand Down
28 changes: 14 additions & 14 deletions debian/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ execute_process(COMMAND gzip -n -9 -c "${PROJECT_SOURCE_DIR}/debian/changelog" W
execute_process(COMMAND chmod 755 ${PROJECT_SOURCE_DIR}/debian/postinst)
execute_process(COMMAND chmod 755 ${PROJECT_SOURCE_DIR}/debian/postrm)

install(DIRECTORY "${PROJECT_SOURCE_DIR}/data/hicolor/256x256/apps/" DESTINATION "/usr/share/icons/hicolor/256x256/apps" FILES_MATCHING PATTERN "*.png")
install(DIRECTORY "${PROJECT_SOURCE_DIR}/data/hicolor/24x24/apps/" DESTINATION "/usr/share/icons/hicolor/24x24/apps" FILES_MATCHING PATTERN "*.png")
install(DIRECTORY "${PROJECT_SOURCE_DIR}/data/ubuntu-mono-dark/apps/24/" DESTINATION "/usr/share/icons/ubuntu-mono-dark/apps/24" FILES_MATCHING PATTERN "*.svg")
install(DIRECTORY "${PROJECT_SOURCE_DIR}/data/ubuntu-mono-light/apps/24/" DESTINATION "/usr/share/icons/ubuntu-mono-light/apps/24" FILES_MATCHING PATTERN "*.svg")
install(FILES "${PROJECT_SOURCE_DIR}/data/about/radiotray-ng.png" DESTINATION ${DESTINATION_DIR})
install(FILES "${PROJECT_SOURCE_DIR}/data/bookmarks.json" DESTINATION ${DESTINATION_DIR})
install(PROGRAMS "${PROJECT_SOURCE_DIR}/data/rt2rtng" DESTINATION "/usr/bin/")
install(PROGRAMS "${PROJECT_BINARY_DIR}/radiotray-ng" DESTINATION "/usr/bin/")
install(PROGRAMS "${PROJECT_BINARY_DIR}/rtng-bookmark-editor" DESTINATION "/usr/bin/")
install(FILES "${PROJECT_SOURCE_DIR}/data/radiotray-ng.desktop" DESTINATION "/usr/share/applications/")
install(FILES "${PROJECT_SOURCE_DIR}/data/rtng-bookmark-editor.desktop" DESTINATION "/usr/share/applications/")
install(FILES "${PROJECT_SOURCE_DIR}/data/radiotray-ng.appdata.xml" DESTINATION "/usr/share/metainfo/")
install(FILES "${PROJECT_SOURCE_DIR}/debian/copyright" DESTINATION "/usr/share/doc/${CPACK_PACKAGE_NAME}")
install(FILES "${PROJECT_BINARY_DIR}/changelog.Debian.gz" DESTINATION "/usr/share/doc/${CPACK_PACKAGE_NAME}")
install(DIRECTORY "${PROJECT_SOURCE_DIR}/data/hicolor/256x256/apps/" DESTINATION "/usr/share/icons/hicolor/256x256/apps" FILES_MATCHING PATTERN "*.png")
install(DIRECTORY "${PROJECT_SOURCE_DIR}/data/hicolor/24x24/apps/" DESTINATION "/usr/share/icons/hicolor/24x24/apps" FILES_MATCHING PATTERN "*.png")
install(DIRECTORY "${PROJECT_SOURCE_DIR}/data/ubuntu-mono-dark/apps/24/" DESTINATION "/usr/share/icons/ubuntu-mono-dark/apps/24" FILES_MATCHING PATTERN "*.svg")
install(DIRECTORY "${PROJECT_SOURCE_DIR}/data/ubuntu-mono-light/apps/24/" DESTINATION "/usr/share/icons/ubuntu-mono-light/apps/24" FILES_MATCHING PATTERN "*.svg")
install(FILES "${PROJECT_SOURCE_DIR}/data/about/radiotray-ng.png" DESTINATION ${DESTINATION_DIR})
install(FILES "${PROJECT_SOURCE_DIR}/data/bookmarks.json" DESTINATION ${DESTINATION_DIR})
install(PROGRAMS "${PROJECT_SOURCE_DIR}/src/radiotray-ng/extras/scripts/rt2rtng" DESTINATION "/usr/bin/")
install(PROGRAMS "${PROJECT_BINARY_DIR}/radiotray-ng" DESTINATION "/usr/bin/")
install(PROGRAMS "${PROJECT_BINARY_DIR}/rtng-bookmark-editor" DESTINATION "/usr/bin/")
install(FILES "${PROJECT_SOURCE_DIR}/data/radiotray-ng.desktop" DESTINATION "/usr/share/applications/")
install(FILES "${PROJECT_SOURCE_DIR}/data/rtng-bookmark-editor.desktop" DESTINATION "/usr/share/applications/")
install(FILES "${PROJECT_SOURCE_DIR}/data/radiotray-ng.appdata.xml" DESTINATION "/usr/share/metainfo/")
install(FILES "${PROJECT_SOURCE_DIR}/debian/copyright" DESTINATION "/usr/share/doc/${CPACK_PACKAGE_NAME}")
install(FILES "${PROJECT_BINARY_DIR}/changelog.Debian.gz" DESTINATION "/usr/share/doc/${CPACK_PACKAGE_NAME}")
11 changes: 11 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
radiotray-ng (0.2.5) unstable; urgency=low

* Updated & added new stations
* Added dbus play_url method
* Added initial m3u8 support
* Various dbus & editor bug fixes
* Added rtng-dbus & rtng2xml scripts

-- Edward G. Bruck <[email protected]> Fri, 15 Mar 2019 22:57:10 -0700


radiotray-ng (0.2.4) unstable; urgency=low

* Added dbus set_volume method
Expand Down
2 changes: 1 addition & 1 deletion debian/copyright
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Files: *
Copyright: 2017-2018 Edward G. Bruck <[email protected]>
Copyright: 2017-2019 Edward G. Bruck <[email protected]>
License: GPL+
The full text of the GPL is distributed as in
/usr/share/common-licenses/GPL on Debian systems.
5 changes: 2 additions & 3 deletions include/radiotray-ng/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ using playlist_t = std::vector<std::string>;

// state data values
#define STATE_BUFFERING "buffering"
#define STATE_PAUSED "paused"
#define STATE_PLAYING "playing"
#define STATE_STOPPED "stopped"
#define STATE_CONNECTING "connecting"
Expand Down Expand Up @@ -110,7 +109,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-2018 - The Radiotray-NG Authors"
#define APP_COPYRIGHT "Copyright © 2017-2019 - 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 @@ -148,4 +147,4 @@ using playlist_t = std::vector<std::string>;
#define DEFAULT_VOLUME_LEVEL_VALUE uint32_t(100)
#define DEFAULT_VOLUME_STEP_VALUE uint32_t(1)
#define DEFAULT_WRAP_TRACK_INFO_VALUE (true)
#define DEFAULT_WRAP_TRACK_INFO_LEN_VALUE (40)
#define DEFAULT_WRAP_TRACK_INFO_LEN_VALUE (40)
50 changes: 0 additions & 50 deletions include/radiotray-ng/i_curl.hpp

This file was deleted.

2 changes: 2 additions & 0 deletions include/radiotray-ng/i_gui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ class IGui

virtual void run(int argc, char* argv[]) = 0;

virtual void reload_bookmarks() = 0;

virtual void stop() = 0;
};
2 changes: 2 additions & 0 deletions include/radiotray-ng/i_playlist_decoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class IPlaylistDecoder
public:
virtual ~IPlaylistDecoder() = default;

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

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

virtual bool decode(const std::string& content_type, const std::string& content, playlist_t& playlist) = 0;
Expand Down
2 changes: 2 additions & 0 deletions include/radiotray-ng/i_radiotray_ng.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class IRadioTrayNG

virtual void play(const std::string& group, const std::string& station) = 0;

virtual void play_url(const std::string& url) = 0;

virtual void play() = 0;

virtual void volume_up() = 0;
Expand Down
5 changes: 1 addition & 4 deletions src/radiotray-ng/bookmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
FILE(GLOB SRC_FILES "*.cpp")

add_library(bookmarks STATIC ${SRC_FILES})
add_library(bookmarks STATIC bookmarks.cpp bookmarks.hpp)
target_link_libraries(bookmarks)
target_include_directories(bookmarks PRIVATE ${JSONCPP_INCLUDE_DIRS})
6 changes: 2 additions & 4 deletions src/radiotray-ng/config/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
FILE(GLOB SRC_FILES "*.cpp")

add_library(config STATIC ${SRC_FILES})
target_link_libraries(config )
add_library(config STATIC config.cpp config.hpp)
target_link_libraries(config)
4 changes: 1 addition & 3 deletions src/radiotray-ng/event_bus/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
FILE(GLOB SRC_FILES "*.cpp")

add_library(event_bus STATIC ${SRC_FILES})
add_library(event_bus STATIC event_bus.cpp event_bus.hpp)
target_link_libraries(event_bus)
4 changes: 2 additions & 2 deletions src/radiotray-ng/extras/media_keys/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
FILE(GLOB SRC_FILES "linux/*.cpp")
set(SRC_FILES linux/media_keys.cpp)
else()
FILE(GLOB SRC_FILES "darwin/*.cpp")
set(SRC_FILES darwin/media_keys.cpp)
endif()

add_library(media_keys STATIC ${SRC_FILES})
Expand Down
5 changes: 1 addition & 4 deletions src/radiotray-ng/extras/rtng_dbus/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
FILE(GLOB SRC_FILES "*.cpp")

add_library(rtng_dbus STATIC ${SRC_FILES})

add_library(rtng_dbus STATIC rtng_dbus.cpp rtng_dbus.hpp)
target_link_libraries(rtng_dbus ${GLIBMM_LIBRARIES} ${GIOMM_LIBRARIES})
target_include_directories(rtng_dbus SYSTEM PRIVATE ${GIOMM_INCLUDE_DIRS} ${GLIBMM_INCLUDE_DIRS})
17 changes: 16 additions & 1 deletion src/radiotray-ng/extras/rtng_dbus/rtng_dbus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ namespace
" <arg type='s' direction='in'/>"
" <arg type='s' direction='in'/>"
" </method>"
" <method name='play_url'>"
" <arg type='s' direction='in'/>"
" </method>"
" <method name='set_volume'>"
" <arg type='s' direction='in'/>"
" </method>"
Expand Down Expand Up @@ -121,7 +124,7 @@ void RtngDbus::on_method_call(const Glib::RefPtr<Gio::DBus::Connection>& /*conne

if (method_name == "reload_bookmarks")
{
this->radiotray_ng->reload_bookmarks();
this->gui->reload_bookmarks();
invocation->return_value(Glib::VariantContainerBase());
return;
}
Expand Down Expand Up @@ -176,6 +179,18 @@ void RtngDbus::on_method_call(const Glib::RefPtr<Gio::DBus::Connection>& /*conne
return;
}

if (method_name == "play_url")
{
Glib::Variant<Glib::ustring> param;

parameters.get_child(param, 0);
const Glib::ustring url = param.get();

this->radiotray_ng->play_url(url);
invocation->return_value(Glib::VariantContainerBase());
return;
}

if (method_name == "get_bookmarks")
{
auto var = Glib::Variant<Glib::ustring>::create(this->radiotray_ng->get_bookmarks());
Expand Down
File renamed without changes.
Loading

0 comments on commit 02d6b3c

Please sign in to comment.