1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2024-12-21 23:33:18 +00:00
1 Development: Renaming Indexers
ilike2burnthing edited this page 2024-09-15 00:54:04 +01:00

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

  1. Rename the indexer id (in yaml or c#)
  2. 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";
  1. Optional: you can rename the yaml / c# filename too
    • yaml: rename the file and add the old file name into src/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)
  2. Optional: The tracker name / description is not related to the id and it can be changed anytime

How it works for the user

  1. The updater will remove the old .yaml definition (if it's a .yaml indexer) and the new one will be extracted in the folder.
  2. 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
  3. The indexer is able to load the previous configuration without problem. From this moment, there are no longer remains of the old id.
  4. 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.