Git Product home page Git Product logo

darkalfx / requestrr Goto Github PK

View Code? Open in Web Editor NEW
854.0 854.0 96.0 6.57 MB

Requestrr is a chatbot used to simplify using services like Sonarr/Radarr/Ombi via the use of chat. Current platform is Discord only, but the bot was built around the ideology of quick adaptation for new features as well as new platforms.

License: MIT License

C# 48.84% HTML 0.18% JavaScript 25.97% SCSS 25.00%
discord discord-bot ombi overseerr radarr siri sonarr

requestrr's People

Contributors

arpitgupta avatar bradpeczka avatar cyb3rgh05t avatar darkalfx avatar mchangrh avatar mikeporterdev avatar sct avatar seanzhang98 avatar thomst08 avatar zenjabba 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

requestrr's Issues

[Feature Request] Ability to connect more than one instance of radarr/sonarr

It would be really cool to be able to connect more than on instance of radarr or sonarr and have a different command trigger either one. So have one radarr set up for kids movies and have !kidsmovies command it and then have another set up for regular movies and have !movies trigger it. I have my kids and regular TV/Movies separate on my server and this would help keep it that way as I get many requests for both and they end up all going to the same folder and then I have to manually sort them later. Or maybe have the option to change the directory based on the command so one instance of radarr could put kids and regular movies in different folders.

Feature Request - Request Approvals (Configurable Profiles/Path)

Ability to queue requests and not directly add until a moderator approves the request. They would have the ability to change the category/path/profile.

Another possible option would be to allow for configurable commands via the UI
image

So it would be like !movie Bollywood SomeRandomBollyTitleIDontKnow
And the UI would have a "Category" command and a preset path/profile.
If using categories doing !movie MyMovieRequest - If found they would need to select a category.

Item already exists returns an error

If an item is already in radarr/sonarr attempting to add the item will result in an 'Unexpected error'

�[40m�[1m�[33mwarn�[39m�[22m�[49m: Requestrr.WebApi.Requestrr.DownloadClients.Radarr[0]
An error while requesting movie "<movie>" from Radarr: Bad Request

�[40m�[1m�[33mwarn�[39m�[22m�[49m: Requestrr.WebApi.Requestrr.DownloadClients.Radarr[0]
An error while requesting movie "<movie>" from Radarr: Bad Request

A response of 'already exists' or similar would be ideal.

grab season packs (sonarr)

The tracker that I use for sonarr usually only has season packs for shows that have finished airing.

When I add a series via requestrr that has finished airing some time ago, it attempts to grab individual episodes which do not exist on the tracker anymore. Is there a way to have it request a season pack first and if no match is found, attempt to grab individual episodes?

I am currently using sonarr v3

Add support for non root docker container user and PUID and PGID env variables

Running docker container with non root user leads to issues where you can see issues like

docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "chdir to cwd ("/root") set in config.json failed: permission denied": unknown.
System.UnauthorizedAccessException: Access to the path '/.dotnet' is denied. ---> System.IO.IOException: Permission denied

This is likely due to the root folder having 700 permission

root@requestrr:~# ls -ld /root
drwx------ 6 root root 4096 Apr 17 22:47 /root

We should also see if we can add support for PGID and PUID env vars so we can have a cleaner integration with Synology docker ui.

Requestrr v1.0.12 docker update wipes settings?

Just curious if anyone else has run into this. Both a friend of mine and my docker setup last night auto updated requestrr to v1.0.12. after the update, settings were wiped. I restored v1.0.11 and it's settings, tried to update container to v1.0.12, same thing. Is this a bug, intended behavior or something unique about our setups? Thanks in advance.

Feature Request: down arrow reaction enhancement

Thank you for an amazing tool!

It might be cool if all users who click on the reaction would get notified when the media completes.

I'd also like to see any user being able to trigger the download by clicking the reaction, not just the user who initiated the request.

An unexpected error occurred while trying to process your request.

fail: Requestrr.WebApi.RequestrrBot.ChatBot[0] An exception occurred while processing a command: The server responded with error 403: Forbidden Discord.Net.HttpException: The server responded with error 403: Forbidden at Discord.Net.Queue.RequestBucket.SendAsync(RestRequest request) at Discord.Net.Queue.RequestQueue.SendAsync(RestRequest request) at Discord.API.DiscordRestApiClient.SendInternalAsync(String method, String endpoint, RestRequest request) at Discord.API.DiscordRestApiClient.SendAsync(String method, String endpoint, String bucketId, ClientBucketType clientBucket, RequestOptions options) at Discord.API.DiscordRestApiClient.AddReactionAsync(UInt64 channelId, UInt64 messageId, String emoji, RequestOptions options) at Discord.Rest.MessageHelper.AddReactionAsync(IMessage msg, IEmote emote, BaseDiscordClient client, RequestOptions options) at Requestrr.WebApi.RequestrrBot.ChatClients.Discord.DiscordMovieRequestingWorkFlow.GetMovieRequestAsync(Movie movie) at Requestrr.WebApi.RequestrrBot.Movies.MovieRequestingWorkflow.HandleMovieSelectionAsync(Movie movie) at Requestrr.WebApi.RequestrrBot.Movies.MovieRequestingWorkflow.RequestMovieAsync(String movieName) at Requestrr.WebApi.RequestrrBot.ChatClients.Discord.DiscordMovieRequestingWorkFlow.HandleMovieRequestAsync(Object[] args) at Requestrr.WebApi.RequestrrBot.ChatBot.<>c__DisplayClass18_0.<<ApplyBotConfigurationAsync>b__5>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Discord.Commands.CommandInfo.ExecuteInternalAsync(ICommandContext context, Object[] args, IServiceProvider services)

Having issues when adding through Discord.

All I see is:
An unexpected error occurred while trying to process your request.

I've given it permissions in Discord.

I've configured and tested Radarr and Discord bot, but no luck :(

[Bug] Error when requesting movies or shows

When I try to request a movie, the bot returns this:

"Hello! The user 'Api' has requested movie title but it could not be added. This has been added into the requests queue and will keep retrying"

I have no default users set up in requesterr and it should not use any ombi information because I haven't set any of that up. This only started happening recently. I've noticed that downloads still seem to work, but the error message is somewhat annoying and confusing for my users.

Update: It turns out this only affects movies. I've tried changing my Ombi API key and pasting it back into Requestrr, as well as properly setting up discord users in Ombi. The new message is the same except the "user" reflects the actual user now instead of api. The user I am testing with is set to 'admin' on Ombi so there shouldn't be any limits or quotas there.

.net downloaded to windows temp directory

hi, wherever i unzip and run requestrr from it puts some .net files in user\appdata\local\temp.net....

all dll files are removed from this directory on system reboot

is this user error?

thanks!

Arm64

Anyplan for amr64 build on dockerhub?

[Feature Request] Variable chat integration

I saw a request for telegram, and I thought it would be awesome to expand on that a bit, and have functionality for other chat programs as well, such as Skype or Slack. I would imagine that the program becomes agnostic to the chat program used, allowing the user to use any program they like, and just have to plug in certain variables. The one that I am particularly interested in is Skype.
Thanks for the work that you have already done. Its utterly transformed my Arr experience!

[Bug] v1.0.9+ fails to start on macOS: "Requestrr.Webapi" is damaged and can't be opened.

After following the one-step macOS installation instructions, I open Requestrr from its directory using ./Requestrr.WebApi and a macOS system dialog opens that states “Requestrr.WebApi” is damaged and can’t be opened. You should move it to the Trash.

This is the behavior with every release of requestrr-osx-x64.zip back to v1.0.9.

v1.0.8 opens and runs fine. (well, it won't load the web configuration interface but the bot is perfectly functional in Discord)

I'm on macOS 10.15.3 on a 2012 Mac Mini

Failing requests to Ombi

My current setup is that all request go via Ombi, the settings pages seem to pass the tests when I configure them on the web UI but when I actually make a request I get a message telling me an unexpected error occurred. I then see this in the logs

fail: Requestrr.WebApi.RequestrrBot.ChatBot[0], An exception occurred while processing a command: The server responded with error 403: Forbidden, Discord.Net.HttpException: The server responded with error 403: Forbidden, at Discord.Net.Queue.RequestBucket.SendAsync(RestRequest request), at Discord.Net.Queue.RequestQueue.SendAsync(RestRequest request), at Discord.API.DiscordRestApiClient.SendInternalAsync(String method, String endpoint, RestRequest request), at Discord.API.DiscordRestApiClient.SendAsync(String method, String endpoint, String bucketId, ClientBucketType clientBucket, RequestOptions options), at Discord.API.DiscordRestApiClient.AddReactionAsync(UInt64 channelId, UInt64 messageId, String emoji, RequestOptions options), at Discord.Rest.MessageHelper.AddReactionAsync(IMessage msg, IEmote emote, BaseDiscordClient client, RequestOptions options), at Requestrr.WebApi.RequestrrBot.ChatClients.Discord.DiscordMovieRequestingWorkFlow.GetMovieRequestAsync(Movie movie) in /Users/darkalfx/Documents/Development/requestrr/Requestrr.WebApi/RequestrrBot/ChatClients/Discord/DiscordMovieRequestingWorkFlow.cs:line 201, at Requestrr.WebApi.RequestrrBot.Movies.MovieRequestingWorkflow.HandleMovieSelectionAsync(Movie movie) in /Users/darkalfx/Documents/Development/requestrr/Requestrr.WebApi/RequestrrBot/Movies/MovieRequestingWorkflow.cs:line 109, at Requestrr.WebApi.RequestrrBot.Movies.MovieRequestingWorkflow.HandleMovieRequestAsync(String movieName) in /Users/darkalfx/Documents/Development/requestrr/Requestrr.WebApi/RequestrrBot/Movies/MovieRequestingWorkflow.cs:line 44,�� at Requestrr.WebApi.RequestrrBot.ChatClients.Discord.DiscordMovieRequestingWorkFlow.HandleMovieRequestAsync(Object[] args) in /Users/darkalfx/Documents/Development/requestrr/Requestrr.WebApi/RequestrrBot/ChatClients/Discord/DiscordMovieRequestingWorkFlow.cs:line 66, at Requestrr.WebApi.RequestrrBot.ChatBot.<>c__DisplayClass18_0.<<ApplyBotConfigurationAsync>b__5>d.MoveNext() in /Users/darkalfx/Documents/Development/requestrr/Requestrr.WebApi/RequestrrBot/ChatBot.cs:line 146, --- End of stack trace from previous location where exception was thrown ---, at Discord.Commands.CommandInfo.ExecuteInternalAsync(ICommandContext context, Object[] args, IServiceProvider services),

Not sure whats causing this as I know my Ombi config is working

[Feature Request] Allow running a script BEFORE sending the request to Radarr/Sonarr

Imagine you have a "backstock" of 10000 movies that you are not managing, so don't want to add to Radarr. Similarly, you don't want to add them to Plex due to scanning time or database size or whatever.

I would like to expose that "backstock" to Requestrr.

My friend requests "Cool Space Movie", which I don't have in Radarr. I have a copy of it in the "backstock". In my utopia, Requestrr would run a script that would check the backstock and if the file is found just copy it into a Plex-monitored location. If the script returns an error, then proceed with the usual "add-to-radarr" process.

With TV, this gets a little more complicated when you start considering Seasons.

[Feature Request] Notify anyone using the bell emoji, not just OP

The current behavior is that Requestrr will only notify the user who requested a movie that was already monitored and reacted using the bell emoji. Anyone else reacting does not get added to notifications.json. It would be amazing if the bot tracks all future reactions too to avoid spamming the channel on Discord.

Thanks for the amazing tool btw!

[Feature Request] Twilio (SMS) integration

Twilio is an SMS platform usually used by businesses, but their rates are very reasonable for the average person to use. If your fine with a standard 10 digit local number, the number itself is only 1$/month + 0.0075 cents per message sent or received (US pricing). 2000 messages sent or received would only be 15$/month and could be very useful to those of us with older folks/technically challenged users

[bug] not all TLDs are valid

domains ending in .xyz throw validation errors, despite .xyz being a valid TLD, throwing a Invalid host and/or port error.

Cant access UI when running with macvlan network and non root user

I am trying to launch this container so that it gets a ip different from the docker host as i need to be able to route traffic via vpn based on ip's. Using macvlan network for this and when i launch the network logs show bot comes up but when i try to access the UI it shows the following in the logs

arn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
warn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
      Bot has been restarted.
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
      Failed to determine the https port for redirect.
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
      An unhandled exception has occurred while executing the request.
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[3]
      An exception was thrown attempting to execute the error handler.
fail: Microsoft.AspNetCore.Server.Kestrel[13]
      Connection id "0HLV9LDHRUGTE", Request id "0HLV9LDHRUGTE:00000001": An unhandled exception was thrown by the application.
warn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
      Bot configuration changed/not connected to Discord: restarting bot

The same container works fine if bought up as root user. So may be my earlier fix was really a bandaid and more fixes need be made?

[Feature Request] Settings not persistent when updated

I use an instance of Watchtower to automatically update all of my containers. When you pushed the most recent release, Watchtower updated my requestrr container and it refreshed everything. When I went to the web UI I got the create new user screen and none of the API keys or other settings were saved either, causing the bot to go offline.

Would it be possible to make all of the settings/connections/users persist between container updates? Thanks!

[Feature Request] Search Plex before sending the request to Radarr/Sonarr

I've got a Plex library that is pointing at movies/tv which are not managed by Radarr/Sonarr.

I'd like Requestrr to search Plex before sending the request on to Radarr/Sonarr. It could then find my existing copy of "Cool Space Movie" before sending it to Radarr, which would ultimately download a second copy or never tell my friend that it was available, even though it has been all along.

[Feature Request] Proxy Support

I run a bunch of services on a single VM and exposed them on 443 with nginx. Requestrr fails with this message:

warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3] Failed to determine the https port for redirect.

Google indicates that the app server needs to be coded to support proxied traffic.

Issues following redirects for different URL bases.

It appears that when using a URL Base setting within Sonarr\Radarr, Requestrr has issues following the redirect that's returned for POSTs. It appears to be switching to a GET request which also no longer includes the API Key. For example below, a URL Base of /sonarr is configured for use behind a reverse proxy.

POST /api/v3/series HTTP/1.1
Host: sonarr_v3:8989
Content-Type: application/json
X-Api-Key: **snip**
Content-Length: 415

{"title":"Outsiders","qualityProfileId":6,"profileId":6,"languageProfileId":1,"titleSlug":"outsiders","monitored":true,"images":[],"tvdbId":303236,"tags":[],"seriesType":"standard","year":2016,"seasonFolder":true,"rootFolderPath":"/tv","id":null,"seasons":[{"seasonNumber":0,"monitored":false},{"seasonNumber":1,"monitored":true},{"seasonNumber":2,"monitored":false}],"addOptions":{"searchForMissingEpisodes":true}}

HTTP/1.1 303 See Other
X-Application-Version: 3.0.3.717
Location: /sonarr/api/v3/series
X-ApplicationVersion: 3.0.3.717
Cache-Control: no-cache, no-store, must-revalidate, max-age=0
Pragma: no-cache
Expires: 0
Access-Control-Allow-Origin: *
Content-Type: text/html
Server: Mono-HTTPAPI/1.0
Date: Sun, 15 Mar 2020 21:38:27 GMT
Content-Length: 0
Keep-Alive: timeout=15,max=78

GET /sonarr/api/v3/series HTTP/1.1
Host: sonarr_v3:8989

HTTP/1.1 401 Unauthorized
X-Application-Version: 3.0.3.717
Cache-Control: no-cache, no-store, must-revalidate, max-age=0
Pragma: no-cache
Expires: 0
Content-Type: application/json; charset=utf-8
Server: Mono-HTTPAPI/1.0
Date: Sun, 15 Mar 2020 21:38:27 GMT
Transfer-Encoding: chunked
Keep-Alive: timeout=15,max=77

1d
{
"error": "Unauthorized"
}
0

This shows up in Sonarr as the the following error due to the GET request with no API key:

20-3-15 14:38:27.5|Info|Auth|Auth-Unauthorized ip 192.168.16.7 url 'http://sonarr_v3:8989/sonarr/api/v3/series'

Modify notification settings for TV shows?

Is this possible? For example, someone requested an entire series and gets a Discord notification for each individual episode. Is it possible to only notify when the entire series is downloaded?

Namespaces

I noticed that you have maintained a very flat namespace hierarchy, so types that are related, like the Discord chat client, are not encapsulated into their own namespaces. Did you do this for a particular reason?

If I want to contribute a new Chat Client (and/or new Download Clients), it would be nice to have a separate namespace to contain the types. There are likely to be a lot of similar but not quite the same types for different clients.

I had Resharper "fix" all the namespaces in the your project, to make them align to the folders, and there were 44 files changed: I encourage you to consider making this change earlier, rather than later, so as you attract contributors to the code base, things stay more organized.

radarr does not auto search movie being added.

I am running radarr Version 0.2.0.1480 and after i add a movie via requestrr bot, it gets added to my monitored list but does not seem to auto search.

I test sonarr and it adds and auto searches just fine.

Feature Request - Media Issues

Ability to log issues with media and have it log to UI/Channel.

EX: !issue movie Bad Boys for Life
(Show Only Movies/TV that are available) (If not found them maybe the issue types are "Obscure/NotFound" media request to be sourced not thru the arrs)
Select Movie
(Show list of configurable options)
Audio Sync
Not Right Movie
Quality
Select Reason
Add optional note?

Another command of !issues list
(Show grid of issues)
Select Issue
Ability to resolve/delete from list

Invalid bot token.

I followed the directions and have tried 5 different times one two different browsers. After adding the client ID and bot token I keep getting the message, "Invalid bot token."

image

Requestrr portal not accessible behind nginx proxy

Having a hard time to get the webportal exposed behind an nginx proxy. Even forwarding the port 4545 to the bot doesn't let me load the webportal externally. Is it only serving the webportal on localhost?

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.