[libdmapsharing] Fix handling of mediakind property in testpython.py
- From: W. Michael Petullo <wmpetullo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdmapsharing] Fix handling of mediakind property in testpython.py
- Date: Mon, 13 Nov 2017 14:32:34 +0000 (UTC)
commit 081c2b29189ff3d78cb1cb3ff94715bd59a4f8c7
Author: W. Michael Petullo <mike flyn org>
Date: Mon Nov 13 09:32:23 2017 -0500
Fix handling of mediakind property in testpython.py
Signed-off-by: W. Michael Petullo <mike flyn org>
tests/test-dmap-client-python | 61 +++++++++++++---------------------------
tests/testpython.py | 2 +-
2 files changed, 21 insertions(+), 42 deletions(-)
---
diff --git a/tests/test-dmap-client-python b/tests/test-dmap-client-python
index ce0cac0..f88b908 100755
--- a/tests/test-dmap-client-python
+++ b/tests/test-dmap-client-python
@@ -26,48 +26,27 @@ class TestDMAPClient(GObject.GObject):
self.browser.start()
def print_record(self, id, record, user_data):
- location = record.get_property('location')
- title = record.get_property('title')
- songalbum = record.get_property('songalbum')
- sort_album = record.get_property('sort-album')
- songartist = record.get_property('songartist')
- sort_artist = record.get_property('sort-artist')
- songgenre = record.get_property('songgenre')
- format = record.get_property('format')
- rating = record.get_property('rating')
- filesize = record.get_property('filesize')
- duration = record.get_property('duration')
- track = record.get_property('track')
- year = record.get_property('year')
- firstseen = record.get_property('firstseen')
- mtime = record.get_property('mtime')
- disc = record.get_property('disc')
- bitrate = record.get_property('bitrate')
- has_video = record.get_property('has_video')
- mediakind = record.get_property('mediakind')
- songalbumid = record.get_property('songalbumid')
-
print('id:', id)
- print(' location:', location)
- print(' title:', title)
- print(' songalbum:', songalbum)
- print(' sort_album:', sort_album)
- print(' songartist:', songartist)
- print(' sort_artist:', sort_artist)
- print(' songgenre:', songgenre)
- print(' format:', format)
- print(' rating:', rating)
- print(' filesize:', filesize)
- print(' duration:', duration)
- print(' track:', track)
- print(' year:', year)
- print(' firstseen:', firstseen)
- print(' mtime:', mtime)
- print(' disc:', disc)
- print(' bitrate:', bitrate)
- print(' has_video:', has_video)
- print(' mediakind:', mediakind)
- print(' songalbumid:', songalbumid)
+ print(' location:', record.location)
+ print(' title:', record.title)
+ print(' songalbum:', record.songalbum)
+ print(' sort_album:', record.sort_album)
+ print(' songartist:', record.songartist)
+ print(' sort_artist:', record.sort_artist)
+ print(' songgenre:', record.songgenre)
+ print(' format:', record.format)
+ print(' rating:', record.rating)
+ print(' filesize:', record.filesize)
+ print(' duration:', record.duration)
+ print(' track:', record.track)
+ print(' year:', record.year)
+ print(' firstseen:', record.firstseen)
+ print(' mtime:', record.mtime)
+ print(' disc:', record.disc)
+ print(' bitrate:', record.bitrate)
+ print(' has_video:', record.has_video)
+ print(' mediakind:', record.mediakind)
+ print(' songalbumid:', record.songalbumid)
def authenticate_cb(self, connection, name, session, msg, auth, retrying):
username = connection.get_property('username')
diff --git a/tests/testpython.py b/tests/testpython.py
index 768476f..2898a42 100644
--- a/tests/testpython.py
+++ b/tests/testpython.py
@@ -50,7 +50,7 @@ class PyDAAPRecord(GObject.GObject, DAAP.Record, DMAP.Record):
disc = GObject.property(type=GObject.TYPE_INT, default=0)
bitrate = GObject.property(type=GObject.TYPE_INT, default=0)
has_video = GObject.property(type=GObject.TYPE_BOOLEAN, default=0)
- mediakind = GObject.property(type=GObject.TYPE_INT, default=0)
+ mediakind = GObject.property(type=DMAP.MediaKind, default=DMAP.MediaKind.MUSIC)
songalbumid = GObject.property(type=GObject.TYPE_INT64, default=0)
hash = GObject.property(type=GLib.ByteArray, default=None)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]