Created
September 24, 2013 01:12
-
-
Save kmark/6679135 to your computer and use it in GitHub Desktop.
Super simple bash script to repeatedly execute plexDownload.php with the same encoding settings but different media IDs. Great for TV show seasons.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright 2013 Kevin Mark | |
# Licensed under the Apache License, Version 2.0 | |
# Will expand upon this script to be more convient, proof of concept right now. | |
# EXAMPLE USAGE: ./plexDownloadMulti.sh "-h 127.0.0.1:32400 -r 720x480 -b 800" 123 456 789 | |
# Universal encoding settings in quotes is the first param. Space-seperated mediaIds are the rest | |
# Change the "folderformedia" and make sure it exists. Change the extension too if you want. | |
DOWNLOAD_OPTIONS=$1 | |
download() { | |
php plexDownload.php -y $DOWNLOAD_OPTIONS -m $1 -o folderformedia/$2.mp4 | |
} | |
for (( i = 2; i <= $#; i++ )); do | |
download ${!i} `expr $i - 1` | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment