Schedule updating library

Hi,

Is there an option to make a schedule update my library? We create and adjust songs on one computer and then open it on sunday on a different computer. This works ok, but when we change the lay-out of songs or add/change translations, it is right in the schedule, but not in the library. Same goes for adding new songs. This is annoying when we want to quickly add a song we didn’t prepare but have used in the past but it isn’t in the library yet.

Hope my question makes sense.

Thanks for all the great work!
Thomas

Do you happen to have the schedule option “Copy song to schedule by default” turned on?
If it is turned on: schedule song edits will be stored in the schedule only.
If it is turned off: schedule song edits will be stored in the schedule AND in the database.

You wrote that you transfer the schedule from the preparation computer to the different sunday computer.
Do both computers also have a database? (i.e. library) If so, how do you sync them?

Hi Dirk,

Thanks for your reply. I’ll look into that option. It probably is turned on. What does this option do?

This would be already a huge help!

In regards to library: well, I hoped that if I enter a new song into a schedule and I opened that schedule on a different computer, quelea would automatically enter that song in the database of the other computer.

I don’t have another way yet to synchronise libraries. I do backup regularly and then import that backup on the Sunday computer. But yes, maybe that’s my 2nd question: how do I synchronise libraries?

Thanks,

Thomas

Outlook voor Android downloaden

Unfortunately, there’s no official way to synchronize a database at the moment.
There has been an issue recorded for this on Quelea Github:

What I did for my previous church (if this is to much detail skip please):

  • Use the MEGA application to cloud sync the “.quelea” folder from C:\users\USERNAME on the preparation computer to an additional folder “.quelea” on the sunday projection computer. This additional folder “.quelea” not being the regular “.quelea” folder from C:\users\USERNAME.
  • Use a PowerShell script on the sunday projection computer that synchronises the additional folder “.quelea” to the “.quelea” folder from C:\users\USERNAME. This script checks on file locks (by Quelea) and must be run manually by the projection operator.

At first we tried a direct cloud sync using MEGA between the regular “.quelea” folders on both computers. However, if Quelea was started on the projection computer and at the same time a MEGA cloud sync was running, we sometimes ended up with an empty Quelea database :-(. (this is because MEGA can’t handle concurrency) Therefore the use of the additional folder “.quelea”

That is actually better because Dropbox kept creating conflict files, which was annoying.
I sync 3 computers with MEGA. All we have to do is not write at the same time.

The only files updated when you open quelea are:
quelea-debuglog.txt ← Just debug logs
database_new\database_new.log ← just logs

The files updated when you close are:
quelea.properties ← this file should be the same for all computers
database_new\database_new.lck

You can use mega to exclude certain files from syncing.

I have 1 copy of everything and it stays in MEGA. Each computer has soft link to the mega folder and that is where it gets the settings.
During normal read use, nothing is written to the profile directory.
After you close quelea you will notice that every time the properties file is updated but the changes are generally superficial.

Hi Jessy,

Thank you so much for your help. Sorry for the late reply, it’s been a busy week.

Could you explain to me what exactly I need to synchronise in the cloud to make it work? You said that dropbox didn’t work, I wonder if onedrive would do it better. We’ve got an account for onedrive with the church, so I’d like to give that a try. Otherwise I’ll look into Mega.

If a developer is still reading along: I still think it would be a great extra feature to have an option that when quelea opens a schedule that has a song in it that doesn’t exist in the library yet, that it automatically imports that new song. I used to use openLP and that had that option.

Thanks!

Thomas

Something of a guide

Too much fluff and 1001 accounts are annoying, that said some integration could be considered similar to how Microsoft office or other application integrates with dropbox.
The developers don’t have to reinvent the hot water or syncing, the cloud services work just fine and are sufficient as they are and we can make it work easily with a proper step by step guide for example.
One of the problems of integration custom integration would be to have to write this for each individual service, so it’s best to keep it very very basic.

======================================================
Step 0: When you install quelea all of your settings and profiles etc. is stored in:
On windows:
~/.quelea
C:\Users%USERNAME%.quelea
On Linux should be:
~/.quelea
MAC … (don’t know)

Step 1: Assuming this is the first installation or the one you want to sync to other computers
MOVE this folder to a shared location of your choice.
This could be a cloud service: Dropbox, MEGA, OneDrive.
Could be: NAS or Network directory on the local network.

Step 2: Create a link from the shared location to the original location.
To do this I just made a little script that you don’t have to use but it works.
You have to run as an Administrator to be able to create the soft link and there must not be a preexisting directory or a link.
The script checks stuff and gives you the appropriate commands to paste and run as admin.

@echo off
REM == To run as Admin ==
	REM powershell -c start -verb runas cmd '/c start /D "%CD%" bash.exe'

REM == Set variables ==
	cls;
	set oldp="%USERPROFILE%\.quelea"
	set newp="%CD%"
	set oldVideo="%CD%\vid"
	set newVideo="%CD%\..\Videos Backgrounds"
	
REM == Display Initial instructions and directory ==
	echo .
	echo To generate the correct comand this script has to be placed in the shared settings directory ".quelea".
	echo Current dir [%newp%] 
	echo .

REM == Checking if default Quelea settings directory or soft link exists. ==	
	echo Checking if default [%oldp%] exists.		
	REM IF exist %oldp% ( DEL /F/Q/S %oldp% > NUL && RMDIR /Q/S %oldp% && echo Quelea old settings dir [%oldp%] removed - OK ) ELSE ( echo Quelea settings dir [%oldp%] not found - OK! );
	IF exist %oldp% ( echo Please delete Quelea default settings directory or existing soft link [%oldp%] ! && pause && exit ) ^
	ELSE ( echo Quelea default directory [%oldp%] not found - OK! );
	REM pause 

REM == Change dir just in case ==
	cd %newp%
	echo New path set to [%newp%] 
	echo .
	REM pause
 
REM == Make link ==
	REM set dispCmdQueleaSettings=mklink /h %oldp% %newp% REM == hardlink version
	set dispCmdQueleaSettings=mklink /d %oldp% %newp%
	set dispCmdVideoBackgrounds=mklink /d %oldVideo% %newVideo%
	
	REM Display Output
	echo Copy and RUN as Admin: 
	echo ----------------------------------------
	echo %dispCmdQueleaSettings%
	echo ----------------------------------------
	echo If link exists for [%oldVideo%] please delete it and run the following command:
	echo ----------------------------------------
	echo %dispCmdVideoBackgrounds%
	echo ----------------------------------------
	pause
		

Step 3: Test if it works. Open Quelea and check if everything works as intended.
Step 4: If you want or need to set permissions on the files (i.e.) you might not want certain PC(s) to be able to have write access. Therefore they can open and read the database but not write to it.
Personally, I don’t bother and you can just repeat Step 2 on any other computer.

======================================================

Onedrive, or any other cloud service, should be fine.
The reason dropbox didn’t work for me, as I already mentioned, creating conflicts.
You can work as normal but avoid editing songs or inserting new songs at the same time.
Under normal read operation or opening, a schedule will not update the database.
What you likely want to avoid is to edit the same song on 2 different computers because the changes coming from 1 would be overwritten by the other.
Anytime you press “edit song” the database will be updated and the edits will go at the end of the database.
Therefore what the developers can do is make sure before the database file is overwritten, quelea is updated immediately before with the database immediate before the write operation.
If Quelea is open for a long time it is reasonable to expect in this context to have some alterations of the database file in storage to what is currently loaded in RAM.
A simple check of the last access or modification date and time would be sufficient.
That allows multiple people to “kind of” work and edit multiple different songs at the same time and edit or save them as long as they don’t hit save within a few seconds of each other, while the syncing service catches up.

Hi JessyJP

It works! I created a link manually at first, but that didn’t work somehow… So I ended up using your script anyway (literally had to google: “How to create script in windows” lol, shows you how much I know :slight_smile: ).

So, maybe it’s worth creating a seperate thread about this and adding the .bat file as an attachment? I would simplify it for complete newbs though… I’m sure there are more people looking for this solution.

Thanks again!

PS: Now I finally know how to pronounce Quelea! :laughing:

Well, I can’t upload .bat files here and people might be a little concerned about just downloading them.
That said here is a link for everyone else:

Just place in .quelea in the user’s folder run the file and the rest should be clear.

1 Like