Some of these are ones I've experienced first-hand, others are
defensive because I realized I don't know what kind of weird
things might be out there. Can do more if necessary.
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.
Not actually used by the application at the moment, but in the
interest of making this particular file a better representation
of the API, this felt like an easy change that I can take advantage
of later now that I have it.
In order to improve the configurability of the queuefile creation,
which I can't really do when relegating that to a possibly third-party
function with only the video id as argument, I've decided I want to
go all in on the queuefile as the output of ycdl. Actually downloading
the video is best left to another tool designed for the task.
Any third-party downloading function would always introduce the
possibility of network errors and crashes, ruining the call stack
of ycdldb.download_video for no good reason.
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.
This makes the page much easier to use on mobile. On desktop I think
the new size may be a little overwhelming but I'll try getting used
to it, and anyway I think it simply makes more sense than the
arbitrary size from earlier.