openzim / youtube

Create a ZIM file from a Youtube channel/username/playlist
GNU General Public License v3.0
44 stars 26 forks source link

Title of HTML page is not updated anymore in 3.0 #298

Closed kelson42 closed 1 week ago

kelson42 commented 3 weeks ago

All the pages have the same title, see:

image
dan-niles commented 3 weeks ago

Should the page title include only the video title (e.g., Les Délires de Maisons de Milliardaires !), or should it also include the ZIM title (e.g., Astrolabe | Les Délires de Maisons de Milliardaires !)?

kelson42 commented 3 weeks ago

@dan-niles At this stage, I would do it like it was before, so only the video title. Same for playlist page, etc...

benoit74 commented 1 week ago

This is not really a regression but an intended change, discussed in https://github.com/openzim/youtube/issues/227

The reason behind it is that we know have one single HTML entry. And the content is dynamically updated with JS. We could hence also update the title dynamically from JS (this is the PR). I tried and failed in kolibri (but maybe my code was different, I do not recall). As far as I remember, some readers where not detecting the dynamic change of document title at all (not really a problem but a waste of code/energy) and some other readers (kiwix-serve if I'm not mistaken) where mixing up titles in browser history: looked like page N had the title of page N-1 in history.

benoit74 commented 1 week ago

I did not intended to close this issue at all, sorry, missclick.

benoit74 commented 1 week ago

I will test the ZIM built in the PR and revert.

benoit74 commented 1 week ago

As mentioned in https://github.com/openzim/youtube/pull/300#pullrequestreview-2275771129, I did not experienced again the issues I experienced with Kolibri. I'm probably not as a good frontend dev as @dan-niles ^^ Glad it works as expected.