Skip to content

Commit

Permalink
minor output fixes for issues raised in #53
Browse files Browse the repository at this point in the history
  • Loading branch information
bebo-dot-dev committed Jul 5, 2020
1 parent 11dd78f commit e38e502
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions m3u-epg-editor-py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,8 @@ def transform_string_value(string_value, compare_value, transforms):
def filter_m3u_entries(args, m3u_entries):
filtered_m3u_entries = []
if m3u_entries is not None and len(m3u_entries) > 0:
output_str("keeping channel groups in this list {}".format(str(args.group_idx)))
keeping_discarding = "keeping" if args.groupmode == "keep" else "discarding"
output_str("{} channel groups in this list {}".format(keeping_discarding, str(args.group_idx)))
if len(args.discard_channels) > 0:
output_str("ignoring channels in this list {}".format(str(args.discard_channels)))
if len(args.include_channels) > 0:
Expand Down Expand Up @@ -652,8 +653,8 @@ def sort_m3u_entries(args, m3u_entries):
m3u_entries = sorted(m3u_entries, key=lambda entry: (entry.group_idx, entry.channel_idx))
else:
# no specific sort channel order is specified so sort the entries by group and channel name
output_str("desired channel sort order: {}".format(str(args.group_idx)))
m3u_entries = sorted(m3u_entries, key=lambda entry: (entry.group_idx, entry.tvg_name))
output_str("sorting filtered items alphabetically by group and channel name")
m3u_entries = sorted(m3u_entries, key=lambda entry: (entry.group_title, entry.tvg_name))

return m3u_entries

Expand Down

0 comments on commit e38e502

Please sign in to comment.