[openlp-dev] Storing media items

Tomas Groth second at tgc.dk
Wed Jul 17 12:29:21 EDT 2019

Hi Phill,

I hope it is still relevant to answer this... I'm a bit slow...
There is no doubt that using a ":" as a data-delimiter in a string is
somewhat hacky - I should know, since I introduced it...
I think using a DB would be the right approach, and it could help us in
creating folders and stuff like that.


Den fre. 14. jun. 2019 kl. 09.34 skrev Philip Ridout <phill.ridout at gmail.com

> 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,
> etc.)
> You guys on board with my idea?
> _______________________________________________
> openlp-dev mailing list
> openlp-dev at openlp.io
> https://lists.openlp.io/mailman/listinfo/openlp-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openlp.io/pipermail/openlp-dev/attachments/20190717/7cd7442b/attachment.html>

More information about the openlp-dev mailing list