jrudess / streamdvr

DVR for streaming entertainment
GNU General Public License v3.0
65 stars 16 forks source link

TUI blue borders behave funny if any streamer is being recorded #109

Closed jrudess closed 5 years ago

jrudess commented 5 years ago

Once a recording starts, the streamer list border jumps to the far right of the window. When no recordings are occurring, it bounds the expected region.

Only suspects right now are weird interaction with colors, since the Offline color is blue, and the border is blue, but the recording file color is green. Need to investigate using the blessed approach to colors rather than the colors library. Swapped colors around in config and it did not influence results.

jrudess commented 5 years ago

Possible bug in neo-blessed. Workaround committed, but something keeps resizing the listtable element to fullscreen anytime there is a resize event or typing in the CLI.

jrudess commented 5 years ago

Tracked this down to a problem with mixing the colors library and blessed. colors, of course, adds terminal escape codes. By applying those to the text before I pass it to blessed, blessed sees a different string length, and so all of its auto-size calculations are wrong.

Blessed implements its own markup for doing coloring that needs to be used to solve this, but its a pretty large rewrite, as the color library allows this code to work seamlessly between TUI and pure console logging mode.

I know I'll piss a few people off if I force tui ;-)