Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- oIFS="$IFS"
- IFS=","
- library="/media/Library/TV Shows"
- ##########################
- url=""
- file=""
- while read show rss parse tag format
- do
- IFS="$oIFS"
- mkdir "/media/Library/Scripts/$show" "$library/$show"
- wget "$rss" -O "/media/Library/Scripts/$show/feed.rss"
- while read r
- do
- url=`echo "$r" | grep -e "${parse}" | sed -e 's/ /\n/g' | grep -e "${tag}" | grep -e "${format}" | sed -e 's/.*http//' -e 's/'${format}'\$.*//' | sed -e 's/'${format}'.*//'`
- if [ "$url" != "" ]
- then
- url="http${url}${format}"
- file=`echo "${url#"http:/"}" | sed -e 's/\//\n/g' | grep -e "${format}"`
- else
- url=""
- fi
- if [ -e "$library/$show/$file" ] && [ "$url" != "" ];
- then
- true
- else
- wget "${url}" -O "$library/$show/$file"
- fi
- done <"/media/Library/Scripts/$show/feed.rss"
- IFS=","
- rm -rf "/media/Library/Scripts/$show"
- done </media/Library/Scripts/showlist
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement