Yup. That sounds good. Although, I haven’t had any issues after moving to EU servers (which makes more sense for me anyway, since I’m over in The Netherlands). That and I use my local storage on the server as well, creating a ‘buffer’ of 3TB.
Here I remade it using CLI command instead of curl calls, however this will take longer as with curl the call is being made and scripts processed to next request with CLI call it will wait until analyzation is done before continuing.
#!/usr/bin/env python3
from subprocess import call
import os
import requests
import sqlite3
import sys
conn = sqlite3.connect(’/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db’)
c = conn.cursor()
c.execute(‘select metadata_item_id from media_items where bitrate is null’)
items = c.fetchall()
conn.close()
print("To analyze: " + str( len(items) ))
for row in items:
os.system('LD_LIBRARY_PATH=/usr/lib/plexmediaserver PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application\ Support /usr/lib/plexmediaserver/Plex\ Media\ Scanner -a -o ’ + str(row[0]))
os.system(‘sleep 1’)
print(str(row[0]))
p.s Since its python it could be when you copy paste some tabs are not ok.
I would recommend switching to EU account if you’re using Hetzner. Although you can max out your connect at 100MB/s to US server by increasing --transfers but having good read speed of individual files are important for streaming.
I’m using ubuntu. I get the following error while attempting to run the script. I changed the name and plex token for security reasons. So do I need to use a curl call or can I use the original script?
I added a ‘#’ to the first line before the ‘!’
File “./plexanalyse.py”, line 14
requests.put(url=‘http://name.com:32400/library/metadata/’ + str(row[0]) + ‘/analyze?X-Plex-Token=xxxxxx’)
^
IndentationError: expected an indented block
** Update **
I resolved it. I actually just added a space for the code
Not yet, just came back from vacation today and Iam still waiting for new server that I ordered.
( it will take some time for PCIe SSD delivery ) I plan to run two server for a while the old/current one on ENCFS and the new one with crypt.
However I did a lot of testing locally and so far the playback performance is more or less the same.
The main reason Iam switching to crypt is far cleaner setup and far less IO writes since its beyond annoying to wait for ages when coucpotato and sonarr are moving files concurrently so instead of instant file move I need to wait for couple of minutes so ENCFS encrypt fhose files locally.
Right. Well. Might just use my Hetzner machine. It’s almost the end of the month and got enough TB’s bandwidth to spare still. Plus I don’t have your enormous library =)
Btw, when doing a rclone move to acd with rclone’s encryption, will the terminal output be readable? As in do you see the unencrypted file names?
I cloned ACD to Gdrive (30TB) worth using --transfers 100 and never got a ban [quote=“pushnoi, post:182, topic:344, full:true”]
Right. Well. Might just use my Hetzner machine. It’s almost the end of the month and got enough TB’s bandwidth to spare still. Plus I don’t have your enormous library =)
Btw, when doing a rclone move to acd with rclone’s encryption, will the terminal output be readable? As in do you see the unencrypted file names?
[/quote]