• This repository has been archived on 27/Jun/2024
  • Stars
    star
    144
  • Rank 255,590 (Top 6 %)
  • Language
    Python
  • Created almost 9 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A fork of whatbetter that can run autonomously

Introduction

  • Do not abuse automated site access.

All automated site access must be done through the API. API use is limited to 5 requests within any 10-second window. Scripts and other automated processes must not scrape the site's HTML pages."

Proceed at your own risk.


redactedbetter is a script which searches your torrent download directory for any FLAC torrents which do not have transcodes, then automatically transcodes and uploads the torrents to redacted.ch.

Installation

Dependencies

  • Python 2.7 or newer
  • mechanize, mutagen, and requests Python modules. You can install these with pip install -r requirements.txt. Depending on your user priveleges, you may need to use sudo, so try: sudo -H pip install -r requirements.txt
  • lame, sox, and flac. These should all be available on your package manager of choice:
    • Ubuntu: sudo apt install lame sox flac
    • macOS: brew install lame sox flac
  • mktorrent: Just installing it with a package manager won't do in this case. We need to build it from source, because otherwise an option that we need is not enabled. For Linux systems, run the following commands in a temporary directory:
$> git clone [email protected]:Rudde/mktorrent.git
$> cd mktorrent
$> make && sudo make install

If you are on a seedbox and you lack the privileges to install packages, you are best off contacting your seedbox provider and asking them to install the listed packages.

Configuration

Run redactedbetter by running the script included when you cloned the repository:

$> ./redactedbetter

You will receive a notification stating that you should edit the configuration file located at:

~/.redactedbetter/config

Open this file in your preferred text editor, and configure as desired. The options are as follows:

  • username: Your redacted.ch username.
  • password: Your redacted.ch password.
  • data_dir: The directory where your torrent downloads are stored.
  • output_dir: The directory where the transcoded torrent files will be stored. If left blank, it will use the value of data_dir.
  • torrent_dir: The directory where the generated .torrent files are stored.
  • formats: A comma space (, ) separated list of formats you'd like to transcode to. By default, this will be flac, v0, 320. flac is included because redactedbetter supports converting 24-bit FLAC to 16-bit FLAC. Note that v2 is not included deliberately - v0 torrents trump v2 torrents per redacted rules.
  • media: A comma space (, ) separated list of media types you want to consider for transcoding. The default value is all redacted lossless formats, but if you want to transcode only CD and vinyl media, for example, you would set this to cd, vinyl.
  • 24bit_behaviour: Defines what happens when the program encounters a FLAC that it thinks is 24-bit. If it is set to 2, every FLAC that has a bit depth of 24 will be silently re-categorized. If it is set to 1, a prompt wil appear. The default is 0 which ignores these occurrences.

Usage

usage: redactedbetter [-h] [-s] [-j THREADS] [--config CONFIG] [--cache CACHE]
                      [-U] [-E] [--version]
                      [release_urls [release_urls ...]]

positional arguments:
  release_urls          the URL where the release is located (default: None)

optional arguments:
  -h, --help            show this help message and exit
  -s, --single          only add one format per release (useful for getting
                        unique groups) (default: False)
  -j THREADS, --threads THREADS
                        number of threads to use when transcoding (default: 3)
  --config CONFIG       the location of the configuration file (default:
                        /home/taylor/.redactedbetter/config)
  --cache CACHE         the location of the cache (default:
                        /home/taylor/.redactedbetter/cache)
  -U, --no-upload       don't upload new torrents (in case you want to do it
                        manually) (default: False)
  -E, --no-24bit-edit   don't try to edit 24-bit torrents mistakenly labeled
                        as 16-bit (default: False)
  --version             show program's version number and exit

Examples

To transcode and upload everything you have in your download directory (it could take a while):

$> ./redactedbetter

To transcode and upload a specific release (provided you have already downloaded the FLAC and it is located in your data_dir):

$> ./redactedbetter http://redacted.ch/torrents.php?id=1000\&torrentid=1000000

Note that if you specify a particular release, redactedbetter will ignore your configuration's media types and attempt to transcode the releases you have specified regardless of their media type (so long as they are lossless types).

redactedbetter caches the results of your transcodes, and will skip any transcodes it believes it's already finished. This makes subsequent runs much faster than the first, especially with large download directories. However, if you do run into errors when running the script, sometimes you will find that the cache thinks the torrent it crashed on previously was uploaded - so it skips it. A solution would be to manually specify the release as mentioned above. If you have multiple issues like this, you can remove the cache:

$> ./redactedbetter ~/.redactedbetter/cache

Beware though, this will cause the script to re-check every download as it does on the first run.

Bugs and feature requests

If you have any issues using the script, or would like to suggest a feature, feel free to open an issue in the issue tracker, provided that you have searched for similar issues already.

More Repositories

1

FuckFuckAdblock

Acts like FuckAdBlock.js but always says that no adblock was detected
JavaScript
1,258
star
2

emojify-webpack-plugin

πŸ¦„ Turn your code into emoji
JavaScript
179
star
3

103-early-anti-adblock

Detect adblockers without Javascript by abusing early hints
TypeScript
118
star
4

BlockBlockAdBlock

Blocks the https://BlockAdBlock.com script [DEPRECATED]
JavaScript
93
star
5

nnmm

A super tiny pastebin/url minifier "microservice"
PHP
80
star
6

Love-Debug-Graph

An fps/memory/misc graph utillity for LΓΆve2D
Lua
34
star
7

vue2-teleport

Teleport component for vue2 that works the same as vue3's teleport
Vue
32
star
8

minidrone-js

🚁 Parrot Minidrone library
JavaScript
31
star
9

RedBetter-WM2

Better.php crawler for Redacted that uses WhatManager
Python
23
star
10

pixelAntiAdblock

PoC adblock detector without javascript abusing RFC2616 section 8.1.4
Python
16
star
11

Nimdok

A fully featured modular IRC bot
Python
11
star
12

CodeIgniter-Limiter

A simple CodeIgniter request/rate limiter
PHP
10
star
13

REDSnatch

What.cd autosnatcher
Python
8
star
14

nginx-config

My personal nginx global config files
Nginx
7
star
15

PushOnAuth

A service that will send a "Push" notification when any kind of authentication happens on your system
Go
6
star
16

unfuck.js

Personal polyfill
JavaScript
6
star
17

Pushover-client-protocol

The missing PushOver client api documentation
Python
5
star
18

Illuminati-detector

Triangle detector and highlighter shoddilly written using opencv
Python
5
star
19

whatmanager-autosnatch

An dead-simple autosnatcher for whatmanager
Python
4
star
20

cc-storage

Computercraft extensible storage system
TypeScript
3
star
21

Pushjet-Gnome-Ghetto

A ghetto client that forwards notifications to Gnome 3
Python
2
star
22

Arch-Linux-Asus-F205TA

Surprisingly hard to install linux on this netbook F205T/X205TA
2
star
23

cc-types

Typescript type definitions for ComputerCraft
2
star
24

Firefox-plugin-enum-disable

Disables plugin enumeration in firefox
JavaScript
1
star
25

transmission-autoclean

Automatically remove untracked torrents from transmission
Python
1
star
26

PyVbus

A simple way to read data from a Resol VBus/LAN adapter using Python 2/3
Python
1
star
27

Python-Teamspeak-interface

A simple interface I wrote to make the querying of a Teamspeak server easier
Python
1
star
28

liqsim

Simple fluid simulation written in javascript
JavaScript
1
star
29

INI-Config

A simple INI config reader/writer
C#
1
star
30

amon3-pushjet-notifications

Adds Pushjet notification support to amon3
1
star
31

amon3-better-MySQL

A better MySQL plugin for amon3
Python
1
star