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

Avoid accessing the database directly if possible #3

Open
ukdtom opened this issue Jul 1, 2015 · 4 comments
Open

Avoid accessing the database directly if possible #3

ukdtom opened this issue Jul 1, 2015 · 4 comments

Comments

@ukdtom
Copy link

ukdtom commented Jul 1, 2015

Since supportfiles for SQLite has to be added to every Linux distro, and since Plex discourage direct access to the database, I humbly suggest, that you perhaps looks into getting the info out of the database like this:

http://127.0.0.1:32400/library/sections/"Number of section"/all?X-Plex-Token="myToken"&addedAt>=1434158288

Best Regards

dane22

@ukdtom
Copy link
Author

ukdtom commented Jul 1, 2015

And adding here....To see howto grap the other MetaData, feel free to steal from my Plex2CSV bundle

https://github.com/ukdtom/plex2csv.bundle

@aptalca
Copy link

aptalca commented Nov 15, 2016

At linuxserver.io we just deprecated the docker container for plexemail after confirming that it corrupts the plex database.

I would like to echo the above request by @ukdtom so the damage can be prevented as I would like to use it myself and perhaps consider republishing the docker container.

Apart from the database corruption, the script itself works really well.

Thanks

@jakewaldron
Copy link
Owner

I've made some changes around the DB usage in the dev branch. It now properly closes connections and before opening the db files, it first makes a copy (and deletes the copy after closing the db connection). This should prevent corruption issues in the future. I plan on pushing it to the master sometime this weekend.

As for switching to the API, I have a new child and no longer have lots of free time, so I have no plans as of now to make the switch. If someone reads this and wants to take it on, please feel free to make a fork (or make the changes and submit a pull request).

@jakewaldron
Copy link
Owner

Dev branch has been merged into master. As said in my previous comment, I don't have the time currently to do a major update to the script to use the API vs DB. Will leave this open though in case someone else wants to take on the task.

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

No branches or pull requests

3 participants