--- a/src/ldt/ldt/__init__.py Tue Jan 22 13:03:10 2013 +0100
+++ b/src/ldt/ldt/__init__.py Tue Jan 22 13:03:55 2013 +0100
@@ -1,4 +1,4 @@
-VERSION = (1, 45, 0, "final", 0)
+VERSION = (1, 46, 0, "final", 0)
def get_version():
--- a/src/ldt/ldt/api/ldt/resources/annotation.py Tue Jan 22 13:03:10 2013 +0100
+++ b/src/ldt/ldt/api/ldt/resources/annotation.py Tue Jan 22 13:03:55 2013 +0100
@@ -95,6 +95,13 @@
content = project.contents.get(iri_id=a['media'])
+ # We update the ids
+ a['type'] = type_id
+ a['ensemble'] = ensemble_id
+ a['id'] = new_id
+ if not a['content'].has_key('audio') :
+ a['content']['audio'] = {'src':audio_src, 'href':audio_href}
+
#add segment
add_segment({
"project" : project,
@@ -113,13 +120,6 @@
"audio_href" : audio_href,
"polemics": adder.get_polemic_syntax(a['content']['title'])
})
-
- # We update the ids
- a['type'] = type_id
- a['ensemble'] = ensemble_id
- a['id'] = new_id
- if not a['content'].has_key('audio') :
- a['content']['audio'] = {'src':audio_src, 'href':audio_href}
# We save the added annotation and reprotect the contents and projects
adder.save(must_reindex=False)
--- a/src/ldt/ldt/ldt_utils/views/json.py Tue Jan 22 13:03:10 2013 +0100
+++ b/src/ldt/ldt/ldt_utils/views/json.py Tue Jan 22 13:03:55 2013 +0100
@@ -178,6 +178,8 @@
cur_out = cur_in + dur
if tc_in<=cur_in and cur_out<=tc_out and ((not remove_zero_dur) or (remove_zero_dur and dur>0.0)):
mashup_list["items"].append(res["element_id"])
+ if mashup_dict["lists"] is None:
+ mashup_dict["lists"] = []
mashup_dict["lists"].append(mashup_list)
# If asked, we remove the annotations not used in the mashup.