Skip to content
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

Probe player paths in a non-UI thread #78

Merged
merged 4 commits into from Oct 30, 2015
Merged

Conversation

@tari
Copy link
Contributor

tari commented Oct 23, 2015

Move calls to getPlayerIconByPath into a background thread so the GUI doesn't lock up when those calls take a long time.

This is particularly important for supporting remote players which are specified by URL, like Kodi. Determining if a player exists at the given path requires hitting the network, and invalid paths often require a timeout to determine they are indeed invalid. It may also be useful with slow filesystems.

While the thread is working, the player icon is replaced with an animated spinner to indicate it's busy:
spinner. (The actual version looks better than this gif since it has transparency.)

tari added 3 commits Oct 16, 2015
Network operations tend to be extremely slow when checking all user
inputs for player path, so perform those checks in a non-UI thread so
the GUI remains responsive. While queries are ongoing, the icon is a
"busy" spinner.
Spawning a lot of threads tends to be inefficient and they often get
serialized, so have a single thread that always looks at the latest
path only.
@Et0h
Copy link
Contributor

Et0h commented Oct 24, 2015

Thanks for this. What's the copyright license on the .mng file and who was the author?

@tari
Copy link
Contributor Author

tari commented Oct 24, 2015

I created it myself with the tool here (and imagemagick to turn it into an mng) which seems to have disappeared in the past few days. From an archived version, its output can be used freely:

  • You are free to copy and redistribute any images generated from SpiffyGif in any medium or format, even commercially.
  • You are permitted to remix, transform, and build upon images generated from SpiffyGif for any purpose, even commercially.
@Et0h
Copy link
Contributor

Et0h commented Oct 24, 2015

Oh, excellent :)
On 24 Oct 2015 17:11, "Peter Marheine" notifications@github.com wrote:

I created it myself with the tool here http://spiffygif.com/ which
seems to have disappeared in the past few days. From an archived version,
its output can be used freely:

  • You are free to copy and redistribute any images generated from
    SpiffyGif in any medium or format, even commercially.
  • You are permitted to remix, transform, and build upon images
    generated from SpiffyGif for any purpose, even commercially.


Reply to this email directly or view it on GitHub
#78 (comment).

@Et0h
Copy link
Contributor

Et0h commented Oct 27, 2015

I note that the spinner.mng resource has not been added to the list of resources to be included in BuildPy2exe.py. If Uriziel is otherwise happy with the PR then this would be an easy thing to fix, though.

Et0h added a commit that referenced this pull request Oct 30, 2015
Probe player paths in a non-UI thread
@Et0h Et0h merged commit af52617 into Syncplay:master Oct 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.