RouxRC / series-DL

Automatically downloads torrents and subtitles for the latest episodes of your favorite TV shows
GNU General Public License v3.0
6 stars 0 forks source link

add autodownload subs from addic7ed.com #1

Closed RouxRC closed 8 years ago

RouxRC commented 8 years ago

Process:

foreach show in http://www.addic7ed.com/shows.php:
  shows[cleaned(name)] = {name, show_id, show_slug, nb_seasons, max_eps_season} 
foreach video file needing subs:
  video = {show_name, season, episode, infos_rip}
  show = shows.filter(best (last?) matching "^cleaned(show_name)" && season <= nb_seasons && episode <= max_eps_season 
  try http://www.addic7ed.com/season/SHOW_ID/SEASON
  find url for episode (like http://www.addic7ed.com/serie/SHOW_SLUG/SEASON/EPISODE/EPNAME)
  try URL
  subs = { language, 100%, link(like http://www.addic7ed.com/original/EPID/SUBID), blob_infos_rip }
  sub = subs.filter(best matching infos_rip with blob_infos_rip)
  good_name = curl -I 'LINK' -H 'Referer: http://www.addic7ed.com/' | grep "Content-Disposition" | sed 's/^.*="//' | sed 's/"//'
  download sub curl 'LINK' -H 'Referer: http://www.addic7ed.com/'
  rename video + sub