-
Notifications
You must be signed in to change notification settings - Fork 21
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
Display of additional metadata (genre, audio/data service types) #16
Comments
May have also found a small bug that prevents album art from updating properly. Currently, it updates the album art after switching from the initial logo image, but self.xhdr_changed towards the end of update() may be preventing it from updating it after that. Might be a timing thing where the image changes before XHDR does, in which case it never gets past the test. Recommend changing |
Would it be possible for you to make a pull request with these changes? |
How about a patch against the v2 baseline of main_form.glade and nrsc5_gui.py... [Don't know if this needs to be said, but if your patch creates new files, it will create something with "_new." added to the filename. After applying, you may have to rename the originals as "_old.", then remove the "_new" part from the new ones in order to run them.] |
Could you provide the nrsc5.py file as well? It gives me errors every time I try to get the Data Svcs working, telling me that the data couldn't be found. |
You might as well pull down the whole v2.0.0 baseline again and make sure you've updated the nrsc5 to it's latest version (I think it's 2.7.5). It sounds like you may have broke something. I didn't modify nrsc5.py at all, and it wouldn't be appropriate for me to re-post it here. |
I applied your patch and the new features seem to work well (if the station broadcasts that info.) I feel like this is ready for a PR. The only thing I think would be a nice change is to lessen the space (padding?) around the album art. I feel like with a little more improvement overall this program would make a cool app for the GNU/Linux Smartphones. |
Cheers. And I tend to agree about the white space around the album art. As I've said, I'm no Python guru, but there might be a way to stretch the image to proportionately fill the area. |
changing |
I've even tried setting GtkImage properties vexpand and hexpand to TRUE, valign and halign to GTK_ALIGN_FULL to see if I couldn't get the thing to stretch to the full size, then just direct load the img_cover and logo using set_from_file()... no joy. |
BTW Can using InterpType.BILINEAR instead of InterpType.HYPER and see if the blurriness goes away. |
Hey Mark. What OS are you using for this? I'm using Kubuntu 20.04 and I've had nothing but errors trying to get the patch applied. It's not able to find any of the station data from my RTL SDR, even on confirmed stations with HD. Also, making a pull request would be highly suggested so that the creator's of this program can promptly update their program. And, I'm curious how you're not a python guru but you know more about python than me and I've been doing it for 4-5 years now. |
I'm on a MacBook Pro, but that should be irrelevant if you've pulled down (and built from) the most recent code, and are using Python3 (not 2), since that's what I worked from: |
Changing HYPER to BILINEAR did not change anything at least for me. |
ok... think I got the image thing partially solved:
in def display_logo:
and in def check_status:
Adding a callback to redraw the image on a window resize should be trivial, but this being Python and not true Gtk/Gdk I'm having a mental block at getting the syntax right atm. |
Yeah, it's minimal. BILINEAR should be a little quicker in terms of clock cycles though. |
Now I'm thinking how:
|
Make your changes and generate a diff. I'll be glad to test it out. |
Got the callback sorted: All in nrsc5_gui.py...
then, as with logo, save image_path to cover_img:
|
Might be a tomorrow problem. Definitely like the button idea though. Constantly looking at the info tab was getting kind of cumbersome. That said, I've noticed an interesting phenomenon with a station in NYC where the stream name and stream description don't correlate to the same stream index. WNSH 94.7 has CBS Sports on stream index 2, but the description for it is on index 1. Even stranger, Wikipedia says it's no longer in use, even though the station is still transmitting the confusing markers. Weird. |
Incorporated all the changes above, plus added the 'return to tune' & the stream buttons. Not totally thrilled with the way the buttons work because they'll expand the whole window if the station uses long names, but it's a start. Diff is as before: Created against most recent versions of main_form.glade and nrsc5-gui.py here on github. If my previous diff was applied, unsure what re-applying this would do depending upon your version of diff, etc. So it's best to start by pulling down raw versions of these files from the Code section as the baseline, and apply the patch against that. Once applied, you will have to realign the file names: Rename the original files to *_old to save them, and remove the *_new part of the patched ones. Enjoy. |
I like the new buttons! This works great for me! Thank you for your contribution! I do think the album art is a little big though but that is okay. Also it would be a nice touch if the button stayed highlighted when on a station but that's not necessary either. Now I just need to work on fixing Which for some reason is happening more but as I continue my testing it could be my environment that could be causing it. Not sure tbh. I plan on testing this application on a RPi when I get one and maybe a PinePhone if I ever get one of those. (I wish Linux Phones had SDRs built into them. Even if it is just one of those cheap DVB tuners...) |
If you want to re-insert a 6-pixel border, find the three places where |
So, the part that bothered me about the buttons was that they couldn't serve as an indicator of what stream was being used - like the preset buttons on an old school car radio. I've fixed that by changing them to toggle buttons, then eliminated the stream spinner, which truly became redundant. This also includes the 6-pixel space around the album art, described previously. Patch attached. Usual disclaimers apply. |
Created pull requests for both of these (main_form.glade and nrsc5_gui.py), but have no idea if I've done it correctly. |
Still not totally thrilled with the Frequency spinner being alone with a lot of white space around it. Thinking about possible ways to help fill that space: Add a text box to the right of the spinner, showing the station name (and slogan?), then add a small pilot image to show when the radio acquires/loses synchronization in the lower left corner (where the station name is now)... If anyone has any other ideas. |
Added these to the pull request... I think. |
Updated in the current pull request:
|
Can you give me a diff for these changes? |
Nevermind, I just pulled down the code from your repo. I like the changes. I'm onto something for the PyAudio problems but it's still W.I.P. |
Cool. Guess I’ve set it up correctly. Was afraid the increments wouldn’t take. One other thing I’d like to add is a way to group the bookmarks. I’m in NJ now, but all my bookmarks are for Virginia. This way you can have different sets of bookmarks for different locations, different station types, or whatever you want. As for the PyAudio, are you sure it’s not an issue with the signal. I get rhythmic dropouts on some stations, but I just assume it’s from intermittent adjacent station interference and/or spurs on one of the sidebands. The RTL-SDR is kind of funky for these kinds of things and I find myself constantly adjusting the rabbit ears that come with it. This is one of the reasons why I’d really rather use an AirSpy HF+ Discovery... signal’s a lot cleaner. |
A few days ago, I found that setting the |
Didn't notice the odd-ball sample rate. I would think that 44100 or 48000 would be standard. Anyway, wrapped img_map in a scrolled window, adjusted some resize things and now have prototype stretchy travel and weather maps. I'll post the changes after I've tested it some. |
Yes - If you want even more features and audio stability, check out the new fork. We could always use more testers. |
The Traffic/Navigation that station provides is via NavTeq/HERE, which is currently unsupported by nrsc5. It only supports maps from Total Traffic and Weather Network on iHeart Media stations. There was an issue in the version I posted here in that it was pulling info from a data type description, not the actual name of the service. As @andrewfer000 states, it's 'fixed' in the new fork. |
Pretty new to this and late to the party...
After a few days playing around with this, was thinking about adding the following:
I'm not a Python developer, but I've made some preliminary changes to nrsc5_gui.py and main_form.glade to display these things. I can provide a diff to the one provided in 2.0.0 if interested.
Some images:
The text was updated successfully, but these errors were encountered: