sahilsehwag/pluralsight-downloader-chrome-extension

Index of Playlist should have Continuous Numbering with Padded Zeros if required w.r.to Files in the Playlist.

IssacEinstein opened this issue · 4 comments

playlist_index (numeric): Index of the video in the playlist padded with leading zeros according to the total length of the playlist.

Is there a way that this can be implemented from my side.?
Example: If All the Video Files are more than 10
1---- 1. Folder\1. Video --> 1. Folder\01. Video
2---- 1. Folder\2. Video --> 1. Folder\02. Video
3---- 2. Folder\1. Video --> 2. Folder\03. Video
4---- 2. Folder\2. Video --> 2. Folder\04. Video
5---- 2. Folder\3. Video --> 2. Folder\05. Video
6---- 2. Folder\4. Video --> 2. Folder\06. Video
7---- 3. Folder\1. Video --> 3. Folder\07. Video
8---- 3. Folder\2. Video --> 3. Folder\08. Video
9---- 3. Folder\3. Video --> 3. Folder\09. Video
10--- 3. Folder\4. Video --> 3. Folder\10. Video
11--- 4. Folder\1. Video --> 4. Folder\11. Video

Similarly, this numbering applies to the folders as well if the folders are more than 10.

Using a function-wide counter should do it.
Replace videoid with the counter here:

If you wanna pad it, you have to modify the called method. Not an expert in js but google is ur best friend ;)

Using a function-wide counter should do it.
Replace videoid with the counter here:

If you wanna pad it, you have to modify the called method. Not an expert in js but google is ur best friend ;)

@JKamsker , Even i saw the code and how the parameters are being declared.
But not sure how i should be able to declare the parameters.
For Youtube-dl, there is a parameter playlist index which does this... but not sure here.

playlist_index (numeric): Index of the video in the playlist padded with leading zeros according to the total length of the playlist.

Is there a way that this can be implemented from my side.?
Example: If All the Video Files are more than 10
1---- 1. Folder\1. Video --> 1. Folder\01. Video
2---- 1. Folder\2. Video --> 1. Folder\02. Video
3---- 2. Folder\1. Video --> 2. Folder\03. Video
4---- 2. Folder\2. Video --> 2. Folder\04. Video
5---- 2. Folder\3. Video --> 2. Folder\05. Video
6---- 2. Folder\4. Video --> 2. Folder\06. Video
7---- 3. Folder\1. Video --> 3. Folder\07. Video
8---- 3. Folder\2. Video --> 3. Folder\08. Video
9---- 3. Folder\3. Video --> 3. Folder\09. Video
10--- 3. Folder\4. Video --> 3. Folder\10. Video
11--- 4. Folder\1. Video --> 4. Folder\11. Video

Similarly, this numbering applies to the folders as well if the folders are more than 10.

You can check the development repo.
And let me know if you find any error along with this issue.

It's not about error. It will just match to the youtube-dl.exe