| Commit message (Collapse) | Author | Age | Lines |
|
|
|
| |
We handle these when reading the file, so we might as well do it here.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should disentangle the logic a bit and make the entire code base
easier to work with. The watch_later entries are now kept in a
WatchLaterEntry dataclass which supports pretty-printing with __repr__.
Fetching of titles is now done through a dedicated TitleMap class which
imports yt_dlp as late as possible, speeding up printing of entries that
don't need to be updated and avoiding the import entirely if everything
can be fetched from cache. Otherwise there should not be any functional
change.
|
|
|
|
|
| |
This makes this already quite deeply nested function a bit easier to
read.
|
|
|
|
|
|
|
| |
The piece of logic that parses the name of the watch_later entry and
makes sure that no redirect entries are processed can easily be moved
into the entries() generator. This way we don't even generate items that
we end up skipping anyway.
|
| |
|
|
|
|
| |
We do the same thing here twice, so this seems worth it.
|
| |
|
|
|
|
|
| |
This will make sure that the whole directory structure will be created
if missing and saves us a try/except block with exist_ok.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Different video URLs can be easy to confuse in the output of later(1).
Look up titles for them in $XDG_CACHE_HOME/later/title.json and add an
option, --update-titles, to populate the file automatically using yt-dlp.
The title is prefixed with a hash sign (#) in order to better separate
it visually from the URLs, as well as to allow easier copypasting of
output onto an mpv command line.
|
| |
|
|
|