A general question:
why do you want to re-integrate the same database?
This is not the right way to work with a database-server.
A general question:
why do you want to re-integrate the same database?
This is not the right way to work with a database-server.
The mAirListDB Server programme is a tool only for accessing a database from a remote mAirList installation, for instance, granting a remote DJ access to your own music. It has nothing to do with correcting “database locked”-issues, i. e. this flaw has its reasons elsewhere. If you set up your local database correctly – just as @Stefan_Hillen is trying to work out for you (but obviously not with you) – it will work, as it does on almost every other users’ stations.
As explained earlier, with the local file, I get some “database locked” errors during playback that cause silences between tracks…
And Stefan told me that “mairlistDB Server” could better manager database connection and avoid this king of error.
On my side, I have a script that launch at the event “OnPlayerStart” that use methods to get/set data on the playlistItem… But, I don’t know if my script comes into conflicts with some mairlist internal database calls (for logging or whatever)…
If there is only one instance accessing the local Mairlist *.mldb file, this behavior is not normal and must have other causes.
We can’t know that because we don’t know the script.
Thank you Tondose for your answer.
For “mairlistDB Server”, it’s what I think since the beginning. But maybe as the program manage all database connection, it is able to better route calls, and avoid multiple calls not managed by accessing directly to the local database file.
Honestly, my local database has nothing specific. I have one station, one instance, one computer. I set the local database like this.
All other tabs are unchanged.
The only thing I have, as explained to ssnoopy, is that I have a OnPlayerStart script that add volume points on the playing track. And maybe it comes into conflicts with internal database calls I don’t see…
Here it is if you want to check… (its development is still in progress/test).
I use documented methods to add volume points, and to get data from database… Nothing complex or exotic I think…
OnPlayerStart.mls (8.5 KB)
Do you still get the error “Database locked” if you deactivate the script?
Why don’t you simply believe what experts tell you? Guessing problems away is always erratic.
For the script, please follow @ssnoopy ’s suggestion.
And “experts” said me that mAirlist DB Server could help me, in my mono-instance, mono-computer, mono-database configuration to avoid “database locked” errors.
I was said that I can’t have 2 identical databaseID (what I understand very well) and I explained that I can’t choose when I set the database connection and asked for how to do it, and what I did wrong.
I don’t ask for anything better than to do what experts can tell me : that’s why I explain you the objectives of what I’m trying to achieve.
Not yet.
I will give it a try today but if it’s the cause of the database locked, what can I do ? Does it mean that we can modify anything on the current playing track (like adding volume envelope points) ?
Do you get any error messages while running the script? (See system log.) Which AI did you employ for writing your script? Would you mind explaining the line
SweeperItemDB := Database(0).LookupByInternalID(SweeperItem.GetDatabaseID);
please?
There is no SystemLog in this script. So, I can’t tell if error messages are during its execution or not.
As I will try to disable it today, I will also try to add SystemLog to see if there is any code in it that give me the “database locked” errors (which is a random error)…
I don’t use any AI for writing this script. All my scripts are self-made with an intensive use of this community, and the online mairlist documentation https://scripting.docs.mairlist.com
As this script modifies the SweeperItem playlistItem Object, the original item values are not available anymore. In this part of the script, I use this line of code to retrieve the original SweeperItem Object from the database, with its original values stored in database.
To be more precise : “start next” cue point had been modified earlier by a postprocessing scripts during scheduling the hour. So, here in the playlist, the “start next” cue point is not the original one. And here in the OnPlayerStart script, I need to retrieve the original value of the “start next” cue points. So I requested the database to give me the value.
mAirList Script will log major errors by itself. Did you have a look into the logfile, actually? Or is this an educated guess of your’s, too?
Fot the script, why do you try retrieve the original StartNext
-value from the database at all? On player start, before fiddling around with any values, read it directly from the playlist item in question, store it in a variable and reinstate it at the right point in time.
Is it me or are you kidding me ? You do not have to help me if you think I’m not listening to the help you bring me. I can assure you I don’t ask better to do what the community propose me (that’s why I’m currently trying to run a playlist without this OnPlayerStart script.
By the way, I use massively the mairlist logfile to debug my script and my problem BEFORE writing to the community. I’m a developer since nearly 20 years and I know very well how we can debug code on system…
But, except if I’m wrong, when mairlist logs an error, it doesn’t tell which script triggered the error. And as there is lot of things that can be executed in the same time, it’s not as easy as you seems to convince me.
|2024-07-28 17:49:24|Error|Error writing log entry into database Heaven REWIND / REPLAY: [FireDAC][Phys][SQLite] ERROR: database is locked|
Here, who can tell it’s the OnPlayerStart Event that trigger this error ? Before there is a start playlist item event and after a stop playlist event. That’s why I imagine to add a SystemLog instruction at the beginning and at the end of specific instruction of the script to identify where the error occurs…
Secondly, to your last proposal :
Because it has been modified in this playlist PREVIOUSLY, after being scheduled by mAirlist DB app (by a custom postprocessing script). So, when the playlist comes into the playout, the segue had already been altered.
Reading it on the playlist item gives me the modified value.
As this point of the script, I need the original duration of the playlist item. As StartNext cue point is not the original value, the duration is not correct. So, I retrieve the original item in the database to retrieve the original cue points (and therefore, the right duration).
Please read carefully what I wrote about it - you can use it BUT only with one opened instance at a time.
No, you never mentioned that you were using one PC only in that post and you never wrote about a script that will access the database too
I just explained to you when the db server could help you and what it does regarding to this information.
And when I asked you about your setup in a PM, after you posted and deleted a thread with, for me, confusing informations and obviously after you bought the advanced server version, you then told me about your special setup on a virtual computer with virtual cables‘ audio routing and playing from two playlists sometimes. And using a script.
So how should people know that you are going a route with your mAirList that isn‘t standard by far?
Btw: Of course you can’t change the ID of connected database by using the internet client connection - every user would then be able to change the ID of a remotely connected DB and make it unavailable for all other connected clients.
You’re totally right Stefan. It’s my fault if I didn’t explain my configuration very well.
As a result, I bought an advanced server license that will not be useful for me because it will not help me to avoid those errors. Too bad…
Maybe one day, I will bought another standard mairlist license to install it on a second computer… and at this moment, this “mairlistDB server” will become useful…
For now, problem is not (really) solved, but too bad again… I don’t want to take more of your time.
I have another open topic for scripting purpose about saving playlist, but I’m going to try to figure it out on my own, as I think I annoyed you.
Thank you for all your replies for the last days.
Best regards,
–
Sylvain
Please see the PM I send you regarding this issue.
Read the values at the very first time the item enters the playlist (before any other script will change anything) and store it in a runtime data variable. You can delay the execution with a timer.
Your topic doesn’t. It’s the inconvincible way you present it here.