Giter Site home page Giter Site logo

Comments (5)

gauthier-th avatar gauthier-th commented on July 30, 2024 2

I was more thinking that we could call the refresh download endpoints from Radarr/Sonarr just before getting the values from Radarr/Sonarrr, so the timings are always more accurate. This could be enabled as an option since it will make addition requests to Radarr/Sonarr.

The Radarr/Sonarr request to update download times is POST /api/v3/command with this payload: { "name": "RefreshMonitoredDownloads" }

from jellyseerr.

Nabstar3 avatar Nabstar3 commented on July 30, 2024 1

What this feature hopes to resolve is put a manual sync button.

I understand.

Would it make more sense to create a new button or incorporate it into the functionality of Download Sync?

The workflow would be: Call the refresh download endpoints from Radarr/Sonarr -> Sync the the downloads on Jellyseerr.

This aligns with your above plan :

I was more thinking that we could call the refresh download endpoints from Radarr/Sonarr just before getting the values from Radarr/Sonarrr, so the timings are always more accurate

from jellyseerr.

Nabstar3 avatar Nabstar3 commented on July 30, 2024

Pardon if this question sound dumb, but what does the 'Download Sync' job perform and would this may be a good function to add on this current feature to?

from jellyseerr.

Fallenbagel avatar Fallenbagel commented on July 30, 2024

Pardon if this question sound dumb, but what does the 'Download Sync' job perform and would this may be a good function to add on this current feature to?

That's precisely the job that syncs with the sonarr/radarr. Which runs every 2 minutes. The reason why the estimated time is not accurate most of the time is because it's not accurate on sonarr/radarr (which also Syncs with the clients every 2 minutes). What this feature hopes to resolve is put a manual sync button.

from jellyseerr.

Nabstar3 avatar Nabstar3 commented on July 30, 2024

The Radarr/Sonarr request to update download times is POST /api/v3/command with this payload: { "name": "RefreshMonitoredDownloads" }

I went through it myself. I don't really know C# all too well, but I can sort of understand the process flow of how it works on Radarr's side:

CommandController received the RefreshMonitoredDownloads command and is picked up by the DownloadProcessingService which executes the ProcessMonitoredDownloadsCommand, which is tasked in scanning the current state of all monitored downloads. I believe this is done for all downloads so we would have to get radarr/sonarr to refresh the status for all downloads, not only an individual series/movie ID.

Here is an example POST call I got when I analysed the network traffic when clicking refresh under Queue:

http://radarr/api/v3/command

{
  "name": "RefreshMonitoredDownloads",
  "commandName": "Refresh Monitored Downloads",
  "body": {
    "sendUpdatesToClient": true,
    "updateScheduledTask": true,
    "requiresDiskAccess": false,
    "isExclusive": false,
    "isTypeExclusive": false,
    "isLongRunning": false,
    "name": "RefreshMonitoredDownloads",
    "trigger": "manual",
    "suppressMessages": true
  },
  "priority": "normal",
  "status": "queued",
  "result": "unknown",
  "queued": "2024-07-22T02:50:27Z",
  "trigger": "manual",
  "sendUpdatesToClient": true,
  "updateScheduledTask": true,
  "id": 49426
}

I haven't figured out exactly how we import and call API endpoints for Radarr/Sonarr but I did find where I should be looking for Download Sync in downloadtracker.ts

Fortunately, my ability to understand Typescript is better than C#, and I'll need to look a bit further on where we would be making our API call.

from jellyseerr.

Related Issues (20)

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.