Coder Social home page Coder Social logo

tvdb_itunes's Introduction

TVDB / iTunes Connector

These are two AppleScripts designed to add metadata from the open source TV Database (http://thetvdb.com) to files in iTunes. The input files are expected to follow a quasi-standard naming convention of

Exciting.Show.Name.S01E01.Blargh.mp4

One script is intended to be used from within iTunes itself, and the other--which relies on the first script--is intended to be attached as a folder action.

Prerequisites

These rely on a Python library called "tvdb_api." This may be installed on OS X with

sudo easy_install tvdb_api

(For the Python fans in the audience, pip is a better choice if you have it, of course.)

Installation

Both of these scripts should be loaded into and resaved with AppleScript Editor as scpt files (the output of "Save..." is fine). Copy "Get TV Show Data" into

~/Library/iTunes/Scripts

Note that it must be named exactly that for the folder action script to find it.

Get TV Show Data

Select one or more files in iTunes and run this script (from iTunes' script menu). If it can find the TV show data in the database, it will add the show's correct title, description, year aired, and episode ID, and set other iTunes metadata in similar fashion to a TV show purchased from iTunes.

Note that shows that have a discrepancy between the filename and the listing in the database may come back with no information or, if you're lucky, incorrect information. A file whose show name is parsed as "CSI," for example, will not match the name "CSI: Crime Scene Investigation" in the database. To correct this problem, use the "Get Info" command on the file to enter the show name as it appears in TVDB (which you can determine by going to the web site), and then run the "Get TV Show Data" script again.

Move TV Shows to iTunes

This is intended to be set as a folder action on a "drop folder." It will take files that are placed in that folder, and if they end in ".mp4" or ".m4v", add them to iTunes, delete them from the drop folder, and run the same functions as "Get TV Show Data" does.

If you set up another program, such as Transmission, to copy files into the folder with the action on it, make sure that it doesn't put incomplete files in there. (Transmission has a setting to store incomplete files in a different folder.)

Note that this script assumes you're letting iTunes move media into the iTunes Media directory when it's added rather than just storing references to files. If you're doing the latter, you'll need to modify the script in some fashion.

tvdb_itunes's People

Contributors

chipotle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

joshhyde mrhenko

tvdb_itunes's Issues

"No module named tvdb_api" after installing Python with Homebrew and tvdb_api with pip

After selecting a show an episode in iTunes then activating "Get TV Show Data" from the Script menu, I get the following error in a dialog:

Traceback (most recent call last):
File "", line 4, in
ImportError: No module named tvdb_api

It started working once I ran sudo easy_install tvdb_api, as advised, from the command line. However, the readme seemed to suggest that the pip method was somehow preferable.

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.