Code Monkey home page Code Monkey logo

addarr's People

Contributors

alexfu avatar anast20sm avatar brandon-wilbur avatar harsh18262 avatar heisenberg2980 avatar hurdurderp avatar mribeiro avatar ptath avatar schoentoon avatar seblat5ch avatar sevospl avatar tedvdb avatar tiomny avatar toddrob99 avatar valentinm27 avatar waterboy1602 avatar wessec avatar xonstone avatar yupps00 avatar ywattenberg 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

addarr's Issues

Bot does not support concurrent users

If two users try to interact with the bot at the same time, the global service and output vars get conflicted. A possible solution (which would require only minimal code changes) is to assign a unique session id when a user starts the process, and move service and output into a dict using the session id as the key. For example:

sessionData = {
    "UNIQUE-SESSION-ID": {
        "service": None,
        "output": None,
    },
    "ANOTHER-UNIQUE-SESSION-ID": {
        "service": None,
        "output": None,
    },
}

I've been learning more about the python-telegram-bot module, and the best solution for this might be as easy as moving the service and output variables inside context.user_data.

I am willing to work on adding support for concurrency, if you want. Feel free to assign the issue to me.

Start command not unique

The /start in a gorup starts questions for every user in the group instead of the one that started the command making weird interactions when people come check the messages or are already in chat.

Spanish translation

I have translated it to spanish, please feel free to copy the text below and integrate it to the project.

#Spanish
es: 
  Start: Empezar
  Stop: Parar
  Movie: Pelicula
  Serie: Serie
  Start chatting: Comienza a conversar con Addarr en Telegram. La primera vez que uses "start" se te pedirá tu contraseña.
  End: Se ha terminado de añadir series o peliculas.
  Title: "Introduzca el título:"
  What is this?: ¿Esto es una película o una serie?
  New: Nueva busqueda
  Next result: No, muéstrame el siguiente resultado
  Last result: No hay más resultados
  Add: Si, añadir
  Select a path: Por favor, selecciona un directorio para la película o serie
  Authorize: Primero hay que autorizar el chat. ¿Cual es la contraseña?
  Wrong password: Contraseña incorrecta. Prueba de nuevo...
  Chatid added: "Este chat se ha añadido a la lista de chats permitidos. Ahora puedes comenzar a usar el bot. \nIf you entered a command, you need to execute it again."
  NotAdmin: "Necesitas ser administrador para ejecutar este comando."
  Chatid already allowed: "Este chat ya está autorizado."
  Help: "¿Quieres ver este mensaje otra vez? Usa  /%{help}.\n
    Para autentificar antes del primer uso: /%{authenticate}.\n
    Para añadir una película o serie usa /%{add}.\n
    Para añadir inmediatamente una película o serie puedes usar /%{movie} o /%{serie}.\n
    Para comprobar qué series hay en Sonarr /%{allseries}.\n
    Para cambiar la velocidad en Transmission usa /%{transmission}."

  messages:
    Add: Si, añadir %{subject}
    This: ¿Es ésta la %{subject} que quieres añadir?
    Failed: Oops, fallo al añadir la %{subject}. Prueba de nuevo.
    Success: "La %{subject} se ha añadido con éxito 🙂"
    Exist: La %{subject} ya existe 😉
  
  searchresults:
    zero: No se han encontrado resultados en la busqueda
    one: Un resultado en la busqueda
    other: "%{count} resultados en la busqueda"

  Transmission:
    NotEnabled: "La función de Transmission no está activada."
    Speed: "¿Que velocidad quieres fijar en Transmission?"
    TSL: Limite de Velocidad Temporal
    Normal: Velocidad normal
    ChangedToTSL: "Limite de Velocidad Temporal activado"
    ChangedToNormal: "Limite de Velocidad Temporal desactivado"

  Sabnzbd:
    NotEnabled: La función de Sabnzbd function no está activada.
    Speed: ¿Que velocidad quieres fijar en Sabnzbd?
    Limit25: 25%
    Limit50: 50%
    Limit100: Sin límite
    ChangedTo50: Límite fijado al 50%
    ChangedTo25: Límit fijado al 25%
    ChangedTo100: Sin límite
    Error: Algó falló al cambiar la velocidad

No ip or port defined. Generate of APIQUERY failed: unsupported operand type(s) for +: 'NoneType' and 'str'.

2021-04-25 15:50:48,600 - addarr - DEBUG - Addarr v0.3 starting up...
2021-04-25 15:50:48,614 - addarr - INFO - Start chatting with Addarr in Telegram. The first time you use "start" you will be asked to enter your password.
2021-04-25 15:51:13,791 - addarr - DEBUG - User entered a title /Godfather
2021-04-25 15:51:17,485 - addarr.commons - WARNING - No ip or port defined.
2021-04-25 15:51:17,485 - addarr.commons - WARNING - Generate of APIQUERY failed: unsupported operand type(s) for +: 'NoneType' and 'str'.

I receive the above error in my log file when I attempt to add. The process I use is:
/start
Enter the title:
/Godfather
Is this a movie or a series?
Movie
It's when I click on "Movie" when I receive the above error and the bot does not continue to the next step. I can type /end and the bot will end the input session.

I'm not really sure how to tell which version I'm on or which version I was using previously. I just ran a git clone today. Previously, I was running whichever build was available on February 17, 2020.

I copied over my previous chatid.txt and config.yaml file from the old version and modified it to include the necessary parameters for the current version. Anything listed in bold face text below is either new or changed from my old config.yaml file.

#Restrict some commands (Transmission) to only admins
enableAdmin: true

#Sonarr Configuration
sonarr:
  server:
    addr: myweb.host.com
    port : 8989 # Default is 8989
    ssl: false #default false
  auth:
    apikey: myAPIkey
    username: myUserID
    password: myPassword
  search: true
  seasonFolder: true
  qualityProfileId: 1

#Radarr Configuration
radarr:
  server:
    addr: myweb.host.com
    port : 7878 # Default is 7878
    ssl: false #default false
  auth:
    apikey: myAPIkey
    username: myUserID
    password: myPassword
  search: true
  qualityProfileId: 1

#Telegram Configuration
telegram:
  token: myToken
  password: myPassword

#Transmission Configuration
transmission:
  enable: false #enable the transmission commands
  onlyAdmin: true #transmission command  will only work for admins
  host:
  authentication: true #is transmission protected with a password?
  username:
  password:

sabnzbd:
  enable: false
  onlyAdmin: true
  server:
    addr:
    port: 8090 # Default is 8090
    path: / # Default is / . If set, it must start and finish with / . Eg: /sonarr/
    ssl: false #default false
  auth:
    apikey:
    username:
    password:

#Language
language: en

#Entrypoints
entrypointAuth: auth #auth or a custom entrypoint
entrypointHelp: help #help entrypoint
entrypointAdd: start #start or a custom entrypoint
entrypointAllSeries: allSeries #allSeries or a custom entrypoint
entrypointAllMovies: allMovies #allMovies or a custom entrypoint
entrypointTransmission: transmission #transmission or a custom entrypoint
entrypointSabnzbd: sabnzbd #sabnzbd or a custom entrypoint

#Logging
logToConsole: false
debugLogging: true

Transmission inside Docker : Transmission-remote: not found

Hello here ! 👋

I'm very interested by this project ! But I have troubles to make the Transmission feature works.

Even if I have correctly set my params inside config.yaml, every time I ask the bot to change the transmission speed I get this error message in the console sh: transmission-remote: not found, (I already have the debug-log option activated in my config file).

I understood by reading this bit of code that Addarr uses the transmission-remote CLI and composes the corresponding command with os.system. But does Addarr uses the CLI inside of Addar's own docker container, or execute the command on the host ?

For my case, Transmission is itself located inside a docker container, so transmission-remote is not in the PATH of my host system. But that command works correctly if I execute the command inside my docker container like thisdocker container exec transmission transmission-remote localhost --auth transmission:mypassword --no-alt-speed.

If this feature is not supported when Transmission is itself in a docker container, maybe I can see if I can make a PR change this in the config file (and execute the command with docker exec itself).

Allowlist only mode for security

I don't want script kiddies to try guess my password, and I would like to avoid having to give people a password to authenticate.
I'd like a mode where the bot will only answer to people in the allowlist, while looking dead for the others.

Instruction

Hey,

i can't figure out how to set this up whit the instruction given to me😅. can you guys make a youtube video or a configuration instruction for windows pls :)

Clarify Docker installation guide

@toddrob99 I saw that you edited the Docker installation guide.

Could you maybe clarify it a bit more? I just transferred from FreeBSD to Docker and I didn't even succeed in installing my own project. I struggled at the step where you should rename config-example.yml to config.yml. How are you supposed to do this? I can't find this files or better said: I have no idea where these files are supposed to be.

I already thank you a lot for the work you've put in this project!

Can't Start Addarr

Hi,
just installed Addarr, changed values in the config and tried to start it with python addarr.py.
I get the following error:

  File "addarr.py", line 42
    READ_CHOICE: [MessageHandler(Filters.regex(f'^({transcript["Movie"]}|{transcript["Serie"]})$'), search)],
                                                                                                ^
SyntaxError: invalid syntax

Better handling of "no result found"

When there is no movie found, the bot responds like this:

Bildschirmfoto 2020-07-09 um 07 42 31

A proper error message would be nice here to indicate that there are actually no results for the given search term.

Provide automatically build image on docker hub

As you're already providing a Dockerfile anyway, it might be worth it to simply set up automated builds on docker hub. This way people can just docker pull it and try it out right away without having to build the image themselves first. Documentation for this can be found here. Or simply login on https://hub.docker.com/ create a repository, link github and it should be fairly straight forward from there.

Custom keyboard remains after flow is completed

The custom keyboard continues to pop up after the flow has ended. I suggest including reply_markup=telegram.ReplyKeyboardRemove() with the 'End' message in stop(), to remove the custom keyboard.

qualityProfileId

Hi, how can I get the list of equivalent values?
For example,. what is the righ value for 1080p ?

Thanks

Sonarr: Oops, failed to add the series. Maybe give it another try.

Hi!

I'm not getting any errors in the log, but adding series to sonarr does not work.

Starting addarr ... done
Attaching to addarr
addarr          | /usr/local/lib/python3.9/site-packages/telegram/ext/conversationhandler.py:279: UserWarning: If 'per_message=False', 'CallbackQueryHandler' will not be tracked for every message.
addarr          |   warnings.warn(
addarr          | 2021-02-11 11:24:59,005 - addarr - INFO - Start chatting with Addarr in Telegram. The first time you use "start" you will be asked to enter your password.```

Cannot add movie nor series

Hi all, hope you can help me on this.
So I have this docker-compose file section for addarr:

  addarr:
    container_name: addarr
    image: waterboy1602/addarr
    restart: unless-stopped
    network_mode: host
    volumes:
      - /home/mothership/docker/containers-data/addarr/config/config.yaml:/app/config.yaml:ro
      - /home/mothership/docker/containers-data/addarr/config/chatid.txt:/app/chatid.txt:rw
      - /home/mothership/docker/containers-data/addarr/logs:/app/logs:rw

And the config:

#Restrict some commands (Transmission) to only admins
enableAdmin: false

#Sonarr Configuration
sonarr:
  server:
    addr: 192.168.21.200
    port : 8989 # Default is 8989
    ssl: false #default false
  auth:
    apikey: *****
    username:
    password:
  search: true
  seasonFolder: true
  qualityProfileId: 1

#Radarr Configuration
radarr:
  server:
    addr: 192.168.21.200
    port : 7878 # Default is 7878
    ssl: false #default false
  auth:
    apikey: ******
    username:
    password:
  search: true
  qualityProfileId: 4

#Telegram Configuration
telegram:
  token: ******
  password: *****

#Transmission Configuration
transmission:
  enable: false #enable the transmission commands
  onlyAdmin: true #transmission command  will only work for admins
  host:
  authentication: true #is transmission protected with a password?
  username:
  password:

#Language
language: en

#Entrypoints
entrypointAuth: auth #auth or a custom entrypoint
entrypointAdd: start #start or a custom entrypoint
entrypointAllSeries: allSeries #allSeries or a custom entrypoint
entrypointTransmission: transmission #transmission or a custom entrypoint

#Logging
logToConsole: true
debugLogging: true

When chatting with the bot I can search both series and movies but the problem is when I confirm to add. These are the logs I get:

2020-11-03 13:11:02,575 - addarr - DEBUG - Addarr v0.3 starting up...,
2020-11-03 13:11:02,598 - addarr - INFO - Start chatting with Addarr in Telegram. The first time you use "start" you will be asked to enter your password.,
2020-11-03 13:11:16,223 - addarr.radarr - DEBUG - Found Radarr paths: [{'path': '/movies/', 'freeSpace': 400074092544, 'totalSpace': 1964637171712, 'id': 1}],
2020-11-03 13:11:16,224 - addarr - DEBUG - Only found 1 path, so proceeding with that one...,
2020-11-03 13:11:16,552 - addarr - DEBUG - Removing choice, title, position, paths, and output from context.user_data...,
2020-11-03 13:17:26,940 - addarr.sonarr - DEBUG - Found sonarr paths: [{'path': '/tv/', 'freeSpace': 400074092544, 'totalSpace': 1964637171712, 'id': 1}],
2020-11-03 13:17:26,940 - addarr - DEBUG - Only found 1 path, so proceeding with that one...,
2020-11-03 13:17:27,494 - addarr - DEBUG - Removing choice, title, position, paths, and output from context.user_data...

I see no logs or any clue an attempt was made to add a show/movie in sonarr/radarr.

I'm running:

  • Sonarr 3.0.4.991
  • Radarr 0.2.0.1504 develop
  • OS Linux 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Any idea what may be wrong?

Thanks

No result found

I'm not sure why but my bot now says "No result found" no matter what I query for. This happened after updating to the latest version of Addarr. I don't believe anything else in my environment has changed. I thought something may have gone south with my OS so I reinstalled it. Same result. This time around I installed using docker but I don't believe that's the issue as I'm still running into the same problem.

OS: Debian GNU/Linux 10

config.yaml

#Sonarr Configuration
sonarr:
  server:
    addr: myhost.mydomain.com
    port : 8989 # Default is 8989
    path: / # Default is / . If set, it must start and finish with / . Eg: /sonarr/
    ssl: false #default false
  auth:
    apikey: 34ccbeede5bc3c036852a8807f9ff4a1
    username: myUserName
    password: myPassword
  search: true
  seasonFolder: true
  qualityProfileId: 1
  excludedRootFolders: # If set must start and finish with / Eg: /mnt/Media/
    -

#Radarr Configuration
radarr:
  server:
    addr: myhost.mydomain.com
    port : 7878 # Default is 7878
    path: / # Default is / . If set, it must start and finish with / . Eg: /radarr/
    ssl: false #default false
  auth:
    apikey: 1e18ebbae35f17496b84aa1ad2d3067c
    username: myUserName
    password: myPassword
  search: true
  qualityProfileId: 1
  excludedRootFolders: # If set, must start and finish with / Eg: /mnt/Media/
    -

#Telegram Configuration
telegram:
  token: 1253292758:ABEXkFAsayAPM2jXdtNotD1_rjEna2PLvI0
  password: mySecretCode

#Transmission Configuration
transmission:
  enable: false #enable the transmission commands
  onlyAdmin: true #transmission command  will only work for admins
  host: # IP-adres of the Transmission service
  authentication: true #is transmission protected with a password?
  username:
  password:

sabnzbd:
  enable: false
  onlyAdmin: true
  server:
    addr:
    port: 8090 # Default is 8090
    path: / # Default is / . If set, it must start and finish with / . Eg: /sonarr/
    ssl: false #default false
  auth:
    apikey:
    username:
    password:

# Optional settings:
##Language
language: en

##Entrypoints
entrypointAuth: auth #auth or a custom entrypoint
entrypointHelp: help #help entrypoint
entrypointAdd: start #start or a custom entrypoint
entrypointAllSeries: allSeries #allSeries or a custom entrypoint
entrypointAllMovies: allMovies #allMovies or a custom entrypoint
entrypointTransmission: transmission #transmission or a custom entrypoint
entrypointSabnzbd: sabnzbd #sabnzbd or a custom entrypoint

##Restrict some commands (Transmission) to only admins
enableAdmin: true

##Logging
logToConsole: false
debugLogging: true

addarr.log
2021-07-18 23:52:19,949 - addarr - DEBUG - User entered a title /stillwater
2021-07-18 23:52:21,937 - addarr - DEBUG - Removing choice, title, position, paths, and output from context.user_data...
2021-07-18 23:53:14,540 - addarr - DEBUG - User issued /movie command, so setting user_data[choice] accordingly
2021-07-18 23:53:24,749 - addarr - DEBUG - User entered a title /godfather
2021-07-18 23:53:24,749 - addarr - DEBUG - user_data[choice] is Movie, skipping step of selecting movie/series
2021-07-18 23:53:25,142 - addarr - DEBUG - Removing choice, title, position, paths, and output from context.user_data...

Error when searching for movie (possibly due to non-unicode characters)

Running in docker, current master version. Search for Friends مش (2010) and the following error will be thrown.

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/telegram/ext/dispatcher.py", line 340, in process_update
    handler.handle_update(update, self, check, context)
  File "/usr/local/lib/python3.8/site-packages/telegram/ext/conversationhandler.py", line 465, in handle_update
    new_state = handler.handle_update(update, dispatcher, check_result, context)
  File "/usr/local/lib/python3.8/site-packages/telegram/ext/handler.py", line 119, in handle_update
    return self.callback(update, context)
  File "/usr/src/addarr/addarr.py", line 325, in searchSerieMovie
    chat_id=update.effective_message.chat_id, photo=output[position]["poster"]
IndexError: list index out of range

I found this while working on other changes, and haven't had a chance to trace the cause. The movie I found the issue with does have a poster URL (here's the escaped data from my log):

{\'title\': \'Friends مش\', \'seasonCount\': 1, \'poster\': \'https://artworks.thetvdb.com/banners/posters/332606-1.jpg\', \'year\': 2010, \'id\': 332606}

[Translations] genders

In Italian, the movie is a male term, while the series is a female term. This leads to poor translation, having to specify both articles. (we don't have a neutral article).
Maybe we need to add the "movie word" and the "movie word with article" in translation to tackle this (?)

Getting "AttributeError: module 'i18n' has no attribute 'load_path'" on Pi4

After the latest update i can no longer start Addarr getting the following error:

Traceback (most recent call last):
  File "addarr.py", line 11, in <module>
    from commons import checkId, authentication, format_bytes, format_long_list_message
  File "/home/pi/Addarr/commons.py", line 7, in <module>
    from translations import i18n
  File "/home/pi/Addarr/translations.py", line 6, in <module>
    i18n.load_path.append(LANG_PATH)
AttributeError: module 'i18n' has no attribute 'load_path'

Port issue

Hi , my server is running with dockers and letsencrypt,
Every container app have its own subdomain, for example :
https://sonarr.mydomain.com
Checking the log I see the error is raised because the url string generated by addarr when requesting api info
Sample;
https://sonarr.mydomain.com:None/api/series/lookup?apikey=XXXXXXXXXXXXXXXXXXXXXXXXXXXX&term=Charmed
As no port is used that is affecting generated url , adding string ":None" inside url, if I remove manually that url works, for example
https://sonarr.mydomain.com/api/series/lookup?apikey=XXXXXXXXXXXXXXXXXXXXXXXXXXXX&term=Charmed works

No results with search

Hi, i'm using docker. After the /start command i will get the question of the bot but when i'm answer with movie or show it won't reply

in the log of the docker i don't see anything except Start chatting with....

example of my config.yaml

sonarr:
server:
addr: http://172.18.0.1
port: 8989
ssl: false
auth:
apikey: 818xxxxxxxxxx
username:
password:
search: true
rootFolder: /tv
seasonFolder: true
qualityProfileId: 1

Large pull request for coding standards?

Hello. I am a hobbyist python developer with a few significant projects under my belt (MLB-StatsAPI being the most utilized and redball being the largest). I also developed and run several bots for work that are in private repos, although I am new to developing bots for Telegram.

I have forked your repo and made some significant changes to code formatting, while not actually changing functionality. Before submitting a pull request I thought I would ask if you are open to this level of change from a community member.

The only end-user-visible changes I made are in lang.yaml, where I changed "serie" to "series" in the English section, fixed a grammatical error, and removed reference to Plex since being added to Sonarr/Radarr does not equate to being downloaded and available in Plex.

Please review the commit on my dev branch and let me know if you are interested in me submitting a pull request.

As a side note, I also plan to look into adding support for multiple root paths in Sonarr and Radarr, since I don't want everything to be added to the default. It will be difficult to submit pull requests for new functionality if we are not using the same standards (I've applied black for formatting and flake8 for linting).

Show available drive space

I have multiple disk drives to store my data. When adding a movie or series, it'd be very helpful if Addarr could show available drive space. Radarr and Sonarr show this information under System > Status but I'm not sure if you can pull that information.

Error when starting new bot

python 3.7

When I try to run Addarr, I get this error:

user@host:/opt/addarr$ python addarr.py Traceback (most recent call last): File "addarr.py", line 34, in <module> updater = Updater(config["telegram"]["token"], use_context=True) KeyError: 'telegram'

I made a copy of config_example.yaml to config.yaml
The Transmission area is left as is because I don't use Transmission.
I've changed my API keys and token to a fictitious value for this post.
Most parameters are intentionally left blank because Sonarr and Radarr run from my PC at home while I'm trying to get this bot to run from my VPS. This is the way I had another bot setup which had limited functionality.

#Restrict some commands (Transmission) to only admins
enableAdmin: true

#Sonarr Configuration
sonarr:
server:
addr:
port : 38989 # Default is 8989
ssl: false #default false
auth:
apikey: 8a52d702a4844f68b932e946272640cd
username:
password:
search: true
seasonFolder: true
qualityProfileId: 1

#Radarr Configuration
radarr:
server:
addr:
port : 37878 # Default is 7878
ssl: false #default false
auth:
apikey: fa716b2ace2a4b642ec9480737cfd6b3
username:
password:
search: true
qualityProfileId: 1

#Telegram Configuration
telegram:
token: 1234542659:AAEXkEAgwuACM5jPcalotv1_rjQna7PLzI0
password:

can't execute

When I run python addarr.py I get the following error
Traceback (most recent call last): File "addarr.py", line 10, in <module> from telegram import * ModuleNotFoundError: No module named 'telegram'
I am using python 3.6.9. Any ideas?

Configure Profile and Path in config

Can you modify the code to configure the movie profile and path settings in the yaml config file? It seems to me it is currently configured statically in the sonarr.py and radarr.py.

I failed to add the movie

I have managed to spend some more time with this and have it installed. Now I try and add a movie to Radarr and get the following: I failed to add the movie

#Radarr Configuration
radarr:
  server:
    addr: localIP_redacted
    port : 7878 # Default is 7878
    ssl: false #default false
  auth:
    apikey: API_redacted
    username:
    password:
  search: true
  rootFolder: /radarr
  qualityProfileId: 1

#Telegram Configuration
telegram:
  token: token_redacted
  password: auth_redacted

#Transmission Configuration
transmission:
  enable: true #enable the transmission commands
  onlyAdmin: true #transmission command  will only work for admins
  host:
  authentication: true #is transmission protected with a password?
  username:
  password:

#Language
language: en

#Entrypoints
entrypointAuth: auth #auth or a custom entrypoint
entrypointAdd: start #start or a custom entrypoint
entrypointTransmission: transmission #transmission or a custom entrypoint

I assume the 'rootfolder' option is when you are accessing the site via /radarr in your URL? What have I missed?

Thanks

Using reactions than the keyboard for selection

I've noticed that when you put the bot in a group and when somebody tries to request something, everyone's affected with the bot changing their keyboard for choices.

Once the request has been made by the user, I've also realised that the other users will have the last "reply" of the movie on top of their keyboard. That's kinda strange.

Plus, I feel like if we use reactions than the keyboard selection, it'll be more stable and less visible queries on the chat.

Here's a screenshot of what I meant by using reactions for selections.
So that the input is a button rather than a wordy response from the user.

Screenshot 2020-06-11 at 6 36 35 PM

Hope this is possible and thanks again!

Not able to add movies or series

I'm new to all this so please bear with me.

I have set up the bot but after selecting Movie or Series nothing happens. The output on CMD is the following:

C:\Users\Administrator>A:\Addarr-master\addarr.py
2021-01-30 13:37:00,474 - addarr - INFO - Start chatting with Addarr in Telegram. The first time you use "start" you will be asked to enter your password.
2021-01-30 13:37:17,740 - addarr.commons - WARNING - Generate of APIQUERY failed: 'auth'.
No error handlers are registered, logging exception.
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\telegram\ext\dispatcher.py", line 432, in process_update
handler.handle_update(update, self, check, context)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\telegram\ext\conversationhandler.py", line 517, in handle_update
new_state = handler.handle_update(update, dispatcher, check_result, context)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\telegram\ext\handler.py", line 156, in handle_update
return self.callback(update, context)
File "A:\Addarr-master\addarr.py", line 366, in searchSerieMovie
searchResult = service.search(title)
File "A:\Addarr-master\sonarr.py", line 25, in search
req = requests.get(commons.generateApiQuery("sonarr", "series/lookup", parameters))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 528, in request
prep = self.prepare_request(req)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 456, in prepare_request
p.prepare(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\models.py", line 316, in prepare
self.prepare_url(url, params)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\models.py", line 390, in prepare_url
raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL 'None': No schema supplied. Perhaps you meant http://None?

And my configuration file is:

#Restrict some commands (Transmission) to only admins
enableAdmin: true

#Sonarr Configuration
sonarr:
server:
addr: http://127.0.0.1
port: 8989 # Default is 8989
path: / # Default is / . If set, it must start and finish with / . Eg: /sonarr/
ssl: false #default false
auth:
apikey: (Added the API Key found in sonarr settings)
username:
password:
search: true
seasonFolder: true
qualityProfileId: 1

#Radarr Configuration
radarr:
server:
addr: http://127.0.0.1
port : 7878 # Default is 7878
path: / # Default is / . If set, it must start and finish with / . Eg: /radarr/
ssl: false #default false
auth:
apikey: (Added the API Key found in radarr settings)
username:
password:
search: true
qualityProfileId: 1

#Telegram Configuration
telegram:
token: (Telegram bot token)
password:

#Transmission Configuration
transmission:
enable: true #enable the transmission commands
onlyAdmin: true #transmission command will only work for admins
host:
authentication: true #is transmission protected with a password?
username:
password:

#Language
language: en

#Entrypoints
entrypointAuth: auth #auth or a custom entrypoint
entrypointAdd: start #start or a custom entrypoint
entrypointAllSeries: allSeries #allSeries or a custom entrypoint
entrypointTransmission: transmission #transmission or a custom entrypoint

#Logging
logToConsole: true
debugLogging: true

The log file just has the "Generate of APIQUERY failed: 'auth'." warning
Let me know if there is any more info I could provide.

trying to install on rpi4

Hello
Trying to install on rpi4 (Raspbian):

  1. apt-get install libxml2-dev libxslt1-dev python3-libxml2 python3-lxml unrar-free
  2. git clone https://github.com/Waterboy1602/Addarr.git
  3. pip install -r requirements.txt
    And when python addarr.py then I get this :
root@raspberrypi:/usr/Addarr# python addarr.py
  File "addarr.py", line 32
    logger.debug(f"Addarr v{__version__} starting up...")
                                                       ^
SyntaxError: invalid syntax

[Errno 29] Invalid seek

New release won't work with docker: see loggingTraceback (most recent call last): File "/usr/src/addarr/addarr.py", line 5, in <module> import sonarr as sonarr File "/usr/src/addarr/sonarr.py", line 4, in <module> import commons as commons File "/usr/src/addarr/commons.py", line 10, in <module> level=logging.INFO) File "/usr/local/lib/python3.6/logging/__init__.py", line 1808, in basicConfig h = FileHandler(filename, mode) File "/usr/local/lib/python3.6/logging/__init__.py", line 1032, in __init__ StreamHandler.__init__(self, self._open()) File "/usr/local/lib/python3.6/logging/__init__.py", line 1061, in _open return open(self.baseFilename, self.mode, encoding=self.encoding)OSError: [Errno 29] Invalid seek

I want to translate into Russian

Hello

Thanks for the bot. I want to translate it into Russian, but there were some difficulties.
Editing lang.yaml, but the bot stops working on several of the lines:

    Start: Start  - does not work if I change
    Stop: Stop  - does not work
    Movie: Film  - does not work
    Serie: Series  - does not work
    End: Добавление фильма или сериала прекращено.  - working

I can't understand what it depends on

mapping values are not allowed here

Sorry i am new to all this, but i am verry interested in addarr for radarr with telegram. Looks awesome!
I get this error. Is someone knowing what this means?

addarr

Download status

Would it be possible to check Activity > Queue for when an item begins downloading and send a notification in Telegram?... then when the item is done downloading and send another notification?

And maybe another separate command to poll Activity > Queue to see the status of where a download is while in progress?

No entries shown after "Please select a path for the movie or series"

Hello,

First of all, thank you for your dev ! Great job here.

I'm having an issues with Sonarr request when submitting new serie to be added to my Telegram bot.
Everything's fine until the "select path" part. Just after receiving message "Please select a path for the movie or series", no entries are shown and when trying to write the path, nothing happend.

No problem with Radarr part as I left only one path for movies directory so for movies, it doesn't ask me this.

To be noted that it worked until I changed Sonarr volumes mounted/linked in my Docker config. I had to reconfigure manually tv shows path in Sonarr but now it's all good again, except that Addarr is not able to see my TVSHOW directory anymore.

Any idea on this ? Nothing special shown or related in terminal/logs.

Thank you in advance.

Bot to send notification once download is completed

It would just be a simple notification that tells the user that the item they requested for has completed downloading. That's it.

Thanks and really appreciate the work that you've put in here, changed my workflow!

i'm getting error when installing on windows 10

i am getting these errors when installing
hope someone can help?

C:\Addarr\Addarr>python addarr.py
Traceback (most recent call last):
File "C:\Addarr\Addarr\addarr.py", line 11, in
from commons import checkId, authentication, format_bytes, format_long_list_message
File "C:\Addarr\Addarr\commons.py", line 5, in
from config import config
File "C:\Addarr\Addarr\config.py", line 5, in
config = yaml.safe_load(open(CONFIG_PATH, encoding="utf8"))
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Addarr\Addarr\config.yaml'

Cant download

Hi couple of questions

I cant seem to get anything to add to radarr after the 'Yes, add this movie'

I am not 100% sure on what im supposed to set as the path, is this the path to where i keep my media after radarr has finished downloading?

Ability to choose Seasons and future Seasons/Episodes

For ex. I have an Season 1 and 2 of a specific TV Show and I asked the bot for the same show but instead of saying it already exist, it can show

  • which Season already on Plex (S1 & S2)
  • what seasons are missing (S3 & S4+)
  • is Radarr listening to future episodes (S4+)

Then we get to choose to either download certain season or enable Radarr to listen to future episodes.

Would be awesome if this is possible and great work btw!

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.