Proposal: antiX Radio Player GUI

Forum Forums antiX-development Development Proposal: antiX Radio Player GUI

  • This topic has 270 replies, 12 voices, and was last updated Jan 16-8:31 pm by Robin.
Viewing 15 posts - 1 through 15 (of 271 total)
  • Author
    Posts
  • #125456
    Member
    PPC

      Over at the portuguese part of the forum, Ch’Pol developed and tested a yad script that serves as a GUI to list and play web radio stations.
      The script is smart enough to automatically pick up your locale and, if a configuration file with a list of radios for your locale exists, it will be automatically loaded, if not, users can select which radio station list they want to load.
      This is a tiny script, extremely intuitive to use and probably a lot more user friendly than Poor Man’s Radio Player, specially for folks that do not like CLI (Terminal) applications.
      I think this script would be a worthy addition to antiX for one simple reason: we already have a radio player (PMRP) but it’s CLI only. Usually antiX offers, when possible a CLI and a GUI application to achieve the same end result. This would be a simple and efficient way to listen to radio streams all across the world.
      Note: currently there are only radio lists in French, Portuguese and Brazilian Portuguese. I added a new “World” list, that includes, for now, several BBC radio streams, including the venerable “BBC World News”.
      Users are encouraged to create their own lists of radios and add them here.

      As always, please test and report back- CH’Pol created the script, but I think I can make small tweaks, if needed (as I already done).

      No coding is required to create the a radio list file: just add one station per line following this format: Radio_Station_name_to_be_displayed,URL

      antix Radio Player

      P.

      • This topic was modified 7 months, 2 weeks ago by PPC.
      • This topic was modified 7 months, 2 weeks ago by PPC.
      #125460
      Member
      PPC

        I had an idea and just turned the script a tiny bit “smarter”- if no list of local radios exists, then load the list of World radio stations…
        The new script is attached to this post.

        I think @Marcelocripe will be proud- this GUI is so simple (and includes all the required instructions) that I think any sane person on Earth that knows how to read the language the GUI is in and operate a computer mouse will know how to use it, no matter how “inexperienced”…

        P.

        #125464
        Member
        ChPol

          Suggested small correction:
          When paused (kill mpv), the last radio station remains displayed. To be consistent with other actions, it would be preferable for “no radio station” to be displayed.
          In “case”, reset radioEncours variable:

          4) tuer_mpv ; radioEncours=$"(no radio station)" ;;

          Please note:
          In lists, radio station names must not contain spaces. They should be replaced by underscores (BBC_World_News) or non-breaking spaces, if your keyboard allows this.

          Ch’Pol

          #125476
          Member
          PPC

            Suggested small correction:

            Dear Ch’Pol – I adapted the script, but not exactly as you suggested – when a radio is paused, “- paused” is appended to the window’s title (this is meant so the user knows exactly what radio station was playing and paused). The idea is when the user click the “Play” button again, the same radio station will continue playing (it’s “unpaused”). Do you like this proposal or do you prefere the window to really say “(no radio station)”? I’ll do what you think is best.

            P.

            #125478
            Member
            PPC

              To anyone interested – we case use the ~350 radio stations on PMRP’s “database” in this script, but doing so would imply quite a bit of manual labour, since there are hundreds of radio stations to add to text files (it would be required to create a radios_[type_of_radio_station].txt for each type of radio station…
              If you search for http in PMRP code, will see all the links and names – https://github.com/hakerdefo/pmrp/blob/master/pmrp

              This means that we would have a kind of GUI for PMRP + access to local radio stations, all from inside this script- mixing a huge radio data base AND a simple to use and nice looking GUI.
              I will only to this kind of work if the dev team wants to add this script to antiX… I’m quite happy as it currently is. For my own personal use, I’ll probably just create a couple of .txt for classical music and so on, and add those to the script’s default radio lists.

              P.

              #125479
              Member
              anti-apXos

                I think this script would be a worthy addition to antiX for one simple reason: we already have a radio player (PMRP) but it’s CLI only. Usually antiX offers, when possible a CLI and a GUI application to achieve the same end result.

                There is a GUI for PMRP in antiX, even using yad, as well. Of course, this new one may be better, I haven’t had a chance to test it yet. I just thought I’d mention it, though.

                #125482
                Member
                PPC

                  I think, some years ago, I tested a PMRP player GUI, not sure if it was made in YAD (I think it was before I started messing with scripts).
                  This script is similar to PMRP in the sense that it allows easy access to web radios. “antiX Radio Player” main aim is to allow fast access to radio stations in the user’s locale, but since the radio stations are stored in simple .txt files, it’s easy, adding new files with new radios.

                  I just created a .txt with PMRP Classical music stations that still working and that are not repeated. PMRP had 16 Classical music stations. the current list has only 3 (yes, 13 radio stations were either simply repeated or off-line).

                  PMRP’s list organizes radios by category (classical, news, etc)- antiX Radio Player organizes radio stations primary by Country, but it’s lists can also refer to category. I attach the radios_CLASSICAL.txt file, for use with antiX Radio Player.

                  P.

                  • This reply was modified 7 months, 2 weeks ago by PPC.
                  • This reply was modified 7 months, 2 weeks ago by PPC.
                  #125486
                  Member
                  Wallon

                    I have a few changes to make but PPC goes too fast.

                    #125487
                    Member
                    Wallon

                      1) I choose a radio station.
                      2) I click on the “Play” button.
                      3) I hear the sound of the radio, it’s perfect.
                      4) I click on the “Load another list” button.
                      5) I click on the “Cancel” button (so I’m not taking a new list).
                      6) The “miniradio” application disappears from the screen but the music continues.
                      There’s no button on the screen to stop the “miniradio” application. I have to shut down the computer to stop the radio.

                      #125489
                      Member
                      Wallon

                        I’ve never been able to find Belgian radio stations in PMRP.
                        It’s a programme that was developed for English speakers.
                        antiX_Radio_player is much easier to use and I have radio stations in the 3 national languages (German, Dutch, French).

                        #125491
                        Member
                        PPC

                          @Wallon – that behavior was on the original script, and I kept it. If you cancel, you really “cancel” and close the script. I think of it as a feature, not a bug. Like stated on the main window, if the main window is closed (i.e. the user does not click the “Turn off the radio” button), the current radio station keeps playing.
                          If more people think that is strange, I can try coding around that.

                          @all: I attach the same exact version of the script, with a more complete radio list, that includes not only locales, but categories (extracted from the corresponding PMRP list).

                          P.

                          #125494
                          Member
                          PPC

                            @Wallon – I changed the script, so users stop listening to radio when they click the button to load a list. Please see if you like the script that way.
                            Unless a bug is found, I probably won’t change the script- it’s meant to be simple and minimal, nothing fancy. Ch’Pol did a great job on it, I just applied a new fresh coat of paint on it and tweaked a few details. I think that, with the extra radio files, It’s, for most users, almost as useful as PMRP, even more, if all you want to do is to listen to local radio stations (in Portuguese, French, or in English)

                            I’m off…

                            P.

                            #125498
                            Moderator
                            Brian Masinick

                              I tried the latest approach and I like the way it works; it is pretty simple and it’s easy to change the source.

                              --
                              Brian Masinick

                              #125513
                              Member
                              ChPol

                                @PPC

                                radio is paused, “- paused” is appended to the window’s title

                                An excellent idea. As so often, I wish I’d had it.

                                A music list, essentially.

                                Ch’Pol

                                • This reply was modified 7 months, 2 weeks ago by ChPol.
                                Attachments:
                                #125517
                                Member
                                Wallon

                                  I’ve just applied a fresh coat of paint. I don’t know if I chose the same colour as PPC?
                                  I’ve changed the ‘x’ button to ‘Exit’, which can be translated into any language.
                                  I’ve modified the script for compatibility with gettext.
                                  I’ve created the *.pot file and added comments.
                                  Here is the new v032 version.

                                Viewing 15 posts - 1 through 15 (of 271 total)
                                • You must be logged in to reply to this topic.