Ocarina: Start through a function call
I was starting Ocarina through "import ocarina" in the launcher. This was apparently a bad idea, since the import lock will never be released. This lock prevents other threads from importing modules, so when I tried to use urllib2 to download album art the call blocked until after I closed Ocarina.
This commit is contained in:
parent
4d2558a693
commit
41e08fe248
|
@ -25,7 +25,8 @@ import queue
|
|||
import library
|
||||
import callbacks
|
||||
|
||||
callbacks.on_get_art("images/ocarina.png", 0)
|
||||
libsaria.startup()
|
||||
print "Startup took:", uptime()
|
||||
gtk.main()
|
||||
def run():
|
||||
callbacks.on_get_art("images/ocarina.png", 0)
|
||||
libsaria.startup()
|
||||
print "Startup took:", uptime()
|
||||
gtk.main()
|
||||
|
|
|
@ -13,6 +13,7 @@ function gen_ocarina()
|
|||
OUT="ocarina.py"
|
||||
echo "#!$PY" > $OUT
|
||||
echo "import ocarina" >> $OUT
|
||||
echo "ocarina.run()" >> $OUT
|
||||
chmod +x $OUT
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue