Commit local changes before merging with remote

This commit is contained in:
Peter Wood
2025-05-29 11:25:02 -04:00
parent 868b340fb5
commit be4f6a8d8c
75 changed files with 14107 additions and 562 deletions

29
plex/plex-recent-additions.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
# Define the path to the Plex database
PLEX_DB="/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db"
# Check if the database exists
if [ ! -f "$PLEX_DB" ]; then
echo "Plex database not found at $PLEX_DB"
exit 1
fi
# Query the database for items added in the last 7 days
sqlite3 "$PLEX_DB" <<EOF
.headers on
.mode column
SELECT
datetime(meta.added_at, 'unixepoch', 'localtime') AS "added_at"
, meta.title
, meta.year
, lib.section_type AS "library_section_type"
, lib.name as "library_name"
FROM
metadata_items meta
left join library_sections lib on meta.library_section_id = lib.id
WHERE
meta.added_at >= strftime('%s', 'now', '-7 days')
ORDER BY meta.added_at DESC;
EOF