betanin logo

betanin

  •  0 ratings
In category: Automation

About betanin

Music organization man-in-the-middle of your torrent client and music player. Based on beets.io, similar to Sonarr and Radarr. GPL-3.0 Pyth

  •   575  
  •   0  
  •   0  
  •   0  
Github stats:
  •  Commits: N/A  
  •   N/A  
  •   N/A  
  •  Latest commit: N/A  

Deploy this app to Linode with a free $100 credit!

Languages/Platforms/Technologies:
Lincenses:

More about betanin

beets.io based man-in-the-middle of your torrent client and music player


workflow


notifiers

betanin uses apprise for notifications. so anything supported there will work. but some include

  • email
  • discord
  • telegram
  • emby

installation

pip install --user betanin

usage

# start server
betanin
# a config file will be created, add your credentials to it
# start again
betanin [--host=<host>] [--port=<port>]
# ui will be available at port
# you may also use env vars instead, eg
BETANIN_HOST=0.0.0.0 betanin
BETANIN_PORT=4030 betanin

# optionally start cli (for db operations, debugging)
betanin-shell
# or if docker
docker exec -it <container_id> betanin-shell

screenshots


docker

image

docker pull sentriz/betanin

volumes /b/.local/share/betanin/ for a persistent database

/b/.config/betanin/ for a persistent betanin config
/b/.config/beets/ for a persistent beets home (point this to your current beets home if you have one)
/music/ so beets can access your music
/downloads/ so beets can access your downloads

compose
betanin:
  image: sentriz/betanin
  ports:
    - 9393:9393
  restart: unless-stopped
  environment:
    - UID=1000 # (optionally) set user id
    - GID=1000 # (optionally) set group id
  volumes:
    - ${DATA}/betanin/data:/b/.local/share/betanin/
    - ${DATA}/betanin/config:/b/.config/betanin/
    - ${DATA}/betanin/beets:/b/.config/beets/
    - ${MEDIA}/music:/music/
    - ${MEDIA}/downloads:/downloads/

transmission

create a script named done.sh or anything you like, and make it executable:
chmod +x done.sh

settings.json (example excerpt)
...
"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/scripts/done.sh",
...
done script
#!/bin/sh

curl \
    --request POST \
    --data-urlencode "path=<path_to_transmission_downloads>" \
    --data-urlencode "name=$TR_TORRENT_NAME" \
    --header "X-API-Key: <your_api_key>" \
    "https://betanin.example.com/api/torrents"
transmission docker compose (excerpt)
volumes:
  - ${DATA}/transmission/config:/config
  - ${DATA}/transmission/scripts:/scripts
  - ${MEDIA}/download:/downloads

deluge

create a script named done.sh or anything you like, and make it executable:
chmod +x done.sh
you must also be using the Execute plugin, set to the Torrent Complete event

done script
#!/bin/sh

curl \
    --request POST \
    --data-urlencode "path=<path_to_deluge_downloads>" \
    --data-urlencode "name=$2" \
    --header "X-API-Key: <your_api_key>" \
    "https://betanin.example.com/api/torrents"

qbittorrent

create a script named done.sh or anything you like, and make it executable:
chmod +x done.sh

open qbittorrent Tools > Options > check Run external program on torrent completion

set the path to the above done.sh and arguments such as

/path/to/done.sh "%L" "%R"
done script
#!/bin/sh

echo "category: $1"
echo "path: $2"

[ "$1" != "music" ] && exit

curl \
    --request POST \
    --data-urlencode "both=$2" \
    --header "X-API-Key: <your_api_key>" \
    "https://betanin.example.com/api/torrents"

now any music downloaded to the music category will be imported by betanin


developing

working on the backend

there is not much else to do, write your code, python -m betanin.entry.betanin, kill it, write your code, etc. the webserver will be available at http://localhost:9393/. the static frontend is served at /, and the api is served at /api. (there is a swagger ui there too) also see python -m betanin.entry.shell.
if you need to do a manual migration do env FLASK_APP='betanin.application:create' flask db migrate --directory betanin_migrations/ (then upgrades are automatically done on betanin start)

working on the frontend

start the backend with python -m betanin.entry.betanin, but don’t use the static frontend served at http://localhost:9393/. Instead, in a new shell, do npm --prefix betanin_client/ run serve and use the frontend served at http://localhost:8081/. it will look for a backend listening on port 9393 locally. after that you can edit anything in betanin_client/src, it will be linted and automatically reflected in your web browser.

Comments (0)

Please login to join the discussion on this project.

betanin Reviews (0)

Overall Rating

None

based on 0 ratings

Please login to review this project.

No reviews for this project yet.

↑ back to top

pCloud Lifetime

Popular Projects

FluxBB

in Social Networks and Forums
 33k    0    0    0  

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Libreddit

in Social Networks and Forums
 6k    0    1    0  

CasaOS

in Self-hosting Solutions
 5k    0    0    0  

Audiobookshelf

in Audio Streaming
 5k    0    1    0  

Dashboard

in Personal Dashboards
 5k    0    0    0  

Mediagoblin

in Photo and Video Galleries
 4k    0    0    0  

Most Discussed

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Tube Archivist

in Automation
 3k    0    1    0  

OneDev

in Project Management
 2k    0    0    0  

iodine

in Proxy
 2k    0    0    0  

Alf.io

in Booking and Scheduling
 2k    0    0    0  

sysPass

in Password Managers
 987    0    0    0  

Misskey

in Social Networks and Forums
 2k    0    0    0  
Linux VPS from $11/yr.
RackNerd VPS for $11.38/mo

Top Rated Projects

Gitea

 1 rating
in Project Management

Bagisto

 1 rating
in E-commerce

LinkAce

 1 rating
in Bookmarks and Link Sharing

Pydio

 1 rating
in File Transfer & Synchronization

Audiobookshelf

 1 rating
in Audio Streaming

Nextcloud

 1 rating
in File Transfer & Synchronization

Seafile

 1 rating
in File Transfer & Synchronization

Categories

You May Also Be Interested In

Alltube logo
Alltube cover

Alltube

Web interface for youtube-dl, a program to download videos …

Exadel CompreFace logo
Exadel CompreFace cover

Exadel CompreFace

Face recognition system that provides REST API for face rec…

LazyLibrarian logo
LazyLibrarian cover

LazyLibrarian

LazyLibrarian is a program to follow authors and grab metad…