Comments (4)
One stopper is that in order to support name templating, we need to have access to the feed data in order to generate the paths/names. We could require the path be specified without templating (and default to the current working directory).
We'd open/save to a JSON file with keys that correspond to the provided URL, and save the ETag
and Last-Modified
headers there for now.
from podcast-dl.
It does seem like a chicken and egg problem, doesn't it? The podcast name needs to be known to resolve the default output folder, but there's little point in caching the feed in that folder if the RSS has to be downloaded to know the podcast name.
I think it would make the most sense to go along with user intent and hint at how to accomplish what they want. If the user requests to cache the feed and has not specified an explicit out-dir, cache the feed anyway, but also print a message along the lines of:
NOTICE: The feed has been cached as you requested, but the cache can only be utilized if you specify the output directory without a template. For this feed, the actual path is: /path/to/resolved/out-dir
Also, don't forget the cache-control headers. If present, those set a TTL for the cached copy that should be followed regardless of the other headers.
from podcast-dl.
@calebj - Good thoughts. Appreciate it!
from podcast-dl.
It's been a while! Taking a look at this again, I think it would be easier and a better separation of concerns to use something like curl
before running podcast-dl
to check if the resource has changed. You can use --etag-save
and --etag-compare
: https://man7.org/linux/man-pages/man1/curl.1.html
from podcast-dl.
Related Issues (20)
- Archive re-downloading podcast imagery HOT 3
- Add date range examples HOT 2
- Automatically retry failed downloads HOT 3
- TypeError [ERR_INVALID_ARG_VALUE] HOT 3
- v8 Preparation & Discussion
- TimeoutError: Timeout awaiting 'request' for 5000ms HOT 6
- Proxy support HOT 2
- Strange duplication of directory names HOT 3
- A 0-byte archive file crashes podcast-dl HOT 2
- ERR_INVALID_URL HOT 3
- Unable to parse RSS URL Hostname/IP does not match certificate's altnames: Host: podiobooks.com. is not in the cert's altnames: DNS:scribl.com, DNS:www.scribl.com
- Option `episode-digits` has no effect on `episode-image` or `episode-meta` HOT 1
- Handling problematic feeds HOT 11
- Only downloads last 100 episodes HOT 2
- Support ffmpeg for more file types HOT 2
- Feature request: out-dir Templating options HOT 2
- Escape all metadata params passed into ffmpeg when using '--add-mp3-metadata' HOT 10
- Escape all metadata params passed into ffmpeg when using '--add-mp3-metadata HOT 1
- Feature Request: Download RSS podcast using Local RSS file HOT 3
- Can mp3/m4a files be downloaded from podcast links directly? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from podcast-dl.