Skip to content

Default theme (smoothness) configuration setting fix#61

Open
cjaone wants to merge 1 commit into
Pavion:masterfrom
cjaone:default_theme_fix
Open

Default theme (smoothness) configuration setting fix#61
cjaone wants to merge 1 commit into
Pavion:masterfrom
cjaone:default_theme_fix

Conversation

@cjaone

@cjaone cjaone commented Feb 10, 2023

Copy link
Copy Markdown

After first start the configuration parameter "Interface theme" is empty in the GUI, i.e. it is not "smoothness":

TSR_empty_theme

If you just change the recording path configuration (or nothing at all) and press "Submit changes" the current theme suddenly is lost. Example screenshot shows the channels page:

TSR_no_theme

Root cause for this is wrong default setting of the theme in config.py and tvstreamrecord.py.

(Please note that in the 2 files there are different line ending characters for a few lines which was automatically fixed by the code editor on save. That's the reason why the diffs show these lines, too.)

@Pavion

Pavion commented Feb 27, 2023

Copy link
Copy Markdown
Owner

Sorry, I've missed your PR, just saw it now. It's a strange behavior here.
It seems to me, jquery-ui.min.css is a proper CSS, using theme.css from the same folder fails for me.
Your fix is not working proper on my quick Windows setup.
Anyway the theme selection is error prone, I'll look into it as soon as I can.
Thanks for pointing it out!

@Pavion

Pavion commented Mar 12, 2023

Copy link
Copy Markdown
Owner

I've looked into this today and it's a curious bug.

  1. I'm sure I've seen this error myself but I wasn't able to reproduce it in a fresh setup. It might have happened due to version or database migration or some misconfiguration

  2. As already written, larger jquery-ui.min.css is the necessary one, theme.css is not. In fact, if you look into any jquery-ui.min.css, you'll see:

image

  1. The theme selection itself is flawed and selects first css from a theme folder:

image

So normally this should select an alphabetic first file jquery-ui.min.css. On some system it probably could select theme.css instead, which would lead to the error.
As I'm too lazy to rewrite this function, I'd rather delete all theme.css from all folders thus reducing the overall footprint. On both Win and Linux with both Py2 and Py3 it looks proper.

  1. There is a bug in the code you've addressed: while config.py default setting is right and should not be changed, tvstreamrecord.py fallback is wrong:

image

Instead of my code or your proposal it should be:

        config.cfg_theme = "smoothness/jquery-ui.min.css"

This wrong fallback setting could too have triggered the same error but shouldn't fire under any circumstances.

Anyway, I'll fix it after merging the first PR.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants