Git Product home page Git Product logo

bettertron's Introduction

bettertron is a tool that will scan your better.php. It will check a specified directory for your seeded FLACs and transcode them into the needed MP3 bitrates. It is edition aware and will transcode all the needed bitrates for the edition you are seeding, regardless of better.php.
---------------------------------------------------------------------
bettertron uses several command line tools that are expected to exist:

*lame
*flac
*mktorrent

If you are running ubuntu/debian, this should get all of them:

apt-get install mktorrent flac lame
---------------------------------------------------------------------
This project uses some pre-existing perl modules from CPAN. To install them in Ubuntu/debian (and probaly anything else) in one line:

sudo perl -MCPAN -e 'install WWW::Mechanize, JSON, JSON::XS, Data::Dumper, Config::IniFiles, Bencode, Crypt::SSLeay'
---------------------------------------------------------------------
After that, simply run the better.pl script once. It will generate a config file called better.ini

Please fill it out:

username and password refer to your apollo.rip username and password

torrentdir is where bettertron will create torrents for your transcodes
flacdir is where bettertron will look for your already existing and seeded flacs
transcodedir is where your flac transcodes will end up
---------------------------------------------------------------------
SEEDBOXES:

It's possible that you may not have privileges to install these cpan modules on your seedbox. A helpful user said these steps work on whatbox:

curl -L http://cpanmin.us | perl - App::cpanminus

~/perl5/bin/cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)

echo eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) >> ~/.bashrc

cpanm WWW::Mechanize JSON JSON::XS Data::Dumper Config::IniFiles Bencode Crypt::SSLeay
---------------------------------------------------------------------
TODO:

*Handle torrent upload errors more gracefully (had a couple rejected due to thumb.db restriction. 
Imagine 1982/original release/CD media will be a problem also)
*Better error or unexpected condition handling.
*Consider including perl modules with the package so that it can run more "stand alone". Useful for seeboxes or other situations where you don't have root

bettertron's People

Contributors

brutog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bettertron's Issues

Don't copy cue/log files

It doesn't make sense to copy cue/log files to the transcode directory. We should still probably copy everything else to make sure we get things like album art and any other extras.

Setting up a cronjob

Hey there,

First off, this script is awesome!

Anywho I want to run a cron to automate the task.

If I run the better.pl directly without cd'ing into the folder then it creates a better.ini in my home folder which doesn't work.

So I made a basic bash script as follows:

! /bin/bash

cd ~/bettertron/
perl better.pl

That works fine if I run the script in terminal, but when I add it to a cron, then it doesn't seem to work.

0,5,10,15,20,25,30,35,40,45,50,55 * * * * bash /home/matsta/bettertron/autotranscode.sh

I'm on a seedbox, so unfortunately I can't see the cron logs to see what the problem is.

If you could please help, that would be much appreciated!

Cheers,

Transcode directory naming improvement

If the original directory is Artist - Album FLAC, the target directory should not be something like Artist - Album FLAC [320].

Instead of just copying the name we should dynamically build it from tags.

Because I am lazy I might just cut the word FLAC out instead

Can't convert

I am trying to run convert.pl and get the following error;
invalid top directory at /usr/share/perl/5.14/File/Find.pm line 464.

How can I solve this? I run on a seedbox where I am not root, and I know very little Linux.

Warning message "Unknown Option"

I get this warning message for every transcode. It doesn't seem to affect the operation.

Running transcode with these options: ./converter.pl --320 --V2 "/downloads/Athlete - 2005 - Tourist (Japan) (flac)"
Unknown option: 320
Unknown option: v2

Thank you so much for this script. It saves so much time!

Feature request

Avoid transcoding pre emphasis flacs as the transcodes are against the rules.

Installing on Whatbox.ca

I was having issues with installing this on whatbox due to the lack of sudo privileges. I spoke with their support team. They gave me the following directions, which worked perfectly. I thought it might be useful to pass this along. Perhaps you can incorporate these steps into your documentation in case someone else might be able to benefit from them.

  1. curl -L http://cpanmin.us | perl - App::cpanminus
  2. /perl5/bin/cpanm --local-lib=/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
  3. echo eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) >> ~/.bashrc
  4. cpanm WWW::Mechanize JSON JSON::XS Data::Dumper Config::IniFiles Bencode Crypt::SSLeay

Timeout error

The script was running for a while when this error occured. It was after several successful uploads.

Error POSTing https://what.cd/upload.php?groupid=13453: Origin Time-out at ./better.pl line 315.

The torrent was posted on what.cd, but the torrent file was not moved to the torrent directory (watch in this case). it was left in the program directory.

The program exited.

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.