From dc8a69bc0d22c565081a732ec7ea0136f0e268b8 Mon Sep 17 00:00:00 2001 From: Bryan Schumaker Date: Sun, 24 Apr 2011 19:08:09 -0400 Subject: [PATCH] ocarina: Refresh library after loading To show changes. I also use the v1.3 decoder function to decode exported libraries. --- libsaria/path/export.py | 2 ++ ocarina/callbacks.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/libsaria/path/export.py b/libsaria/path/export.py index e1f568c6..8025a211 100644 --- a/libsaria/path/export.py +++ b/libsaria/path/export.py @@ -207,3 +207,5 @@ def import_library(child): decode_v1_2(child) elif version == "1.3": decode_v1_3(child) + elif version == "4.4": # No library format change from 1.3 + decode_v1_3(child) diff --git a/ocarina/callbacks.py b/ocarina/callbacks.py index 7af7aa56..2ec46010 100644 --- a/ocarina/callbacks.py +++ b/ocarina/callbacks.py @@ -5,6 +5,7 @@ import queue from ocarina import body from ocarina.body import footer import playlist +import library invite = libsaria.event.invite @@ -40,3 +41,7 @@ invite("POSTGETART", on_getart) def on_load_playlist(*args): playlist.refresh() invite("POSTLOADPLAYLIST", on_load_playlist) + +def on_load_library(*args): + library.refresh() +invite("POSTNEWSOURCE", on_load_library)