I know it can be a real pain when things go awry. This is a new glitch that appears to be caused by some change in iCloud. The short answer is to start again adding back the shares and favorites you had before with the added step of first turning off iCloud Sync in settings.

Remember that Library won’t work with DLNA, you’ll have to use to one of the other formats like SMB or NFS in order to get the library and it’s sort functions.

Now with the issues of google drive failing to index, it seems that google drive is sensitive to mass requests and may shut you out after a bit and then you can resume the scan later.

There is s thread discussing the initial glitch here that has some good info (and some chicken little info mixed in) Lost all Favorites, Up-Next, etc

There are some others if you use the search function that discuss the google drive thing.