You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A tremendous percentage of the scripts execution time goes towards files that do not have a match on Trakt or cannot be parsed for some other reason. Every time my scheduled run triggers like 60% of execution time is spent with it spitting out why it can't work for one series or another.
Plex allows you to place a ".plexignore" file in any directory, specifying certain wildcards to ignore specific files, file types, folders, etc within that folder. I suggest something similar, but much more basic; if a ".ptsignore" (or whatever you want to call it) file exists within a folder - just a plain, empty file named that - the script immediately stops processing that folder and skips it. This would be an easy way to specify what doesn't need to be scanned without having to modify anything outside of the file system, and is much simpler than needing to have a local database/JSON file/comma delimited list/whatever to do the same thing.
That's all well and good to manually have it ignore content, and would certainly be helpful on its own, but I'd also love if there were a flag to have the script automatically create said file when an entire directory (with media) has no applicable content to sync. For example, if when it's processing it reaches folder "R:\Media\Television\Mobile Suit Gundam Seed Destiny (2004)" and every single file within it returns a "not found on trakt" error, automatically place a ".ptsignore" (or whatever) file within it.
If you want to go even further - and I'm sure you don't - you could allow the file to optionally contain a timestamp as its sole contents. This would allow a specific duration to ignore to be set in case people are worried that a series doesn't match now, but will in the future. Any time the script comes across one it does a simple "is (current timestamp - file timestamp) > (one week)" or whatever time limit they'd want, and if so it scans the directory again as normal, updating the timestamp if there's still no applicable content or deleting the .ptsignore file if now something within the directory was able to sync.
Basically, with libraries over 100TB - especially with a lot of content requiring custom metadata - so much of execution time is going towards files that will quite literally never match that it's more than tripling the run time. Some sort of (optional) automated "if this folder has nothing relevant, don't scan it again (or don't scan it again for X days/weeks/whatever)" would be great, but if not that at least the ability to manually create the file and have it skipped would be better than nothing.
If there's a better alternative that already exists and I've missed, please let me know.
Edit: Another feature that also prevents this issue is the ability to integrate a Tautulli URL and API key, allowing the script to scan using Tautulli's list of last content played rather than simply scanning all files in a directory. This would be an option, of course, as I'm sure plenty of people prefer to scan all files - but in many other situations, being able to simply update by what has been played within the past X days (and then saving the timestamp of run time, so it can automatically update how far back to go on the next scan) would be, like, revolutionary in terms of optimization - instead of needing to scan all 100TB of content I've got on every run, it could simply see that the last run was 4 days ago and parse Tautulli's "last played items" list until it hits an item played > 4 days ago. That's another feature request entirely, though.
Use case
Preventing the script from wasting time on content that will never be relevant but is in the primary media directory from dramatically increasing run time.
Workarounds
Uh... split your media across multiple root directories specifically to avoid this? Not really realistic.
Plan to implement
It would be a long, long time from now. I'm currently in the middle of fixing up a family member's house and then moving, and I've got other projects I've promised to help that I've had to blow off for a long time.
The text was updated successfully, but these errors were encountered:
Feature description
A tremendous percentage of the scripts execution time goes towards files that do not have a match on Trakt or cannot be parsed for some other reason. Every time my scheduled run triggers like 60% of execution time is spent with it spitting out why it can't work for one series or another.
Plex allows you to place a ".plexignore" file in any directory, specifying certain wildcards to ignore specific files, file types, folders, etc within that folder. I suggest something similar, but much more basic; if a ".ptsignore" (or whatever you want to call it) file exists within a folder - just a plain, empty file named that - the script immediately stops processing that folder and skips it. This would be an easy way to specify what doesn't need to be scanned without having to modify anything outside of the file system, and is much simpler than needing to have a local database/JSON file/comma delimited list/whatever to do the same thing.
That's all well and good to manually have it ignore content, and would certainly be helpful on its own, but I'd also love if there were a flag to have the script automatically create said file when an entire directory (with media) has no applicable content to sync. For example, if when it's processing it reaches folder "R:\Media\Television\Mobile Suit Gundam Seed Destiny (2004)" and every single file within it returns a "not found on trakt" error, automatically place a ".ptsignore" (or whatever) file within it.
If you want to go even further - and I'm sure you don't - you could allow the file to optionally contain a timestamp as its sole contents. This would allow a specific duration to ignore to be set in case people are worried that a series doesn't match now, but will in the future. Any time the script comes across one it does a simple "is (current timestamp - file timestamp) > (one week)" or whatever time limit they'd want, and if so it scans the directory again as normal, updating the timestamp if there's still no applicable content or deleting the .ptsignore file if now something within the directory was able to sync.
Basically, with libraries over 100TB - especially with a lot of content requiring custom metadata - so much of execution time is going towards files that will quite literally never match that it's more than tripling the run time. Some sort of (optional) automated "if this folder has nothing relevant, don't scan it again (or don't scan it again for X days/weeks/whatever)" would be great, but if not that at least the ability to manually create the file and have it skipped would be better than nothing.
If there's a better alternative that already exists and I've missed, please let me know.
Edit: Another feature that also prevents this issue is the ability to integrate a Tautulli URL and API key, allowing the script to scan using Tautulli's list of last content played rather than simply scanning all files in a directory. This would be an option, of course, as I'm sure plenty of people prefer to scan all files - but in many other situations, being able to simply update by what has been played within the past X days (and then saving the timestamp of run time, so it can automatically update how far back to go on the next scan) would be, like, revolutionary in terms of optimization - instead of needing to scan all 100TB of content I've got on every run, it could simply see that the last run was 4 days ago and parse Tautulli's "last played items" list until it hits an item played > 4 days ago. That's another feature request entirely, though.
Use case
Preventing the script from wasting time on content that will never be relevant but is in the primary media directory from dramatically increasing run time.
Workarounds
Uh... split your media across multiple root directories specifically to avoid this? Not really realistic.
Plan to implement
It would be a long, long time from now. I'm currently in the middle of fixing up a family member's house and then moving, and I've got other projects I've promised to help that I've had to blow off for a long time.
The text was updated successfully, but these errors were encountered: