Skip to content

qt: handle multiple running instances of the application with model recovery

ModelRecoveryAgent helps recovering a model if the application closes abruptly, this can be a simple crash or power loss. Currently it is only used for the main playlist.

It works well for that use case, but if a new instance of the application starts while the old instance still runs, it considers the previous instance to be closed abruptly. This is a known limitation, and now it should be corrected with this change.

Note that currently we do not support recovering multiple models of same type. This means that the instance holding the lock manages recovery, and if you have multiple instances open with different models, only the lock holder instance's model would be saved.

There is currently no plan to support recovering multiple models of the same type. It is questionable if that would be useful in a media player, although it really makes sense with text editors to not lose data.

Request review @chub.

Merge request reports

Loading