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:
Bryan Schumaker 2011-05-07 15:54:26 -04:00
parent 4d2558a693
commit 41e08fe248
2 changed files with 6 additions and 4 deletions

View File

@ -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()

View File

@ -13,6 +13,7 @@ function gen_ocarina()
OUT="ocarina.py"
echo "#!$PY" > $OUT
echo "import ocarina" >> $OUT
echo "ocarina.run()" >> $OUT
chmod +x $OUT
}