[change] Extend series list help message. (#1720)#1737
[change] Extend series list help message. (#1720)#1737liiight merged 1 commit intoFlexget:developfrom
Conversation
|
That message is more confusing than helpful imo. Also, I'd do this when the default series list return nothing, like what happened to you. About what you said with cli, I agree with you and I imagine this could be done by forcing our subparser options to contain at least one option. |
|
Would it help if I'd write smt like: 'Use |
|
Cool |
d8d8565 to
2b0d05f
Compare
flexget/plugins/cli/series.py
Outdated
There was a problem hiding this comment.
The python way is to do:
if not query.count():Also, I think this should be before the table construction, since displaying an empty table is weird IMO.
And maybe add some thing like: "No results found. Try using flexget series all to view all known series" to make it more clear.
There was a problem hiding this comment.
Excellent!
I was a bit reluctant to change too much but I considered doing just that. Will do.
|
@liiight Not sure if you saw the latest commit I pushed. |
|
I'm not sure why this over-complication is needed. just check if |
|
I merely split the original function into two. The diff might look daunting but it's almost trivial. Reasoning behind doing so is the fact that the original function became/was quite long hampering (my) understanding. But you're the owner. If you prefer I'll revert it. No problem. |
|
I agree that it's quite long but i don't think this is the right time (or way) to address that. |
|
I'll amend. |
45401ea to
cf1b363
Compare
Both help messages are conditional. One will show on an empty result set the other then there actually is something to detail.
cf1b363 to
5b9329d
Compare
|
Try to make it a DRY as possible, but since this is a UI plugin, and one that holds a significant amount of data and data types, some cluster is bound to exist. |
|
I'm unsure why CI failed. The log is blank? |
Motivation for changes:
See #1720
Detailed changes:
Addressed issues:
flexget series listis empty #1720.To Do:
When 'implementing' this I noticed that most of the CLI plugins don't return anything when no additional CLI arguments are given. For example
flexget seriesjust returns as doesflexget archive.flexget regexcrashes (because it uses a map). That's rather confusing (for me at least).I believe it would be helpful to print the help page with a leader like 'no option selected'. Would you agree?