Store media_file with relative path

Bug #1689131 reported by Daniel Borges on 2017-05-07
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

The path stored on table "media_files", in songs.sqlite is the full path. Is there a way to change this to save the relative path independent of OS (unix vs Windows), based on data path?

All my database is on Windows (with a lot of linked audios), I installed OpenLP in a linux machine and just copy & paste the songs and themes folders. But the linked audios don't play (because of the 'old' path). So, I had to update the instances of "media_files" with SQL commands, like these:

UPDATE media_files SET file_name = REPLACE(file_name, '\', '/');
UPDATE media_files SET file_name = REPLACE(file_name, 'C:/Users/Alberto/AppData/Roaming/openlp/data/songs/audio', '/home/alberto/.local/openlp/songs/audio');

Old OpenLP machine: Windows 7
New OpenLP machine: Ubuntu 16.04
OpenLP version: 2.4.6 (both)

Related branches

István Máté (stephanvs) wrote :

Also causes inability to save service lists if media files (with wrong paths) are included.

Raoul Snyman (raoul-snyman) wrote :

phill is busy with a change that will fix this bug.

Changed in openlp:
assignee: nobody → Phill (phill-ridout)
Phill (phill-ridout) on 2017-10-09
Changed in openlp:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers