Skip to content

ayhanavci/radiokayra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Radio Kayra is a free and open source Gnome desktop extension that plays your favorite music and podcast streams in the background.

It utilizes yt-dlp and GStreamer for url/thumbnail resolving and audio playback respectively.

Alt Text

Requirements

  1. Gnome 46,47 or 48
  2. GStreamer
  3. YTDLP

Features

v1.0

  • Gnome tray icon. Play/Stop button. Volume slider.
  • Channel list in a scroll view. Plays with one click.
  • Auto downloads Radio/Video name and thumbnail. You don't have to manually enter.
  • Integrated into Gnome shell search.
  • Left mouse click on the radio icon opens the menu, mid click toggles between play / stop, right click opens channel editor.
  • Add/Delete/Edit channels in preferences. You can also move them up and down.
  • Saves last played channel and volume level for each session.
  • Displays currently playing song in a radio (if provided).
  • Has built-in Youtube search, using yt-dlp. You don't need to use a browser or copy paste urls to find music or podcasts.
  • Has built-in Radio search, using radio-browser.info.
  • Supports all direct audio stream urls including local audio files.
  • Supports a wide range of streaming websites that requires url resolving such as youtube, twitter, rumble etc. Here is the list from yt-dlp page.
  • Live channels that are detected by yt-dlp have a live icon below their thumbnail. Otherwise its duration is displayed in hh:mm:ss format.
  • Language support. For now only English and Turkish. But no coding necessary to add more languages. See Gjs guide

v2.0:

  • Back & Forward buttons to navigate through stations.
  • Radio & Youtube search returns up to 30 results.
  • Settings page. Change scroll area height, right click behaviour.
  • Can copy the currently playing artist+song into clipboard with a right click! (Enable from settings) Now you can right click on the icon and just paste it in the youtube search.
  • Displays Artist / Song / Station info tooltip when you hover over the radio icon. (Can be disabled)

Alt Text

  • Checked for Gnome 48. (St Widgets Orientation update)

v2.1

  • Fixed an issue in which some radio stations were not playing.
  • Fixed a minor issue in which station page scroll bar was jumping to top when a station was moved up or down.
  • Gnome 48 added to metadata

Channel Management

This window opens if you right click on the radio icon or click "Edit Channels" on the main panel. Alt Text Here you can see your current channels. On each row there are 4 buttons. Delete channel, Edit Channel, Move Channel Up and Move Channel Down. Last two allows you to sort your channels.

If you click the + button on top of the list, you can manually add a radio channel. Alt Text Here you can paste your own stream url and a name.

  • If the url requires no resolving (a direct url to a stream), then uncheck "Use yt-dlp?". Enter a name and click "Add".
  • If the url requires resolving (i.e. Youtube, Rumble, Twitter/X) and is supported by yt-dlp, then paste the url and leave "Use yt-dlp?" checked. You can enter a name manually or you can click "Fetch from url" to let yt-dlp retrieve the official title (recommended). You can later edit the field.

Station Search

Youtube

Select "Youtube" tab, type your search phrase and click enter or search button. This will perform a youtube search and the results will be retrieved and displayed asynchronously. It returns up to 30 results.

Alt Text

To add a search result. Just click the + button next to it. This will add the channel name, url and the thumbnail to your stations.

Radio

Select "Radio" tab, type your search phrase and click enter or search button. This will perform a radio search and the results will be retrieved synchronously and then displayed (so it may freeze for 1-2 seconds, unlike youtube search). It returns up to 30 results.

Alt Text

To add a search result. Just click the + button next to it. This will add the channel name, url and the thumbnail to your stations.

Gnome Search

You can click radio icon and click any channel to play. But you can also search through your channels using integrated Gnome shell search feature. Clicking any of the search results starts playing the channel.

Alt Text

Settings

Select "Settings" tab. Here you can change the right click and hover behaviour as well as the scroll area height.

Alt Text

Translations

The extension has English and Turkish languages support by default. But any language can be added without having any programming knowledge.

The strings are ready to be translated by using a program such as PoEdit

  • Open the file at your extensions folder

    .../radiokayra@dokaton.com/po/radiokayra@dokaton.com.pot

  • Then you can compile the translations as described in GJS Guide. On your extensions folder:

    gnome-extensions pack --podir=po example@gjs.guide

Notes

  • If you only use radio channels-direct links, the extension should work without installing yt-dlp but features will be lacking.
  • Extension stops all activity on screen lock.
  • If a channel thumbnail is not provided by the host url, then a placeholder icon is used (audio-x-generic-symbolic).
  • Thumbnails and channel list json file are saved in your /.config/radio-kayra folder and is kept on updates.
  • channels.json file only holds the channels. Each node is in the following format:
{
    "id": "3c136fd7-a94c-45be-be3f-4f683b4d5781",
    "name": "Rammstein - Sonne (Official Video)",
    "order": 8,
    "useYtdlp": true,
    "uri": "https://www.youtube.com/watch?v=StZcUAPRRac"
}
  • Key features are decoupled and are represented in seperate files for ease of modification.

    1. Icon names used and various size constants are in constants.js
    2. yt-dlp commands are in ytdlphandler.js
    3. Every sub-panel has a seperate class and file popXXX.js
    4. GStreamer related code is only inside radiokayra.js
    5. Search functionalities are in searchradio.js, searchyoutube.js and gnome search is in searchProvider.js
  • I will probably add MPV support as an alternative to GStreamer in the future.

  • Code checked with eslint

Contact

ayhanavci@gmail.com

Enjoy, Ayhan

About

A Gnome shell extension for listening to music

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •