Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show current song #78

Closed
wants to merge 13 commits into from
Closed

Conversation

l-wegner
Copy link

@l-wegner l-wegner commented Oct 18, 2023

This pull request should address #75

I added also a command to start and stop the current station.

I did not find any rules, how to contribute, so it's that informal now. :)

Edit:
I had to force push, because I forgot the --signoff

@github-actions
Copy link

Hi, @l-wegner,
Thanks for opening this PR 💙 .
Contributors 🧑‍🤝‍🧑 like you make the open source community 🌍 such an amazing place to learn 📖 , inspire 👼, and create 🎨 .
We will review it 👀 and get back to you as soon as possible 👍 . Just make sure you have followed the contribution guidelines.

By that time enjoy this meme 👇 , hope you like it 😄

meme

Use this action on your projects. Use jokes on issues instead.

Signed-off-by: Lars Wegner <[email protected]>
- player.stop() sets the process fast to None

Signed-off-by: Lars Wegner <[email protected]>
Signed-off-by: Lars Wegner <[email protected]>
- also reworking handle_listen_keypress

Signed-off-by: Lars Wegner <[email protected]>
Signed-off-by: Lars Wegner <[email protected]>
Signed-off-by: Lars Wegner <[email protected]>
The current callback needs to be improved,this needs a type for stations

Signed-off-by: Lars Wegner <[email protected]>
Signed-off-by: Lars Wegner <[email protected]>
@deep5050
Copy link
Owner

deep5050 commented Oct 19, 2023

Thank you sooo much for the PR. really appreciate it.

I see several bugs in the PR:

  1. current station panel is showing after the command menu
  2. after I stop a station, it again shows the panel
c/Users/Dipankar$ radio
╭─────────────────────────────────── RADIOACTIVE ───────────────────────────────────╮
│                                                                                   │
│         📻 Play any radios around the globe right from this Terminal ⚡!          │
│         😄 Author: Dipankar Pal                                                   │
│         ❓ Type '--help' for more details on available commands                   │
│         🐛 Visit: https://github.com/deep5050/radio-active to submit issues       │
│         ⭐ Show some love by starring the project on GitHub ❤                     │
│         💵 You can donate me at https://deep5050.github.io/payme/                 │
│         ❌ Press Ctrl+C to quit                                                   │
│                                                                                   │
╰───────────────────────────────────────────────────────────────────────────────────╯
      i     | You can search for a station on internet using the --search option
      i     | Press '?' to see available commands
Enter a command to perform an action:
╭─────────────────────────────────────── 📻 ────────────────────────────────────────╮
│                                 RADIO MARIA INDIA                                 │
│                                     undefined                                     │
╰───────────────────────────────────────────────────────────────────────────────────╯
s


╭─────────────────────────────────────── 📻 ────────────────────────────────────────╮
│                                 RADIO MARIA INDIA                                 │
│                                     undefined                                     │
╰───────────────────────────────────────────────────────────────────────────────────╯
      i     | Radio playback stopped successfully
Enter a command to perform an action: ╭─────────────────────────────────────── 📻 ────────────────────────────────────────╮
│                                 RADIO MARIA INDIA                                 │
│                                     undefined                                     │
╰───────────────────────────────────────────────────────────────────────────────────╯
  1. new panel is showing up on every new title
Type the result ID to play: 90
      i     | Station found: Auckland 80s
      i     | Press '?' to see available commands
Enter a command to perform an action:
╭─────────────────────────────────────── 📻 ────────────────────────────────────────╮
│                                   Auckland 80s                                    │
│                            Duran Duran - The Wild Boys                            │
╰───────────────────────────────────────────────────────────────────────────────────╯

╭─────────────────────────────────────── 📻 ────────────────────────────────────────╮
│                                   Auckland 80s                                    │
│                                R.E.M. - Fall On Me                                │
╰───────────────────────────────────────────────────────────────────────────────────╯
  1. showing undefined when song information is not available. show be blank
╭─────────────────────────────────────── 📻 ────────────────────────────────────────╮
│                                 RADIO MARIA INDIA                                 │
│                                     undefined                                     │
╰───────────────────────────────────────────────────────────────────────────────────╯

we need to resolve thse

@deep5050
Copy link
Owner

deep5050 commented Oct 19, 2023

Enter a command to perform an action:
╭─────────────────────────────────────── 📻 ────────────────────────────────────────╮
│                                   Auckland 80s                                    │
│                            Duran Duran - The Wild Boys                            │
╰───────────────────────────────────────────────────────────────────────────────────╯

╭─────────────────────────────────────── 📻 ────────────────────────────────────────╮
│                                   Auckland 80s                                    │
│                                R.E.M. - Fall On Me                                │
╰───────────────────────────────────────────────────────────────────────────────────╯
    [!!!]   | Error while reading current track: string index out of range

╭─────────────────────────────────────── 📻 ────────────────────────────────────────╮
│                                   Auckland 80s                                    │
│                                R.E.M. - Fall On Me                                │
╰───────────────────────────────────────────────────────────────────────────────────╯

╭─────────────────────────────────────── 📻 ────────────────────────────────────────╮
│                                   Auckland 80s                                    │
│                                R.E.M. - Fall On Me                                │
╰───────────────────────────────────────────────────────────────────────────────────╯

@deep5050
Copy link
Owner

c/Users/Dipankar$ radio --search india
╭─────────────────────────────────── RADIOACTIVE ───────────────────────────────────╮
│                                                                                   │
│         📻 Play any radios around the globe right from this Terminal ⚡!          │
│         😄 Author: Dipankar Pal                                                   │
│         ❓ Type '--help' for more details on available commands                   │
│         🐛 Visit: https://github.com/deep5050/radio-active to submit issues       │
│         ⭐ Show some love by starring the project on GitHub ❤                     │
│         💵 You can donate me at https://deep5050.github.io/payme/                 │
│         ❌ Press Ctrl+C to quit                                                   │
│                                                                                   │
╰───────────────────────────────────────────────────────────────────────────────────╯
     [!]    | showing 18 stations with the name!
┏━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ID ┃ Station                                               ┃ Country ┃                    Tags                     ┃
┡━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 1  │ 1.FM - Bombay Beats India Radio                       │   CH    │                  bollywood                  │
│ 2  │ All India Radio AIR Bilaspur                          │   IN    │                                             │
│ 3  │ All India Radio AIR Punjabi                           │   IN    │                india,punjabi                │
│ 4  │ Blu Radio, señal nacional (HJCK, 89.9 MHz FM, Bogo... │   CO    │ armenian,bogotá,caribbean music,live spo... │
│ 5  │ caprice indian folk                                   │   RU    │                                             │
│ 6  │ Indiana Country 101.5 WKKG                            │   US    │                   country                   │
│ 7  │ Indiana Public Radio WBST                             │   US    │              npr,public radio               │
│ 8  │ New Delhi India TV                                    │   IN    │                                             │
│ 9  │ Radio Caprice - Indian Cinema Music                   │   RU    │ bollywood,film music,hindi,movie soundtr... │
│ 10 │ Radio Caprice - indian folk                           │   RU    │                indian music                 │
│ 11 │ Radio Caprice - Indian Spiritual Music                │   RU    │        ethnic,folk,mantra,spiritual         │
│ 12 │ RADIO MARIA INDIA                                     │   IN    │           catholic,religion,talk            │
│ 13 │ WFIU 103.7 Indiana Public Media - Bloomington, IN     │   US    │ apm,bloomington,classical,jazz,npr,pri,p... │
│ 14 │ WFIU-HD2 Indiana Public Media - Bloomington, IN       │   US    │    bbc,bloomington,npr,pri,public radio     │
│ 15 │ WFYI 90.1 Indianapolis, IN                            │   US    │ bbc,indianapolis,news,npr,public radio,t... │
│ 16 │ WIBC 93.1 Indianapolis, IN                            │   US    │           indianapolis,news talk            │
│ 17 │ WIOE Oldies 101.1 South Whitley, Indiana              │   US    │                                             │
│ 18 │ WXLW 950 "Freedom 95" Indianapolis, IN                │   US    │ conservative,finance,local weather,news,... │
└────┴───────────────────────────────────────────────────────┴─────────┴─────────────────────────────────────────────┘
      i     | If the table does not fit into your screen,
      i     | try to maximize the window , decrease the font by a bit and retry
Type the result ID to play: 3
      i     | Station found: All India Radio AIR Punjabi
      i     | Press '?' to see available commands
Enter a command to perform an action:     [!!!]   | Error while reading current track: string index out of range

    [!!!]   | Error while reading current track: string index out of range
╭─────────────────────────────────────── 📻 ────────────────────────────────────────╮
│                            All India Radio AIR Punjabi                            │
│           Error while reading current track: string index out of range            │
╰───────────────────────────────────────────────────────────────────────────────────╯
    [!!!]   | Error while reading current track: string index out of range
    [!!!]   | Error while reading current track: string index out of range
    [!!!]   | Error while reading current track: string index out of range
    [!!!]   | Error while reading current track: string index out of range

@deep5050
Copy link
Owner

i have implemented this as a runtime command on 2.9.0.

thanks for the PR. thanks for contributing

@deep5050 deep5050 closed this Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants