Giter VIP home page Giter VIP logo

monitorrent's Introduction

monitorrent

awesome Build Status Build status Coverage Status codecov.io

Join discussion at:

Join the chat at https://gitter.im/werwolfby/monitorrent

Support on Beerpay

Hey dude! Help me out for a couple of 🍻!

Yandex.Money

This app can watch for torrent updates

Supported trackers:

Supported torrent clients:

  • support download torrent files to specified folder (downloader plugin)
  • support transmission over transmission-rpc
  • support deluge over deluge-rpc
  • support uTorrent over uTorrent web api
  • support qbittorrent over webui api

Supported notification services:

Installation:

Docker

Multiplatform image (arm64 and amd64 (arm is not supported anymore, until playwright will support it)):

Docker Pulls Docker Stars Docker Image Size

https://hub.docker.com/r/werwolfby/monitorrent/

How to run docker?

Monitorrent expose 6687 tcp port. And has database to store all current settings and info about monitorrent tracker topics. To store this database outside of container it has to be mounted to file outside monitorrent:

touch /path/to/monitorrent.db
docker run -d \
    --name monitorrent \
    -p 6687:6687 \
    -v /path/to/monitorrent.db:/var/www/monitorrent/monitorrent.db werwolfby/alpine-monitorrent

Where /path/to/monitorrent.db is path to stored monitorrent database file (it has to be absolute or use pwd macros in docker command).

For ARM version please use werwolfby/armhf-alpine-monitorrent.

Windows Installer:

https://github.com/werwolfby/monitorrent/releases/download/1.4.0/MonitorrentInstaller-1.4.0.exe

Manual Install

Requirements:

  • Python 3.9+ and pip

Download latest build: https://github.com/werwolfby/monitorrent/releases/download/1.4.0/monitorrent-1.4.0.zip Extract into monitorent folder

  • pip install -r requirements.txt
  • playwright --with-deps install firefox
  • python server.py

This will start webserver on port 6687

Open in browser http://localhost:6687

Default password is monitorrent. Don't forget to change in settings tab or disable authentication at all

Note for python 2.7

Monitorrent can run on Python 2.7, but because of unicode processing in it, there are plenty of issues with russian symbols in urls, pathes and credentials. Some of this issues are part of libraries that Monitorrent uses, so it can't be fixed on our side.

We will continue to support main functionallity on Python 2.7, but 'ascii' encoding issues will not be fixed in most cases.

Manual Install from sources (development mode)

Requirements:

  • Python 2.7 or 3.x, and pip
  • NodeJS 4.x

Download this repo:

To get monitorrent up and running execute following commands:

  • pip install -r requirements.txt
  • npm install
  • gulp
  • python server.py

This will start webserver on port 6687

Open in browser http://localhost:6687

Default password is monitorrent. Don't forget to change in settings tab or disable authentication at all

Command Line Interface

config.py Argument Environment Variable Default Description
debug --debug MONITORRENT_DEBUG False Run in debug mode. Secret key is always the same
ip --ip MONITORRENT_IP 0.0.0.0 Bind interface
port --port MONITORRENT_PORT 6687 Port for server
db-path --db-path MONITORRENT_DB_PATH monitorrent.db Path to SQL lite database
--config config.py Path to config file

NOTE: Environment Variables overrides config data, Command Line arguments overrides Environment Variables

NOTE: config.py is regular python file with variables and values: debug = True, ip = '127.0.0.1''

Screenshots:

Main page

Main Page

Settings

Settings

lostfilm.tv quality settings

Lostfilm Credentials

Torrent Clients

Torrent Clients

Transmission connection settings

Transmission Connection Settings

Add new topic

Add New Topic

monitorrent's People

Contributors

akior avatar aleshkashell avatar dependabot[bot] avatar dmitryribalka avatar dsilence avatar github-actions[bot] avatar impalex avatar kijojo avatar kolayuk avatar lynxas avatar meffulka avatar mortifactor avatar shemanaev avatar st7105 avatar vlad-nikityuk avatar werwolfby avatar xbeg9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monitorrent's Issues

Redesign logs and execute screen

  • Checkbox to hide info execute logs entries
  • Checkbox to hide execute without download and fails.
    • Filtering by date
    • Checkbox to hide with downloads but without fails??
    • Multiselect dropdown?
  • Remove log level from log entries, keep colors as log level.

Still hangs on bad internet connection

Socket by some reason hangs on some requests.
The issues was reproduced with lostfilm plugin and had next stacktrace:

  File "/var/www/monitorrent/monitorrent/plugins/trackers/lostfilm.py", line 513, in execute
    episodes = self._prepare_request(serie)
  File "/var/www/monitorrent/monitorrent/plugins/trackers/lostfilm.py", line 574, in _prepare_request
    parsed_url = self.tracker.parse_url(topic.url, True)
  File "/var/www/monitorrent/monitorrent/plugins/trackers/lostfilm.py", line 212, in parse_url
    r = requests.get(url, headers=self._headers, allow_redirects=False)
  File "/usr/lib/python2.7/site-packages/requests/api.py", line 67, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/api.py", line 53, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 468, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 376, in send
    timeout=timeout
  File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 559, in urlopen
    body=body, headers=headers)
  File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 376, in _make_request
    httplib_response = conn.getresponse(buffering=True)
  File "/usr/lib/python2.7/httplib.py", line 1132, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 453, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 409, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "/usr/lib/python2.7/socket.py", line 480, in readline
    data = self._sock.recv(self._rbufsize)

And

  File "/var/www/monitorrent/monitorrent/plugins/trackers/lostfilm.py", line 506, in execute
    if not self._execute_login(engine):
  File "/var/www/monitorrent/monitorrent/plugins/trackers/__init__.py", line 273, in _execute_login
    if not self.verify():
  File "/var/www/monitorrent/monitorrent/plugins/trackers/lostfilm.py", line 497, in verify
    return self.tracker.verify()
  File "/var/www/monitorrent/monitorrent/plugins/trackers/lostfilm.py", line 195, in verify
    r1 = requests.get('http://www.lostfilm.tv/my.php', headers=self._headers, cookies=cookies)
  File "/usr/lib/python2.7/site-packages/requests/api.py", line 67, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/api.py", line 53, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 468, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 608, in send
    r.content
  File "/usr/lib/python2.7/site-packages/requests/models.py", line 737, in content
    self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
  File "/usr/lib/python2.7/site-packages/requests/models.py", line 660, in generate
    for chunk in self.raw.stream(chunk_size, decode_content=True):
  File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/response.py", line 340, in stream
    for line in self.read_chunked(amt, decode_content=decode_content):
  File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/response.py", line 489, in read_chunked
    chunk = self._handle_chunk(amt)
  File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/response.py", line 449, in _handle_chunk
    value = self._fp._safe_read(amt)
  File "/usr/lib/python2.7/httplib.py", line 703, in _safe_read
    chunk = self.fp.read(min(amt, MAXAMOUNT))
  File "/usr/lib/python2.7/socket.py", line 384, in read
    data = self._sock.recv(left)

Looks like there is some issue with sockets. In case of bad connection when it starts receive packages from lostfilm and connection was broken it hangs on socket.recv method.

Can be solved by introducing and use timeout for requests.

Extends parameters to start monitorrent

Add parameters and env variables:
ip / MONITORRENT_IP - Bind interface. Default is 0.0.0.0
port / MONITORRENT_PORT - Port for web ui. Default is 5000
db / MONITORRENT_DB - Path to monitorrent database. Default is current folder.

Add push notifications

The following push notification plugins should be implemented:

  • pushbullet
  • pushover
  • pushall
  • telegram bot
  • email

Also need to discuss actual notification usage, e.g. server events and stuff

Can't detect removed topic

Topic was removed from tracker.
But monitorrent can't detect this removed topic and continue successfully run execute on removed topic.

Disable/Enable auth issue.

Issue:

  • disable auth
  • enable auth

Actual result:

Logout button not shown

Expected result:

Logout button should be shown

Failed on execute for lostfilm.tv for some records.

FAILED
Can't parse title: Герои: Возрождение (Heroes Reborn). Темные материи (Dark matters) [MP4]. (S01E0)

FAILED
Can't parse title: Джонатан Стрендж и мистер Норрелл (Jonathan Strange & Mr Norrell). Первый сезон полностью (The Complete First Season) [MP4]. (S01)

WebUI for torrent clients

  • Start/Pause downloads
    • Globally
    • Individually for topics
    • Quiet hours
  • Manual add torrent
    • Support for magnet links
    • Select files for download
  • Configure download folder
    • Globally
    • Individually for topics
  • Stop seeding after download
  • Downloading status, speed and progress.
  • Scripting support

There is error in console on clean database

TypeError: Cannot read property 'status' of undefined
    at getStatus (mt-torrents-list-header.js:37)
    at mt-torrents-list-header.js:52
    at processQueue (angular.js:14567)
    at angular.js:14583
    at Scope.$eval (angular.js:15846)
    at Scope.$digest (angular.js:15657)
    at Scope.$apply (angular.js:15951)
    at done (angular.js:10364)
    at completeRequest (angular.js:10536)
    at XMLHttpRequest.requestLoaded (angular.js:10477)

Future plans

  • Notifiers
  • Search by trackers
    • with rich/smart filtering
      • properties: Releaser, Quality, starting Season/Espisode info, voiceover, subtitles, etc.
    • query language to support smart search?
  • Logo
  • Python 3 support?
  • Router testing/support
  • UI testes + coverage
  • Reimplement to Angular 2
  • Grouping by date period...
    • ...on main page
    • ...on logs/execute
    • ...etc.
  • Get downloading progress from torrent client
  • Add import from torrent clients
    • Add torrent manually with available import
  • One time download without tracking changes
  • Quiet hours
  • Sync with trakt.tv watch list to auto download topics over smart search

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.