Simple Windows Solution for a Plex Player with NetDrive Custom API

Admin9705

Administrator
Original poster
Project Manager
Local time
3:30 AM
Jan 17, 2018
4,798
1,843
So I used netdrive <<< click (for windows and mac) for awhile and testing it again upon finding something new. Before, it would stall out. There was a section where you could put in your own google api's in. That I didn't know which would make sense due everyone using the same key from netdrive in a sense.

Long story short, you can run plex on windows or mac and use netdrive direct to connect. I'll let you know how the scanning works and holds up. If this works great, it's awesome because my 2080-TI can transcode instead of running it in a VM. The upside to running a PG copy in a VM serves as a great backup because linux handles very well.

If the netdrive solution works, this would work for about half the people.

1578812159695.png

You may then ask, well how does this work with share drives.

1578812245422.png

It shows up like this. This is how I edit the paths since it can scan the share/team drive.

1578812309379.png

The downside to this is for those who use encryption, you may have problems (or nothing I can think of). The major upside is that you could add multiple team drives in conjuction with the share drive. I'll let the thing scan and keep you updated. I had high hopes before, but never worked out; but I never knew that you could add your own apis.

If testing, use the link here: https://support.bdrive.com/t/slow-google-drive-how-to-register-your-own-google-api-key/18503

Took me awhile to find it (don't use the v2 instructions).

If this works in the end end, i'll generate a .bat script with some instructions so it shuts plex down if the drive gets disconnected (so it doesn't self erase) and will check for the drive every 30 seconds to restart plex.

Finally there is one more nice plus if it works. Netdrive allows you to mount multiple drives, each with it's own api. This could be good news because you could point emby to one, nzbget to another. Each drive that has it's own api is a project and each project is separate so you don't rate-limit one another (basically each drive would act independent without rate-limit collision of one another).

Note the scanning takes around the same time, I notice it being about 30% percent faster but just an observation.
 
Last edited:
  • Like
Reactions: bretc and 28061b

Edrock200

Respected Member
Local time
3:30 AM
Nov 17, 2019
93
27
Btw, there are some scripts out there to unlock the "max 2 transcode" limits imposed by Nvidia drivers. My 2080ti can easily handle 8+ 1080p transcodes unlocked. No idea why Nvidia imposed such a low limit in their drivers.
 
  • Like
Reactions: Nightshade

Admin9705

Administrator
Original poster
Project Manager
Local time
3:30 AM
Jan 17, 2018
4,798
1,843

Edrock200

Respected Member
Local time
3:30 AM
Nov 17, 2019
93
27
That's the one! I had my entire setup on Google drive file stream on Windows with 3 Plex servers, and ~60TB media, before switching to Linux. Netdrive was so slow it took days, but one tip was to set TV shows to get a notification update from sonarr so the Plex servers would only need to update the show that got updates vs the entire library.

Google drive file stream creates a local cached file system much like plexdrive or rclone. The initial scan did indeed cause me an API ban for 2 or 3 days until everything was indexed.

What I did to prevent going through this for every server or every future server was I created a virtual hard drive in Windows disk manager and mounted it as the p drive. I set Plex to point to that pdrive for plexdata. I let the initial library scan complete, shut down Plex, then copied the vhd file and mounted to my two other servers. The reason I put the data in a vhd container is because moving a Plex data library on Windows, even with fast ssd drives is painfully slow due to ntfs performance when dealing with a mass amount of tiny files. My copies would take 24+ hours from ssd's! But vhd containers are one flat file so I could copy the entire plexdata folder in minutes, and easily back it up to my gsuite drive weekly.

With windows Plex stores it's Plex settings in the registry (equivalent to preferences.xml on Linux.) So this allowed all my libraries and scanning to carry over while not over writing the Plex server guid info. So no rescans needed for the other two servers, which meant no api bans.

Subsequent scans were just as fast as rclone due to Google drive file streams caching. One tip with netdrive, it doesn't default to use the maximum amount of cache (defaults to 10GB I think but can max at 50GB if I'm remembering correctly.) Try maxing that out. You might also want to try throwing an rclone vfs cache remote on top of it to speed up your scans. I get that it's not as plug and play but trust me, those library updates are brutally slow and as far as I know netdrive doesn't support file system notify, so Plex won't detect changes between scans (unless that same windows box if making the changes.)

All that said, when I moved over to Linux, I've never looked back. I did so to start learning Linux 3 months ago, and my first build was with centos 7 minimal and plexdrive. I was amazed that a completely fresh scan /import of my entire library caused no bans or issues. That's when I discovered quickbox/openflixr/plexguide, and after a brief shootout test it was clear to me that plexguide was the best and I migrated to it.

My setup today consists of 5 centos Plex servers running rclone vfs, and plexguide for media management (I don't run Plex on plexguide itself.) I have scans set to run every 15m on all 5, and even have thumbnail generation turned on on two of the 5. It's been about 2 months, no api bans, no streaming issues, etc.
 

Admin9705

Administrator
Original poster
Project Manager
Local time
3:30 AM
Jan 17, 2018
4,798
1,843
The scan speed runs the same as pg. If you use your own keys, then no api bans. It scanned everything perfectly for the 1st time. Netdrive just doesn't really advertise well to use your own keys. You think they would. The only reason why I wanted this was because I have some powerful windows machines that can act as additional players. My downloading and primary player is linux, but i've had 2 netdrive lifetime licenses just sitting. Thanks for the additonal tips.
 

Edrock200

Respected Member
Local time
3:30 AM
Nov 17, 2019
93
27
Why not just use rclone for Windows? My experience with net drive (this was ~2 years ago) was it was very slow, like took a day to scan my library slow. Not sure if that's still the case or not. Google drive file stream and raidrive worked well enough before I switched to Linux. But my recent testing of rclone for Windows seems to show it works pretty well.

Side note, there is supposedly ways to run Plex in hyper-v and pass hw transcode through to the host, but haven't tried myself yet.

The good news is if netdrive shuts down, it removes the mapped drives as well, so Plex won't actually delete the content if it runs a scan and the drive is gone.
 

YellowMonster

Junior Member
Local time
8:30 AM
Nov 29, 2018
7
1
Could this also be used as a safe method to copy your entire content to a local drive on a windows machine without getting a hammer ban?
 

Edrock200

Respected Member
Local time
3:30 AM
Nov 17, 2019
93
27
I don't think you would get an API ban since netdrive throttles to 1 or 2 requests/second. But there is supposedly some unknown download limit imposed, although no one knows what that is. Rumor has it it's around 10TB/day. I recently did about ~6TB/day for 10 days to encrypt my library and it didn't cause me any issues or bans, however that was with rclone.
 

Admin9705

Administrator
Original poster
Project Manager
Local time
3:30 AM
Jan 17, 2018
4,798
1,843
ya this won't work around the 750gb daily upload limit. to slow down the copy, you could use goodsync and impose a 750gb day daily copy sync. Again, this is a solution for simplicity and out of the box.
 

Admin9705

Administrator
Original poster
Project Manager
Local time
3:30 AM
Jan 17, 2018
4,798
1,843
6 hrs later, plex still scanning perfectly. never got passed this so the adding the api makes a difference. will post update on adding the tv stuff (that's the challenge).
 
  • Like
Reactions: bretc

foolio

Full Member
Local time
2:30 AM
Jan 10, 2019
61
23
any news on this front? very interested in this.
 

Admin9705

Administrator
Original poster
Project Manager
Local time
3:30 AM
Jan 17, 2018
4,798
1,843
scanned the entire library perfectly. nearly 500tb. worked just as fast as my linux counterpart. I have powerful windows machines I want as additional players.
 
Assists Greatly with Development Costs

remserwis

Junior Member
Local time
9:30 AM
Apr 13, 2019
13
1
Perfect timing....after consideration I decided to have one complete plexguide setup with plexserver on linux (hetzner) for europe friends, and just plex server on osx ( mac mini server in USA) for my neighbors. I was using VM on OSX to create unionfs before...but installed NetDrive now as I had one license.
Added keys as explained and NetDrive started to use them. After movies scan start (5000) ... requests jumped to approx. 7-8/sec.
When checked history for pgblitz ... it was similar. Hard to say how fast is the scan. 5k movies to change the path im most of them ( netdrive in osx is adding username suffix to share so I couldn't just name it unionfs to keep the path).
So far so good...will see in the morning if it worked properly. Thank you for NetDrive-API discovery...hopefully it will solve most of my problems.
 

remserwis

Junior Member
Local time
9:30 AM
Apr 13, 2019
13
1
Update:
Overnight...Plex scanned all libraries. Works pretty smooth...movies play pretty quick and responsive (not like straight fromGCE but ok). So far I like this Plex NetDrive API setup very much. One hiccup though. I cannot figure how to force Radarr and Sonarr to scan only updated directories as I can't force NetDrive to do mnt/unionfs path nor Radarr to send custom path notification. I've read something in Cloudbox Wiki that there is config.json with mappings to edit in Plex Autoscan but cannot find it in PGblitz. Ultimately I would love to notify 2 Plex servers at the same time as I decided to split between my US and EU friends. Any suggestions would be very helpful.
 

Admin9705

Administrator
Original poster
Project Manager
Local time
3:30 AM
Jan 17, 2018
4,798
1,843
i would say they are roughly the same when you use your own apis. I never really bothered with the notifies, so couldn't really tell you that one. ya in regards to unionfs, there is one program in the past that was $99 that would do this before i did all this; but cannot recall and the licesnse management sucks. What I do is run plexguide in a vm to do all of the downloading and fetching. The goal here is to generate extra players (have some powerful windows machines just sitting idle).
 

USSHauler

Junior Member
Local time
3:30 AM
Feb 23, 2019
4
1
Well if the entirety of PGBlitz works on Windows and even on Hyper-V then it's definitely worth the effort . I would love to run PMS on Windows and have my docker environment on a Microserver or something of the sort or even all on just Windows. Nice find !
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads


Maintenance Donations

Recommend NewsGroups

      Up To a 58% Discount!