diff options
author | Christophe Guiraud <christophe.guiraud@intel.com> | 2013-03-25 10:45:23 +0100 |
---|---|---|
committer | Christophe Guiraud <christophe.guiraud@intel.com> | 2013-03-25 10:45:23 +0100 |
commit | 96f167287afc2447e51b47c1794db72cf4fbb529 (patch) | |
tree | 13aeb55f4068b5b620f580aa4b45e11385c031fa /test | |
parent | ffb46e3ae01bd05cfbd43d2f50fa7743db45b531 (diff) | |
download | dleyna-server-96f167287afc2447e51b47c1794db72cf4fbb529.tar.gz |
[Tests] Add print_metadata() method to MediaConsole
- Add a print_metadata() debug method to the MediaConsole Python
test application. This new method allows to retrieve and pretty
print Media objects Metadata information which are formatted in
DIDL Lite XML.
- Related to issue #25
Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/dbus/mediaconsole.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/dbus/mediaconsole.py b/test/dbus/mediaconsole.py index 2dc552e..d0a2bd5 100644 --- a/test/dbus/mediaconsole.py +++ b/test/dbus/mediaconsole.py @@ -22,6 +22,8 @@ import dbus import sys import json +from xml.dom import minidom + def print_properties(props): print json.dumps(props, indent=4, sort_keys=True) @@ -58,6 +60,10 @@ class MediaObject(object): i = i + 2 print + def print_metadata(self): + metadata = self.__objIF.GetMetaData() + print minidom.parseString(metadata).toprettyxml(indent=' '*4) + def delete(self): return self.__objIF.Delete() |