mosra / heytrack Goto Github PK
View Code? Open in Web Editor NEWShows current track in internet radio stream
Home Page: http://mosra.cz/blog/heytrack-en.php
License: GNU Lesser General Public License v3.0
Shows current track in internet radio stream
Home Page: http://mosra.cz/blog/heytrack-en.php
License: GNU Lesser General Public License v3.0
Take inspiration from: https://github.com/mackstann/mpris-remote
Stream URL is in format:
/data/s/60/playlist/g3128.asx
which cannot be parsed with regexp
"/([^/]+[^\d])(?:\d+).asx"
Similar problem is with Radio U2:
/data/s/37/playlist/u2128.asx
Stream URL is in format
/data/s/124/playlist/hitradio80tka128ss.asx
with unexpected "ss" postfix after bitrate number.
Stream URL is in format
/data/s/10/playlist/groovyhouse128ss.asx
with unexpected "ss" postfix after bitrate number.
Similar problem is with:
There is another non-common behavior next to that one fixed in 0c7965c. For example:
hraje= - Rockchart&hralo=JORN - World Gone M...
HeyTrack currently periodically displays "Cannot parse song name", which is irritating. Solution would be adding implementing these "song names" as a new feature, or at least not displaying error message again, again and again.
Sometimes, when using HeyTrack for longer time (e.g. 10 hours) the memory usage increases up to 500 MB and more. ArchLinux x86_64, Qt 4.8.0, internal Phonon player.
As of VLC 2.0, which implements new MPRIS 2.0 spec, the VLC player cannot be controlled from HeyTrack. However, it seems that it's not that simple, see 9869759 The D-BUS interface itself works, because Amarok can be controlled.
MPRIS 2.0 specs: http://www.mpris.org/2.1/spec/
Currently all HTML entities are just stripped to amp; nbsp; (without &). Create a translation table or make QXmlQuery understand and parse HTML entities.
Amarok support is theoretically as easy as for VLC, but Amarok doesn't seem to like HTTP URLs. It can add local files into playlist, but adding HTTP URL does nothing.
It maybe needs some research which protocols are supported (mms?) or what needs to be sent to make Amarok like it (explicit playlist, etc.).
Next to start/stop commands a volume control could be usable. While it's redundant for DBUS players (which can be controlled easily by global shortcuts etc.), it is missing for Phonon.
There could be some indication in tray icon (like Amarok has for position in the track, but for volume) or in the menu/hover. Controlling volume with mouse wheel above tray icon should be an essential feature. Some players also spit out an notification while changing volume, so don't do it twice.
I don't know how it's about getting current volume level in various DBUS players, for some it is maybe set-only feature (with no visual feedback). It could be declared in AbstractPlayer and implemented in all subclasses:
enum Features {
VolumeControllable = 0x01,
VolumeGettable = 0x02
};
virtual int features() const = 0;
your libs are installed into /usr/lib directory. Unfortunately Linux LSB expects it in lib64 on 64bit systems. Please use LIB_SUFFIX (pretty standard in cmake workd) variable and/or additional script which should fix it:
https://tora.svn.sourceforge.net/svnroot/tora/trunk/tora/cmake/modules/LibSuffix.cmake
you can use install into CMAKE_INSTALL_PREFIX/lib${LIB_SUFFIX} ...
Besides it's ugly and might cause problems in future, currently the only visible problem is when Phonon player is set. It doesn't stop after opening settings (this has been fixed in 4c966e8), but after accepting the dialog.
Stream URL is in format
/data/s/38/playlist/awradio.asx
without expected bitrate number.
Similar problem is with Radio Celtic:
/data/s/2/playlist/celtic.asx
This action is now in context menu, which is two clicks away. But it requires retrieving player state (stop it if player is playing, play if player is stopped). Current play state should be indicated with play/pause icon, which changes itself after player emits state change.
Additional issues:
HeyTrack crashes when changing stream format. Steps to reproduce:
It crashes on model index out of range, it can be easily fixed there (StationModel), but the problem lies somewhere upper in hierarchy. Are other models affected with this problem too?
Backtrace:
ASSERT failure in QList::at: "index out of range", file /usr/include/QtCore/qlist.h, line 455
Program received signal SIGABRT, Aborted.
0x00007ffff4f5a565 in raise () from /lib/libc.so.6
(gdb) bt
#0 0x00007ffff4f5a565 in raise () from /lib/libc.so.6
#1 0x00007ffff4f5b9e6 in abort () from /lib/libc.so.6
#2 0x00007ffff777f45f in qt_message_output(QtMsgType, char const*) ()
from /usr/lib/libQtCore.so.4
#3 0x00007ffff777f5ed in ?? () from /usr/lib/libQtCore.so.4
#4 0x00007ffff777f785 in qFatal(char const*, ...) ()
from /usr/lib/libQtCore.so.4
#5 0x0000000000411dc5 in QListHeyTrack::Core::Station::at(int) const ()
#6 0x0000000000411a7c in HeyTrack::Core::StationModel::station(int) ()
#7 0x00000000004106c7 in HeyTrack::Settings::SettingsDialog::setFormat(int) ()
#8 0x0000000000412d8f in HeyTrack::Settings::SettingsDialog::qt_metacall(QMetaObject::Call, int, void**) ()
#9 0x00007ffff78852ff in QMetaObject::activate(QObject_, QMetaObject const_, int, void**) () from /usr/lib/libQtCore.so.4
#10 0x00007ffff700c671 in QComboBox::currentIndexChanged(int) ()
from /usr/lib/libQtGui.so.4
#11 0x00007ffff700c6dc in ?? () from /usr/lib/libQtGui.so.4
#12 0x00007ffff700c83f in ?? () from /usr/lib/libQtGui.so.4
#13 0x00007ffff700d4c4 in ?? () from /usr/lib/libQtGui.so.4
#14 0x00007ffff7010957 in QComboBox::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libQtGui.so.4
#15 0x00007ffff78852ff in QMetaObject::activate(QObject_, QMetaObject const_, int, void**) () from /usr/lib/libQtCore.so.4
#16 0x00007ffff72abe12 in ?? () from /usr/lib/libQtGui.so.4
#17 0x00007ffff7007a2a in ?? () from /usr/lib/libQtGui.so.4
#18 0x00007ffff7870037 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject_, QEvent_) () from /usr/lib/libQtCore.so.4
#19 0x00007ffff6c40531 in QApplicationPrivate::notify_helper(QObject_, QEvent_)
() from /usr/lib/libQtGui.so.4
#20 0x00007ffff6c4585a in QApplication::notify(QObject_, QEvent_) ()
from /usr/lib/libQtGui.so.4
#21 0x00007ffff786feac in QCoreApplication::notifyInternal(QObject_, QEvent_)
() from /usr/lib/libQtCore.so.4
#22 0x00007ffff6c41565 in QApplicationPrivate::sendMouseEvent(QWidget_, QMouseEvent_, QWidget_, QWidget_, QWidget**, QPointer&, bool) ()
from /usr/lib/libQtGui.so.4
#23 0x00007ffff6cbefd4 in ?? () from /usr/lib/libQtGui.so.4
#24 0x00007ffff6cbd499 in QApplication::x11ProcessEvent(_XEvent*) ()
from /usr/lib/libQtGui.so.4
#25 0x00007ffff6ce45f2 in ?? () from /usr/lib/libQtGui.so.4
#26 0x00007ffff4240b23 in g_main_context_dispatch ()
from /usr/lib/libglib-2.0.so.0
#27 0x00007ffff4241300 in ?? () from /usr/lib/libglib-2.0.so.0
#28 0x00007ffff424159d in g_main_context_iteration ()
from /usr/lib/libglib-2.0.so.0
#29 0x00007ffff789af1f in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQtCore.so.4
#30 0x00007ffff6ce429e in ?? () from /usr/lib/libQtGui.so.4
#31 0x00007ffff786f242 in QEventLoop::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQtCore.so.4
#32 0x00007ffff786f48c in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQtCore.so.4
#33 0x00007ffff70f252e in QDialog::exec() () from /usr/lib/libQtGui.so.4
#34 0x000000000040cc20 in HeyTrack::Tray::HeyTrack::openSettings() ()
#35 0x000000000040e295 in HeyTrack::Tray::HeyTrack::qt_metacall(QMetaObject::Call, int, void**) ()
#36 0x00007ffff78852ff in QMetaObject::activate(QObject_, QMetaObject const_, int, void**) () from /usr/lib/libQtCore.so.4
#37 0x00007ffff6c39ee2 in QAction::triggered(bool) ()
from /usr/lib/libQtGui.so.4
#38 0x00007ffff6c3a0da in QAction::activate(QAction::ActionEvent) ()
from /usr/lib/libQtGui.so.4
#39 0x00007ffff706fbb3 in ?? () from /usr/lib/libQtGui.so.4
#40 0x00007ffff7075b4a in ?? () from /usr/lib/libQtGui.so.4
#41 0x00007ffff6c91bc8 in QWidget::event(QEvent*) ()
from /usr/lib/libQtGui.so.4
#42 0x00007ffff7076d3b in QMenu::event(QEvent*) () from /usr/lib/libQtGui.so.4
#43 0x00007ffff6c40564 in QApplicationPrivate::notify_helper(QObject_, QEvent_)
() from /usr/lib/libQtGui.so.4
#44 0x00007ffff6c4585a in QApplication::notify(QObject_, QEvent_) ()
from /usr/lib/libQtGui.so.4
#45 0x00007ffff786feac in QCoreApplication::notifyInternal(QObject_, QEvent_)
() from /usr/lib/libQtCore.so.4
#46 0x00007ffff6c41565 in QApplicationPrivate::sendMouseEvent(QWidget_, QMouseEvent_, QWidget_, QWidget_, QWidget**, QPointer&, bool) ()
from /usr/lib/libQtGui.so.4
#47 0x00007ffff6cbefd4 in ?? () from /usr/lib/libQtGui.so.4
#48 0x00007ffff6cbd499 in QApplication::x11ProcessEvent(_XEvent*) ()
from /usr/lib/libQtGui.so.4
#49 0x00007ffff6ce45f2 in ?? () from /usr/lib/libQtGui.so.4
#50 0x00007ffff4240b23 in g_main_context_dispatch ()
from /usr/lib/libglib-2.0.so.0
#51 0x00007ffff4241300 in ?? () from /usr/lib/libglib-2.0.so.0
#52 0x00007ffff424159d in g_main_context_iteration ()
from /usr/lib/libglib-2.0.so.0
#53 0x00007ffff789af1f in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQtCore.so.4
#54 0x00007ffff6ce429e in ?? () from /usr/lib/libQtGui.so.4
#55 0x00007ffff786f242 in QEventLoop::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQtCore.so.4
#56 0x00007ffff786f48c in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQtCore.so.4
#57 0x00007ffff787394b in QCoreApplication::exec() ()
from /usr/lib/libQtCore.so.4
#58 0x000000000040d962 in main ()
Stream URL is in format
/data/s/76/playlist/cshity128ss.asx
with unexpected "ss" postfix after bitrate number.
Stream URL is in format
/data/s/148/playlist/hubajda64.m3u
with unexpected "m3u" playlist extension.
Similar problem is with:
Working cross-platform solution (hopefully not KDE dependent) is in http://code.google.com/p/pidgin-knotifications/ , it also uses Growl notifications on Windows.
HeyTrack is currently nearly unfindable on Linux after installation. Windows version has Start menu shortcuts thanks to NSIS installer.
Stream URL is in totally unexpected format
http://mys.limemedia.cz/ok192_premium
"Similar" problem is with Radio Relax
mms://mys.limemedia.cz/relax128
While Phonon is currently broken on Windoze, it would be good to give users at least stream URL so they can play it manually.
While all common stream URLs in ABradio.cz server are in format
http://static.abradio.cz/data/s/%0/playlist/%2.asx
stream URLs for Český Rozhlas (and maybe others) must be in format
http://www.rozhlas.cz/audio/download/cro1-128.asx
This requires not exactly trivial code rewrite or separating Český Rozhlas to another server (and disabling this "genre" in ABRadio.cz). I'm not sure about "current track" notification system at rozhlas.cz, if there is any (and how it's different from ABRadio.cz).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.