Code Monkey home page Code Monkey logo

gnome-shell-extension-radio's Introduction

GNOME Shell Extension Radio

A GNOME Shell extension for listening to internet radio streams.

screenshot01

Features

  • Supports GNOME Shell 45 - for older versions see releases
  • Manage internet radio streams
  • Middle click to start/stop last played station
  • Cyrillic tag support - see charset conversion
  • Support for multimedia keys: play / stop, cycle through stations via next / prev
  • Show tags in the panel or via notification
  • Search online radio directory radio-browser
  • Separate volume slider
  • Copy title to clipboard via button in the radio menu or via middle click on the panel title
  • Show radio stations as search results in GNOME overview

Installation

Prerequisites: GStreamer plugins are installed.

Charset conversion

Radio station streams may include tags - track artist and title.

If tags are not served in UTF-8 encoding, non-latin characters may be printed as garbage characters and must be converted to UTF-8 to make sense.

A specific source charset can optionally be set upon adding or editing each channel.

Unfortunately, charsets cannot be reliably determined automatically. Finding the right source charset for a channel's tags are therefore a matter of guessing - or guessing again. A tool like 2cyr/decode may come useful.

Currently, this extension supports conversion of the following charsets:

  • windows-1251 - Russian, Bulgarian, Serbian Cyrillic and Macedonian
  • windows-1252 - Western European / Latin 1
  • windows-1253 - Greek
  • windows-1257 - Baltic
  • koi8-r - Russian
  • koi8-u - Ukrainian

Contributing

See CONTRIBUTING.

License

Copyright © 2014-2023 hslbck.

GNOME Shell Extension Radio is published under the GPL-3+ license, see COPYING for details.

gnome-shell-extension-radio's People

Contributors

arkelis avatar bridouz avatar enecciari avatar enecciariatbl avatar fastbyte01 avatar felipebueno avatar gmg137 avatar hslbck avatar junaru avatar marekmosiewicz avatar marjinal1st avatar maxattwell avatar meskobalazs avatar morealaz avatar nielsrune avatar pkomur avatar serdarsaglam avatar skarmoutsosv avatar stmc avatar tamahome-m avatar thejacer87 avatar uwe-ss avatar x4lldux avatar xmj avatar zapashcanon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gnome-shell-extension-radio's Issues

Latest version crash on gnome shell start

Most of the times I log in into my account the extension is not loaded due an error. I have to uninstall and install it again to make it work.

I do not know how to take a look to the logs and report a better error report. Let me know how I can help to fix the issue.

Import/Export Json Channels [Improvement]

I've recently reinstalled my operating system and lost all my stations.

Fortunately I had a channelList.json saved somewhere in the cloud and replaced it with the original. Maybe it could be useful to add a export/import function through json formatted files.

There are 2 files ~/.local/share/gnome-shell/extensions/[email protected]/channelList.json and ~/.gse-radio/channelList.json

Only the second one is recognized by the extension.

Thanks

installation error

when i try to install it from GSE website I get this error, i'm on arch with GS 3.18 :

ott 18 11:02:30 ArchBox gnome-session[844]: Archive:  /tmp/PU3O6X.shell-extension.zip
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/channelListDialog.js
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/COPYING
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/addChannelDialog.js
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/player.js
ott 18 11:02:30 ArchBox gnome-session[844]: creating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/locale/de/
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/radio-extension.png
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/extension.js
ott 18 11:02:30 ArchBox gnome-session[844]: creating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/locale/de/LC_MESSAGES/
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/po/[email protected]
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/stylesheet.css
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/convenience.js
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/channelList.json
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/README.md
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/locale/de/LC_MESSAGES/[email protected]
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/channel.js
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/io.js
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/po/de.po
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/icons/extension-page-icon.png
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/icons/gser-icon-stopped-symbolic.svg
ott 18 11:02:30 ArchBox gnome-session[844]: inflating: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/icons/gser-icon-playing-symbolic.svg
ott 18 11:02:30 ArchBox gnome-session[844]: extracting: /home/iacopodeenosee/.local/share/gnome-shell/extensions/[email protected]/metadata.json
ott 18 11:02:30 ArchBox gnome-session[844]: Gjs-Message: JS LOG: Extension "[email protected]" had error: Error: No signal 'message' on object 'GstBus'

List of different stations in HQ

Hi,

I have managed to gather great list of stations in High Quality. It should be useful:

{ "channels":[
    {
    "name": "Stations: Europe FM",
    "address": "http://96.31.90.115:9984",
    "favourite": true,
    "encoding": false
},  {
    "name": "Stations: Kiss FM",
    "address": "http://192.81.248.91:8131",
    "favourite": true,
    "encoding": false
},  {
    "name": "Top Hits (uk3.internet-radio.com)",
    "address": "http://uk3.internet-radio.com:8136",
    "favourite": true,
    "encoding": false
},  {
    "name": "Artist: Metallica",
    "address": "http://107.6.132.210:9400",
    "favourite": true,
    "encoding": false
},  {
    "name": "Ambient (philae.shoutca.st)",
    "address": "http://philae.shoutca.st:9019",
    "favourite": true,
    "encoding": false
},  {
    "name": "Ambient (partyviberadio.com)",
    "address": "http://www.partyviberadio.com:8056",
    "favourite": true,
    "encoding": false
},  {
    "name": "Chillout",
    "address": "http://38.109.219.207:8020",
    "favourite": true,
    "encoding": false
},  {
    "name": "Relaxation (sc9106.xpx.pl)",
    "address": "http://sc9106.xpx.pl:9106",
    "favourite": true,
    "encoding": false
},  {
    "name": "Relaxation (rmnrelax1.powerstream.de)",
    "address": "http://rmnrelax1.powerstream.de:8023",
    "favourite": true,
    "encoding": false
},  {
    "name": "Jazz (us1.internet-radio.com)",
    "address": "http://us1.internet-radio.com:8094",
    "favourite": true,
    "encoding": false
},  {
    "name": "Rock (us2.internet-radio.com)",
    "address": "http://us2.internet-radio.com:8039",
    "favourite": true,
    "encoding": false
},  {
    "name": "Rock (rockradio1.com)",
    "address": "http://91.121.7.49:8000",
    "favourite": true,
    "encoding": false
}
],

  "lastplayed":{
    "name": "Europe FM",
    "address": "http://96.31.90.115:9984",
    "encoding": false
}
}

gnome-shell freezes on ubuntu 17.10

just upgraded to ubuntu 17.10 and was able to add a station and turn it on, i could listen for a few minutes. then gnome froze. restarted the computer, and now gnome freezes immediately when starting a stream

turned off all extensions and still no luck. not sure how to get good/accurate logs

gnome-shell --version
GNOME Shell 3.26.2

Feature Request: Add scrobbling/add to favorites support for Last.FM

This extension has a nice feature - it shows artist and title of the currently streamed song.
Everytime I like a song I feel the urge to push some kind of like/favorite/heart button like lastf.fm players have 😄. It would be great if this extension could integrate such a feature someday.

Add record button

Could you please add a Record button?
This is a great extension. Really nice. I love it.

[Feature request] Limiting the size of the current artist/title

Hi,

I just noticed that sometimes, the size of the current artist/title is really big. Especially with radio dedicated to classical music...

E.g. :

capture du 2016-12-08 18-14-38

And sometimes it's even worse...

It would be great to limit the maximum size displayed and to use some kind of auto scroll so the whole title/artist is still here if needed.

(I don't know what happens if the size is > to the screen size, I'll try to catch one like this !)

Copyright for convertCharset.js

Hi,

In convertCharset.js there's a link to the source of the code, but it's in Russian, which I don't understand.

@nielsrune, if you do understand Russian, could you try to find which license is this code published under ? And, author + mail would be amazing.

Also, should I add you as a copyright holder for this file ?

Getting "Stream Error"

Getting "Stream Error" when trying to play radio music.

If I go to Chrome or Firefox and paste the URL the music plays with no problem.
OS:
Linux wks-pc 4.10.0-20-generic #22-Ubuntu SMP Thu Apr 20 09:22:42 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

uname --version
uname (GNU coreutils) 8.26
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
gnome-shell --version

GNOME Shell 3.24.1

Hope there is help.

UI do not open

Hello, I've added several radios (let's say 20+) and now when I click on the icon the UI simply doesn't show up.
I think its because the list is too large and there is no scroll.
Where is located the file containing all the station URL's so I can remove manually?

Regards

Can't remove a station

Hi,

The easy way to reproduce is the following:

  • search for "vivaldi", you should see two result Radio Clasic Vivaldi and Calm Radio Vivaldi
  • click on the stars of the two stations, then click on one of them, click the "add" button
  • you'll see the two stations in the favorites, but when you click on the button to manage stations, you'll see only one of them (the one on which you clicked before clicking on add)

Thus, I can't remove the other one.

Issue with play button

Hello, i have a problem with play button in this extension, when i play the music sound if and i click again "stop" but when i repeat a few times "play" -> "stop" and "play"->"stop" etc... the system freeze a few seconds, the more times I give longer hang on every click. I use now manjaro and the gstreamer versión is "gstreamer-1.8.2-1" i use others extensions: dash-to-dock, openweather, removable drive menu, user themes and volume mixer.

Thanks.

Multiple streams running / Stream not stopped/canceled properly

Hello,

this extension is awesome, thanks for your effort!

I noticed that when i play a stream and it's not reacting idk maybe slow connection and meanwhile clicked another stream it can happen that they play in parallel, maybe because the first request was not cancelled?

Best regards

Support Old Gnome

Please support LTS version Gnome shell like Ubuntu Gnome and Debian Gnome.

Debian - Gnome Shell version : 3.14
Ubuntu LTS - Gnome Shell version 3.10

This is very important as it LTS OS system... thx very much...

Source of `extension-page-icon.png` missing ?

Hi,

I just noticed this using check-all-the-things:

# Check with upstream where the Inkscape SVG source files are.
$ find -type f \( -iname '*.png' -o -iname '*.gif' -o -iname '*.jpg' -o -iname '*.jpeg' \) -exec grep -iF inkscape {} +
Fichier binaire ./[email protected]/icons/extension-page-icon.png correspondant

@hslbck are you the author of it ? If yes, do you still have the source ? If not, do you remember where did you get it ? :)

Using XDG Base Directory Specification

Hi,

Instead of saving the list of channels in ~/.gse-radio/channelList.json it would be better to store it in the correct place according to the XDG Base Directory Specification.

That is:

$XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored. If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used.

So, in $XDG_DATA_HOME/gse-radio/channelList.json, or, if $XDG_DATA_HOME is not set, in $HOME/.local/share/gse-radio/channelList.json.

Moreover, I think the folder gse-radio should be renamed to something like gnome-shell-extension-radio or the like, it wasn't trivial to find it, had to look at the source code, because nothing showed up when I searched for the extension name. :)

Thanks.

EDIT: maybe the last played radio could be moved to another place ? so, the main file is not edited each time (it would be useful in case where someone, like me, wants to sync the main file between many computers)

Radio with same name

In radio-browser.info there are some same name stations even they're different city/country & in your extension search is hard with this kind of stations. Can you add more search options (like search can read tags details or at least read country info of the station)
I can always use Gradio but your app is very easy to use and I prefer yours.
Thanks.

Favourite channel temporarily disappears from favourite list

If a stream address is changed for a favourite channel, but the channel name is not, the channel disappears from the favourite list until the shell is restarted.

It seems, that the _removeFromFavourites function is run twice in this situation when old and new channel has the same name, but that said function cannot differ between oldChannel and newChannel. Thus, the oldChannel is removed from favourites, the newChannel is added, and the newChannel is removed again from the second run of _removeFromFavourites(oldChannel)

I have tried a few things, but can't just figure out a working, yet stateful, solution at the moment.

Added channel and favorites disappear after upgrade

Hi,

It seems that after upgrading the extension, all channels and favorite channels disappear and are replaced by the default ones. It happened after upgrading yesterday with the latest version from gnome website (but I'm almost sure it's not the first time they disappear).

(Thanks for this great extension. :) )

EDIT: nevermind, just saw the explanation in the README.. :/

Gstreamer Plugins Requirements

What gstreamer plugins does it need ? I'm on OpenSuse 42.3 and installed all the gstreamer plugins available but when trying to start a radio it keeps saying misssing plugin

Contributors and copyright informations missing

Hi,

I'm packaging this extension for Debian, I now have a working package, but I'm just missing a few informations to put in the copyright file.

Here's the current version.

I'd like to ask to each contributor if informations given here are corrects, especially the name/pseudo + email. If you don't want to provide an email, just tell me.

Files + licenses should be correct - but if someone is willing to check the whole git history one more time, go for it. :)

As an example, for me it's:

Léo Andrès <[email protected]>
  • @hslbck: it would be great if you could provide some contact email as you're the author of the extension...
Stas Solovey <[email protected]>
Piotr Komur <[email protected]>
Balázs Úr <[email protected]>
Niels Rune Brandt <[email protected]>
Anthony Chaput <[email protected]>
Berthault Justin <[email protected]>
Quentin Daem <[email protected]>
Ahmet Sezgin Duran <[email protected]>
  • @bezcitu

Hardcoded english strings

Hi,

Some strings displayed to the end-user are hard-coded and thus, not translated.

E.g. in player.js:

case Gst.MessageType.ERROR:
      MyE.radioMenu._stop();
      MyE.radioMenu.playLabel.set_text("Stream error");
      break;
case Gst.MessageType.EOS:
      MyE.radioMenu._stop();
      MyE.radioMenu.playLabel.set_text("End of stream");

Issue: After suspend cannot play radio

Hello,

After wake up from suspend mode, when I try play radio station it hangs gnome-shell.
I have to restart gdm or computer to work again.

Is it possible to somehow restart instance of radio?

gnome-shell --version
GNOME Shell 3.18.3

Call AddChannelDialog._getStreamAddress() when clicking on a favourite item

Currently _getStreamAddress() is called when the user adds a new channel, so only one single streaming server is stored in the channel file and alternative streaming servers are removed. A better solution would be to store the m3u address in the channelist file and call _getStreamAddress() if the user clicks on a favourite item, so there are alternative servers to choose from if a server is offline for some reason.

Apart from this, there should be break in the for loop of _getStreamAddress() if a http address has been found, so the first server is selected instead of the last one (the first server has a higher priority and may have better streaming quality).

Wrong icon path

Hi @hslbck, thanks for this awesome extension, I like it so much that I decided to replace radiotray with it. 👍
There is a problem with the icon path though. Icons should be located in icons/hicolor/scalable/apps, otherwise Gtk.IconTheme prefers similar icons of the the users default theme on some systems (/usr/share/icons/Faenza/apps/scalable/radio.svg in my case).

Feature Request: Survive Locksreen Mode

Everytime GNOMEs lockscreen kicks in the extension is disabled and thus streaming is aborted. This is very annoying and a big disadvantage compared to other streaming applets like radiotray.

I'd suggest to just remove the indicator icon from the panel instead of disabling the extension if the lock screen triggers. An example how to achieve this can be found here @ line 384.

New tag ?

Hi,

@hslbck, could you please tag a new version once #41 is merged ? So that I'll be able to propose a first Debian package using this release.

Thanks. :)

Button to copy current playing title to clipboard

Hi,

Sometimes, I'm listening to a radio, and suddenly, I hear a song and I'm like: I want to be able to listen this again. So I look at the title, and write it somewhere. It's sometimes not very easy as each time you click somewhere, it closes the radio panel with the title ; and moreover, if it's too long, the whole title isn't displayed.

So, we could add a button "copy to clipboard", which would copy the title of the current song to the clipboard.

In the case where the title is empty, we could replace it by something like: radio name + current time. A lot of radio don't have ID3 tags in their stream, but still, display the list of (time, song) played on their website. So this information is sufficient to retrieve the song. E.g. TSF Jazz.

Editing a channel should send you back to channel list

The only way to get to the edit channel window is to go through the channels list. You should drop the user back at the channels list when editing a channel. Related: The button on the edit channel window is odd as it says "Add" when it should be something more along the lines of "Save".

Main volume is updated on playing start

Hi,
I'm using gnome radio for a long time, and it's quite a very good extension: it has became the main radio in my home...The PC is plugged into the main HiFi, it's cool.

When using a header set at work, I can notice that the main (aka. pulse audio) playing volume is pumped up to max, which destroys my ears every time I start listening a channel or change it.

Could this be fixed ?
Thanks for this great extension !

Adding the same radio twice will lead to strange things

Hi,

If you search a station, let's say TSF Jazz, add it as a favorite. Close the window. Then, add it a second time still as a favorite.

It'll lead to strange things like: it'll appear 3 times in the favorite list. If you delete it once, it'll delete all of them etc.

One solution would be to disallow adding two stations with the same name. Another one would be to add an ID to each entry in the channel list and stop identifying them by name.

Channels menu item should be a button

This was another odd workflow to me. The menu items feel like they should work in the menu while the buttons (which are all grouped together) all open new windows. It feels a bit out of context to have the channels menu item open a window.

On a related note: if you do decide to make Channels a button, it would also be nice to not have to expand the favorites list. Consider making it the main list in the dropdown.

I understand this bug could be considered personal preference, so feel free to tell me to bugger off.

Support Multimedia Keys

It would be nice if the play and pause key etc, just like Rhythmbox.

  • XF86AudioPlay
  • XF86AudioPause
  • XF86AudioStop

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.