Home › macOS/OS X (Mac)
If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!
Camera Upload Script
I’m loving the new Camera Upload feature! I was about to share a script I wrote to do something similar but then the guys at Plex beat me to it! Well, anyway until Plex adds support for Videos and Android I guess it can still be of some use.
Here's what I've been doing:
I have an Android tablet and a Motorola Razr M, both of which I installed ISyncr from Google Play. ISyncr allows you to synchronize your ITunes library on a Mac or on Windows with an Android device, wirelessly and automatically. The great thing about it is that it also allows you to upload both Videos and Pictures to your desktop AND delete them off your phone at the same time.
iPhoto will import photos and videos if you dump them in the "~/iPhoto Library.photolibrary/Auto Import" directory. Note, iPhoto needs to be open in order for this to run so make sure it's in your "Logon Items".
The two scripts will take the files from your uploaded (using iSyncr) movies and pictures directories, move them to a backup location called "$NASDIR" (which could be the directory your Plex server uses for pictures or movies) and then dump them in iPhoto's import directory. When iPhoto is open, it will import them automatically. Also when your Plex server scans your photo directories it will see the new photos and add them.
You could run this without the iPhoto import and just dump the photos into Plex's Photo and Movie directories. Or do both. The "$NASDIR" variable could be where your photos are all backed up before dumping them into iPhoto.
You can set iSyncr to run on a schedule and put these two scripts in cron:
15,45 * * * * /Users/Les/bin/import.iphoto >> /Users/Les/logs/iphoto.log 2>&1
00,30 * * * * /Users/Les/bin/import.movies >> /Users/Les/logs/movies.log 2>&1
Go outside, take some pictures with your phone, walk into the house and everything happens automatically!
DISCLAIMER: Please test this script before running on your machine! Triple check your variables and double backup your files before using these scripts!