Skip to content

Added ability to filter pending list entries via API#2087

Merged
liiight merged 1 commit intodevelopfrom
pending_list_search
Mar 9, 2018
Merged

Added ability to filter pending list entries via API#2087
liiight merged 1 commit intodevelopfrom
pending_list_search

Conversation

@liiight
Copy link
Copy Markdown
Member

@liiight liiight commented Feb 28, 2018

Motivation for changes:

@stevezau asked

Detailed changes:

  • Added /pending_list/<list_id>/entries?search=<string> endpoint

log.debug('querying entries from pending list with id %d', list_id)
query = session.query(PendingListEntry).filter(PendingListEntry.list_id == list_id)
if filter:
query = query.filter(func.lower(PendingListEntry.title).contains(filter.lower()))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What happens if i search for "Some Series" but the titles are Some.Series?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It won't find it. Just a substring search currently

@liiight liiight merged commit 118c739 into develop Mar 9, 2018
@liiight liiight deleted the pending_list_search branch March 9, 2018 14:52
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.

2 participants