Commit graph

219 commits

Author SHA1 Message Date
b76be18b6c Add CHANNEL_ID variable to js via jinja. 2020-06-03 12:58:33 -07:00
415acdf7d1 Add api.js. 2020-06-03 12:54:20 -07:00
d0a0a87b43 Add function common.refresh. 2020-06-03 12:28:09 -07:00
113a92fb5b Move function html_to_element to common.js. 2020-06-03 12:26:25 -07:00
2ba9eb8df2 Add docstring for init_atag_merge_params. 2020-06-03 12:21:23 -07:00
8fcba8f05b Add more attributes to ytapi.Video from API data.
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.
2020-05-26 22:05:08 -07:00
dd99ddc10f Remove youtube_dl_function argument, but add configurable extension.
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.
2020-05-24 21:07:14 -07:00
bd27a910e1 Fix bugs introduced by new http response["data"] format. 2020-05-21 22:20:50 -07:00
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
480eeb9ac3 Update common.js request, get, post functions like Etiquette. 2020-05-21 20:29:43 -07:00
5c4b2e9d21 Add jsonify.py. 2020-05-21 20:28:52 -07:00
21af1576c2 Move endpoints into separate files like Etiquette. 2020-05-21 20:04:02 -07:00
13a72ec7fc Move CSS and JS into separate folders under static. 2020-05-21 19:43:45 -07:00
55d0bb463c Add utility merge_db.py. 2020-05-21 17:33:59 -07:00
57d87560a4 Add interface for setting automark state. 2020-05-21 17:28:34 -07:00
0c5823cbeb Indicate automark state on /channels listing. 2020-05-21 17:26:12 -07:00
34f24d9940 Let default state of automark be pending, not None. 2020-05-21 17:25:06 -07:00
af494e2684 Rename CSS class channel_card_downloaded -> channel_card_no_pending. 2020-05-21 17:22:07 -07:00
e165b16edc Rstrip the "Z" off of timestamps.
This only started occuring recently.
2020-05-06 21:23:24 -07:00
cd7a59cbfa Sort channel names case-insensitive. 2020-05-06 21:23:02 -07:00
0562c51d6c Use mark_state instead of doing the sql update here. 2020-04-15 16:34:33 -07:00
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
4689609c97 Add links for sort by date, duration, views, random. 2020-04-03 14:24:48 -07:00
1bc3df5efe Split DB_INIT into pragmas and full init, like Etiquette. 2020-04-03 11:23:51 -07:00
11a147fbcd Use insert_filler for add_channel. 2020-04-03 11:12:56 -07:00
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
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
275db1e608 Fix typo googleapicliet -> googleapiclient. 2020-03-28 17:07:18 -07:00
4effa64694 Move endpoints to new endpoints.py. 2020-03-28 17:05:43 -07:00
1b2778ca7a Rename ycdl_flask.py to common.py. 2020-03-28 16:56:06 -07:00
790fbd7b9a Remove this ifmain. 2020-03-28 16:53:39 -07:00
d407326392 Move make_json_response into new jsonify.py. 2020-03-28 16:51:40 -07:00
c7ef2dd41b Rearrange these imports. 2020-03-28 16:49:33 -07:00
428ada8c83 Rename inner ycdl_flask folder to backend.
Following the same thing as I did with etiquette.
2020-03-28 16:47:37 -07:00
201ae70ba0 Use argparse to expose refresher thread controls. 2020-03-28 16:44:47 -07:00
9fe7057021 Move refresher thread launcher into a function. 2020-03-28 16:42:54 -07:00
d0bfbaadfe Add method insert_playlist. 2020-03-17 20:53:18 -07:00
1a7662b6bd Add method get_playlist_videos. 2020-03-17 20:53:10 -07:00
08ae8a9394 Update reference to ycdldb. 2020-03-17 20:52:50 -07:00
9b227c6e5f Add link to random pending videos on homepage. 2020-03-13 14:38:27 -07:00
b5f892d595 Add ?orderby url parameter. 2020-03-11 18:02:09 -07:00
672abf9d86 Hold Shift to not deselect videos after setting a state. 2020-03-11 14:30:56 -07:00
26328865e1 Pass list of all states to page for autogeneration of elements. 2020-03-11 14:30:12 -07:00
b48c2fc37c Rename ycdl.py -> ycdldb.py; add exceptions.py. 2020-03-11 14:27:27 -07:00
3d3da805b6 Stop selecting text when shift-clicking to select videos. 2020-03-11 13:01:55 -07:00
81b864ec19 main should return args.func(args) value. 2020-02-08 17:20:27 -08:00
6691c49481 Add parameter skip_failures to refresh_all_channels. 2020-01-19 10:53:49 -08:00
03b5e97d33 Add ycdl_logo.svg.
It's just the favicon anyway.
2020-01-19 10:51:54 -08:00
29d819fe97 Add a refresher thread to keep your sub box up to date. 2020-01-06 22:07:43 -08:00
78ce6a6f41 Add views column and some other database changes.
And various other changes which have been sitting here for too long.
2020-01-06 22:07:25 -08:00