They are currently one for one copies of each other but the /mnt/ directory is a MergerFS mount of a scratch directory on my NAS to write to first for Sonarr to download to and an encrypted rclone mount to my Google Drive. I added a new path to the library with a copy of the all the existing files.Įxample, for over a year my Plex library has had an Anime library withĪfter having copied all of the media from my NAS to my Google Drive I edited the library and added the folder I have Plex Autoscan setup for subsequent updates from Sonarr/Radarr. If it is indeed going to take this long is it safe to add the new directory for all my libraries now and just let it scan or will I start hitting API limits? I'm using my own client ID to connect to my Google Drive.Įmpty Trash automatically is currently off. Should it be taking this long? Is there a way to speed it up? I have multiple much larger libraries left to add the MergerFS directory for before removing the local NAS directory, at this point it seems like it will take weeks. I added the directory for my smallest library first and it has been scanning for two hours and is still no where near complete for a 42 show library with ~4000 files. I'm going to remove the local directory after the initial scan is done however that initial scan is taking forever. #PLEX FORCE EMPTY TRASH WINDOWS#I wanted it in PowerShell should I decide to run it from the Windows Server host at any time.I'm currently using Animosity's VFS setup and I'm at the step of adding the MergerFS mount as a folder for the library in addition to my local directory. I'm currently running this on my Ubuntu VM that runs my Docker containers using Cron to schedule it. I also wanted to be able to check when it last ran for sanity. Had Plex crap out and erase most of my metadata once because of this. I just wanted to be able to empty the trash ONLY if my NAS was reachable. Aborting" | Out-File -FilePath $LogpathĬredit to u/mrsilver76 since I just took what you had and expanded on it. Invoke-WebRequest -Uri "$url/library/sections/$_/emptyTrash?X-Plex-Token=$token" -Method Put Write-Output "URL we are hitting: $url/library/sections/$_/emptyTrash?X-Plex-Token=$token" Invoke-WebRequest -Uri "$url/library/sections/$_/emptyTrash?X-Plex-Token=$token" -Method Put | Out-File -FilePath $Logpath -Append Write-Output "URL we are hitting: $url/library/sections/$_/emptyTrash?X-Plex-Token=$token" | Out-File -FilePath $Logpath -Append Write-Output "Emptying library ID $_" | Out-File -FilePath $Logpath -Append Write-Output "Beginning trash empty at $date" | Out-File -FilePath $Logpath $NAS_Status=Test-Path 'PATH YOU WANT TO TEST' # Your Plex token, which can be found with the following instructions $libraries= The URL required to access Plex. # bit in at the end of the URL which is source=XX - with XX being the ID # the IDs hover the mouse over the library in Plex Web and look for the # Each of the libraries you wish to empty separated by a space. # Forces all the Plex libraries to empty their trash Since I didn't need all the power from Python-PlexAPI and I also needed a way to make sure FreeNAS was up and reachable by my Docker host, I figured I would write something in PowerShell. And thought I would contribute my own solution I came up with today.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |