Skip to content

Commit

Permalink
Playlist clear missed last variable definition.
Browse files Browse the repository at this point in the history
  • Loading branch information
istnv committed Jan 1, 2024
1 parent 05f9662 commit cc026e8
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,33 @@ See HELP.md and LICENSE
* Don't strip +/- from volume adjustment

**V2.3.0**
* Add actions to adjust playback speed/rate
* Add actions to adjust playback speed/rate

**V2.3.1**
* Refactor for some ES6 features

**V2.3.2**
* Upgrade base modules

**V2.3.3**
* Provide proper 'empty' response to upgrade script

**V2.3.4**
* fix some comparison logic

**V2.3.5**
* fix comparisons in toggle logic

**V2.3.6**
* Add missing default values to presets

**V2.3.7**
* anoter refactor for 'pause'

**V2.4.0**
* reduce debug log info
* Allow host name as well as IP

**V2.4.1**
* OBO error left variable set when clearing playlist

4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class VlcInstance extends InstanceBase {

clearUnusedReservedClipVariables(targetReservedCount, oldLength) {
const emptyStr = this.config.use_bullet ? CHARS.empty : ''
const knownClipCount = this.PlayIDs ? this.PlayIDs.length : 0
const knownClipCount = this.PlayIDs?.length || 0

const newVariableValues = {}

Expand All @@ -163,7 +163,7 @@ class VlcInstance extends InstanceBase {
}

// remove any previously reserved variables
for (let i = Math.max(targetReservedCount, knownClipCount) + 1; i < (oldLength || 0); i++) {
for (let i = Math.max(targetReservedCount, knownClipCount) + 1; i <= (oldLength || 0); i++) {
newVariableValues[`pname_${i}`] = undefined
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "videolan-vlc",
"version": "2.4.0",
"version": "2.4.1",
"main": "index.js",
"type": "module",
"scripts": {
Expand Down

0 comments on commit cc026e8

Please sign in to comment.