Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] optionally load only configured indexers. #9224

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jellofishi
Copy link
Contributor

Potential implementation for feature described in #7851.
Configuration setting to load all or only configured indexers.
Requires restart on config change

Copy link
Contributor

@garfield69 garfield69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you will need to update in index.html the changed= datestamp in order to force the browser cache to refresh custom.js

<script type="text/javascript" src="../custom.js?changed=20200410"></script>

its the 698 line

Copy link
Contributor

@garfield69 garfield69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, anomaly.
I have 334 indexers loaded normally.
with your PR active, I only get 331.
apparently, the following were not loaded?
AniRena, Channelx, RockBox
Are you loading only lowercase filenames?
the names of the files in the Indexers folder are based on the id: in the *.cs and *.yml definitions.

@jellofishi
Copy link
Contributor Author

@garfield69 Can I assume indexer ids are case insensitive ?

Can i assume the indexer id is the same as the yml file name ? or should i open the yml file and use the id inside it to make sure ?

Can i assume the config files are save with the indexer id which may be camel case ?

All yml definition files i saw except one (DasUnerwartete.yml) are lowercase.

@jellofishi
Copy link
Contributor Author

example: anirena.yml and id:aniRena and config file aniRena.json.

similar for Channelx, RockBox

Seems to be the reason for them not loading

…ers with case sensitive discrepancies between indexer id and indexer definition file name
Optional indexer loading:  force the browser cache to refresh custom.js

Feature: optionally load only configured indexers - fix loading indexers with case sensitive discrepancies between indexer id and indexer definition file name
@jellofishi
Copy link
Contributor Author

Squashed the commits as per the contribution instructions. Never did that before. Hope i didn't break anything.

@garfield69
Copy link
Contributor

Can I assume indexer ids are case insensitive ?

I believe the id is case sensitive (eg aniRena is not the same as anirena or ANIRENA)
@ngosang this is your baby, please confirm my responses just in case I have it wrong, and while you are at it, your review for this PR is requested. thanks.

Can i assume the indexer id is the same as the yml file name ?

no. the yml filename is not necessarily the same as the id. Usually they are lower case, but there are exceptions, such as Bittorrentfiles.yml and DasUnerwartete.yml previously created when there were no naming standards in place.

or should i open the yml file and use the id inside it to make sure ?

that would certainly be the safest and more reliable method

Can i assume the config files are save with the indexer id which may be camel case ?

yes, the *.json files are created using the case sensitive id

@jellofishi
Copy link
Contributor Author

Current fix still assumes indexer id is same as file name except for case. Will fix to open yml and look at id later.

… to id in definition file and not according to definition file name.
@jellofishi
Copy link
Contributor Author

Fixed to load only configured indexers according to index id in the definition file and not using the indexer definition file name.
config files still assume the file name is the indexer id.

As an aside, I think indexers ids should be UUID4 and only the display names should be used to actually represent the indexer to the user. This may complicates human (read:developer) accessibility to things, but can reduce the amount of workaround code (such as the need to rename indexers)

@ngosang ngosang self-assigned this Sep 15, 2020
@garfield69 garfield69 removed their request for review August 17, 2021 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants