stashapp / stash

An organizer for your porn, written in Go. Documentation: https://docs.stashapp.cc
https://stashapp.cc/
GNU Affero General Public License v3.0
8.7k stars 774 forks source link

[Feature] Manually add content (no binary) + link to web hosted videos eg google photos / drive #966

Open timcantona opened 3 years ago

timcantona commented 3 years ago

My "stash" tends to be located in two places currently; Google photos and locally on my media server. I went for google photos a while back because of the unlimited space (which I know, is going.... :( ) and the remote access. When Stash came along I started to mirror my favourite content locally, but due to space constraints I don't really want everything local.

Something I thought would be great is if I could host all the metadata in my stash so I can use stash as my interface to my entire collection, regardless of where it is stored. Now I know some of stashes features could not work for remote content, but just the ability to scrape a remote film have things like actors, tags, etc in stash so I can quickly filter and find content, and then click a link to view it on the cloud platform would be great!

Ideal world it would be great to connect to google photos via the API, pull details list of files and then create linked media items based on the name with the url to the media item. Looking at the API, I am not sure you can do much else, but thats ok. Then we could scrape the linked item based on the file name and include it in the library.

If the API isn't feasible, perhaps another way would be to allow users to manually create media items with no actual file, and add a URL to the file to play as needed. Ideally this could be a batch import from a text file of the names and then users could go use a script to dump the filenames out and import that. I have a script that I use for this already here

If it supported it, it would also be great to play the remote file embedded directly in stash to keep things seemless, but not sure how hard that would be to implement with permissions, etc.

timcantona commented 3 years ago

I've been playing with this some more, and if anyone is interested I have updated the gist I linked in the post above.

My script now loops through all the videos in your google photos library and creates an empty file with the filename of each video, and also pushes the filename and url (that you can watch the video via with correct creds) to a text file. My next thought was to put all the dummy files into a sub directory in my stash directory and scan them so they got added, but ffprobe errors out.... Manually inserting them into the sqlite db seemed to work (they are listed under my scenes!) but clicking the scene gives out another ffprobe error.

I wonder if a simple first step might be to allow adding (via a setting) invalid (according to ffproke) / empty files and when the scene is selected, the option to play is just not given.

Does anyone else have a solution for this already or some ideas how to solve?

I don't know go at all, but there are a few google photo projects already out there written in go that could maybe get utilised? eg https://godoc.org/github.com/Q-Brains/gphotos