Skip to content
This repository was archived by the owner on Feb 5, 2022. It is now read-only.

Commit 2ad74af

Browse files
committed
-l shows names as a text list
1 parent e394c1b commit 2ad74af

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plex-ttp.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,13 @@ if (argv.l) {
112112
plex.init();
113113

114114
let res = plex.listTag(argv.l);
115-
res = res.sort((a, b) => a.tag < b.tag ? -1 : a.tag > b.tag ? 1 : 0);
115+
const nb = res.length;
116+
res = res.map(elt=>elt.tag).sort().join(", ");
117+
//res = res.sort((a, b) => a.tag < b.tag ? -1 : a.tag > b.tag ? 1 : 0);
116118
// eslint-disable-next-line no-console
117119
console.log(res);
118120
// eslint-disable-next-line no-console
119-
console.log(`${res.length} entries`);
121+
console.log(`\n${nb} entries`);
120122
plex.end();
121123
}
122124

0 commit comments

Comments
 (0)