Store media_file with relative path

Bug #1689131 reported by Daniel Borges
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenLP
Fix Committed
Wishlist
Phill

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

Revision history for this message
István Máté (stephanvs) wrote :

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

Revision history for this message
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)
Changed in openlp:
status: New → Fix Committed
Tim Bentley (trb143)
Changed in openlp:
milestone: none → 2.9.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.