7 Commits

Author SHA1 Message Date
pcjones
3f3c7e5b68 Update README.md 2025-01-22 19:42:25 +01:00
Jonas F
d15b9e2e90 Update run_on_seedbox.sh 2025-01-14 01:02:56 +01:00
Jonas F
30fad063b6 Update run_on_seedbox.sh 2025-01-14 01:00:56 +01:00
Jonas F
eeff05783e Create run_on_seedbox.sh 2025-01-14 01:00:26 +01:00
pcjones
37673f8a6c Fix wrong check for empty api key again -_- 2025-01-13 23:14:10 +01:00
pcjones
d2eaac7a6c Fix wrong check for empty API key 2025-01-13 23:09:24 +01:00
pcjones
aa3765bcf2 Fix Proxy not working if no api key was set 2025-01-13 23:01:14 +01:00
6 changed files with 60 additions and 7 deletions

View File

@@ -124,7 +124,9 @@ Sonarr erwartet immer den Englischen Namen, der hier natürlich nicht gegeben is
## Spenden ## Spenden
Über eine Spende freue ich mich natürlich immer :D Über eine Spende freue ich mich natürlich immer :D
PayPal: https://paypal.me/pcjones1
<a href="https://www.buymeacoffee.com/pcjones" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" height="60px" width="217px" ></a>
<a href="https://coindrop.to/pcjones" target="_blank"><img src="https://coindrop.to/embed-button.png" style="border-radius: 10px; height: 57px !important;width: 229px !important;" alt="Coindrop.to me"></img></a>
Für andere Spendenmöglichkeiten gerne auf Discord oder Telegram melden - danke! Für andere Spendenmöglichkeiten gerne auf Discord oder Telegram melden - danke!

View File

@@ -18,7 +18,7 @@ namespace UmlautAdaptarr.Controllers
[HttpGet] [HttpGet]
public async Task<IActionResult> Caps([FromRoute] string apiKey, [FromRoute] string domain, [FromQuery] string? apikey) public async Task<IActionResult> Caps([FromRoute] string apiKey, [FromRoute] string domain, [FromQuery] string? apikey)
{ {
if (_options.ApiKey != null && !apiKey.Equals(apiKey)) if (!string.IsNullOrEmpty(apikey) && !apiKey.Equals(apiKey))
{ {
_logger.LogWarning("Invalid or missing API key for request."); _logger.LogWarning("Invalid or missing API key for request.");
return Unauthorized("Unauthorized: Invalid or missing API key."); return Unauthorized("Unauthorized: Invalid or missing API key.");

View File

@@ -169,7 +169,7 @@ namespace UmlautAdaptarr.Controllers
internal bool AssureApiKey(string apiKey) internal bool AssureApiKey(string apiKey)
{ {
if (options.Value.ApiKey != null && !apiKey.Equals(options.Value.ApiKey)) if (!string.IsNullOrEmpty(options.Value.ApiKey) && !apiKey.Equals(options.Value.ApiKey))
{ {
logger.LogWarning("Invalid or missing API key for request."); logger.LogWarning("Invalid or missing API key for request.");
return false; return false;

View File

@@ -3,8 +3,7 @@
"http": { "http": {
"commandName": "Project", "commandName": "Project",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development", "ASPNETCORE_ENVIRONMENT": "Development"
"SETTINGS__ApiKey": "test123"
}, },
"_launchUrl": "optionsTODO/example.com/api?t=movie&apikey=132&imdbid=123&limit=100", "_launchUrl": "optionsTODO/example.com/api?t=movie&apikey=132&imdbid=123&limit=100",
"dotnetRunMessages": true, "dotnetRunMessages": true,

View File

@@ -42,7 +42,7 @@ namespace UmlautAdaptarr.Services
var bytesRead = await clientStream.ReadAsync(buffer); var bytesRead = await clientStream.ReadAsync(buffer);
var requestString = Encoding.ASCII.GetString(buffer, 0, bytesRead); var requestString = Encoding.ASCII.GetString(buffer, 0, bytesRead);
if (_options.ApiKey != null) if (!string.IsNullOrEmpty(_options.ApiKey))
{ {
var headers = ParseHeaders(buffer, bytesRead); var headers = ParseHeaders(buffer, bytesRead);
@@ -130,7 +130,7 @@ namespace UmlautAdaptarr.Services
var url = _configuration["Kestrel:Endpoints:Http:Url"]; var url = _configuration["Kestrel:Endpoints:Http:Url"];
var port = new Uri(url).Port; var port = new Uri(url).Port;
var apiKey = _options.ApiKey == null ? "_" : _options.ApiKey; var apiKey = string.IsNullOrEmpty(_options.ApiKey) ? "_" : _options.ApiKey;
var modifiedUri = $"http://localhost:{port}/{apiKey}/{uri.Host}{uri.PathAndQuery}"; var modifiedUri = $"http://localhost:{port}/{apiKey}/{uri.Host}{uri.PathAndQuery}";
using var client = _clientFactory.CreateClient(); using var client = _clientFactory.CreateClient();

52
run_on_seedbox.sh Normal file
View File

@@ -0,0 +1,52 @@
#!/bin/bash
# Download linux binary from https://github.com/PCJones/UmlautAdaptarr/releases
# script by schumi4 - THX!
#seedbox fix
export DOTNET_GCHeapHardLimit=20000000
# Basic Configuration
export TZ=Europe/Berlin
# Sonarr Configuration
export SONARR__ENABLED=true
export SONARR__HOST=https://name.server.usbx.me/sonarr/
export SONARR__APIKEY=APIKEY
# Radarr Configuration
export RADARR__ENABLED=false
export RADARR__HOST=http://localhost:7878
export RADARR__APIKEY=APIKEY
# Readarr Configuration
export READARR__ENABLED=false
export READARR__HOST=http://localhost:8787
export READARR__APIKEY=APIKEY
# Lidarr Configuration
export LIDARR__ENABLED=false
export LIDARR__HOST=http://localhost:8686
export LIDARR__APIKEY=APIKEY
# Multiple Sonarr Instances (commented out by default)
#export SONARR__0__NAME="NAME 1"
#export SONARR__0__ENABLED=false
#export SONARR__0__HOST=http://localhost:8989
#export SONARR__0__APIKEY=APIKEY
#export SONARR__1__NAME="NAME 2"
#export SONARR__1__ENABLED=false
#export SONARR__1__HOST=http://localhost:8989
#export SONARR__1__APIKEY=APIKEY
# Advanced Options
#export IpLeakTest__Enabled=false
#export SETTINGS__IndexerRequestsCacheDurationInMinutes=12
export SETTINGS__ApiKey="apikey" # Change to something unique! Then in Prowlarr, in the proxy settings set any username and use this ApiKey as password.
export SETTINGS__ProxyPort=1234 # Port for Proxy
export Kestrel__Endpoints__Http__Url="http://[::]:1235" # Port for UmlautAdaptarr API
chmod +x ./publish/UmlautAdaptarr
./publish/UmlautAdaptarr