Problem

Problem Source:889. Construct Binary Tree from Preorder and Postorder Traversal(Daily Challenge)

Problem Description

Given two integer arrays, preorder and postorder where preorder is the preorder traversal of a binary tree of distinct values and postorder is the postorder traversal of the same tree, reconstruct and return the binary tree.

If there exist multiple answers, you can return any of them.

Read more »

Preface

The recommended usage of Jellyfin is that users create folders according to the media rules and place media files in them. After that, the media titles are automatically generated based on the metadata obtained from the scraper. However, this rule is so compulsory that this simple functionality of using the original file name as the title is not even available. While manual updating media titles is possible, it can be cumbersome.

To fit this demand, I have created a script using jellyfin-apiclient-python to batch rename all media in a specific media library. Additionally, this article explores some previous solutions, none of which were satisfactory in my opinion.

Read more »

Preface

Jellyfin is an open-source media server. Here is my way of using Jellyfin: download anime using qBittorrent, start Jellyfin, and then watch the anime on iPad through the client.

Previously, I have installed the portable version of Jellyfin on Windows because a Linux virtual machine can not utilize the graphics card for hardware transcoding. However, I discovered that the Android and iOS clients support most codecs, eliminating the need for server-side transcoding. Since I am already familiar with Jellyfin’s usage and configuration, I decided to migrate it to Docker.

Although Jellyfin itself is cross-platform, its configuration is still OS-dependent, especially when moving from Windows to Docker. Despite the availability of a third-party script, I chose to reconfigure it for safety, which does not require much effort.

This article mainly talks about how to install Jellyfin using Docker, along with any issues encountered and their solutions.

Read more »

Preface

In my previous post, I successfully set up a LANraragi server and shared it with other devices in my home LAN. However, new issues arose:

  • LANraragi could be accessed without logging in.
  • Even if LANraragi had a login feature, it still used HTTP plaintext transmission, which is equivalent to no password protection.

The root cause of these issues was that devices like smartphones and smart home devices, connected to the LAN, were not trustworthy. They could potentially have backdoors (or ‘users voluntarily transmitting private data to improve service’). Anyway, these issues needed urgent resolution.

The solution is Nginx:

  • Use Nginx’s built-in basic authentication to allow access only with a correct username and password.
  • Utilize Nginx’s reverse proxy feature. Once Nginx is configured with HTTPS, any software being proxied can use the encrypted transmission.

Therefore, the key lies in the configuration of Nginx and SSL certificates. The challenge is that I need to request a certificate for an internal IP address without a corresponding domain name. This article explores these solutions, marking my first encounter with Nginx and SSL certificate configuration.

Read more »
0%