JeffHoogland / qAndora

Pandora player written in Python and QT that uses VLC as a streaming backend
Other
16 stars 2 forks source link

Interested in contributions? #9

Closed JasonLG1979 closed 9 years ago

JasonLG1979 commented 9 years ago

Over the last week or so I've been hacking around on qAndora and I've come up with (IMHO) a few improvements/changes.

Here's what I've implemented so far.

Event driven song changes with the VLC audio backend. No more depending on constantly comparing the song position to the song duration. (The same thing can easily be done with gstreamer with the signal bus.)

Only check the song duration once per song. Your code was calculating the song duration every time you checked the song position.

Use the system icon theme for platforms that support it and fall back to your icons for platforms that don't.

Album covers in pynotify desktop notifications.(when no cover is available it reverts back to just text.)

Don't show currently playing songs in the history list.

Redesigned the UI again with a couple extra buttons. A dedicated info button and a mute toggle button and put song info in the window title.

Added the album cover and song info to the tray icon menu. When clicked it takes you to the song info page.

Broke up your functions a little bit to make it easier to understand and more modular.

Here's a screenshot qmuze

Let me know what you think and if you're interested.

JeffHoogland commented 9 years ago

Those changes look really slick! Make a pull request and I'll merge them and confirm they work as expect on Linux/Windows still as expected.

I've had qAndora on the back burner while getting ready for my Bodhi release, but I was planning to clean things up a bit after that, thanks for doing that already :)

The two "new" things qAndora really needs are:

Cheers!

JasonLG1979 commented 9 years ago

I kinda fixed the login part already. If the login fails the login window just pops back up.

JeffHoogland commented 9 years ago

That is perfect :+1:

JasonLG1979 commented 9 years ago

A couple other things I forgot.

I'm working on getting more meaningful error messages out of it. But for now when I do get an error when trying to login or add songs a window pops up and tell you to close qAndora and try back in a while.(most likely requesting too many playlists from constantly opening and closing to test stuff.)

And I set it so that clicking the close window control minimizes it to the tray instead of quitting.

It'll take some time for me to break up the changes into digestible pieces. I'm horrible at just making huge changes and not keeping track of them.

Up next on my to do list is a new icon and Pandora one support. After that a port to python3 and qt5. Although creating/managing stations is a nice feature.

JeffHoogland commented 9 years ago

I started with pyside+python 2 so I could support my older devices like the N900/N9.

Personally I still don't see the draw to python 3. What features are you looking to gain by moving to python3/Qt5? Wouldn't it be better to just invest that time into making the existing application more functional?

JasonLG1979 commented 9 years ago

I agree. The ports are distant goals. It makes more sense to build on what you have and then at sometime in the future port when you have to. There's something to be said about sticking to qt4 and python2, least common denominator and all. And at this point I wouldn't touch Gstreamer 1.0 with a 10 ft pole for audio streaming. Any version beyond what ships with Ubuntu 14.04 has a wicked bug that locks up Pithos. Something to do with the download buffer. I've been pretty happy with the VLC backend in qAndora especially since the whole event driven song change thing.

JasonLG1979 commented 9 years ago

I'll do the pull requests one change at a time when possible. I'll wait for you to review each change and merge it(or not,lol!!!) before I do another request.

JeffHoogland commented 9 years ago

The first two requests you did are pretty minor. In all honesty I'm OK with not updating the GStreamer backend and just focusing on VLC as that has better crossplatform support than GStreamer does anyways.

JasonLG1979 commented 9 years ago

I agree VLC has always been pretty much rock solid in my opinion.

I'm keeping them small because there's A LOT of changes.

JasonLG1979 commented 9 years ago

I can do a massive dump to my fork and you can test it out and see what you think, it would be faster?

JeffHoogland commented 9 years ago

Yea that would likely be best. I can just compare the changes then.

Fair warning I am going to be out of town tomorrow and Sunday so I will likely not get to looking the changes over till late Sunday night/Monday morning.

JasonLG1979 commented 9 years ago

That's cool. I'll get to dumping,lol!!!

JasonLG1979 commented 9 years ago

Well, the dump is done. It's still a little rough around the edges. For example:

I've noticed that Qtimer pretty much sucks at keeping time. Threading it out with the invoker and restarting it at the beginning of each song seems to help but even so every now and then it gets stupid and doesn't keep straight time. The GTK equivalent has no problem keeping time.

I removed the text sizing for different platforms. I think it's best for the OS/user to decide font sizes.

I have no way to test on any other platform/OS than Linux(Kubuntu 14.04) Your milage may vary on any other system.

You'll need to add buttons to your alternative UI's and you'll need to find icons for the mute toggle button.

Also looking into finding a way to insure only one instance is allowed to run at a time.

And I combined the login and pref windows. pref

JasonLG1979 commented 9 years ago

Oh and I'm also kicking around a few main icon redesign ideas.

JeffHoogland commented 9 years ago

They all sound like positive changes - haven't dug into things yet though.

What exactly are you using QTimer for? I don't recall using that for anything.

JasonLG1979 commented 9 years ago

It was in there. QTimer does the track time updates. Before the event driven song change deal you also used it to compare the song position to duration to decide if the song should be changed.

JeffHoogland commented 9 years ago

Ahh alrighty, forgot about that.

JeffHoogland commented 9 years ago

Cloned your latest branch and playback is working as expected and the UI seems like an improvement. Your icon's do not seem to like my default icon set though:

http://www.enlightenment.org/ss/e-54d835099344a5.53533127.png

JeffHoogland commented 9 years ago

The assign widgets function does not have the proper fall backs defined looks to be the issue. We will also need to add fallbacks for volume/mute.

JeffHoogland commented 9 years ago

I've merged your changes into my main repo. I fixed the icon issue as well as logging out/logging back in not working properly.

I also added a "show/hide" option to the systray so qAndora can be shown again when it is hidden on systems using libappindicator

JasonLG1979 commented 9 years ago

Cool. I knew there would be a couple rough edges.

JasonLG1979 commented 9 years ago

Next up is figuring out how to make sure only one instance is allowed to run at a time. As it sit(at least on Kubuntu 14.04) you can have multiple instances running at the same time.

JasonLG1979 commented 9 years ago

Question on the enlightment DE. It doesn't follow freedesktop.org icon naming spec? Because the defaults should just use whatever the icon theme calls for by generic name.

JasonLG1979 commented 9 years ago

I'm going to call this closed. We got a lot done. Any more changes and I'll bring them up individually.