Commit Graph

78 Commits (720db06d4c484a4818f21d758f8db3fa9d587882)

Author SHA1 Message Date
voussoir 17cd98fa50 Let image thumbnails lazy load. 2020-08-15 22:28:53 -07:00
voussoir de5aba4895 Remove unnecessary spacer when channel is none. 2020-08-15 22:28:27 -07:00
voussoir 5610d756c2 Fix video_cards variable name being used twice, breaking filter. 2020-08-15 22:27:47 -07:00
voussoir 6bd4997f3f Simplify logging.getLogger because they are hierarchical. 2020-08-12 11:25:59 -07:00
voussoir 3f3eda58b1 Move logging basicconfig effort to frontmost application layer. 2020-08-12 11:17:10 -07:00
voussoir ee89582a1b Return 404 when channel could not be added and still does not exist. 2020-08-12 10:28:06 -07:00
voussoir be45de55f5 Use generator comprehension instead of list comprehension for ?q. 2020-08-11 21:50:38 -07:00
voussoir e90254cfeb Copy some common css from Etiquette. 2020-08-10 20:55:23 -07:00
voussoir b660d700b9 Add endpoint and gui button for deleting channels. 2020-08-10 18:30:56 -07:00
voussoir e42e4cac55 Add #toolbox_left and #toolbox_right where I can put more buttons. 2020-08-10 18:29:50 -07:00
voussoir 213278edcc Capitalize state filter links, remove commas from sorter links.
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.
2020-08-09 17:54:38 -07:00
voussoir c13f02006b Let button_with_confirm inherit original CSS when not specified. 2020-08-08 18:59:17 -07:00
voussoir 1eafdf5e5b Add skewer-case aliases for snake_case arguments. 2020-08-08 18:58:39 -07:00
voussoir ff0d01fdda Add more to docstring about spinner delay attribute. 2020-07-10 16:34:32 -07:00
voussoir 4911cee910 Use generators instead of lists for loading / searching videos.
Previously, creating the list meant that all database rows would be
loaded and objected even if you had a limit in place on your page
query, which was a huge waste.
2020-07-01 17:54:36 -07:00
voussoir bacdad07a6 Add docstring to bind_box_to_button, and some small linting. 2020-06-30 20:32:29 -07:00
voussoir 6a41b18ba7 Dedent by using early returns. 2020-06-28 17:07:12 -07:00
voussoir 3044907264 Use dot notation instead of subscript on response. 2020-06-28 16:57:32 -07:00
voussoir 1e4f4441bb Use dot notation instead of subscript. 2020-06-28 16:55:37 -07:00
voussoir fcbb128f47 Add attribute "completed" to response object. 2020-06-28 16:47:54 -07:00
voussoir 27219d74c4 Add spinner when setting automark. 2020-06-26 20:59:55 -07:00
voussoir f1e80dac94 Add spinners to channel refresh buttons. 2020-06-17 14:15:50 -07:00
voussoir 235bc2501d Add spinner.js, synced with Etiquette. 2020-06-17 14:15:13 -07:00
voussoir dd59fd2c36 Import common.js before api.js. 2020-06-17 14:13:33 -07:00
voussoir e420d92f6c Add more docstring to button_with_confirm data-onclick parameter. 2020-06-17 14:09:02 -07:00
voussoir d2d8a69d39 Synchronize Etiquette common.js and YCDL common.js. 2020-06-17 13:38:01 -07:00
voussoir ff1b043279 Arrange the state filters horizontally instead of vertically.
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.
2020-06-10 23:09:17 -07:00
voussoir 9c629d53b1 Remove some useless functions from common.js. 2020-06-04 19:04:51 -07:00
voussoir 66f499c232 Move functions mark_state, start_download to api.js. 2020-06-03 13:01:53 -07:00
voussoir d996101152 Move function set_automark to api.js. 2020-06-03 13:01:28 -07:00
voussoir ba1f17da75 Move function add_channel to api.js. 2020-06-03 13:00:44 -07:00
voussoir 1f2c43278a Move function refresh_all_channels to api.js. 2020-06-03 13:00:16 -07:00
voussoir ab1a2364be Move function refresh_channel to api.js. 2020-06-03 12:59:29 -07:00
voussoir b76be18b6c Add CHANNEL_ID variable to js via jinja. 2020-06-03 12:58:33 -07:00
voussoir 415acdf7d1 Add api.js. 2020-06-03 12:54:20 -07:00
voussoir d0a0a87b43 Add function common.refresh. 2020-06-03 12:28:09 -07:00
voussoir 113a92fb5b Move function html_to_element to common.js. 2020-06-03 12:26:25 -07:00
voussoir 2ba9eb8df2 Add docstring for init_atag_merge_params. 2020-06-03 12:21:23 -07:00
voussoir bd27a910e1 Fix bugs introduced by new http response["data"] format. 2020-05-21 22:20:50 -07:00
voussoir 3e27e6e2e8 Add separate API endpoint for add_channel, apply to web ui.
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.
2020-05-21 22:16:02 -07:00
voussoir 480eeb9ac3 Update common.js request, get, post functions like Etiquette. 2020-05-21 20:29:43 -07:00
voussoir 21af1576c2 Move endpoints into separate files like Etiquette. 2020-05-21 20:04:02 -07:00
voussoir 13a72ec7fc Move CSS and JS into separate folders under static. 2020-05-21 19:43:45 -07:00
voussoir 57d87560a4 Add interface for setting automark state. 2020-05-21 17:28:34 -07:00
voussoir 0c5823cbeb Indicate automark state on /channels listing. 2020-05-21 17:26:12 -07:00
voussoir af494e2684 Rename CSS class channel_card_downloaded -> channel_card_no_pending. 2020-05-21 17:22:07 -07:00
voussoir 2f5ec40b89 Big: Object-oriented channels & videos, match Etiquette structure.
- 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.
2020-04-05 18:59:16 -07:00
voussoir 4689609c97 Add links for sort by date, duration, views, random. 2020-04-03 14:24:48 -07:00
voussoir 718399806a Add channel_name to videos before returning them, show on listings.
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.
2020-04-03 08:49:35 -07:00
voussoir 1b456bf900 Let embedded video fit width of the video card instead of hard px.
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.
2020-04-03 08:43:47 -07:00