Skip to content

Commit

Permalink
Remove apt check for now, causing issues for some users
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick0703 committed Apr 1, 2020
1 parent 8e0c7b4 commit 7cba8e9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
meta_update.pyc
database_path.txt
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Requirements
---------------------------------
- Python 3.7 or newer
- Double check your python3 version `python3 --version`, if it's less than 3.7, update it to the latest version.
- python3-apt is also required.
- plex.tar (If you want to use the backed-up metadata)
- Make sure that the file is in the same directory as the script.
- pv `apt install pv`
Expand Down
20 changes: 5 additions & 15 deletions meta_update.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python3

import apt
import os
import pathlib
import shutil
Expand All @@ -12,14 +11,6 @@
if sys.version_info < (3, 7):
sys.exit("You must use Python 3.7 or newer.")

# Check if pv is installed
cache = apt.Cache()
cache.open()
try:
cache["pv"].is_installed
except Exception:
sys.exit("You must install pv, apt install pv.")

# Installation type
installType = ""

Expand All @@ -29,10 +20,10 @@
cbInstall = pathlib.Path("/opt/plex/")
customInstall = ""

plexdb = ("Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db")
plexdbBack = ("Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db.back")
plexPref = ("Library/Application Support/Plex Media Server/Preferences.xml")
plexPrefBack = ("Library/Application Support/Plex Media Server/Preferences.xml.back")
plexdb = "Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db"
plexdbBack = "Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db.back"
plexPref = "Library/Application Support/Plex Media Server/Preferences.xml"
plexPrefBack = "Library/Application Support/Plex Media Server/Preferences.xml.back"
backupFile = "database_path.txt"

metaTar = pathlib.Path("plex.tar")
Expand Down Expand Up @@ -150,8 +141,7 @@ def remove_database_backup():
print("\nDeleting Backup of the Database.")
os.remove(dbBackFile)
else:
sys.exit("No backup file found (database_path.txt), exiting.")

sys.exit("\nNo backup file found (database_path.txt), exiting.")

# Menu
def make_menu():
Expand Down

0 comments on commit 7cba8e9

Please sign in to comment.