JagandeepBrar / lunasea

Self-hosted software controller built using Flutter
https://www.lunasea.app
GNU General Public License v3.0
1.31k stars 64 forks source link

[Feature] Option to send NZB file, instead of URL to downloader. #307

Closed akzkak closed 3 years ago

akzkak commented 3 years ago

First of all thanks for this great project!

Ran into a problem that NZBHydra 2 had for a while before they fixed it by adding this feature: v2.28.0 (2020-09-03) https://github.com/theotherp/nzbhydra2/blob/master/changelog.md#v2280-2020-09-03 Feature When using "Add links" to add NZBs to your downloader the links are usually calculated using the URL with which you accessed NZBHydra. This might be a URL that's not accessible by the downloader (e.g. when it's inside a docker container). You can now configure a URL in the downloading config that will be used for these links instead.

Basically sending a link instead of NZB file results in the following NZBGet error "Connection to hydra2.example.com failed: ErrNo 110, Operation timed out" when running inside a docker container. And link will be stuck on fetching. Send NZB have always worked with docker, but LunaSea dont have this option.

Hope there is a way to fix this.

JagandeepBrar commented 3 years ago

This sounds like something you would need to configure from within NZBHydra2, not within LunaSea.

LunaSea takes the download URL passed through the API call and sends it to NZBGet or SABnzbd. Since it isn't a direct implementation of NZBHydra2 and instead is using the Newznab specification, there currently isn't any special treatment possible for Hydra.

As a workaround in your situation, you can download the NZB to your device and then upload it to NZBGet through the module itself. It's non-ideal, but in the future I can look into the option of sending via file.

What I would recommend also looking into is setting up your own network within Docker, for example a media network where everything within that network can communicate with each other freely but still need to be exposed to the host.

akzkak commented 3 years ago

This sounds like something you would need to configure from within NZBHydra2, not within LunaSea.

A link send directly from Hydra2 with the External URL feature from v2.28.0 will look like this randomized example: http://172.38.1.1:5076/getnzb/api/-2185499018131006644?apikey=KEY1234

But a link via LunaSea will completely ignore the external URL set in Hydra and be: https://hydra.example.com:443/getnzb/api/-2185499018131006644?apikey=KEY1234

LunaSea takes the download URL passed through the API call and sends it to NZBGet or SABnzbd. Since it isn't a direct implementation of NZBHydra2 and instead is using the Newznab specification, there currently isn't any special treatment possible for Hydra.

As a workaround in your situation, you can download the NZB to your device and then upload it to NZBGet through the module itself. It's non-ideal, but in the future I can look into the option of sending via file.

What I would recommend also looking into is setting up your own network within Docker, for example a media network where everything within that network can communicate with each other freely but still need to be exposed to the host.

Sending via file would be a great option for LunaSea.

Have it all on the same network "mynet"

  networks:
          mynet:
            ipv4_address: 172.38.1.1

But i do use:

        ports:
            - '127.0.0.1:5076:5076'

Perhaps work with port directly exposed without 127.0.0.1 and of course will with network_mode : host, but rather download NZB to device and just upload manually to NZBGet then.

Thanks for the input.

JagandeepBrar commented 3 years ago

Hey there, I am moving the feature request to the new feedback board to keep the GitHub issues reserved for issues: https://feedback.lunasea.app/features/send-via-file

You can follow along on progress there!