Menu

Request for adding support for "radiotray-ng" application and some other stuff.

phd21
2018-12-16
2019-01-02
  • phd21

    phd21 - 2018-12-16

    Hello StreamTuner2 developer(s), Mario,

    Thank you again for this wonderful application!

    Can you please add a plug-in option for the newer "radiotray-ng" application or perhaps modify the existing radiotray "hook" code to choose either "radiotray" or "radiotray-ng"? Maybe change the wording in that option from "Keep in Radiotray" to "Play in Radiotray"?

    There have been some discussion from people on the Linux Mint forums that would like to be able to easily add streaming radio stations to a radiotray application like "radiotray" or "radiotray-ng" in additionn to playing them. It is easy to add a streaming station from StreamTuner2 to a music application using drag-n-drop or by modifying the ST2 settings to add to a player's playlist like "audacious -e %pls", or even export stations to various playlist formats. I realize this would probably have to come from the developers of those applications. But, maybe you have some ideas on this as well. RadioTray uses the "xml" format and RadioTray-ng uses the ".json" format.

    Would also be nice to be able to create multiple custom bookmarks (playlists) in StreamTuner2. You can easily add to the "Favorites" bookmarks playlist and export that, but I do not see a way to add a new bookmarks (playlist) category like "holiday music" or "TodaysMusic_12-16-2018", and add stations to that category and then export those into playlist formats if I wanted to do that.

    Also, I tried to create a new button for adding a streaming station to a music application's playlist rather than modifying the "player" settings tab which does work, but the same command "audacious -e %pls" does not work in the "Features" settings tab for "Special buttons for apps" section? Am I missing something?

    I am currently using Linux Mint 19 and Linux KDE Neon both based on Ubuntu 18.04.

    Below is a link to the recent current Linux Mint post.
    Radio Tray Bookmark Additions... - Linux Mint Forums
    https://forums.linuxmint.com/viewtopic.php?f=58&t=283260

    Thank you.

    Merry Christmas and Happy Holidays to you and yours and everyone else!

    Best regards,

    Phil (phd21)
    phd21mint@gmail.com

     

    Last edit: phd21 2018-12-16
  • Mario Salzer

    Mario Salzer - 2018-12-16

    Hi Phil!

    You had me at "radiotray-ng". Didn't even realize there was a nenewed project.
    Anyway, I've updated the radiotry plugin, and will pick up on your Github thread there. Somewhat optimistic RT-NG may introduce an add_radio() method without any hacks.

    Alternatively we could simply append to RTNGs bookmarks.json directly. Easy peasy. But I would prefer a real interface (otherwise may instabilize RT).

    I'm afraid there won't be a drag and drop option for it however. I believe it is possible for systray applications too. But alas, drag and drop is a world of pain for ordinary applications already. That would be quite some coding overhead I fear.

    Would also be nice to be able to create multiple custom bookmarks (playlists) in StreamTuner2. You can easily add to the "Favorites" bookmarks playlist and export that, but I do not see a way to add[...]

    I've been pondering this for a while. It's pefectly possible to have multiple bookmark lists already. But there's no UI really to add new entries.

    Which is because all the list views in ST2 were really just meant for browsing. It's kinda cumbersome to manage personal favorites with it really. (Always just had the find-new-stations use case in mind really).

    That being said adding a [new category] button is probably the simplest approach. But bookmarking would always default to the main favorites list. So you'd have to drag the entries to any custom bookmark lists later.

    Also, I tried to create a new button for adding a streaming station to a music application's playlist rather than modifying the "player" settings tab which does work, but the same command "audacious -e %pls" does not work in the "Features" settings tab for "Special buttons for apps" section? Am I missing something?

    I think that's a bug in specbuttons rather. Just tried it myself and got "TypeError: run_fmt_url() got multiple values for keyword argument 'row'". So the parameter matching in ST2 does not work right there.

    Update: Probably fixed now, update the plugin to 0.8.3 via pluginmanager.

    Best,
    mario

     

    Last edit: Mario Salzer 2018-12-16
  • phd21

    phd21 - 2018-12-17

    Hello Mario,

    Nice to hear from you. Thank you for your prompt reply.

    Yes, the radiotray-ng works nicely only they use a different bookmarks format the .json which ST2 already supports. I see that you added to my request on the radiotray-ng website, thank you. We already received a reply as well. I do not see a ST2 plugin manager update to the radiotray hook plugin for this yet, although you mentioned you had already changed that?

    I thought that appending to the existing radiotray-ng bookmarks file would work too, but I think it would be better to have some sort of import option in the actual radiotray-ng app in the system tray and or the separate bookmarks editor for various playlist formats. I can see how a "drag-n-drop" would be difficult for a system tray application, but what about when the separate bookmarks editor option "rtng-bookmark-editor" is open? I did not see an option for ".json" in ST2 drag-n-drop" plugin? Maybe you and "ebruck" can collaborate on this. I'll be happy to test anything for either of you.

    I just tested the new Special Options button and it works great now, yeah (thanks)! Any way to add a button text label?

    As for the custom new bookmark's group category option(s) to save user favorites like new playlists , that would be very convenient which is why most of the music player applications have that ability. You already have the add bookmarks (save to favorites), could you not just copy or use that same code to add to different user defined bookmark group category(s) sort of like playlists? Then those playlists could be used in ST2 or exported to other music player apps and or the radiotray-ng app. Maybe modify the right-click menu option for "add bookmark" which adds to favorites to give the user a choice to add it to another bookmark category (playlist), dragging to the new bookmark category would be good as well. And in addition to play in radiotray-ng an option to right click export or add to radiotray-ng bookmarks?

    Also, I cannot seem to add a new station properly, I click that and nothing seems to happen? Perhaps that could be made more obvious like a pop-up window? And would it not be a good idea to add that to a something like "User added bookmarks" category?

    I really love the "Control+F" Find feature much more than the search feature, perhaps that could be added to the main toolbar? If it could be added to the Special Buttons option, how would I do that, what would the command be?

    Best regards,
    Phil (phd21)
    phd21mint@gmail.com

     

    Last edit: phd21 2018-12-17
  • Mario Salzer

    Mario Salzer - 2018-12-17

    Hey Phil.

    […] . I do not see a ST2 plugin manager update to the radiotray hook plugin for this yet, although you mentioned you had already changed that?

    Right. It does not show up in the update list due to some specificity in the meta data. For manual updates you could download radiotray.py directly to your ~/.config/st2/plugins folder however.

    At the moment it really just adds browsing of existing RTNG bookmarks. Looking over Radiotray it might be more involving to add the required DBUS method. Therefore I'll probably add direct writing to bookmarks.json - after all there's a menu entry to "Reload Bookmarks" in RT.

    Thus I'm gonna make a 0.6 version of our radiotray plugin later, which ought to show up in the plugin manager as usual.

    I thought that appending to the existing radiotray-ng bookmarks file would work too, but I think it would be better to have some sort of import option in the actual radiotray-ng app in the system tray and or the separate bookmarks editor for various playlist formats. I can see how a "drag-n-drop" would be difficult for a system tray application, but what about when the separate bookmarks editor option "rtng-bookmark-editor" is open? I did not see an option for ".json" in ST2 drag-n-drop" plugin? Maybe you and "ebruck" can collaborate on this. I'll be happy to test anything for either of you.

    I think it's pretty safe to append to RTs bookmarks.json. Note that "JSON" is really just a catch-all description for various formats. One of the supported export formats of that class in ST2 is "JSPF". Which is sort of a fringe standard however.

    What I would imagine is RTNGs editor supporting PLS files for importing. That's the most widely used format anyway.

    Drag and drop is slightly more involving than just having a specific file type. There's (theoretically) some negotiation betwen sendeing and receiving app through the clipboard. ST2 has some needless compelxity here to support different payloads. However, nobody is using them. Whenever you drag-and-drop something it's all just dumb file lists being swapped between windows. I think I left some sarcastic remarks on http://fossil.include-once.org/streamtuner2/wiki/XDND+types (and more in the plugin docs) after giving up.

    I would say Ed of RTNG shouldn't spend too much effort on this. (It's a chore with gtk... funcs). If he adds DND support, it'll just be a list of PLS files being sent over. But that would be sufficient in this very case, since RT just needs station urls and titles really.

    Another option would be to add a little script to manually convert+import bookmarks to RTNG.

     
  • Mario Salzer

    Mario Salzer - 2018-12-17

    Also, I cannot seem to add a new station properly, I click that and nothing seems to happen? Perhaps that could be made more obvious like a pop-up window? And would it not be a good idea to add that to a something like "User added bookmarks" category?

    The only option currently is the [copy/new] in the station editing window.

    I've meant to finish the "add new station" plugin for some time, but never got around to make a proper window.

    I really love the "Control+F" Find feature much more than the search feature, perhaps that could be added to the main toolbar? If it could be added to the Special Buttons option, how would I do that, what would the command be?

    We could definitely make an optional main toolbar button, right next to [reload] for this.

    The special buttons can't invoke internal functions (wthout some new code lookup magic), it's just for external commands.

     
  • Mario Salzer

    Mario Salzer - 2018-12-17

    As for the custom new bookmark's group category option(s) to save user favorites like new playlists , that would be very convenient which is why most of the music player applications have that ability. You already have the add bookmarks (save to favorites), could you not just copy or use that same code to add to different user defined bookmark group category(s) sort of like playlists? Then those playlists could be used in ST2 or exported to other music player apps and or the radiotray-ng app. Maybe modify the right-click menu option for "add bookmark" which adds to favorites to give the user a choice to add it to another bookmark category (playlist), dragging to the new bookmark category would be good as well. And in addition to play in radiotray-ng an option to right click export or add to radiotray-ng bookmarks?

    Adding right click options for other bookmark categories shouldn't be an obstacle.

    The main issue is still the bookmarks tab being somewhat magic (it harbours some dynamic plugins and lists), and thus no reliable support for subcategories or extra favorite* lists.

    Right now even if you handicraft a "favorite2" entry in STs bookmarks.json, it will not show up in the UI. Because the category browser in the bookmarks tab really just cares about its fixed known names. That's the main obstacle. Not a big one. But I need to give it some more thought on how to support custom lists reliably.

     
  • phd21

    phd21 - 2018-12-17

    Hi Mario,

    Thanks again for your work on this and for replying so well and quickly.

    There was a comment from "ebruck" of radiotray-ng today.
    "I read some of the discussions and JSON is rather easy to deal with especially in Python. The quickest route to getting something going is for ST2 to edit the JSON file found in the config setting and then issue a reload bookmarks command via the dbus interface."

    • Regarding the ST2 radiotray hook update:
      You: "Right. It does not show up in the update list due to some specificity in the meta data. For manual updates you could download radiotray.py directly to your ~/.config/st2/plugins folder however."

    I meant for this immediate concern, just so when you click "keep in radiotray' it will play in the radiotray-ng application.

    Can you please provide a download link to the new "radiotray.py" file, where is this located? I do not really understand why this cannot be updated through your existing update option like other plugins?

    As for adding new features to ST2 regarding the radiotray-ng application, whenever you can do it would be great.

    • You: "I think it's pretty safe to append to RTs bookmarks.json. Note that JSON is really just a catch-all description for various formats. One of the supported export formats of that class in ST2 is "JSPF". Which is sort of a fringe standard however."

    I never heard of the ".jspf" format before.

    -You: "What I would imagine is RTNGs editor supporting PLS files for importing. That's the most widely used format anyway."

    I created various playlists in Audacious and exported them into various playlist formats to see what they looked like. I think it would be preferred to use a playlist format that provides the streaming station's title and obviously the station's url, the favicon would be nice but not necessary. In my tests only the ".xspf" and the ".json" formats provided both the station title and url. Are you saying the ".pls" format normally provides both the title and url?

    • You: "I would say Ed of RTNG shouldn't spend too much effort on this. (It's a chore with gtk... funcs). If he adds DND support, it'll just be a list of PLS files being sent over. But that would be sufficient in this very case, since RT just needs station urls and titles really.

    Another option would be to add a little script to manually convert+import bookmarks to RTNG."

    I really like the "radiotray-ng" application and more users would use it if it had the ability to import playlists in various formats from other sources like ST2 and other music apps. There is already a script to convert the original radiotray "xml" files, but apparently it is not workng well for nested grouped stations. Ideally it would be great if ST2 and radiotray-ng could import playlists in ".xspf", ".pls", and "m3u", and the ".json" formats.

    As for DND it seems to me that using ".json" would work well now with the RTNG bookmarks editor and if even one other commonly used playlist format could be imported that would be sufficient..

    • Re the new station option:
      You: The only option currently is the [copy/new] in the station editing window. I've meant to finish the "add new station" plugin for some time, but never got around to make a proper window.

    It would be a nice to have feature if it was easy and obvious to use.

    • Re the Control+F Find feature:
      You: We could definitely make an optional main toolbar button, right next to [reload] for this.

    I think that would be great.

    You: "The special buttons can't invoke internal functions (wthout some new code lookup magic), it's just for external commands."

    I understand. But being able to invoke internal functions may be something to consider in a future update...

    -Re custom bookmarks like playlist option(s):

    You:"Adding right click options for other bookmark categories shouldn't be an obstacle.

    The main issue is still the bookmarks tab being somewhat magic (it harbours some dynamic plugins and lists), and thus no reliable support for subcategories or extra favorite* lists.

    Right now even if you handicraft a "favorite2" entry in STs bookmarks.json, it will not show up in the UI. Because the category browser in the bookmarks tab really just cares about its fixed known names. That's the main obstacle. Not a big one. But I need to give it some more thought on how to support custom lists reliably."

    Ideally it would be great to have user configurable bookmark groups and categories that work like playlists. I was thinking that one reasonably quick option for this where you could use existing code might be to create one other static bookmark group specifically for temporary use like "Favorites2" or "Todays Favorites" with its own right-click to "add to bookmark" option or DND to that new bookmark group and another option to easily clear that group for re-using it. This would allow the user to create a temporary playlist to use without messing up their main favorites list that could also be exported to other music apps and radiotray-ng. What do you think of this?

    • Another question. What are the proper or best settings for recording using "streamripper". It seems to be hit and miss for me where sometimes it works and other times it does not. I changed the default audio recording entry in the Player Tab settings to put just "streamripper", was that wrong or is there a better command like "streamripper %srv"? I also noticed an addional plugin for this which I installed, but on my KDE system I cannot check the box at the top and other settings in this are not accessible? Maybe a better explanation of these options for this plugin?

    Thank you again for all your efforts into this for all music lovers.

    Best regards,
    Phil (phd21)

     

    Last edit: phd21 2018-12-17
    • Mario Salzer

      Mario Salzer - 2018-12-17

      Hi again!

      I meant for this immediate concern, just so when you click "keep in radiotray' it will play in the radiotray-ng application.

      The direct-play function is not going to work with RT-NG.

      • While it does have a play_station() DBUS method, that one only works for existing stations within Radiotray.
      • Thus you would have to have an exact match between ST2 and RT category and station name.
      • You can't pass arbitrary streaming URLs over this.

      Hencewhy I'd just focus on the bookmarks transfer for now.


      Can you please provide a download link to the new "radiotray.py" file, where is this located? I do not really understand why this cannot be updated through your existing update option like other plugins?

      It's already showing up for me.
      http://fossil.include-once.org/streamtuner2/artifact/f78abe4734754879[Download] button atop.


      […] station's title and obviously the station's url, the favicon would be nice but not necessary. In my tests only the ".xspf" and the ".json" formats provided both the station title and url. Are you saying the ".pls" format normally provides both the title and url?

      It does indeed. PLS always includes station title and url:

      [playlist]
      NumberOfEntries=160
      File1=urn:liveradio:play-radio
      Title1=Play Radio
      Length1=-1
      File2=urn:liveradio:only-hits-radio
      Title2=ONLY HITS Radio
      

      It's not the best format in my opinion, but it would fit the bill I think.

      […] grouped stations. Ideally it would be great if ST2 and radiotray-ng could import playlists in ".xspf", ".pls", and "mu3', and the ".json" formats.

      Streamtuner2 does support quite a few import and export formats. With some heuristics and brute force it could theoretically extract from any playlist or json format. That's what it does for some radio directories.

      However, there's purposefully no general import capability in ST2. The UI doesn't lend itself to bookmark management very much. That's really the domain of Rythmbox & Co.
      That being said, I'm already working on some custom bookmark categories. But it'll likely remain inconvenient at best.

      Anyway, the crux is that RTNG doesn't have an own import feature yet. And with the ST2 radiotray hook you can only send over one station after another. Other than that you would have to design a custom script, to convert e.g. Streamtuners2 json into RT-NG json format. (Similar, but not the same.)


      The special buttons can't invoke internal functions (wthout some new code lookup magic), it's just for external commands.

      I understand. But being able to invoke internal functions may be something to consider in a future update...

      This might even be a simple addition...


      As for the custom bookmark categories:
      This is what it's gonna look like:

      • Dragging stations in from other tabs is just going to work as normal.
      • And the usual export function will behave as always.

      Another question. What are the proper or best settings for recording using "streamripper". It seems to be hit and miss for me where sometimes it works and other times it does not. [...]

      Hard to tell without any error messages. It's usually some user_agent blocking as mentioned in the manual.

      The extra recording plugin is just for gimmicks. You would have to look up the streamripper or fIcy/fPls manual. I would need a screenshot to see what option is hidden. Probably Gtk-theme-related.

       

      Last edit: Mario Salzer 2018-12-17
  • Mario Salzer

    Mario Salzer - 2018-12-17

    The special buttons can't invoke internal functions (wthout some new code lookup magic), it's just for external commands.

    I understand. But being able to invoke internal functions may be something to consider in a future update...

    This might even be a simple addition...

    The new specbuttons plugin now supports commands like:

      search.menu_search(1)
    

    (With parens and dummy argument.)

     
  • phd21

    phd21 - 2018-12-17

    Hi Mario,

    I was able to update and get the new "add to radiotray-ng" option, nicely done! I do have to reload the RTNG bookmarks again afterward even though it looks like it reloaded. I noticed some stations showed up under pop/rock and others under different categories, and the "root"? What is the best selection to use in the ST2 radiotray hook plugin, group, as is, etc...? FYI: I am using the RTNG v0.2.3, did you compile the newer version?

    That is to bad you cannot also have it just play in RTNG like you could in the older radiotray app to see if the station works and is something you want to add to the RTNG app bookmarks. But, people can preview a station in Audacious or whatever music app to see if it works and is something they want to add to their RTNG or music app playlist.

    Are you still going to add the Ctrl+F search button as a default to ST2 toolbar, or should we use the Special Button option?

    It still would be great to have the ability to import playlists into RTNG from ST2 and other music apps.

    I decided to use Amarok to export my playlist to a shoutcast playlist into ".pls" and sure enough it did have the format you showed. I wonder my my Audacious did not export a playlist into a .pls playlist with the title, it only had the urls?

    I decided to compile radiotray-ng v0.2.5-dev and installed that and used ST2 to add a station to RTNG bookmarks and it worked perfectly without having to refresh the RTNG bookmarks again.

    Thank you...

    Best regards,

    Phil (phd21)

     

    Last edit: phd21 2018-12-18
  • phd21

    phd21 - 2018-12-18

    Hi Mario,

    I think I figured out how to make StreamTuner2 work better with "streamripper" at least on Linux systems using Ubuntu 18.04 + base. As you probably know the Ubuntu and other developers constantly change things from their previous verions (Ubuntu 14.04, 16.04, and now 18.04) and one very annoying aspect of Linux that they change is related to security even though it was secure before. Unfortunately, they do not have all the supporting OS packages properly setup to handle the security changes well. I have had to change user permmissions in Ubuntu 18.04 based operating systems to get many applications that used to work perfectly in Ubuntu 14.04 and 16.04 but would not in Linux Mint 19/Ubuntu 18.04 until the user permissions were changed?

    Even with StreamTuner2, I have had to tell users of Linux Mint 19 based on Ubuntu 18.04 to run the console terminal command below to make sure users have permission to run ST2 and the updated plugins (sub-python apps) which works. This would probably be a good idea to run these commands on Linxu Mint 18 and Ubuntu 16.04 users as well.
    sudo chmod -R ugo+rwx /usr/share/streamtuner2/

    I just did the same thing for "streamripper".
    sudo chmod -R ugo+rwx /usr/bin/streamripper

    I updated the ST2 Player Tab Audio recording settings to use "streamripper %srv", and it now works perfectly everytime but it is storing the streaming in my home folder. But, If I tried to add other parameters like a default folder or "--xs2", it would not work? Apparently, streamripper wants a particular path to a folder for Linux. I was trying to use "-d /home/username/Music/Streaming" and it would not work. After looking at the streamripper ini file I notice something different in the default output path just "./". So, I added a new ST2 Spec Button for streamripper to use "streamripper %srv --xs2 -d ./Music/Streaming/" it works perfectly, when normally in Linux to represent this folder would be "~/Music/Streaming" or the full path "/home/username/Music/Streaming"???

    But, If I try to use the same streamripper command in the Player Tab Audio Recording settings it will not work??? I can use "streamripper %srv", but the only way to get it to go to a folder I want is to edit the user configuration file for "streamripper.ini"
    gedit /home/user69/.config/streamripper/streamripper.ini
    changed the line below to whatever folder you want to save streams to. I created a "Streaming" folder underneath my Music folder to store the stream recordings.
    output_dir=./Music/Streaming/
    and now that works well too?

    Best regards,
    Phil (phd21)

     
  • Mario Salzer

    Mario Salzer - 2018-12-18

    [...] I noticed some stations showed up under pop/rock and others under different categories, and the "root"? What is the best selection to use in the ST2 radiotray hook plugin, group, as is, etc...? FYI: I am using the RTNG v0.2.3, did you compile the newer version?

    Yes, RTNG 0.2.5 does update the menuitems right away.

    The new plugin version will provide a few more mapping options, and there's a more details in the comments.

    Are you still going to add the Ctrl+F search button as a default to ST2 toolbar, or should we use the Special Button option?

    Done.

    It still would be great to have the ability to import playlists into RTNG from ST2 and other music apps.

    You'll have to keep in contact with Ed on this.

    I wonder my my Audacious did not export a playlist into a .pls playlist with the title, it only had the urls?

    The titles can be omitted for PLS. It's customary they're retained however. This might be a bug in Audacious.

    the console terminal command below to make sure users have permission to run ST2 and the updated plugins (sub-python apps) which works. This would probably be a good idea to run these commands on Linxu Mint 18 and Ubuntu 16.04 users as well.
    sudo chmod -R ugo+rwx /usr/share/streamtuner2/

    I'm not sure what error prompted this. But making files writeable for everyone is not always a good idea. There might be circumstances where it makes sense, but for Streamtuner2 these files don't need write permission.

    But, If I try to use the same streamripper command in the Player Tab Audio Recording settings it will not work??? I can use "streamripper %srv", but the only way to get it to go to a folder I want is to edit the user configuration file for "streamripper.ini"

    If there's an ini file, it may take precedence over command arguments.

    • "streamripper %srv --xs2 -d ./Music/Streaming/" only works since ST2 starts in $HOME as current working directory
    • Generally ~/ lookups should be avoided. $HOME/ or the cd … trick works more reliably.

    Attached test version:

    • new radiotray plugin
    • plugin for crafting new bookmark categories
    • search toolbar button
     
  • phd21

    phd21 - 2018-12-19

    Hi Mario,

    Thank you again for all that you do on this ST2 project.

    I have been testing the 2.2.1-dev20181218 version since last night on Linux Mint 19 Cinnamon 64-bit (Gnome/GTK) and Linux KDE Neon both based on Ubuntu 18.04. Here are my observations so far.

    • Love the new search button for Ctrl+F
    • I can now add new bookmark group categories (nice), but I cannot add anything into them by right -clicking and add to that new bookmark group or by DND?
    • I cannot seem to delete a new bookmark group either.
    • Found an odd behavior with ST2 crashing immediately only in the Edit->Properties Options tab if I try to use my mouse wheel or the vertical scrollbar? But if I change the theme from the Feature tab theme setting option from adwaita to some of the other themes it works? This is in KDE. In Cinnamon I cannot select anything in that same theme settings option, but the GTK2 bookmark theme picker works? All other tabs work perfectly regardless of theme settings?
    • I like that ST2 when adding to RTNG creates and uses the StreamTuner category and adds stations from ST2 to that, is that because it could not find a category or group? And, Is that because of the "group" settings in the Features Tab radiotray hook option? I personally would like an option specifically to always add to the RTNG StreamTuner2 group which makes it easy to find those stations added by ST2 , then I can use the RTNG bookmarks editor to rearrange them if I want.
    • What Linux system(s) are you using with ST2?
    • Does the Win32 plugin affect anything with Linux systems?

    Best regards,
    Phil (phd21)

     
  • Mario Salzer

    Mario Salzer - 2018-12-20

    Hey Phil,

    Thanks for the testing and feedback again!

    • Love the new search button for Ctrl+F

    Great. It's pretty much just an UI change. (make glade if you want to tinker around / prototype some UI change, btw). I've just left it invisible per default though for parity with the original ST1 look&feel.

    • I can now add new bookmark group categories (nice), but I cannot add anything into them by right -clicking and add to that new bookmark group or by DND?

    Drag and drop doesn't really work between categories. Dragging only switches between channels.

    So: you would have to select the destined custom bookmark category first, switch to e.g. Shoutcast, then drag an entry over to the bookmarks tab/channel. (It's possible, but too much effort / likely unstable, to support category-autoswitching.)

    Alternatively the context menu "Bookmark to > …" should allow to copy entries from favourite to a custom category. (Requires deleting the original/old entry afterwards.)

    → Click/reload the target category again to see that it was copied.

    This feature will likely not get more conenient any time soon. It's really just a workaround.

    • I cannot seem to delete a new bookmark group either.

    There's some preparation for it, but the [delete] button is still missing in the plugin.

    Replace line 38 with following if you want to try it:

            (gtk.STOCK_DELETE, gtk.RESPONSE_DELETE_EVENT, gtk.STOCK_OK, gtk.RESPONSE_APPLY)
    

    (Do backups first!)

    • Found an odd behavior with ST2 crashing immediately only in the Edit->Properties Options tab if I try to use my mouse wheel or the vertical scrollbar? But if I change the theme from the [...]

    There are known crashes with ST2 when switching tabs or categories. Albeit too seldom to be reproducible. Even though I got console errors once, they're in between the Python runtime and libgtk, thus virtually unfixable right now.

    This might be related. Or a theme bug perhaps. Or due to Gtk+theme running on KDE even. I wouldn't think it's the edit dialog by itself, becasue that one's pretty static.

    • I like that ST2 when adding to RTNG creates and uses the StreamTuner category and adds stations from ST2 to that, is that because it could not find a category or group? And, Is that because of the "group" settings in the Features Tab radiotray hook option? I personally would like an option specifically to always add to the RTNG StreamTuner2 group which makes it easy to find those stations added by ST2 , then I can use the RTNG bookmarks editor to rearrange them if I want.

    Yes, "group" means matching+mapping to existing groups if possible.

    I think setting it to "root" would now force it to always add to the "streamtuner2" submenu in RT.

    Anyway, if you had something else in mind, take a look at the plugin source at map_group. You could introduce your own option names there if you want some different mapping.

    • What Linux system(s) are you using with ST2?

    Mostly on Ubuntu 18.10 w/ XFCE now.

    • Does the Win32 plugin affect anything with Linux systems?

    It's mostly an alternative "exec" backend now. Some of the options specifically only work on Linux for instance. Not the win32* bunch of course. But there's no need to use this plugin on Linux usually.

     

    Last edit: Mario Salzer 2018-12-20
  • phd21

    phd21 - 2018-12-20

    Hi Mario,

    Thanks for your replies.

    Unfortunately, I still cannot add to new bookmarks group categories?

    Best regards,
    Phil (phd21)

     
  • Mario Salzer

    Mario Salzer - 2018-12-21
    • Are there any console errors?
    • What happens? (e.g. screenshots/screencast)
    • New bookmark cats showing up in bookmarks.json at all?
    • Have you cleared any obsolete ~/.config/streamtuner2/plugins/ or even settings.json?
     
  • phd21

    phd21 - 2018-12-21

    Hi Mario,

    Hope all is well with you and yours.

    I'll do a complete purge and fresh install of ST2, and get back to you...

    The new bookmark group categories do show up in the bookmarks.json but they are empty.

    I usually install all the ST2 plugins except the Windows ones, but I don't activate (checkmark) all of them.

    Thank you for replying.

    Phil (phd21)

     
  • Mario Salzer

    Mario Salzer - 2018-12-21

    Hey Phil,

    Yeah, just the usual holiday hubbub. :)

    This might just be the many gradual changes and test versions interacting. Once the plugin works it might best be shifted into core code instead. But it's just too early. (I plan on a xmas/years end release at least → without too many major changes.)

    Best!
    mario

     
  • phd21

    phd21 - 2018-12-21

    Hi Mario,

    I hope this finds you and yours doing well.

    Okay, I just completely purged ST2 from my system, which does not remove everything, so I ran console terminal commands to make sure everything was removed. Then installed the development version of ST2, ran it from the console terminal to gather all the console terminal messages for you from my Linux KDE Neon system based on Ubuntu 18.04 there is some good information in that. I put some of my comments into that text file. It is somewhat lengthy, so I will attach it as an archive file for you to review.

    I have to change my theme to something like oxygen-gtk to see pop-up messages or fly-out right-click options which otherwise are white on white.

    Is ST2 created in Python2? If so, perhaps using Python3 might be good for a future update.

    I was able to add new categories, had to restart st2. I added a "favorite2" category and could add stations from the various categories, click the top regular favourite group then click the sub-group favorite2 and they showed (yeah). So, I created a christmas category for christmas music stations, did a search for christmas and could not add them to the christmas bookmark group? So, I thought I would add them using the regular add bookmark to the regular favourite group which worked, then I would try adding them from the top favourite group to the christmas sub-group and it did not work, but I could add them to the favorite2 sub-group?

    If you want and it would help, I could create a desktop video recording of what I just did which I use the superb SimpleScreenRecorder for desktop recording.

    I hope this helps. Thank you again for all your work on this...

    I wish you and yours a very Merry Christmas and Happy Holidays !

    Best regards,
    Phil (phd21)

     
  • Mario Salzer

    Mario Salzer - 2018-12-21

    Hi Phil,

    The log is pretty helpful indeed.

    ~~~Traceback (most recent call last):
    File "/home/user69/.config/streamtuner2/plugins/new_favourite_cat.py", line 78, in <lambda>
    uikit.add_menu([self.submenu], label, lambda w,target=label: self.parent.bookmark(w, target))
    File "/usr/share/streamtuner2/st2.py", line 327, in bookmark
    self.bookmarks.add(self.row(), target)
    File "/usr/share/streamtuner2/channels/bookmarks.py", line 125, in add
    self.streams[target].append(row)
    AttributeError: 'dict' object has no attribute 'append'
    ~~~</lambda>

    What it boils down to is:

            if not have:
                bm.streams[title] = {}
                #                   ↑↑
                #  should have been []
    

    So, I just updated the plugin to v0.3.

    • You will have to delete and recreate the custom categories.
    • Or edit bookmarks.json. And replace {} with [] for the christmas category.

    Two other things I noticed:

    • You don't have soundcloud available (sudo pip install soundcloud perhaps), or remove the plugin
    • And radiosure is broken, thus throws out some recurring errors, or might crash ST2.

    This just real quick (on the jump right now).
    Nice holidays in advance!


    Edit: you probably need to update with the new -dev version to make the subcategory plugin work; there was some code shuffling.

     

    Last edit: Mario Salzer 2018-12-21
  • phd21

    phd21 - 2018-12-22

    Hi Mario,

    Update: Apparently Ed Bruck has added a "play in" option to RTNG
    How to import existing streaming radio playlists? · Issue #92 · ebruck/radiotray-ng
    https://github.com/ebruck/radiotray-ng/issues/92#issuecomment-449599532

    Okay back to ST2, thank you so much for the new update. I went through removing ST2 and re-installing with the newer dev file.

    I could add new bookmark favorite sub-group categories, but if I exited and restarted they disappeared? If added a new favorite sub-group and added a station to it, it was retained after restarting? I could also add to the new favorite sub-groups stations from the search results which is very cool. So, overall much better. I still have to restart ST2 sometimes for adding a new favorite sub-groups, and some other stuff, anyway to not have to do that?

    I was wondering if there are add-ons that are specific to MS Windows or Linux, if so, what are they and is that well defined in the plug-in description? Like is the ST2 soundcloud and or PodSpider (podcast) option specific to MS Windows? For Linux users gpodder (gpodder --help) might work (has a "gpo" console terminal command, "gpo help"); gpodder may also work for soundcloud on Linux so they claim.

    The gPodder User Manual
    https://gpodder.github.io/docs/user-manual.html

    Subscribe And Manage Podcasts Using gPodder
    https://www.lifewire.com/subscribe-and-manage-podcasts-using-gpodder-4066928

    Would be nice to have an option to have the favicons updated automatically.

    Best regards,
    Phil (phd21)

     

    Last edit: phd21 2018-12-24
    • Mario Salzer

      Mario Salzer - 2018-12-31

      Hi Phil,

      Sorry for responding so late. Holiday time!

      Release 2.2.1 is sort of done now.
      Any further feature fine tuning will go through the plugin manager.


      Update: Apparently Ed Bruck has added a "play in" option to RTNG
      How to import existing streaming radio playlists? · Issue #92 · ebruck/radiotray-ng
      https://github.com/ebruck/radiotray-ng/issues/92#issuecomment-449599532

      Just adding this to the radiotray hook plugin. Haven't tested it yet.


      I could add new bookmark favorite sub-group categories, but if I exited and restarted they disappeared? If added a new favorite sub-group and added a station to it, it was retained after restarting?

      There is no immediate .save() after adding a category. It just prepares the entry. Unless something is added (or edited rather) in the bookmarks channel, it will not end up on disk. Which does not strike me as a big issue for now.

      I would consider the current implementation temporary anyway.

      I still have to restart ST2 sometimes for adding a new favorite sub-groups, and some other stuff, anyway to not have to do that?

      Reload categories might help if new categories do not show up right away. The "bookmark to"-submenus should always update.


      I was wondering if there are add-ons that are specific to MS Windows or Linux, if so, what are they and is that well defined in the plug-in description?

      There isn't much platform-specific code anywhere. Some feature plugins might depend on Python modules that aren't available everywhere. DBUS/Radiotray being one such exception.
      Other than that the plugin documentation should yield some infos or hints at least.

      Like is the ST2 soundcloud…

      Wouldn't think this is very Linux-specific. Although I haven't checked if it runs on Windows. Also it's just used by reddit occasionally.

      and or PodSpider (podcast) option specific to MS Windows?

      The application doesn't matter. It's just about the xml date file.

      or Linux users gpodder (gpodder --help) might work (has a "gpo" console terminal command, "gpo help"); gpodder may also work for soundcloud on Linux so they claim.

      Not sure if there's any use for that. And to be honest, I don't think podcasts were ever requested in ST2. That was just an experimental one-off plugin.

      The gpodder.net API might be workable for ST2, but I don't think competing with or interfacing with gpodder itself (really just a RSS/OPML parser with built-in player) makes sense.


      Would be nice to have an option to have the favicons updated automatically.

      That would slow down the UI considerably and pump up memory usage. Could be an option of course, but I think Channel > Update favicons... usually suffices. I'd personally just use this for one or two categories in some channels. Due to lack of station homepage links it doesn't work in half of them anyway.


      And happy new year in advance!

       

      Last edit: Mario Salzer 2018-12-31
  • phd21

    phd21 - 2019-01-01

    Hi Mario,

    Happy New Years to you and yours!

    Sorry for responding so late. Holiday time!
    Release 2.2.1 is sort of done now. Any further feature fine tuning will go through the plugin manager.

    No problem and totally understandable. I hope you and yours are doing well.

    Just adding this to the radiotray hook plugin. Haven't tested it yet.

    I read your reply to Ed's, looking forward to this and I like your idea of "This might even warrant a --play_url CLI option to make Radiotray invokable as generic audio player.". Please let me know when your updates are ready and how to get them, and I'll test it asap.

    I am assuming that I have to re-download, recompile and re-install RTNG again, correct? Do you know if these these RTNG changes "ffd743c" are now part of the 0.2.5-dev branch, in other words how do users get this RTNG update "ffd743c"?

    As for the podcast stuff, I agree with your comments on this. There are plenty of good stand-alone podcast client apps and a lot of the existing music applications can already handle those. I was bringng it up because your ST2 also has that option which seemed geared more towards MS Windows users whereas gpodder would work cross-platfrom and maybe another option for soundcloud too. I could even understand you removing podcast options from ST2, maybe take a forum poll to see if anyone is using that feature.

    I also agree with your assessment of the auto-update of the favicons idea might add unnecessary system overhead.

    Best regards,

    Phil (phd21)

     
  • Mario Salzer

    Mario Salzer - 2019-01-02

    […] Please let me know when your updates are ready and how to get them, and I'll test it asap.

    If nothing shows up in the plugin manager, you can always download from the repository:

    […] know if these these RTNG changes "ffd743c" are now part of the 0.2.5-dev branch, in other words how do users get this RTNG update "ffd743c"?

    Indeed. The -dev branch contains the mentioned commit.

    […] soundcloud too. I could even understand you removing podcast options from ST2, maybe take a forum poll to see if anyone is using that feature.

    I'll probably prune that plugin if it's misleading. Moreover it's likely outdated.

    I would rather wait for someone to make a gpodder plugin, rather than do one myself. Albeit the usual podcast grouping (category→podcast→release) does not fit well into ST2s channel→category→station layout. (Would incur heaps of initial scanning and longwinded category trees).

    Then again, the API seems very workable (though not based on / compatible with anything else).

    I also agree with your assessment of the auto-update of the favicons idea might add unnecessary system overhead.

    You could try a specbuttons commnad like favicon.update_all(1). Though even that might fail. The favicons support is somewhat recent and not very well integrated. Just a gimmick really.

     

Log in to post a comment.