Play images and video from Synology PhotoStation server

xbmcgui.py 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # -*- coding: utf-8 -*-
  2. # noinspection PyPep8Naming,PyUnusedLocal
  3. class ListItem(object):
  4. def __init__(self, label=None, label2=None, iconImage=None,
  5. thumbnailImage=None, path=None):
  6. self.label = label
  7. self.label2 = label2
  8. self.iconImage = iconImage
  9. self.thumbnailImage = thumbnailImage
  10. self.path = path
  11. self.properties = {}
  12. self.stream_info = {}
  13. self.art = {}
  14. self.selected = False
  15. self.context_menu_items = None
  16. self.infolabels = {}
  17. def addContextMenuItems(self, items, replaceItems=False):
  18. self.context_menu_items = items
  19. def getLabel(self):
  20. return self.label
  21. def getLabel2(self):
  22. return self.label2
  23. def getProperty(self, key):
  24. return self.properties[key.lower()]
  25. def isSelected(self):
  26. return self.selected
  27. def select(self, selected):
  28. self.selected = selected
  29. def setIconImage(self, icon):
  30. self.iconImage = icon
  31. def setInfo(self, info_type, infoLabels):
  32. #assert info_type in ['video', 'music', 'pictures']
  33. self.infolabels.update(infoLabels)
  34. def setLabel(self, label):
  35. self.label = label
  36. def setLabel2(self, label2):
  37. self.label2 = label2
  38. def setPath(self, path):
  39. self.path = path
  40. def setProperty(self, key, value):
  41. self.properties[key.lower()] = value
  42. def addStreamInfo(self, stream_type, stream_values):
  43. self.stream_info.update({stream_type: stream_values})
  44. def setThumbnailImage(self, thumb):
  45. self.thumbnailImage = thumb
  46. def setArt(self, values):
  47. self.art = values
  48. class WindowXMLDialog:
  49. pass