~tomasgroth/openlp/portable-path

« back to all changes in this revision

Viewing changes to openlp/plugins/presentations/lib/messagelistener.py

  • Committer: Tomas Groth
  • Date: 2019-04-30 19:02:42 UTC
  • mfrom: (2829.2.32 openlp)
  • Revision ID: tomasgroth@yahoo.dk-20190430190242-6zwjk8724tyux70m
trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
###############################################################################
5
5
# OpenLP - Open Source Lyrics Projection                                      #
6
6
# --------------------------------------------------------------------------- #
7
 
# Copyright (c) 2008-2018 OpenLP Developers                                   #
 
7
# Copyright (c) 2008-2019 OpenLP Developers                                   #
8
8
# --------------------------------------------------------------------------- #
9
9
# This program is free software; you can redistribute it and/or modify it     #
10
10
# under the terms of the GNU General Public License as published by the Free  #
31
31
from openlp.core.ui import HideMode
32
32
from openlp.plugins.presentations.lib.pdfcontroller import PDF_CONTROLLER_FILETYPES
33
33
 
 
34
 
34
35
log = logging.getLogger(__name__)
35
36
 
36
37
 
336
337
            # Create a copy of the original item, and then clear the original item so it can be filled with images
337
338
            item_cpy = copy.copy(item)
338
339
            item.__init__(None)
339
 
            if is_live:
340
 
                # TODO: To Path object
341
 
                self.media_item.generate_slide_data(item, item_cpy, False, False, ServiceItemContext.Live,
342
 
                                                    str(file_path))
343
 
            else:
344
 
                # TODO: To Path object
345
 
                self.media_item.generate_slide_data(item, item_cpy, False, False, ServiceItemContext.Preview,
346
 
                                                    str(file_path))
 
340
            context = ServiceItemContext.Live if is_live else ServiceItemContext.Preview
 
341
            self.media_item.generate_slide_data(item, item=item_cpy, context=context, file_path=file_path)
347
342
            # Some of the original serviceitem attributes is needed in the new serviceitem
348
343
            item.footer = item_cpy.footer
349
344
            item.from_service = item_cpy.from_service