~raoul-snyman/openlp/pyro-impress

« back to all changes in this revision

Viewing changes to openlp/core/display/window.py

  • Committer: Raoul Snyman
  • Date: 2019-06-05 04:53:18 UTC
  • mfrom: (2700.2.174 openlp)
  • Revision ID: raoul@snyman.info-20190605045318-bd2hsvmgrf7f5qew
HEAD

Show diffs side-by-side

added added

removed removed

Lines of Context:
249
249
        """
250
250
        Set images in the display
251
251
        """
252
 
        for image in images:
253
 
            if not image['path'].startswith('file://'):
254
 
                image['path'] = 'file://' + image['path']
255
 
        json_images = json.dumps(images)
 
252
        imagesr = copy.deepcopy(images)
 
253
        for image in imagesr:
 
254
            image['path'] = image['path'].as_uri()
 
255
        json_images = json.dumps(imagesr)
256
256
        self.run_javascript('Display.setImageSlides({images});'.format(images=json_images))
257
257
 
258
258
    def load_video(self, video):
259
259
        """
260
260
        Load video in the display
261
261
        """
262
 
        if not video['path'].startswith('file://'):
263
 
            video['path'] = 'file://' + video['path']
 
262
        video = copy.deepcopy(video)
 
263
        video['path'] = video['path'].as_uri()
264
264
        json_video = json.dumps(video)
265
265
        self.run_javascript('Display.setVideo({video});'.format(video=json_video))
266
266