The use of the channel library as a cache for metadata to avoid
re-requesting metadata for known media is an optimization that dates
back to 1.0. However, it doesn't have any TTL, is prone to bugs, and is
of dubious value.
This commit ignores the results of the library check when queueing a new
video, opting to always re-request the metadata. This fixes a few bugs:
* Google Drive metadata being lost when storing in library
* Streamable metadata being lost when storing in library
* Videos in the channel library that are now unavailable on their
source website being queueable and then failing to play (e.g. deleted
YouTube videos).
In its place, a small fail-open check is left behind to emit metric
counters on how many queues would have been cache-hits, to provide
insight into whether a proper caching solution (i.e. one not tacked on
top of the library) would be worth pursuing or not. This will be
removed eventually.
Allows switching resolutions via the video.js UI. Also added support on
the player side for 540p, 1440p, and 2160p videos, although the metadata
extractors have not been updated to provide these sources yet.
We now allow server operators to customize the /r/ part of the channel links
The new config option in the template is commented and the config module validates and will terminate with status 78 if an improper value is used.
We've also dropped some old cruft and uses a more elegant method to assign CHANNEL.name
Resolves#668
Code is not used anywhere yet, but the end goal is:
* Replace the bash-style algorithm with a less kludgy one
* Add the ability to customize tab completion method (will also
include default zsh-style completion)
* Abstract tab completion so it can be shared for chat and emote names
as available options
I thought about just moving the parse failure message handling to queueMessage, but that quickly turned into a minefield of pain. This gets the job done for now.
Many older devices do not support the Let's Encrypt CA, for various
reasons. This causes connection issues for sites using Let's Encrypt to
support HTTPS connections. This commit adds a hack that can be enabled
with a switch in callbacks.js to try to detect when the user's browser
does not trust the certificate and permit the user to connect to an
insecure endpoint instead.
Unfortunately, the AJAX API does not allow to distinguish between *why*
a request fails, so the best we can do is detect that the HTTPS request
failed, try to make a request over plain HTTP, and if it works, assume
the HTTPS request failed due to a certificate error. It's not 100%
foolproof since the HTTPS endpoint could just be down for some reason,
but it should work well enough in most cases.
Closes#602
The `from` field has existed for ages, but was never actually displayed.
Displaying it to users reduces confusion about who is making the
announcement.
The channel settings emote list is now paginated and leverages the same
basic code as the emote browser, but with a different renderer. Fixes
#594 and kills an ugly function.
The error messages were a bit difficult for users to understand due to a
combination of including useless technical information and lacking
userful user information. The error messages are more verbose now and
give a better indication of what went wrong.
Also combined adminflair and modflair into one button (the button has 2
states if you're a moderator, or 3 states if you're a site
administrator). Resolves#517