W2P_TVSeries

TV Series Organizer, built with web2py

View Screenshots

View the Project on GitHub niphlod/w2p_tvseries

W2P_TVSeries

Features

General

Home page

The Home page redirects to Settings if no settings are yet saved. Normally, it displays an "overview" page of what is missing (grouped by series-season). Only episodes that are yet aired are considered. Pretty much like in calendar you'll obtain a general "grasp" of what is going on with your series, but only for those episodes you don't have already. You can directly disable episode tracking if you're not interested, and if you click on the season you'll be redirected to the corresponding page. The status shown here is pretty much "freezed" as the last time a "Organize" run has been made.

Manage

Here you can find Settings, that are somewhat general, Client Settings where you can configure your torrent clients and Log where you can see the detailed log of all operations done by w2p_tvseries

Clients

By default the supported torrent clients are Deluge, Transmission and uTorrent. When setting the preferred client, the default configuration for everyone is suggested directly by w2p_tvseries. Please note that every client must enable "something" to let w2p_tvseries interact with it:

You can see the status of your torrents right in w2p_tvseries at Torrents

Series

You can add as many series as you want: definitions will be downloaded from thetvdb.com . Set your preferred language in Settings and add the series. When you search it, after the name there will be 2 letters identifying the language. Mind that definitions will be downloaded in the language you choose. It's up to you to arrange all other settings if you want to get torrents/subtitles in your preferred language. To add a Series you can click on "Add Series" on the left upper bar. You can search the series, w2p_tvseries will show you the title and the overview. When you'll choose a series, a background operation will be fired to retrieve all series definitions. You'll be then redirected to the settings page, where you can disable season tracking (it won't be displayed, searched for, matched against, etc) and set all kinds of parameters for torrents, subtitles, scooper, etc. The only thing that is needed is the basepath for the series (enjoy the tab completion :-D)

Operations

Every page carry a left menu, with an upper bar showing if there are ongoing operations. Ongoing operations will happen also for other things (Back in Time just to say) but those will be clearly visible on the page itself. The upper bar shows "background" operations that are not displayed elsewhere (except if you read all the log)

Scooper

The Scooper is in charge for moving around files in the correct directories. Often you find yourself with one (or more) folder(s) containing all your last works and you want to keep them organized in multiple subdirectories.... but you don't have the time to actually move them around. For every season you can set "Scooper masks" and add common strings to look for in scooper paths. To preview the files the scooper will move, click on "Preview scooper". Scooper paths (source directories) can be set in Settings. Files will be actually moved when running the Organize queue (need the scheduler active) or by the cron script.

Torrents

Torrents will be searched through ezrss.it, torrentz.eu, DailyTvtorrents.org or showrss.karmorra.info. For every season you have some parameters to specify what to download and what not, using "Torrent Settings". Please be sure to tick "Torrent Tracking" as well. By default some parameters will be suggested by w2p_tvseries, but you can tune it and preview the results in semi real-time (you're encouraged to check at least the first time if the supplied parameters return something useful!). All recent feeds carry all kind of informations, and the app will try to do its best to retrieve what you want, but it has to deal with the actual data returned from the feed itself, and some general considerations. ATM showrss.it can't provide meaningful magnet links, so tune your preferences accordingly! You can allow only some strings (useful for qualities), discard them (prefix with NO_), accept a minimum and a maximum size, or going mad with regexes..... pick your poison!

Subtitles

Subtitles for now are downloaded from italiansubs.net and opensubtitles.net only. Feel free to send me patches to include other sites you want. You can tune the quality for the one available from italiansubs.net (Normal, WEB-DL or 720p). Opensubtitles fetching is based on corresponding episode filehash, so no problem there, but you can choose the language (default is english).

Organizing and renaming

The center for live operations is the Organize page. It shows:

The normal flow of operations is:

Back in Time

A feature that I really wanted was the possibility to revert every filesystem change made by w2p_tvseries. By default, w2p_tvseries records every change made to the filesystem (except for non-destructive operations, like dir creation). You can use Back in Time to Revert every operation. Filter by dates, series and/or Season Number to refine the results. Files will be grouped by the dir they are actually in. Expand those dirs and click on the button to move the file to it's original state.

Calendar

To give you a practical overview of what is coming, what is ready, what is missing.

General

Installation

Those procedures are valid both for installing for the first time and updating an existing installation

Auto - Python available

There is a script in private folder, w2p_tvseries_installer.py Download it, put it in an empty folder, start with

python w2p_tvseries_installer.py

and follow instructions. It tries to:

Semi-Auto - No Python (binary_install)

There's a ready-to-use archive at github.com for Windows users. Decompress it in a folder of your choice and you're good to go: for updates, just overwrite the contents of the folder with the contents of the archive.

Alternatively, go to web2py.com and download the binary for your system. If you are on Windows, just download this zip, decompress in a folder of your choice, put w2p_tvseries_installer.py right out of that folder

c:\chosenfolder
    |
    `-- w2p_tvseries_installer.py
    |
    `-- web2py \
        |
        `-- applications \
            ...

Start the installer/updater with

cd chosenfolder\web2py
web2py.exe -S admin -R ..\w2p_tvseries_installer.py

and follow the instructions. It will:

Manual

Install web2py (downloading the archive and unzipping it in a directory) Download this app from GitHub and place it under web2py/applications/w2p_tvseries

/installfolder/
    |
    `-- w2p_tvseries_installer.py
    |
    `-- web2py/
        |
        `--applications/
            |
            `-- w2p_tvseries/
                |
                `-- controllers/
                |   default.py
                |   ...
                `-- models/
                ...

Start web2py with

python web2py.py -a "yourdesiredpassword"

Then go to http://127.0.0.1:8000/w2p_tvseries/

Refer to the next section on how to start the scheduler

Scheduled tasks

W2P_TVSeries needs two processes alive to use all features: the webserver and the scheduler. The webserver can be started with

web2py.py -i 127.0.0.1 -a 'yourpassword' -p 8000

With this, you can reach the app opening your browser at http://127.0.0.1:8000/w2p_tvseries. For write operations, organizing files, downloading stuff, etc... you must start the scheduler too !!

web2py.py -K w2p_tvseries

That will start the scheduler process: it will run forever. There's a command to start them both at the same time, if you prefer

web2py.py -i 127.0.0.1 - a 'yourpassword' -p 8000 -K w2p_tvseries -X

Once all the series and settings are set through the web-interface, you'll likely want to shut down the webserver and run only the scheduler at specified times (let's say, every 3 hours). To facilitate this, W2P_TVSeries ships with a script (in the private/ folder) w2p_tvseries.py. This script will queue all the needed operations (just like when you press the "Organize" button), then it will start a special scheduler that will terminate at the end of all operations. You can install it into cron with

python web2py/applications/w2p_tvseries/private/w2p_tvseries.py

or, if you installed the binary version, with

web2py.exe -M -S w2p_tvseries -D 0 -R applications/w2p_tvseries/private/w2p_tvseries.py

If you'll like to avoid a subset of the operations, you can start this script with parameters, specifically:

python web2py/applications/w2p_tvseries/private/w2p_tvseries.py -s 'operation_to_avoid1,operation_to_avoid2'

or

web2py.py -M -S w2p_tvseries -D 0 -R applications/w2p_tvseries/private/w2p_tvseries.py -A -s 'operation_to_avoid1,operation_to_avoid2'

and those features will be skipped. Let's say you'll like to rename episodes, download torrents and subtitles but not move files around (using the Scooper), you can disable it with

python web2py/applications/w2p_tvseries/private/w2p_tvseries.py -s scoop_season

Check with -h all the available options

python web2py/applications/w2p_tvseries/private/w2p_tvseries.py -h

PS: If you installed w2p_tvseries with the provided script, you'll find two scripts under the installation folder, containing templates to run the web interface along with the scheduler and the cron script.

Why

This app was born to accomplish some objectives:

Some considerations:

Operations that are "potentially harmful" will be passed to the scheduler (long ones and the ones that need write access): the idea behind is that you can "mount" the web part to a webserver of your choice and give the process only read permission on the filesystem, and then let the scheduler run with a user with write permission to do the "dirty parts" of the work. Still, ideally the scheduler will have take the burden of do the "read the filesystem" part, for the complete decoupling of operations: this is not implemented yet.

Loose ends

Loose ends in such an application are likely to happen. I'll be more than glad to receive patches and accomodate everybody, just remember that I'm definitely NOT a full-time python programmer guru.

Credits

Let's remind who make this possible. Developers like Andrey Petrov, Massimo Di Pierro, Anthony Bastardi, Branko Vukelic, Bruno Rocha, Jonathan Lundell, Omi Chiba, Nathan Freeze and many others let me think that collaboration is the way to go for programming. Have the possibility to talk to and with them, allow yourself to grow a better programmer and generally as a better person. Python programs and libraries that are easy to understand even for me were (and are) a great source nonetheless:

How to contribute

All the development takes place on GitHub. If you spot a bug or want to propose a new features, please open an issue so it doesn't get lost. Last but certainly not least, I'm not a git expert but you can fork the repo and send pull requests ;-)