forked from snobu/destreamer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added template option and validation * update comment link to element list * get author info when fetching video info * added template elements to video object * minor function naming changes * better exit message for template error * changed template elements for better substitution * implemented video title template * removed trailing decimals on duration * added template description * removed hashing from uniqueId removed debug logger.warn() * fixed typos in default template added elements to template fail message * moved ffmpeg version logging to verbose
- Loading branch information
Showing
6 changed files
with
165 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,11 @@ This release would not have been possible without the code and time contributed | |
- [Università della Calabria][unical]: fork over at https://github.com/peppelongo96/UnicalDown | ||
|
||
## What's new | ||
### v2.2 | ||
|
||
- Added title template | ||
|
||
### v2.1 | ||
|
||
- Major code refactoring (all credits to @lukaarma) | ||
- Destreamer is now able to refresh the session's access token. Use this with `-k` (keep cookies) and tick "Remember Me" on login. | ||
|
@@ -138,6 +143,26 @@ https://web.microsoftstream.com/video/xxxxxxxx-aaaa-xxxx-xxxx-xxxxxxxxxxxx | |
-dir=videos/lessons/week2" | ||
``` | ||
|
||
### Title template | ||
The `-t` option allows users to input a template string for the output file names. | ||
In the template you have to use 1 or more of the following special sequence that will be substituted at runtime. | ||
The special sequences must be surrounded by curly brackets like this '{title} {publishDate}' | ||
|
||
- `title`: the video title | ||
- `duration`: the video duration in HH:MM:SS format | ||
- `publishDate`: the date when the video was first published in YYYY-MM-DD format | ||
- `publishTime`: the time when the video was first published in HH:MM:SS format | ||
- `author`: the video publisher's name | ||
- `authorEmail`: the video publisher's email | ||
- `uniqueId`: a (almost) unique ID generated from the video informations | ||
|
||
Example - | ||
``` | ||
Input: | ||
-t '{title} - {duration} - {publishDate} - {publishTime} - {author} - {authorEmail} - {uniqueId}' | ||
Expected filename: | ||
This is an example - 0:16:18 - 2020-07-30 - 10:30:13 - lukaarma - [email protected] - #3c6ca929.mkv | ||
``` | ||
|
||
## Expected output | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters