For channels with many thousands of videos, it can be a while
before the DOM is fully parsed and ready to go. It is annoying
to type in the box and find that it doesn't work yet, since the
script tag comes after body.
Why not move the script above body? Because I don't want to,
and because you'd be filtering from an incomplete list of
videos anyway.
On large channels, filter_video_cards is painfully slow because of all
the forced reflows. I'm currently trying to find a better solution.
In the meantime, hiding the containing div does prevent those reflows
until the end, but itself is also quite slow.
To make these two rows look similar. Rather than lowercasing the
sorters, let's capitalize the state filters. And rather than adding
a ','.join to the state filters, let's just remove commas from the
sorters. Good enough.
The "New videos are" dropdown and the sorting options are both
horizontal, so this one being vertical stuck out badly visually.
This is a little better.
Previously, the "add channel" box was just calling refresh, which
implicitly adds the channel. This adds a separate endpoint for
add_channel, and as a bonus the web ui will navigate you to the
channel after it has been loaded.
- Channels and videos are now objects instead of just dictionaries.
- Copied Etiquette's use of cachemanager mixin to cache those objects.
- Copied Etiquette's use of sql_ methods.
- Copied Etiquette's use of namespaced javascript.
- Copied Etiquette's use of config file.
- Redid video_card css to use grid, better on mobile.
- Improved usage of URL parameters with class=merge_class.
- Wrote some actual content on readme.
Previously, when viewing a /videos listing, there was a link
called (Chan) to bring you to the channel page, but since videos
only carried author_id and not author_name it was always kind of
ugly. This will inject that attribute on the way out.
I know, this would be more properly written as an SQL join in the
first place, but my row-dict conversion isn't set up for that and
I'm planning on converting this all to object-based returns instead
of dicts soon.