Make media in multiple languages uniformly sorted in the order of the Latin alphabet in Jellyfin.
1.1K
Make media in multiple languages uniformly sorted in the order of the Latin alphabet (ABCD ......) in Jellyfin.
Note : This tool will modify the "Short title" of media metadata, if you want to keep the manually modified short title, please use JELLYFIN_SORT_EMPTY_ONLY environment variable to enable the ignore feature.
First, you need to prepare the following information:
+ button in the Jellyfin main menu => Dashboard in Administration => API Keys in Advanced => click the + button. For example "cd1fedb049404c17af7b6026badf50a5"When you are ready, you can refer to the following ways to use it.
To learn how to install and use Docker, please refer to the Docker Official Documentation.
A one-time run:
docker run --rm \
--name=Jellyfin-Sort \
--env=JELLYFIN_SERVER={Jellyfin URL} \
--env=JELLYFIN_KEY={Jellyfin API Key} \
--restart=unless-stopped \
libook/jellyfin-sort:latest
Replace {Jellyfin URL}, {Jellyfin API Key} with your own information. See Parameter list below for more parameters.
To add environment variables when creating Docker containers, simply add --env= in front of the new environment variable and add ={value} after the environment variable, such as "--env=JELLYFIN_SORT_EMPTY_ONLY=true".
Docker image can be found in here.
To learn how to install and use Node.js, please refer to the Node.js Official Documentation.
Clone or download code from GitHub:
git clone https://github.com/libook/jellyfin-sort.git
Enter project directory, install dependencies:
npm ci
A one-time run:
JELLYFIN_SERVER={Jellyfin URL} \
JELLYFIN_KEY={Jellyfin API Key} \
node ./src/daemon.js
Replace {Jellyfin URL}, {Jellyfin API Key} with your own information. See Parameter list below for more parameters.
To add an environment variable when running a Node.js program, simply add the environment variable before the node command and add ={value} after the environment variable, e.g. "JELLYFIN_SORT_EMPTY_ONLY=true".
All parameters are environment variables.
JELLYFIN_KEY
+ button in the Jellyfin main menu => Dashboard in Administration => API Keys in Advanced => click the + button. For example "cd1fedb049404c17af7b6026badf50a5".JELLYFIN_SERVER
JELLYFIN_SORT_BATCH_LIMIT
JELLYFIN_SORT_CRON
,. e.g. "42 * * * *,18 * * * *".JELLYFIN_SORT_EMPTY_ONLY
false, 0, etc. is also equivalent to turning it on since it is only turned off if not used or left blank.JELLYFIN_SORT_HOOK_PORT
Dashboard in Administration => Plugins in Advanced, install the weebhook plugin. Click Webhooks=>Add Generic Destination, type in the URL of Jellyfin Sort, check Item Added and click Save. When a new media is added to Jellyfin, a notification will automatically be sent to Jellyfin Sort, and Jellyfin Sort will process the media directly.-p host port:container port when creating the Docker container.If the program neither needs to wait to receive the Webhook nor has a scheduled task to wait for, it will exit automatically when processing is complete.
Annex: Cron format quick reference
┌───────────── minute (0–59)
│ ┌───────────── hour (0–23)
│ │ ┌───────────── day of the month (1–31)
│ │ │ ┌───────────── month (1–12)
│ │ │ │ ┌───────────── day of the week (0–6) (Sunday to Saturday)
│ │ │ │ │
│ │ │ │ │
* * * * *
By default, Jellyfin uses the media title to sort the list, if the user sets "Short title", the short title of the media will be used as the basis for sorting.
Many languages have a Latinized (romanized) scheme. Alphabetic writing systems such as French, German, Russian, etc. can be roughly converted by mapping to the Latin alphabet. Chinese, Japanese, and other hieroglyphic writing systems can be roughly transformed into Latin alphabet representations by means of a phonetic system. It should be noted that, due to the complexity and non-strictness of natural languages, such transformations may not be completely accurate, but they are usually sufficient for sorting.
This project uses GPL-3.0 license, anyone can contribute code as Pull Request.
This project uses ESLint and configured rules, please make sure the code conforms to the rules, if you have questions about the rules, you can submit an Issue to discuss.
This project uses the convention commit style, please make sure that the commit message conforms to the style specification when you commit the code.
Content type
Image
Digest
sha256:1a395ec54…
Size
69.7 MB
Last updated
over 2 years ago
docker pull libook/jellyfin-sort