Cloudbox / autoscan

Autoscan replaces the default Plex and Emby behaviour for picking up changes on the file system.
MIT License
611 stars 53 forks source link

Notify Plex to reanalyze a file? #105

Closed ponchohoncho closed 2 years ago

ponchohoncho commented 3 years ago

Is it possible to get Plex to reanalyze a file?

I use Tdarr to create Stereo AAC streams from 5.1 audio tracks, which keeps transcodes nice and light on my server.

Tdarr copies a file to a cache location, does its transcoding, then copies the file back to where it came from. The problem is that Plex doesn't know about these new audio tracks, so playback fails because the expected media components are all out of order. I've found that having autoscan notify Plex about the file isn't enough to get it to notice the new audio tracks and I have to manually Analyze the files that Tdarr touches.

This is what happens in Plex during Analyzing: https://support.plex.tv/articles/200289336-analyze-media/

Is it possible to get autoscan to tell Plex to Analyze the media it scans too?

Thank you!

l3uddz commented 3 years ago

This would require Plex to enhance their Scan API with an analyse flag.

ponchohoncho commented 3 years ago

Ah, too bad. I see that your other autoscan project has an analyze flag. If I switched to that project, would it also not be able to tell Plex to reanalyze files?

On Thu, Mar 18, 2021, 4:30 PM l3uddz @.***> wrote:

This would require Plex to enhance their Scan API with an analyse flag.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cloudbox/autoscan/issues/105#issuecomment-802314906, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7HLKZODSTXDORTT6OGYYTTEJWIFANCNFSM4ZL64TLQ .

karan commented 2 years ago

Can't we do this:

https://github.com/fracai/plex-reanalyze/blob/f9f8116fb90bc420dd36eedccc2ab5f6e8e4b5bf/plex-reanalyze.py#L13

m-rots commented 2 years ago

Can't we do this:

https://github.com/fracai/plex-reanalyze/blob/f9f8116fb90bc420dd36eedccc2ab5f6e8e4b5bf/plex-reanalyze.py#L13

We would have to either access Plex's database or use some of their internal APIs to figure out which metadata item to put in the URL. Autoscan only works with paths and there is no way for Autoscan to know when a certain path has been scanned by Plex. So it's unclear when to even search for a metadata item ID corresponding to the original path.

We do not plan to work on a workaround thus I suggest you to open a feature request on Plex's forum instead.

SpartacusIam commented 10 months ago

Can't we do this: https://github.com/fracai/plex-reanalyze/blob/f9f8116fb90bc420dd36eedccc2ab5f6e8e4b5bf/plex-reanalyze.py#L13

We would have to either access Plex's database or use some of their internal APIs to figure out which metadata item to put in the URL. Autoscan only works with paths and there is no way for Autoscan to know when a certain path has been scanned by Plex. So it's unclear when to even search for a metadata item ID corresponding to the original path.

We do not plan to work on a workaround thus I suggest you to open a feature request on Plex's forum instead.

Could you not just tell autoscan to analyze the path it was just told to scan via a trigger? File would change, trigger would tell autoscan to scan the path, then if, eanbled in the config, also tell plex to analyze what under the same path.