Commit graph

72 commits

Author SHA1 Message Date
Roland
f305d7912f
channel may be None. 2022-01-16 13:37:44 -07:00
Roland
6f58a2b563
Chrome attempts to screenshot in the current directory, but if the current directory is not a real user directory, the screenshot fail.s 2022-01-16 13:35:18 -07:00
Roland
1d9fe2f649
Setting channel id rather than channel because the channel may be in a different session. 2022-01-16 10:27:24 -07:00
Roland
89e3edb157
Creating functions to unify finding/making video directories. 2022-01-16 10:17:06 -07:00
Roland
a70e049823
Creating channel directory if it does not exist. 2022-01-16 09:28:22 -07:00
Roland
ca96bce6b7
Finding yt-dlp bin on startup. 2022-01-15 20:07:38 -07:00
Roland
e0b5966717
Creating videos and archives directory when they don't exist. 2022-01-15 19:58:38 -07:00
Roland
474e68cc3d
Fixing a few bugs in preparation for sneak peek. 2022-01-15 18:05:51 -07:00
Roland
fa0ccedd8b
Fetching next_download for each channel. 2022-01-15 13:52:43 -07:00
Roland
4f770bd215
Not counting empty videos in Channel statistics. 2022-01-15 13:31:53 -07:00
Roland
4a2fb577da
Creating channel directory if requested. 2022-01-15 13:23:57 -07:00
Roland
7d23a914e6
Info_json may not yet be a MediaPath. 2022-01-14 16:13:17 -07:00
Roland
f9a1f736ca
Not adding video when it was already in the session. 2022-01-14 16:11:14 -07:00
Roland
8b9d44df5c
Using str to check if video file is relative to channel directory. 2022-01-14 16:06:23 -07:00
lrnselfreliance
86893ef7f1
Feature/video validate (#74)
* Videos are marked as validated so they will not be tried again.  All previous bulk methods are combined into one.

* Passing json to fixture factory to avoid writing the files in every test.

* Adding log to explain if refresh is slow.

* Generating video poster if one cannot be found.

* Generating video poster if no poster can be found.

* Videos without a video file (yet to be downloaded) are not validated.

* Video title is extracted from the video file name as a last resort.

* Keeping existing view count because it may be from the channel, which will be more recent.

* Downloads should only be downloaded after they are due, not the same day.

* Setting manager on new downloads.

* Checking if downloading is disabled in loop.

* Adding log when refresh is complete.

* Not generating posters by default.  This is to avoid deleting files.

* Not converting posters unless channel has that enabled.

* Not logging on valid because all posters will be checked.

* Validating videos in upsert.

* Using video name parser in upsert.

* Using validate_video in upsert so that data is only read once from disk.

* Attaching manager in download_manager.get_download.

* Adding 22 to preferred video format for odd 720p resolution.

Signed-off-by: Roland <roland@learningselfreliance.com>
2022-01-14 15:54:51 -07:00
Roland
f21dfa4195
Deferring large video columns from select. 2022-01-11 08:56:27 -07:00
Roland
8f48e1b0d2
Commiting using channel session. 2022-01-07 14:46:03 -07:00
Roland
a96d6f97f3
A Channel must be refreshed before download. 2022-01-07 14:41:28 -07:00
Roland
b9606c1b31
Adding check to ensure that tests are running in test db. 2022-01-07 13:59:43 -07:00
Roland
512fb532d8
Revert "Raising error if channel directory does not exist."
This reverts commit 90e7d682fa.
2022-01-07 13:33:47 -07:00
Roland
1d69e5417a
Making calling optional_session optional. 2022-01-07 10:33:52 -07:00
Roland
90e7d682fa
Raising error if channel directory does not exist. 2022-01-06 19:53:29 -07:00
Roland
30affa20cd
Using archive request when testing. 2022-01-06 14:20:21 -07:00
Roland
2447ced632
Enabling downloads. 2022-01-06 13:56:49 -07:00
lrnselfreliance
6e55e7360b
Feature/raspberry pi archive (#72)
* Converting OTP PDF generation to Latex to avoid installing wkhtmltopdf.

* Creating temporary_directory_path to simplify creating a TemporaryDirectory of type Path.

* Removing author

* Linting

* Installing texlive-latex-extra for more readable font.

* Raspberry pi has to archive locally.

Signed-off-by: Roland <roland@learningselfreliance.com>
2022-01-06 13:56:19 -07:00
Roland
9091efaf2b
Not setting validated unless the conversion was successful. 2022-01-05 15:10:11 -07:00
lrnselfreliance
bedcc3a5e9
Bugfix/favorites import (#71)
* Favorite videos are saved even if the DB is wiped.

* Logging when importing.

* Warning when favorite video cannot be found.

* Handling when a favorited video has no channel.

* Fixing link name in log.

* vid2 was not in a channel.

Signed-off-by: Roland <roland@learningselfreliance.com>
2022-01-05 12:52:38 -07:00
Roland
e6fa9c79f7
Importing videos config after successful refresh. This is apply favorites to videos. 2022-01-05 09:50:46 -07:00
Roland
f3b49b3551
Handling when a video has no channel, but should not be downloaded again. 2022-01-04 16:24:02 -07:00
Roland
0c2250ea12
Skipping video when download URL is bad. 2022-01-04 16:21:27 -07:00
Roland
a190348263
Ignoring and warning about error when refreshing a channel's videos. 2022-01-04 15:10:44 -07:00
Roland
b6c7ef1d99
Using video path as alternate title on video player. Showing 'No Description' when no description is available. 2022-01-04 14:48:01 -07:00
Roland
61abff1c5e
Video titles have HTML entities replaced. 2022-01-04 14:30:45 -07:00
Roland
9da3b3d8b2
Creating api_param_limiter which can be used to restrict limit or offset. 2022-01-04 12:15:11 -07:00
Roland
fe9bdc190e
Using more broad video format selection. 2022-01-04 10:31:37 -07:00
Roland
51b7c1cc75
Reformatting pages in a consistent way. 2022-01-04 09:07:28 -07:00
lrnselfreliance
c23b014add
Feature/archive search (#70)
* Working through archive search.

* Using custom hook.

* Setting archive.contents duration creation.

* Archive search and domain list use custom hooks.

* Watching search param using value, not history.

* Search params are preserved on load.  Search and domain can be cleared.

* Fixing archive external link.

* Archive search form is new generic SearchInput.

* Reworking Archives empty states.

* Simplifying Archives logic.

* Fixing bug which displayed the wrong empty state during loading.

* Archives can be synced and deleted.

* Changing wording of archive delete.

* Removing URL table.

* Deleting domain if it has no archives.

* Fixing FE use of archive.url.  Fixing bug with get_domains.

* Universal results are displayed on Welcome page.

* Creating ExternalLink to open a link in a new tab.g

* Increasing size of search headers.

* Adding divider to ease reading.

* Adding More button below search results.

* Disabling More buttons when there are no results.

* Ordering videos by rank so linked results are at the top.

Signed-off-by: Roland <roland@learningselfreliance.com>
2022-01-03 15:13:38 -07:00
Roland
3cb2aaf6cf
Fixing archive deleting. 2021-12-31 22:35:23 -07:00
Roland
3f7145c940
Fixing video search bug. 2021-12-31 20:28:51 -07:00
Roland
a95cbd74c9
Splitting new archive test for thoroughness. 2021-12-31 20:23:49 -07:00
Roland
6e16ad9a23
Archives can be searched by their contents. 2021-12-31 20:14:14 -07:00
Roland
e3fd85ff97
Getting latest archive by greating __gt__ and using max(). 2021-12-30 22:31:40 -07:00
Roland
a05cb2272e
Handling when archives have been manually deleted. 2021-12-30 22:23:32 -07:00
Roland
02f8584762
Squashed commit of the following:
commit 1663e1be9e
Author: Roland <roland@learningselfreliance.com>
Date:   Thu Dec 30 19:37:25 2021 -0700

    Setting downloader to video when a channel schedules it's videos for download.

commit a6811f9e87
Author: Roland <roland@learningselfreliance.com>
Date:   Thu Dec 30 19:33:27 2021 -0700

    Setting channel downloader when spreading channel downloads.

commit b63c8f132a
Author: Roland <roland@learningselfreliance.com>
Date:   Thu Dec 30 19:28:53 2021 -0700

    Fixing DownloadManager.kill

commit 120ce7cd2c
Author: Roland <roland@learningselfreliance.com>
Date:   Thu Dec 30 19:10:12 2021 -0700

    Fixing OTP api urls.

commit d3b985241b
Author: Roland <roland@learningselfreliance.com>
Date:   Thu Dec 30 19:07:48 2021 -0700

    Channel Cancel button does not submit form.

commit 9d1a0ecd55
Author: Roland <roland@learningselfreliance.com>
Date:   Thu Dec 30 19:00:53 2021 -0700

    A Channel without an existing Download cannot be downloaded.

commit e7c920f382
Author: Roland <roland@learningselfreliance.com>
Date:   Thu Dec 30 18:41:02 2021 -0700

    Fixing typing.

commit d56c8fde24
Author: Roland <roland@learningselfreliance.com>
Date:   Thu Dec 30 18:36:02 2021 -0700

    Testing bad downloader param.

commit e3c57ef674
Author: Roland <roland@learningselfreliance.com>
Date:   Thu Dec 30 18:31:35 2021 -0700

    Adding __json__ to Downloader for sending them to the FE.  Hiding ChannelDownloader because it will be handled specifically.

commit 047b507119
Author: Roland <roland@learningselfreliance.com>
Date:   Thu Dec 30 18:20:37 2021 -0700

    Downloader can be specified by the user.

commit 4a169ba43c
Author: Roland <roland@learningselfreliance.com>
Date:   Tue Dec 28 18:37:30 2021 -0700

    Download info a set in create_downloads.

commit 8778d53fa1
Author: Roland <roland@learningselfreliance.com>
Date:   Tue Dec 28 18:21:43 2021 -0700

    Fixing Download.info_json name.

commit b28bacfd5b
Author: Roland <roland@learningselfreliance.com>
Date:   Tue Dec 28 18:17:53 2021 -0700

    Downloader names are in the class, not in the init.

commit f5ce952da0
Author: Roland <roland@learningselfreliance.com>
Date:   Tue Dec 28 18:07:42 2021 -0700

    Download info can be saved during the download process and can be used by the Downloader.
2021-12-30 20:45:11 -07:00
Roland
f830fe3dcc
Dropping channel.next_download. Removing noisy download logs. 2021-12-27 16:43:52 -07:00
Roland
95c37ae415
Creating statistic container for channels. 2021-12-24 15:31:15 -07:00
Roland
81fb9b06c5
Creating indexes on video columns to speedup video search. 2021-12-24 14:53:47 -07:00
Roland
2b5f48d8d7
Removing duplicate log. 2021-12-23 14:22:28 -07:00
Roland
944782fd7c
Creating video.censored column so videos can be quickly filtered. 2021-12-23 14:09:31 -07:00
lrnselfreliance
02116bf2bc
Feature/censored videos (#65)
* Creating api endpoint to find censored videos.

* Videos can be filtered by censored status.

* Not deleting when there has not been a successful download.

* Search now has a different param order.

* Displaying correct header for videos page.

* Reworking FilterModal to be more universal.

* Using merge_output_format for preparing filename.

* Resetting attempts when user requests a download be started.

* Displaying video stem as title if no title is available.

Signed-off-by: Roland <roland@learningselfreliance.com>
2021-12-23 09:38:32 -07:00