[openlp-dev] Storing media items

Philip Ridout phill.ridout at gmail.com
Fri Jun 14 03:33:50 EDT 2019

This email is mainly addressed to TRB143, I felt it was too long to post to
IRC, and some feedback from others would be great, so I'm posting it here.

I've been working on the way we store media items. (As in the media plugin
media items rather than any other plugin 'media items')

In 2.4 we stored the info in a string which was ok for standard media
files, but it wasn't great for optical media.

1: because we need to store more info than just the path
2: to store the data we were encoding it in a string separated by ':'. This
cause minor problems on windows where the path usually contains a ':' after
the drive letter. Additionally we may have issues with the potential
future(?) addition of streaming media capabilities.

My is solution is to create a class which stores the extra info needed for
media media items, and store that in a db. For storing in service files, we
just need to subclass from the JSONMixin class I implemented recently.
Doing so implements some nice features such a automatically serializing the
media type enum and the path object which points to the media file / dvd
drive, which also provides the benefits for which I initially started my
path refractors (better portability for service files, settings and DBs,

You guys on board with my idea?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openlp.io/pipermail/openlp-dev/attachments/20190614/2ebeceb0/attachment.html>

More information about the openlp-dev mailing list