Skip to content

Commit

Permalink
2.9.0 (#96)
Browse files Browse the repository at this point in the history
* feat: 💄 less log messages

* feat:

* feat: ✨ add: sort result page

Sort result page with several parameters like popularity, clickcount, random etc.

* feat: ✨ add: new column for sorted results

* fix: 🐛 EOF error fixed #80

fixed #80 EOF error while pressed CTRL + D

* Update commit author

* refactor: 🎨 move argument parser logic to a new file

* refactor: 🎨 some unnecessary functions removed

* feat: ✨ select and remove stations from favorite list

fixes #88

* When you add your radio station from URL, it is assigned the name "N/A". This becomes problematic when you want to record the from the station because the default naming structure is STATION_NAME_FILE_NAME. (#91)

In linux you will end up getting directory "N/A" does not exist.

This update attempts to get the station name from header 'ICY-Name' from the URL provided

Updated custom url name from 'N/A' to 'Custom Station'

Changed requests library from 'urllib.request' to 'requests' to get rid of 'Audit url open for permitted schemes' warning

Co-authored-by: Marvin Ochieng <marvin@technologic-software.com>

* docs: add marvoh as a contributor for code, and bug (#94)

* Update README.md

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: Dipankar Pal <dipankarpal5050@gmail.com>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* feat: ✨ detect station name while playing with direct url

fixes #92 allow record a station played with direct url

* update README

* fix: 🚑 timeout error introduced on fetching station name

* feat: ✨ improve logic for station name detection

using ffprobe instead of requests to fetch station name

* feat: ✨ dynamic width result page

result page will now adjust its width accroding to the actual window size.

* feat: ✨ play random stations from result page

* feat: ✨ see station info from runtime command

* updated

* Update README.md

* docs: 📝 contribution guide added

* feat: ✨ current track information from runtime command

* 2.8.1

* README update

Signed-off-by: Dipankar Pal <dipankarpal5050@gmail.com>

* 2.9.0

Signed-off-by: Dipankar Pal <dipankarpal5050@gmail.com>

---------

Signed-off-by: Dipankar Pal <dipankarpal5050@gmail.com>
Co-authored-by: John Doe <john.doe@example.com>
Co-authored-by: marvoh <marvoh@protonmail.com>
Co-authored-by: Marvin Ochieng <marvin@technologic-software.com>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
  • Loading branch information
5 people authored Oct 30, 2023
1 parent 7c17e32 commit 0ce6278
Show file tree
Hide file tree
Showing 13 changed files with 744 additions and 325 deletions.
10 changes: 10 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@
"contributions": [
"code"
]
},
{
"login": "marvoh",
"name": "marvoh",
"avatar_url": "https://avatars.githubusercontent.com/u/5451142?v=4",
"profile": "https://github.com/marvoh",
"contributions": [
"code",
"bug"
]
}
],
"contributorsPerLine": 7,
Expand Down
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 2.9.0

1. Fetch current playing track info from runtime commands 🎶 ⚡
2. Sort results with several parameters like: click-count, popularity, bitrate, random etc. `--sort`
3. Select stations from favorite menu to remove them `--remove`
4. Result page will adjust width according to the actual terminal window size
5. Squashed CTRL+D unhandled bugs
6. Detect station name while playing with direct url
7. Play a random station from result page
8. See station information from runtime command

## 2.8.0

1. Selection menu added for `--country` and `--tag` results. Play directly from result page.
Expand All @@ -15,7 +26,7 @@
4. Runtime command feature added. Perform actions on demand ⚡
5. A caching mechanism was added for fewer API calls. Faster radio playbacks!
6. Code refactored. It is easier for contributors to implement new features.
7. BREAKING CHANGES: `--station` -> `--search`, `--discover-by-country` -> `--country`, `--discover-by-tag` -> `--tag`, `--discover-by-state` -> `--state`, `--discover-by-language` -> `--lamguage`, `--add-station` -> `--add`, `--add-to-favorite` -> `--favorite`, `--show-favorite-list` -> `--list`
7. BREAKING CHANGES: `--station` -> `--search`, `--discover-by-country` -> `--country`, `--discover-by-tag` -> `--tag`, `--discover-by-state` -> `--state`, `--discover-by-language` -> `--language`, `--add-station` -> `--add`, `--add-to-favorite` -> `--favorite`, `--show-favorite-list` -> `--list`


## 2.6.0
Expand Down Expand Up @@ -60,7 +71,7 @@
## 2.4.0

1. Crashes on Windows fixed
Fixed setup-related issues (development purpose)
2. Fixed setup-related issues (development purpose)

## 2.3.0

Expand Down
52 changes: 52 additions & 0 deletions CONTRIBUTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Contribution Guide

Welcome to the radio-active project! We're thrilled that you want to contribute. Before you get started, please take a moment to read this guide to understand our contribution process.


## Getting Started

To get started, make sure you have `git`, `ffmpeg` and `python3` installed on your local machine. You'll also need a GitHub account.

## How to Contribute

### Fork the Repository

1. Click the "Fork" button on the top right of this repository's page.
2. This will create a copy of the repository in your GitHub account.

### Clone Your Fork

1. Clone your fork to your local machine using the following command:
```bash
git clone https://github.com/deep5050/radio-active.git
git checkout -b your-branch-name
```

### Install dependencies
```bash
pip3 install -r requirements.txt
pip3 install -r requirements-dev.txt
```

### Make changes.

Modify the code as required

### Test Your Changes

Before submitting your changes, please ensure that your code doesn't break the existing functionality.
Run `make` to install it locally and test before you push changes!
```
git add .
git commit -m "Add your commit message here" --signoff
git push
```
### Create a Pull Request
Visit the original repository on GitHub.
You should see a "New Pull Request" button. Click on it.
Follow the instructions to create your pull request.
Fill the description section with meaningful message.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SRC_DIR = "radioactive"
TEST_DIR = "test"

.PHONY: all clean isort check dist deploy test-deploy help build install install-dev test
all: clean format check build install
all: clean isort format check build install

check:
@echo "Chceking linting errors......."
Expand Down
79 changes: 49 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,32 @@

</div>


### Features

- [x] Supports more than 40K stations !! :radio:
- [x] Record audio from live radio on demand :zap:
- [x] Get song information on run-time 🎶
- [x] Saves last station information
- [x] Favorite stations (Aliasing) :heart:
- [x] Favorite stations :heart:
- [x] Selection menu for favorite stations
- [x] Supports user-added stations :wrench:
- [x] Looks minimal and user-friendly
- [x] Runs on Raspberry Pi
- [x] Finds nearby stations
- [x] Discovers stations by genre
- [x] Discovers stations by language
- [x] Record audio from live radio on demand :zap:
- [ ] I'm feeling lucky! Play Random stations
- [ ] VLC, MPV player support


> See my progress ➡️ [here]([https://github.com/deep5050/radio-active/projects/1](https://github.com/users/deep5050/projects/5))
> See my progress ➡️ [here](https://github.com/users/deep5050/projects/5)
### Why radioactive?

While there are various CLI-based radio players like [PyRadio](https://github.com/coderholic/pyradio) and [TERA](https://github.com/shinokada/tera), Radioactive stands out for its simplicity. It's designed to work seamlessly right from the start. You don't need to be a hardcore Linux or Vim expert to enjoy radio stations with Radioactive. The goal of Radioactive is to offer a straightforward user interface that's easy to grasp and comes preconfigured, without unnecessary complexities.

### Showcase
### In the Spotlight

The praise from YouTube channels and blogs underscores Radioactive's emergence as a top choice for radio enthusiasts. Its simple yet powerful features, make it a must-try application for radio lovers of all expertise levels. Discover the world of radio with ease – experience Radioactive today.

Expand All @@ -62,6 +64,7 @@ The praise from YouTube channels and blogs underscores Radioactive's emergence a
6. Awesome-stars: https://arbal.github.io/awesome-stars/#:~:text=deep5050/radio%2Dactive%20%2D%20Play%20any%20radios%20around%20the%20globe%20right%20from%20the%20terminal%20%3Azap%3A
7. OpenSourceAgenda: https://www.opensourceagenda.com/projects/my-awesome-stars#:~:text=deep5050/radio%2Dactive%20%2D%20Play%20any%20radios%20around%20the%20globe%20right%20from%20the%20terminal%20%3Azap%3A


### Install

Simply run: `pip3 install --upgrade radio-active`
Expand Down Expand Up @@ -111,39 +114,41 @@ Search a station with `radio --search [STATION_NAME]` or simply `radio` :zap: to

<!-- <a align=center href="https://www.youtube.com/watch?v=X-NfK5XbM90" target="_blank"> <img align=center src=https://user-images.githubusercontent.com/27947066/267328820-f7264e02-edc1-46f3-9548-5dfb50a6627d.jpg /> </a>
<hr> -->
<a align=center href="https://asciinema.org/a/611668" target="_blank"><img src="https://asciinema.org/a/611668.svg" /></a>

<a align=center href="https://asciinema.org/a/611668" target="_blank"><img src="https://asciinema.org/a/617580.svg" /></a>


### Options


| Argument | Note | Description | Default |
| ------------------ | ----------------------------------- | ---------------------------------------------- | ------------- |
| `--search`, `-S` | Required (Optional from second run) | Station name | None |
| `--play`, `-P` | Optional | A station from fav list or url for direct play | None |
| `--last` | Optional | Play last played station | False |
| `--uuid`, `-U` | Optional | ID of the station | None |
| `--loglevel` | Optional | Log level of the program | Info |
| `--add` , `-A` | Optional | Add an entry to fav list | False |
| `--list`, `-W` | Optional | Show fav list | False |
| `--favorite`, `-F` | Optional | Add current station to fav list | False |
| `--flush` | Optional | Remove all the entries from fav list | False |
| `--country`, `-C` | Optional | Discover stations by country code | False |
| `--state` | Optional | Discover stations by country state | False |
| `--tag` | Optional | Discover stations by tags/genre | False |
| `--language` | optional | Discover stations by | False |
| `--limit` | Optional | Limit the # of results in the Discover table | 100 |
| `--volume` , `-V` | Optional | Change the volume passed into ffplay | 80 |
| `--kill` , `-K` | Optional | Kill background radios. | False |
| `--record` , `-R` | Optional | Record a station and save to file | False |
| `--filename`, `-N` | Optional | Filename to used to save the recorded audio | None |
| `--filepath` | Optional | Path to save the recordings | <DEFAULT_DIR> |
| `--filetype`, `-T` | Optional | Format of the recording (mp3/auto) | mp3 |
| Argument | Note | Description | Default |
| ------------------ | -------- | ---------------------------------------------- | ------------- |
| `--search`, `-S` | Optional | Station name | None |
| `--play`, `-P` | Optional | A station from fav list or url for direct play | None |
| `--country`, `-C` | Optional | Discover stations by country code | False |
| `--state` | Optional | Discover stations by country state | False |
| `--language` | optional | Discover stations by | False |
| `--tag` | Optional | Discover stations by tags/genre | False |
| `--uuid`, `-U` | Optional | ID of the station | None |
| `--record` , `-R` | Optional | Record a station and save to file | False |
| `--filename`, `-N` | Optional | Filename to used to save the recorded audio | None |
| `--filepath` | Optional | Path to save the recordings | <DEFAULT_DIR> |
| `--filetype`, `-T` | Optional | Format of the recording (mp3/auto) | mp3 |
| `--last` | Optional | Play last played station | False |
| `--sort` | Optional | Sort the result page | name |
| `--limit` | Optional | Limit the # of results in the Discover table | 100 |
| `--volume` , `-V` | Optional | Change the volume passed into ffplay | 80 |
| `--favorite`, `-F` | Optional | Add current station to fav list | False |
| `--add` , `-A` | Optional | Add an entry to fav list | False |
| `--list`, `-W` | Optional | Show fav list | False |
| `--remove` | Optional | Remove entries from favorite list | False |
| `--flush` | Optional | Remove all the entries from fav list | False |
| `--kill` , `-K` | Optional | Kill background radios. | False |
| `--loglevel` | Optional | Log level of the program | Info |

<hr>


> **NOTE:** Once you save/play at least one station, invoking `radio` without any options will show a selection menu
> `--search`, `-S`: Search for a station online.
Expand Down Expand Up @@ -172,13 +177,26 @@ Input a command during the radio playback to perform an action. Available comman
```
Enter a command to perform an action: ?
q/Q/quit: Quit radioactive
h/H/help/?: Show this help message
t/T/track: Current song name (track info)
r/R/record: Record a station
f/F/fav: Add station to favorite list
rf/RF/recordfile: Specify a filename for the recording.
h/H/help/?: Show this help message
q/Q/quit: Quit radioactive
```

### sort parameters

you can sort the result page with these parameters:
- `name` (default)
- `votes` (based on user votes)
- `codec`
- `bitrate`
- `lastcheckok` (active stations)
- `lastchecktime` (recent active)
- `clickcount` (total play count)
- `clicktrend` (currently trending stations)
- `random`

### Bonus Tips

Expand Down Expand Up @@ -230,6 +248,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://www.bjoli.com"><img src="https://avatars.githubusercontent.com/u/48383?v=4?s=100" width="100px;" alt="Joe Smith"/><br /><sub><b>Joe Smith</b></sub></a><br /><a href="https://github.com/deep5050/radio-active/commits?author=Yasumoto" title="Tests">⚠️</a> <a href="https://github.com/deep5050/radio-active/commits?author=Yasumoto" title="Code">💻</a> <a href="#ideas-Yasumoto" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/salehjafarli"><img src="https://avatars.githubusercontent.com/u/81613563?v=4?s=100" width="100px;" alt="salehjafarli"/><br /><sub><b>salehjafarli</b></sub></a><br /><a href="https://github.com/deep5050/radio-active/commits?author=salehjafarli" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/marvoh"><img src="https://avatars.githubusercontent.com/u/5451142?v=4?s=100" width="100px;" alt="marvoh"/><br /><sub><b>marvoh</b></sub></a><br /><a href="https://github.com/deep5050/radio-active/commits?author=marvoh" title="Code">💻</a> <a href="https://github.com/deep5050/radio-active/issues?q=author%3Amarvoh" title="Bug reports">🐛</a></td>
</tr>
</tbody>
</table>
Expand Down
Loading

0 comments on commit 0ce6278

Please sign in to comment.