C9Glax / tranga

Docker-Container to monitor (Manga) Scanlation-Sites for download new chapters.
GNU General Public License v3.0
133 stars 13 forks source link

Enhancement - Notifications for new downloads #21

Closed lsultana98 closed 1 year ago

lsultana98 commented 1 year ago

I don't know the possibility of getting this done without doing hundreds at a time during initial bull download. Mainly just for new releases.

I use Lunasea for my notifications with Sonarr/Radarr etc. Doesn't haven't to be this, just an example of a cool tool. https://docs.lunasea.app/lunasea/notifications/custom-notifications

C9Glax commented 1 year ago

Yes the idea of notifications was already brought up somewhere else, however using Gotify. To avoid notification spam, I would only notify on completion of a monitoring task, with the new chapters.

C9Glax commented 1 year ago

Hello there, I just finished adding support, however I couldn't test the lunasea implementation.

If you could do me a favor and test wether it works by adding your own webhook and then adding a new monitoring task, that would be greatly appreciated.

lsultana98 commented 1 year ago

I am a little confused at what I am trying to do here 😂 sorry mate, if you could give me a lil more info

C9Glax commented 1 year ago

Okay so I guess you already pulled the updated containers. In the settings on the webpage (top right corner) there should now be an option for the lunasea webhook. I have just read the documentation again, and you can either use an existing webhook from the official modules (lidarr, etc.), or one of the custom webhook: https://notify.lunasea.app/v1/custom/device/:device_id https://notify.lunasea.app/v1/custom/user/:user_id Replace device_id or user_id with your specific id.

When you set up sonarr it looked like this, the url should include your user/device id.

C9Glax commented 1 year ago

Also please don't paste your specific ones here, they are unqiue to your device/user and secret.

lsultana98 commented 1 year ago

I've done this now, just need to wait for a new release ahaha. Any chance you could add a test notification button?

lsultana98 commented 1 year ago

Okay big issue, I believe changing this has broken the tranga-api functionality somehow. I will attach logs.

tranga.txt

C9Glax commented 1 year ago

Hmm yes, it seems that 1 or both of the following problems has occured:

  1. I forgot to add a deserializer for the LunaSea-Object (fixed just now, will push release later)
  2. Some formatting of the provided URL is not liked by the deserializer. (Not likely)

Will bump again when I have pushed the release. Should probably already fix the problem.

C9Glax commented 1 year ago

Just pushed the release. Also Tranga will now send a notification on startup and when adding a notification Manager. Just to make sure: The webhook-URL should be https://notify.lunasea.app/v1/custom/device/[id] with [id] being your indiviudal one.

lsultana98 commented 1 year ago

trangalogs.txt

Same looking error, i have attached the logs post update.

C9Glax commented 1 year ago

0f0902c93207ced7ab9cb0dfdef94e30454b7a4a Okay because parsing the full url cause this issue I changed some things. You now only enter the part: device/:id or user/:id on the website. To fix your settings.json simply edit the value

"notificationManagers": [{
            "notificationManagerType": 1,
            "webhook": "someThingSomeThing"
        }
    ]

to simply "notificationManagers": []

lsultana98 commented 1 year ago

Okay so that fixed that error, but now I have a new one where the web interface doesn't display what I've had in the past, or function at all. webui tranga.txt

C9Glax commented 1 year ago

Hmm can you clear your cache (ctrl+f5 or shift+f5 one of those)? Could just be that the cached javascript files don't mix well ;) If it still persists can you take a screenshot of the developer console -> network page?

lsultana98 commented 1 year ago

I've tried multiple browsers and cleared cache and incognito, no luck.

lsultana98 commented 1 year ago

Screenshot_1

C9Glax commented 1 year ago

Okay one more easy solution: Have you changed the port in docker-compose to 6531:6531 ? Last release I finally got that working instead of 80.

lsultana98 commented 1 year ago

That fixed that issue, now onto the notifications. I am not receiving the auto one after set up or docker start.

Is the proper way: (this is a fake unique string) /device/cjfsdjkhfsdjkhsjkhfsda0vEtat-m1S-LN-N3J4DFgxNRSECkk153_HkEkep5l8Qr9PvJGupsdfsdfsdfsdfM1Q0oZtN2pEGqQnT3c3b2W61_fONjWcNehQAZE-4D_esTymb8l4 or cjfsdjkhfsdjkhsjkhfsda0vEtat-m1S-LN-N3J4DFgxNRSECkk153_HkEkep5l8Qr9PvJGupsdfsdfsdfsdfM1Q0oZtN2pEGqQnT3c3b2W61_fONjWcNehQAZE-4D_esTymb8l4

C9Glax commented 1 year ago

Glad that wasn't a real issue ':) string should be device/gfgzffg

lsultana98 commented 1 year ago

I am not having any luck here with this. Definitely the right ID as I have notifications for sonarr/radarr/tautulli already

C9Glax commented 1 year ago

Okay I will have to read over the documentation once again I guess. I get a 200 success on any webhook (even the official lidarr and radarr ones) but no notifications as well...

C9Glax commented 1 year ago

Okay lunasea didnt like that i provided the image field, but didnt provide a valid url. If you use it now device/<id> or user/<id> it should work. At least it did for me :)