Whisparr / Whisparr

GNU General Public License v3.0
530 stars 65 forks source link

V3 performer search will search all scenes, not just monitored ones #200

Closed plz12345 closed 6 months ago

plz12345 commented 6 months ago

Is there an existing issue for this?

Current Behavior

Monitor and refresh a performer Unmonitor some of the scenes Click Search Performer

Whisparr searches and downloads all scenes, not just monitored ones

Expected Behavior

Whisparr only searches fur scenes that are monitored.

Steps To Reproduce

No response

Environment

- OS: 
- Whisparr: 3.0.0.523
- Docker Install: yes
- Using Reverse Proxy: no
- Browser: Firefox
- Database: SQLite

What branch are you running?

Develop

Trace Logs?

Available if needed but this is easy to repro

Anything else?

No response

sampulsar commented 6 months ago

Should be an easy fix to PerformersSearchService.cs

From var items = _movieService.GetByPerformerForeignId(performer.ForeignId); to var items = _movieService.GetByPerformerForeignId(performer.ForeignId).Where(x => x.Monitored).ToList();

Tom-Estes commented 6 months ago

Same for studios. Do we want to skip search if the scene already has a file?

var items = _movieService.GetByPerformerForeignId(performer.ForeignId)
                                         .Where(x => x.Monitored &&
                                                     !x.HasFile)
                                         .ToList();
plz12345 commented 6 months ago

Same for studios. Do we want to skip search if the scene already has a file?

var items = _movieService.GetByPerformerForeignId(performer.ForeignId)
                                         .Where(x => x.Monitored &&
                                                     !x.HasFile)
                                         .ToList();

No, that would negate upgrades, wouldn't it?

Tom-Estes commented 6 months ago

No, that would negate upgrades, wouldn't it?

Good call.

Tom-Estes commented 6 months ago

From var items = _movieService.GetByPerformerForeignId(performer.ForeignId); to var items = _movieService.GetByPerformerForeignId(performer.ForeignId).Where(x => x.Monitored).ToList();

Also in these if blocks so the search on the right side of the page works if (message.StudioIds.Count > 0) if (message.Years.Count > 0)

plz12345 commented 6 months ago

Are you already working it, or want me to? I just wasn't sure whether the fix should be in BE vs. FE. Now I know it's FE.

Tom-Estes commented 6 months ago

Now I know it's FE.

It's actually in the backend. If @sampulsar can do it, I can review it.

plz12345 commented 6 months ago

Ah, ok. Misread the post.

sampulsar commented 6 months ago

@Tom-Estes

Can do.

The filter is only for monitored, as there is a decision process that happens after this to allow upgrades, etc.

The studio search would also have the same issue, as the items do not look like they are filtered.

Filtering this list differently would not stop a user from manually searching for an individual item on any of the pages, studio, performer, or scene. A manual search there should always attempt to download the item.

Tom-Estes commented 6 months ago

Filtering this list differently would not stop a user from manually searching for an individual item on any of the pages, studio, performer, or scene. A manual search there should always attempt to download the item.

I meant adding it to the if blocks also so it can filter the search for the whole studio if on the performer page, or year if on the studio page.