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

Filter results to a series_id_list #199

Open
nephlm opened this issue Apr 26, 2021 · 0 comments
Open

Filter results to a series_id_list #199

nephlm opened this issue Apr 26, 2021 · 0 comments

Comments

@nephlm
Copy link

nephlm commented Apr 26, 2021

Story:
a directory full of files from a known set of serieses, but more than one, and let's say that file globbing is inconvenient for the situation I'm working with. I'd like to be able to specify a collection of series_ids and have tvnamer filter out any results that don't match one of those ids. In most cases this will be used with "select_first" or the default behavior of when a single result is returned.

I have code to do this, and was wondering if it was of any interest upstream to make it worth cleaning up and disentangling it from other changes? It may be too niche of a desire to be worth maintaining upstream, but it would make my life slightly easier if I didn't have to update it when new versions come out, so I figured I'd see if there was any interest.

New config settings:

  • series_id_list - List of Ids
  • series_file - If the list is empty and this is set, it will populate the list from a delimited file.
  • series_file_delimiter - What delimiter to use for reading the file
  • series_file_id_field - Which filed (0 based number) are the ids located.

Passes a custom_ui to tvdb_api to filter the list before the normal uis present them to the user. Reproduced the interactive logic from tvdb_api so "select_first" still works.

In retrospect, the file stuff might not have a place in tvnamer, I can rip that out and do something external to populate the series_id_list if that's preferred, after all it's a json file. The more significant issue is that series_id and series_id_list do similar, but not quite the same things and are named way too similarly. I suspect a new name is in order, though I don't know what it would be at present.

These are the bulk of the changes in questions as they currently exist: nephlm@241fe6c

@nephlm nephlm changed the title series_id_list Filter results to a series_id_list Apr 26, 2021
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

No branches or pull requests

1 participant