markjfine / nrsc5-dui

An enhanced, user-friendly version of nrsc5-gui that is not heavily dependent upon Python processing for audio generation.
GNU General Public License v3.0
139 stars 9 forks source link

Testing Notes #1

Closed andrewfer000 closed 3 years ago

andrewfer000 commented 3 years ago

Thank you for doing this! The audio works very well.

My System- Ubuntu 20.04

I do have only one issue I see right now and it's this

Mar 27 17:22:02 : Error: Unable to load station logo database
Mar 27 17:22:02 : Error: Unable to load config
Mar 27 17:22:43 : Error: Unable to save config

Not sure if this is a WIP still but I cannot save favorites or save the station logos. The album art works fine though. Do you know any fixes? besides that it works awesome!

markjfine commented 3 years ago

Maybe picking the first thing it comes up with is not the right thing to do

andrewfer000 commented 3 years ago

Another interesting feature would be if Discogs could fill in missing information about a song such as the Album and Genre. For example, 104.5 ALT-FM displays a song like this

Title: Mr Brightside Artist: The Killers Album: Genre:

The new information from Discogs (if possible) would fill in the missing infos

Title: Mr Brightside Artist: The Killers Album: Hot Fuss Genre: Pop Rock (or whatever the site classifies it as)

This might be asking too much so don't take this request too seriously unless it will not be a hassle to implement with the downloaded album art.

andrewfer000 commented 3 years ago

Also i am thinking about buying a Raspberry Pi and this screen or this one in hopes that I can make my own Free Software powered handheld radio.

markjfine commented 3 years ago

The extra info can be done, especially the album name. I can add it later once this checks out. There may be a lot of instances where the Artist name doesn't lash up and I have to throw it out and let the station do it. Right now if I don't find a valid match, I load the station logo as filler. Eventually a miniature version of the logo will be up top next to the station call, full time.

If this kind of thing works, I may be able to fill the logos that some lazy stations don't provide from somewhere like wikipedia.

markjfine commented 3 years ago

It's up there.

andrewfer000 commented 3 years ago

Yes, and also if/when you implement FM+RDS the internet data can be used to match a song name to an album art. So it could end up being a more useful feature for future features.

andrewfer000 commented 3 years ago

So the new artwork downloads but the station art takes priority which is what I was worried about. This is a good feature, but I think the album art database I mentioned above may have to be implemented as well in order for this feature to work flawlessly.

markjfine commented 3 years ago

I can make it switch between just one way or the other full time. However, if it doesn't find a match I think you'd want the station one's there as backup. I've kept the repository idea in mind though, because I can always change the way the art provided by the station is saved to fill in the gaps using the same scheme.

I just need to see if this is stable first.

andrewfer000 commented 3 years ago

I like the new feature that grays out the buttons if they are unused. Makes this program a lot more user friendly!

Btw how's the Airspy + nrsc5 comparability going? I know it's been one of your priorities in regards to this project.

markjfine commented 3 years ago

Still in the thinking stage. I think I found part of the problem with the RTL. I think it's overheating, causing it to detune. If it's not overheating, it's getting pretty hot. Almost too hot to touch.

markjfine commented 3 years ago

Speaking of which, I keep the RTL disconnected to keep it cool when not in use. Got tired of the app crashing when I forgot to reconnect. Or, if I'm in a VM and forgot to give it access to it. Just added device detection where if you hit play and no RTL is found, it will turn the pilot red as conk on the head (senior moment) to reconnect the @#$%$% thing.

andrewfer000 commented 3 years ago

I just pulled down the latest code and was using the online album art feature and noticed a small problem. When the song ends the display does not change back to the station logo but it will change when a new songs starts or the program is restarted. I'm assuming the station logo logic just needs to be tweaked to reflect the changes the the album art.

markjfine commented 3 years ago

The answer is, it depends.

The way the original one was set up, it would show on initial play, but only if it was saved. Then it would only show when the logo was broadcasted.

The new way just adds to this a cover check when/if the track info changes. If a cover exists (it looks in aas first, then online) for the first artist listed, it uses that. If the cover search comes up blank it uses the station logo by default.

If the station sent a cover or logo after the track info changes, it will replace whatever is there.

If the station changes the track info to something nebulous (like a station id/slogan thing), it should change to the logo because a cover won't be found. But if it switches to the next track without that segue, it will just try to change to the new cover.

If they fail to change the track info, nothing changes until either they send an image, or the track info finally changes.

markjfine commented 3 years ago

Worthwhile to add that eventually I'm going to unmesh how logos and covers are used when I redo the album art tab. It's a precursor to everything else.

The logo really should be next to the station call full-time, (wherever that is - either I keep it up top or move it above the cover art). The covers should be full-time as the larger image on the album art tab. The only reason you would use the logo where the covers go is just filler for when there's no cover available, or it's just station personalities yammering. Unless of course the show itself has some artwork associated with it, like a podcast has.

The logic I've set up will work a lot better once I finally separate the two, but that's almost a total rewrite of how it's done. Right now there's an XHDR message and a LOT message that tells you whether it's a logo or a cover image, for which stream it's associated, as well as some logic to whether it should be displayed. Because this application was basically set up as a reactive way to deal with the messages, they treat them interchangeably when in fact the logic should be completely different. This is also why the logos only get assigned iff it's for the stream that's currently being played, despite the fact the nrsc5 has already dumped all of it to the aas directory. If it's not for the current stream, the application just ignores it.

The next logical step after the redesign and getting the logos fixed would be to finish redesigning the art repository so the cover art that the station produces is more integral to the way the online feature works.

Once all of this is done it should start to have the seamless look and feel of an actual HD Radio.

andrewfer000 commented 3 years ago

That'll be great! What I mean is, when a downloaded album art is applied, the station art does not come back when the song ends and the title / artist changes back to the station info. Almost like since the station art is not downloaded from the internet the program does not apply it.

markjfine commented 3 years ago

That's curious. Would you have happened to notice any errors in the terminal or the log?

markjfine commented 3 years ago

Never mind... just saw it happen. No errors. It just never switches. ugh.

andrewfer000 commented 3 years ago

I figured out a "fix" I made a copy of the station logo and renamed it in the stile of the downloaded artwork and it works flawlessly. I.e for WRFF Alt 104.5 i made a copy of 529_SLWRFF$$0111170000.png and called it Philly's_Alternitive_Rock_-_Alt-104.5.png and it work fine.

markjfine commented 3 years ago

Lol... but that's cheating. Actually, I think there's a timing issue where the trigger that sets that the track info changed gets set to false by the time it gets to the cover routine that changes it, so it never happens.

markjfine commented 3 years ago

Put a new one up there. Might want to move the png you created to another directory before trying this to see if it fixes it for you.

andrewfer000 commented 3 years ago

No it did not seem to fix it consistently.

markjfine commented 3 years ago

Only one or two other conditions could be causing it. One I can control, the other may be the station... the timing of when they update the logo and how it's actually updated in the program. There's some weird threading in there.

markjfine commented 3 years ago

Make that three: Just saw the station logo flash for a second but quickly get replaced with a station-generated cover of the preceding song.

andrewfer000 commented 3 years ago

Hey Mark, it's been awhile and I hope you are doing well. I have using the program with downloaded album art and it has been working very well. I do have a suggestion for the web album art though. A subroutine or thread that scans the title and artist every few minutes and checks for an album art. If it's there it is displayed if not it downloads and displays it. I've been kinda hinting at a feature like that for awhile but I couldn't think of a good way to describe it.

The reason I mention this is because stations like BEN-FM that do not have album art will not display any album art if the station does not natively support it. I was hoping the album art download would of been the fix for that.

markjfine commented 3 years ago

I'm ok, just got diverted a bit to other things.

As long as the station is transmitting Artist and Title, then it should already be downloading album images whenever those things change as far as the app is concerned.

If that's not happening, I'll investigate why. Can you capture a screenshot of the track info section for one that isn't?

andrewfer000 commented 3 years ago

Seems like downloading of album art does not work at all now and I'm getting this console error.

Traceback (most recent call last):
  File "nrsc5-dui.py", line 302, in on_cover_resize
    self.showArtwork(self.coverImage)
  File "nrsc5-dui.py", line 410, in showArtwork
    self.pixbuf = GdkPixbuf.Pixbuf.new_from_file(art)
gi.repository.GLib.Error: g-file-error-quark: Failed to open file “/home/owner/Desktop/nrsc5-dui-main/aas/_-_.jpg”: No such file or directory (4)
markjfine commented 3 years ago

Lol. I suppose I should check for when the title and artist changes or at least parses to "", even if it's temporary.

markjfine commented 3 years ago

So there's another reason why it no longer works. Discogs is likely blocking the python user agent as a malicious bot. The current search string works in a browser, but returns a 403 in app.

Can't really blame them if I'm honest. If I was their security guy, I'd block it.

Maybe I can change the UA to something that looks less bot-like.

markjfine commented 3 years ago

yeah, that's not working either

andrewfer000 commented 3 years ago

Personally I wouldn't mind populating missing album art myself and that's why I would like to have a more organized artwork database like I mentioned before. But honestly this program works very well and serves it's purpose better than the old version which is enough to make me happy. The only features I would want at this point are -

But I do not really consider these high-priory or super necessary, But it would be nice to have them since there will finally be a true, user-friendly, SDR based broadcast radio application and I think that could be a huge plus for SDR newbies or people who just want to listen to broadcast radio on their PC.

Also, I am thinking of closing this issue and starting a new one, This thread has 80 posts now and it's getting messy.

markjfine commented 3 years ago

lol. understand.

That said, the whole automated album art thing might be dead in the water if I find another source and they block me as well. It would have to be solely a user-populated thing like in iTunes, which would get old real quick.

andrewfer000 commented 3 years ago

---- Closing issue due to getting to large - starting a new issue called "Testing Notes 2" ----