petio-team / petio

Petio Request, Discover, Review
https://petio.tv
MIT License
251 stars 28 forks source link

Requests Enter Pending Approval for Items Already in *arrs #263

Closed Hossy closed 3 years ago

Hossy commented 3 years ago

Describe the bug If an item was already being tracked in an *arr, but not yet available in Plex, a Petio request for that item asks the admin for approval.

To Reproduce Steps to reproduce the behavior:

  1. Add an item directly in Radarr.
  2. Before the item is available in Plex, request the same item in Petio from a non-admin, non-auto-approve user.
  3. Log into Petio as an admin and look for the item's request and note the pending approval.

Expected behavior When a user makes a request for an item, Petio should check to see if the item is already being tracked in the *arr. If it is, the request should skip the approval requirement and also not deduct from the user's request quota.

Desktop (please complete the following information):

Additional context After speaking with @angrycuban13, it makes sense that Petio is not going to backfill all the existing *arr data to indicate status of existing items. This is similar to how Tautulli doesn't show previous watched history, although that's for different reasons.

But, upon a new request coming in through Petio, Petio should check the *arr to see if the item is already being tracked and update the request status to bypass the approval phase. This also unburden's the admin from reviewing a request that is already approved.

This is a restatement of #261 to eliminate confusion between the backfill of existing *arr data and new Petio requests for pre-existing items.

RyleaStark commented 3 years ago

Curious, as I have not tested this yet... Does the "pending" request become complete when its detected later in plex? regardless if its approved or not?

AshDyson commented 3 years ago

Yes the request will auto be "completed" even if not approved. But this is just how Petio will handle this. We don't communicate with Radarr etc to check if it's already a job for that ID until the request is actually approved. Petio will not read data from S/R in anticipation and keeps its own flow outside of external requests.