add polemic_version to serialization
authorymh <ymh.work@gmail.com>
Wed, 30 Dec 2015 13:10:34 +0100
changeset 1471 9d7b1d5579e9
parent 1470 4b24a724f2b8
child 1472 2a74f44d6356
add polemic_version to serialization
src/ldt/ldt/__init__.py
src/ldt/ldt/ldt_utils/projectserializer.py
--- a/src/ldt/ldt/__init__.py	Mon Dec 28 19:24:20 2015 +0100
+++ b/src/ldt/ldt/__init__.py	Wed Dec 30 13:10:34 2015 +0100
@@ -1,6 +1,6 @@
 __all__ = ["VERSION", "get_version", "__version__", "default_app_config"]
 
-VERSION = (1, 60, 0, "final", 0)
+VERSION = (1, 60, 1, "final", 0)
 
 
 def get_version():
--- a/src/ldt/ldt/ldt_utils/projectserializer.py	Mon Dec 28 19:24:20 2015 +0100
+++ b/src/ldt/ldt/ldt_utils/projectserializer.py	Wed Dec 30 13:10:34 2015 +0100
@@ -202,6 +202,8 @@
                 else:
                     element_source = None
 
+                element_polemic_version = reduce_text_node("meta/polemic_version/text()")
+
                 element_audio_src = ""
                 element_audio_href = ""
                 res = element_node.xpath("audio")
@@ -292,6 +294,8 @@
 
                 if element_source:
                     new_annotation['meta']['dc:source'] = element_source
+                if element_polemic_version:
+                    new_annotation['content']['polemic_version'] = element_polemic_version
 
                 # Metadatacomposer features. An annotation can have the usual datas (title, description...)
                 # and new kinds of extra metas : video, audio, text, links array, images slideshow