audible-cli icon indicating copy to clipboard operation
audible-cli copied to clipboard

adding downloadable flag to library list cmd

Open rhhayward opened this issue 2 years ago • 4 comments

Hi @mkb79,

I've taken a stab at adding a "--downloadable" flag for the library list command. I tried to duplicate the pattern of the existing "--resolve-podcasts" flag, but if there's a better way please let me know. I also had to add "customer_rights" to the response_groups list to populate the necessary field for the is_downloadable() function.

I also haven't tested this with podcasts, or other types of resources, so if there's tests you'd suggest please let me know.

Thanks, rhhayward

rhhayward avatar May 25 '23 15:05 rhhayward

@rhhayward Thank you for your pr. I'll review this now. Please give me some time.

mkb79 avatar May 26 '23 05:05 mkb79

@rhhayward Your code works. But instead of adding a downloadable flag we can add a filter option. So a user can select one/multiple predefined filter keywords like downloadable, not downloadable, author. What do you thinking about this?

mkb79 avatar May 27 '23 12:05 mkb79

Sure, I can do that. Here's what I'm thinking:

@click.option('--filters', multiple=True)

and then I'll create flags based on the contents for downloadable, not downloadable, and author=<Name>, and filter by those. Let me give that a shot, and if you want to revise any of the flag names, or how they're handled, let me know.

rhhayward avatar May 27 '23 21:05 rhhayward

@mkb79 - I've changed to the --filter format. Let me know what you think.

rhhayward avatar May 27 '23 22:05 rhhayward