Skip to content

Commit

Permalink
core: remove legacy configuration files (Jackett#10416)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngosang authored Dec 7, 2020
1 parent 38f0990 commit 9f66532
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 300 deletions.
18 changes: 18 additions & 0 deletions src/Jackett.Common/Services/IndexerManagerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public void InitIndexers(IEnumerable<string> path)
InitIndexers();
InitCardigannIndexers(path);
InitAggregateIndexer();
RemoveLegacyConfigurations();
}

private void MigrateRenamedIndexers()
Expand Down Expand Up @@ -234,6 +235,23 @@ public void InitAggregateIndexer()
};
}

public void RemoveLegacyConfigurations()
{
var directoryInfo = new DirectoryInfo(globalConfigService.GetIndexerConfigDir());
if (!directoryInfo.Exists)
return; // the directory does not exist the first start
var files = directoryInfo.GetFiles("*.json*");
foreach (var file in files)
{
var indexerId = file.Name.Replace(".bak", "").Replace(".json", "");
if (!indexers.ContainsKey(indexerId) && File.Exists(file.FullName))
{
logger.Info($"Removing old configuration file: {file.FullName}");
File.Delete(file.FullName);
}
}
}

public IIndexer GetIndexer(string name)
{
// old id of renamed indexer is used to maintain backward compatibility
Expand Down
300 changes: 0 additions & 300 deletions src/Jackett.Updater/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -423,306 +423,6 @@ private void ProcessUpdate(UpdaterConsoleOptions options)
"Definitions/xtremefile.yml",
"Definitions/xtremezone.yml", // migrated to C# XtremeZone base tracker
"Definitions/yourexotic.yml", // renamed to exoticaz
"Indexers/32pages.json",
"Indexers/32pages.json.bak",
"Indexers/420files.json",
"Indexers/420files.json.bak",
"Indexers/academictorrents.json",
"Indexers/academictorrents.json.bak",
"Indexers/alein.json",
"Indexers/alein.json.bak",
"Indexers/alexfilm.json",
"Indexers/alexfilm.json.bak",
"Indexers/aox.json",
"Indexers/aox.json.bak",
"Indexers/apollo.json", // renamed to orpheus
"Indexers/apollo.json.bak", // renamed to orpheus
"Indexers/archetorrent.json",
"Indexers/archetorrent.json.bak",
"Indexers/asiandvdclub.json",
"Indexers/asiandvdclub.json.bak",
"Indexers/avg.json",
"Indexers/avg.json.bak",
"Indexers/b2s-share.json",
"Indexers/b2s-share.json.bak",
"Indexers/badasstorrents.json", // to be migrated to c#
"Indexers/badasstorrents.json.bak", // to be migrated to c#
"Indexers/bithq.json",
"Indexers/bithq.json.bak",
"Indexers/bitme.json",
"Indexers/bitme.json.bak",
"Indexers/bittorrentam.json",
"Indexers/bittorrentam.json.bak",
"Indexers/blubits.json",
"Indexers/blubits.json.bak",
"Indexers/brobits.json",
"Indexers/brobits.json.bak",
"Indexers/bt-scene.json",
"Indexers/bt-scene.json.bak",
"Indexers/btbit.json",
"Indexers/btbit.json.bak",
"Indexers/bteye.json",
"Indexers/bteye.json.bak",
"Indexers/btgigs.json",
"Indexers/btgigs.json.bak",
"Indexers/btkitty.json",
"Indexers/btkitty.json.bak",
"Indexers/btstornet.json",
"Indexers/btstornet.json.bak",
"Indexers/btxpress.json",
"Indexers/btxpress.json.bak",
"Indexers/cinefilhd.json",
"Indexers/cinefilhd.json.bak",
"Indexers/crazyscorner.json",
"Indexers/crazyscorner.json.bak",
"Indexers/czteam.json",
"Indexers/czteam.json.bak",
"Indexers/cztorrent.json",
"Indexers/cztorrent.json.bak",
"Indexers/demonsite.json",
"Indexers/demonsite.json.bak",
"Indexers/digbt.json",
"Indexers/digbt.json.bak",
"Indexers/downloadville.json",
"Indexers/downloadville.json.bak",
"Indexers/dragonworld.json",
"Indexers/dragonworld.json.bak",
"Indexers/dreamteam.json",
"Indexers/dreamteam.json.bak",
"Indexers/eggmeon.json",
"Indexers/eggmeon.json.bak",
"Indexers/elitehd.json",
"Indexers/elitehd.json.bak",
"Indexers/elitetorrent-biz.json",
"Indexers/elitetorrent-biz.json.bak",
"Indexers/elittracker.json",
"Indexers/elittracker.json.bak",
"Indexers/eotforum.json",
"Indexers/eotforum.json.bak",
"Indexers/estrenosdtl.json",
"Indexers/estrenosdtl.json.bak",
"Indexers/ethor.json",
"Indexers/ethor.json.bak",
"Indexers/evolutionpalace.json",
"Indexers/evolutionpalace.json.bak",
"Indexers/extratorrent-ag.json",
"Indexers/extratorrent-ag.json.bak",
"Indexers/extratorrentclone.json",
"Indexers/extratorrentclone.json.bak",
"Indexers/feedurneed.json",
"Indexers/feedurneed.json.bak",
"Indexers/filmsclub.json",
"Indexers/filmsclub.json.bak",
"Indexers/freakstrackingsystem.json",
"Indexers/freakstrackingsystem.json.bak",
"Indexers/freedomhd.json",
"Indexers/freedomhd.json.bak",
"Indexers/gdf76.json",
"Indexers/gdf76.json.bak",
"Indexers/gfxnews.json",
"Indexers/gfxnews.json.bak",
"Indexers/gods.json",
"Indexers/gods.json.bak",
"Indexers/gormogon.json",
"Indexers/gormogon.json.bak",
"Indexers/greeklegends.json",
"Indexers/greeklegends.json.bak",
"Indexers/hachede-c.json",
"Indexers/hachede-c.json.bak",
"Indexers/hd4free.json",
"Indexers/hd4free.json.bak",
"Indexers/hdbc.json", // renamed to hdbitscom
"Indexers/hdbc.json.bak", // renamed to hdbitscom
"Indexers/hdclub.json",
"Indexers/hdclub.json.bak",
"Indexers/hdplus.json",
"Indexers/hdplus.json.bak",
"Indexers/hon3yhd-net.json",
"Indexers/hon3yhd-net.json.bak",
"Indexers/horriblesubs.json",
"Indexers/horriblesubs.json.bak",
"Indexers/hyperay.json",
"Indexers/hyperay.json.bak",
"Indexers/idopeclone.json",
"Indexers/idopeclone.json.bak",
"Indexers/iloveclassics.json",
"Indexers/iloveclassics.json.bak",
"Indexers/infinityt.json",
"Indexers/infinityt.json.bak",
"Indexers/inperil.json",
"Indexers/inperil.json.bak",
"Indexers/isohunt.json",
"Indexers/isohunt.json.bak",
"Indexers/kapaki.json",
"Indexers/kapaki.json.bak",
"Indexers/katcrs.json",
"Indexers/katcrs.json.bak",
"Indexers/kaztorka.json",
"Indexers/kaztorka.json.bak",
"Indexers/kickasstorrent.json",
"Indexers/kickasstorrent.json.bak",
"Indexers/kikibt.json",
"Indexers/kikibt.json.bak",
"Indexers/korsar.json",
"Indexers/korsar.json.bak",
"Indexers/lapausetorrents.json",
"Indexers/lapausetorrents.json.bak",
"Indexers/lemencili.json",
"Indexers/lemencili.json.bak",
"Indexers/leparadisdunet.json",
"Indexers/leparadisdunet.json.bak",
"Indexers/leporno.json",
"Indexers/leporno.json.bak",
"Indexers/magnetdl.json",
"Indexers/magnetdl.json.bak",
"Indexers/maniatorrent.json",
"Indexers/maniatorrent.json.bak",
"Indexers/manicomioshare.json",
"Indexers/manicomioshare.json.bak",
"Indexers/megabliz.json",
"Indexers/megabliz.json.bak",
"Indexers/mkvcage.json",
"Indexers/mkvcage.json.bak",
"Indexers/moecat.json",
"Indexers/moecat.json.bak",
"Indexers/music-master.json",
"Indexers/music-master.json.bak",
"Indexers/nachtwerk.json",
"Indexers/nachtwerk.json.bak",
"Indexers/nexttorrent.json",
"Indexers/nexttorrent.json.bak",
"Indexers/nordichd.json",
"Indexers/nordichd.json.bak",
"Indexers/nostalgic.json", // renamed to vhstapes
"Indexers/nostalgic.json.bak", // renamed to vhstapes
"Indexers/nyaa.json",
"Indexers/nyaa.json.bak",
"Indexers/nyoo.json",
"Indexers/nyoo.json.bak",
"Indexers/passionetorrent.json",
"Indexers/passionetorrent.json.bak",
"Indexers/polishtracker.json",
"Indexers/polishtracker.json.bak",
"Indexers/pt99.json",
"Indexers/pt99.json.bak",
"Indexers/qctorrent.json",
"Indexers/qctorrent.json.bak",
"Indexers/qxr.json",
"Indexers/qxr.json.bak",
"Indexers/rapidetracker.json",
"Indexers/rapidetracker.json.bak",
"Indexers/redtopia.json",
"Indexers/redtopia.json.bak",
"Indexers/rgu.json",
"Indexers/rgu.json.bak",
"Indexers/rns.json", // site merged with audiobooktorrents
"Indexers/rns.json.bak", // site merged with audiobooktorrents
"Indexers/rockethd.json",
"Indexers/rockethd.json.bak",
"Indexers/rockhardlossless.json",
"Indexers/rockhardlossless.json.bak",
"Indexers/rodvd.json",
"Indexers/rodvd.json.bak",
"Indexers/scenereactor.json",
"Indexers/scenereactor.json.bak",
"Indexers/scenexpress.json",
"Indexers/scenexpress.json.bak",
"Indexers/seedpeer.json",
"Indexers/seedpeer.json.bak",
"Indexers/sharespacedb.json",
"Indexers/sharespacedb.json.bak",
"Indexers/sharingue.json",
"Indexers/sharingue.json.bak",
"Indexers/skytorrents.json",
"Indexers/skytorrents.json.bak",
"Indexers/soundpark.json", // to be migrated to C#
"Indexers/soundpark.json.bak", // to be migrated to C#
"Indexers/spacetorrent.json",
"Indexers/spacetorrent.json.bak",
"Indexers/speed-share.json",
"Indexers/speed-share.json.bak",
"Indexers/t411.json",
"Indexers/t411.json.bak",
"Indexers/t411v2.json",
"Indexers/t411v2.json.bak",
"Indexers/tazmaniaden.json",
"Indexers/tazmaniaden.json.bak",
"Indexers/tbplus.json",
"Indexers/tbplus.json.bak",
"Indexers/tehconnection.json",
"Indexers/tehconnection.json.bak",
"Indexers/tfile.json",
"Indexers/tfile.json.bak",
"Indexers/the-madhouse.json",
"Indexers/the-madhouse.json.bak",
"Indexers/themoviecave.json",
"Indexers/themoviecave.json.bak",
"Indexers/theresurrection.json",
"Indexers/theresurrection.json.bak",
"Indexers/thetorrents.json",
"Indexers/thetorrents.json.bak",
"Indexers/theunknown.json", // became 3evils #9678
"Indexers/theunknown.json.bak", // became 3evils #9678
"Indexers/tigers-dl.json",
"Indexers/tigers-dl.json.bak",
"Indexers/tntvillage.json",
"Indexers/tntvillage.json.bak",
"Indexers/topnow.json",
"Indexers/topnow.json.bak",
"Indexers/torrentcouch.json",
"Indexers/torrentcouch.json.bak",
"Indexers/torrenthane.json",
"Indexers/torrenthane.json.bak",
"Indexers/torrentkim.json",
"Indexers/torrentkim.json.bak",
"Indexers/torrentquest.json",
"Indexers/torrentquest.json.bak",
"Indexers/torrentrex.json",
"Indexers/torrentrex.json.bak",
"Indexers/torrentsmd.json",
"Indexers/torrentsmd.json.bak",
"Indexers/torrentvault.json",
"Indexers/torrentvault.json.bak",
"Indexers/torrentwal.json",
"Indexers/torrentwal.json.bak",
"Indexers/torrentwtf.json",
"Indexers/torrentwtf.json.bak",
"Indexers/torrof.json",
"Indexers/torrof.json.bak",
"Indexers/torviet.json",
"Indexers/torviet.json.bak",
"Indexers/tspate.json",
"Indexers/tspate.json.bak",
"Indexers/turknova.json",
"Indexers/turknova.json.bak",
"Indexers/u-torrents.json",
"Indexers/u-torrents.json.bak",
"Indexers/ultimategamerclub.json",
"Indexers/ultimategamerclub.json.bak",
"Indexers/ultrahdclub.json",
"Indexers/ultrahdclub.json.bak",
"Indexers/uniotaku.json", // to be migrated to c#
"Indexers/uniotaku.json.bak", // to be migrated to c#
"Indexers/utorrents.json", // same as SzeneFZ now
"Indexers/utorrents.json.bak", // same as SzeneFZ now
"Indexers/vanila.json",
"Indexers/vanila.json.bak",
"Indexers/vhstapes.json",
"Indexers/vhstapes.json.bak",
"Indexers/waffles.json",
"Indexers/waffles.json.bak",
"Indexers/world-of-tomorrow.json", // #9213
"Indexers/world-of-tomorrow.json.bak", // #9213
"Indexers/worldofp2p.json",
"Indexers/worldofp2p.json.bak",
"Indexers/worldwidetorrents.json",
"Indexers/worldwidetorrents.json.bak",
"Indexers/xfsub.json",
"Indexers/xfsub.json.bak",
"Indexers/xktorrent.json",
"Indexers/xktorrent.json.bak",
"Indexers/xtremefile.json",
"Indexers/xtremefile.json.bak",
"Microsoft.Owin.dll",
"Microsoft.Owin.FileSystems.dll",
"Microsoft.Owin.Host.HttpListener.dll",
Expand Down

0 comments on commit 9f66532

Please sign in to comment.