Adding Media

Once the server is set up and running, you should probably give it access to some media files you want to be able to watch.

There are multiple ways to give the server access to media files.

  1. Putting media inside the Media directory
  2. Uploading files through the client application
  3. Sharing local files through the client application
  4. Downloading media through remote-requests

Technical details to keep in mind

The way the server stores media metadata in the database relies on the file path.

If you take a file and rename it or move it to a different directory, it's path hash will change and it will be recognized as a new file.
Currently there is no rename/move option but if it's a commonly requested feature it will be added.

Putting media inside the Media directory

The first and most common way is to simply put them inside the Media directory.

Anything inside wt-server/Media will be scanned on server start and when a manual scan is started from the admin panel.

It is recommended to keep the actual media inside main sub-directories like Media/Movies and Media/Series.

For example, Media/Uploaded and Media/Downloaded are created by default for uploaded using client upload and downloaded files through remote requests to keep things more organized.

You can mount a NAS directory inside the directory as well, but you will need to restart the server for it to take effect.

Upload files through the client application

When connected to the server and with the "UploadMediaToServer" permission (or administrator) you will be able to upload files through the Server Media window.

Uploaded files will be put inside Media/Uploaded

Sharing local files through the client application

Sometimes there is no need to keep a file around for long, or no point in uploading it to the server just to delete it afterwards.

This is where local file sharing comes in.

You can pick a file available on your local machine to be shared with the server.
Currently, there is no access control for this.
Everyone on the server will be able to see it and play it.

When you want to play it, the player will use the local file stream to not waste server bandwidth.

Media shared like this is available in the Server Media window in the User shared tab.

Downloading media through remote-requests

When you have a link to some media like a video or a clip, you can use the "Remote Media" button to open the "Media Requests" window, paste the link and click "Request".

The server will try to download the media present at that link.
This is how you watch media from external websites.

Using yt-dlp behind the scenes for this, currently set to download at most 1080p.
(will be exposed to settings)

Storage while downloading

While yt-dlp is downloading and processing the file, it does so in a separate directory "RequestTemporary".
Make sure you have enough storage space available for about twice the size of the file you are downloading.
This is because sometimes the best quality video and audio are available as separate streams and are downloaded as such and then later merged.
After all processing finishes, the finished file is copied over to the final directory, all temporary files are deleted, and the space is reclaimed.

Downloaded files will be put inside Media/Downloaded