mirror of
https://github.com/Jackett/Jackett
synced 2024-12-21 15:23:21 +00:00
Page:
Development: Renaming Indexers
Pages
Definition format
Development: General guidelines for what an Indexer should aim to provide
Development: How to remove Indexers from Jackett
Development: Renaming Indexers
Development: Sites that may update cats after a new year
Development: Yearly updates for test code
Finding cookies
Home
How to request a new tracker
Installation on Alpine Linux
Installation on FreeBSD
Installation on OpenWrt
Installation on Synology
Jackett API
Jackett Categories
Reverse Proxy
Systemd service
Troubleshooting
No results
0
Development: Renaming Indexers
ilike2burnthing edited this page 2024-09-15 00:54:04 +01:00
Table of Contents
This documents how to rename indexers to allow the changing of the indexer id without breaking backward compatibility.
Note that changing the id must be justified.
Steps to rename the id
- Rename the indexer id (in yaml or c#)
- add the replaces statements
- for yaml
id: newidname
replaces:
- oldidname
name: NewName
- for C#
public override string Id => "newidname";
public override string[] Replaces => new[] { "oldidname" };
public override string Name => "NewName";
- Optional: you can rename the yaml / c# filename too
- yaml: rename the file and add the
old file name
intosrc/Jackett.Updater/Program.cs
to be removed by the updater - c#: rename the file and the class name (there is no need to change
src/Jackett.Updater/Program.cs
)
- yaml: rename the file and add the
- Optional: The tracker name / description is not related to the id and it can be changed anytime
How it works for the user
- The updater will remove the old .yaml definition (if it's a .yaml indexer) and the new one will be extracted in the folder.
- In the first start, Jackett will rename the old configuration file into the new one. The user will see this trace:
Info Configuration renamed: /home/XX/.config/Jackett/Indexers/nostalgic.json => /home/XX/.config/Jackett/Indexers/vhstapes.json
- The indexer is able to load the previous configuration without problem. From this moment, there are no longer remains of the old id.
- Some users will be using the Torznab/Potato/RSS feeds in 3rd party apps. Those URLs contains the
old id
. Eg:http://127.0.0.1:9117/api/v2.0/indexers/nostalgic/results/torznab/api?apikey=ygm5 ..
The old URL still works after the change. You can use nostalgic (old) or vhstapes (new), both work. If you use the deprecated id, you will see a warning in the log with each request (until you change nostalgic to vhstapes in the URLs):Warn Indexer nostalgic has been renamed to vhstapes. Please, update the URL of the feeds. This may stop working in the future.