Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plex: Don't overwrite primary database on restart #24900

Merged
merged 1 commit into from Apr 16, 2017

Conversation

pjones
Copy link
Contributor

@pjones pjones commented Apr 14, 2017

Motivation for this change

This change fixes two major issues:

  1. If you don't use SIGQUIT to stop Plex it will corrupt its own
    database :(

  2. Newer versions of Plex keep metadata in the
    com.plexapp.plugins.library.db database. This is the file that
    we copy into /var/lib/plex/.skeleton. If we copy the empty
    database on top of this one the user will lose their entire
    library metadata. This change skips the copy if the file
    already exists.

Goes with #24138

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

This change fixes two major issues:

  1. If you don't use SIGQUIT to stop Plex it will corrupt its own
     database :(

  2. Newer versions of Plex keep metadata in the
     `com.plexapp.plugins.library.db` database.  This is the file that
     we copy into `/var/lib/plex/.skeleton`.  If we copy the empty
     database on top of this one the user will lose their entire
     library metadata.  This change skips the copy if the file
     already exists.
@joachifm joachifm merged commit 2db0cf0 into NixOS:master Apr 16, 2017
@joachifm
Copy link
Contributor

Sounds like a bad bug to me, does this need to be picked to the release branch as well?

@pjones
Copy link
Contributor Author

pjones commented Apr 17, 2017

That would probably be a good idea.

joachifm pushed a commit that referenced this pull request Apr 17, 2017
This change fixes two major issues:

  1. If you don't use SIGQUIT to stop Plex it will corrupt its own
     database :(

  2. Newer versions of Plex keep metadata in the
     `com.plexapp.plugins.library.db` database.  This is the file that
     we copy into `/var/lib/plex/.skeleton`.  If we copy the empty
     database on top of this one the user will lose their entire
     library metadata.  This change skips the copy if the file
     already exists.

(cherry picked from commit 5a50b26)

See #24900 (comment)
@joachifm
Copy link
Contributor

Done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants