diff --git a/plex/plex-recent-additions.sh b/plex/plex-recent-additions.sh index 0b4567e..b735db0 100755 --- a/plex/plex-recent-additions.sh +++ b/plex/plex-recent-additions.sh @@ -42,6 +42,10 @@ # Handle command line arguments DAYS=${1:-7} +# Plex SQLite path (custom Plex SQLite binary) +PLEX_SQLITE="/usr/lib/plexmediaserver/Plex SQLite" + + # Show help if requested if [ "$1" = "--help" ] || [ "$1" = "-h" ]; then echo "Usage: $0 [DAYS]" @@ -69,20 +73,18 @@ if [ ! -f "$PLEX_DB" ]; then fi # Query the database for items added in the specified number of days -sqlite3 "$PLEX_DB" <= strftime('%s', 'now', '-$DAYS days') - and meta.title is null -ORDER BY meta.added_at DESC; +ORDER BY lib.name, meta.added_at DESC; EOF