Giter VIP home page Giter VIP logo

sync's Introduction

LFTP seedbox sync script

A simple script to download new media from your seedbox every night. It will download contect from the server (overwriting any local duplicates) and delete it from the server once the download is complete.

Requirements:

  • LFTP, an awesome command line FTP utility
  • A way to run bash scripts
  • Cron
  • A little bit of setup

If you are on windows, that means you'll need something like cygwin or babun (which gets my vote).

How to use:

1- Change script values. If you set up your seedbox with this installer then you can leave the remote paths alone.

login="your_user"
pass="your_password"
host="your_server_address"

remote_movies="/home/movies"
remote_tvshows="/home/tv"
remote_music="/home/music"
remote_other="/home/other"

local_movies="/local/path/for/movies"
local_tvshows="/local/path/for/tv"
local_music="/local/path/for/music"
local_other="/local/path/for/other"

2- Set a cron job to run every day at night (I have mine set for 4am)

3 (Optional) - Set script to update your XBMC or Plex here:

### Do any XBMC / Plex updates here ###

# Update XBMC libraries
# (see http://kodi.wiki/view/HOW-TO:Remotely_update_library)

curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "mybash"}' /
     -H 'content-type: application/json;' http://localhost:9191/jsonrpc
curl --data-binary '{ "jsonrpc": "2.0", "method": "AudioLibrary.Scan", "id": "mybash"}' /
     -H 'content-type: application/json;' http://localhost:9191/jsonrp

# Update Plex libraries
# (see https://support.plex.tv/hc/en-us/articles/201242707-Plex-Media-Scanner-via-Command-Line)

"C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe" --scan --refresh --force --section 1

sync's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.