openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #22063
Re: [Merge] lp:~felipe-q/openlp/better-remote into lp:openlp
Review: Needs Fixing
As Tim says, take a look at http://wiki.openlp.org/#Standards
597 Should be os.path.normpath, (only windows uses \ to separate folders)
You're repeating yourself a bit when writing the titles and notes to the files. Can you make a common method in the class PresentationDocument. Maybe you could pass a list of titles, and a dictionary of notes.
When adding a presentation I get:
Traceback (most recent call last):
File "/home/phill/openlp/better-remote/openlp/core/lib/mediamanageritem.py", line 326, in on_file_click
self.validate_and_load(files)
File "/home/phill/openlp/better-remote/openlp/core/lib/mediamanageritem.py", line 387, in validate_and_load
self.load_list(full_list, target_group)
File "/home/phill/openlp/better-remote/openlp/plugins/presentations/lib/mediaitem.py", line 190, in load_list
doc.load_presentation()
File "/home/phill/openlp/better-remote/openlp/plugins/presentations/lib/impresscontroller.py", line 255, in load_presentation
self.create_titles_and_notes()
File "/home/phill/openlp/better-remote/openlp/plugins/presentations/lib/impresscontroller.py", line 484, in create_titles_and_notes
titles.append( self.__get_text_from_page(slideIndex,TextType.Title).replace('\n',' ') + '\n')
File "/home/phill/openlp/better-remote/openlp/plugins/presentations/lib/impresscontroller.py", line 462, in __get_text_from_page
page = pages.getByIndex(slide_no - 1)
openlp.plugins.presentations.lib.impresscontroller.IndexOutOfBoundsException
Restart OpenLP and I am able to add the presentation fine, but when I click to preview it I get:
Traceback (most recent call last):
File "/home/phill/openlp/better-remote/openlp/core/lib/mediamanageritem.py", line 482, in on_preview_click
service_item = self.build_service_item()
File "/home/phill/openlp/better-remote/openlp/core/lib/mediamanageritem.py", line 595, in build_service_item
if self.generate_slide_data(service_item, item, xml_version, remote, context):
File "/home/phill/openlp/better-remote/openlp/plugins/presentations/lib/mediaitem.py", line 267, in generate_slide_data
titles, notes = doc.get_titles_and_notes()
File "/home/phill/openlp/better-remote/openlp/plugins/presentations/lib/presentationcontroller.py", line 301, in get_titles_and_notes
with open(titlesfile) as fi:
FileNotFoundError: [Errno 2] No such file or directory: '/home/phill/.local/share/openlp/presentations/thumbnails/Untitled 1.odp/titles.txt'
Finally, you're missing unit tests for your code. see ( http://wiki.openlp.org/Development:Unit_Tests )
--
https://code.launchpad.net/~felipe-q/openlp/better-remote/+merge/191897
Your team OpenLP Core is subscribed to branch lp:openlp.
Follow ups
References