Updated Renaming Indexers (markdown)

Diego Heras 2020-05-12 22:12:34 +02:00
parent 8aa2ccaf5b
commit f71f866b08
1 changed files with 21 additions and 6 deletions

@ -1,17 +1,32 @@
This documents how to rename indexers.
#8355 allows the changing of the indexer id without breaking backward compatibility. Note that changing the id must be justified.
This documents how to rename indexers. [#8612](https://github.com/Jackett/Jackett/pull/8612) allows the changing of the indexer id without breaking backward compatibility.
Steps to rename the id:
Note that changing the id must be justified.
## Steps to rename the id
1. Rename the indexer id (in yaml or c#)
2. Edit `IndexerManagerService.cs` to add `old id` and `new id` in the map
3. Optional: you can rename the yaml / c# too
* yaml: rename the file and add the `old file name` into `Program.cs` to be removed by the updater
* c#: rename the file and the class name (not need to change `Program.cs`)
* yaml: rename the file and add the `old file name` into `Program.cs` to be removed by the updater
* c#: rename the file and the class name (not need to change `Program.cs`)
4. Optional: The tracker name / description is not related to the id and it can be changed anytime
How it works for the user:
## How does 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.`
## Renaming several times
The first time the indexer is renamed to `vhstapes`
```
{
{"nostalgic", "vhstapes"}
}
```
The second time is renamed to `anewname`
```
{
{"nostalgic", "anewname"},
{"vhstapes", "anewname"}
}