Skip to content

Commit

Permalink
Subsonic: Fix playlist loading breaking on any invalid track reference
Browse files Browse the repository at this point in the history
The Subsonic method `getPlaylist` used to fail with an uncaught exception if
the playlist in question contained any references to tracks which do not
exist. This had actually been already fixed once in eae36b8 but then
accidentally reintroduced with e45282e in the v1.8.0.

refs #1087
  • Loading branch information
paulijar committed Oct 8, 2023
1 parent 2b3a52c commit c889b89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,11 @@
[#1083](https://github.com/owncloud/music/issues/1083)

### Fixed
- Subsonic API: Unhandled exception when attempting to delete a non-existent bookmark
[#1071](https://github.com/owncloud/music/issues/1071)
- Subsonic API:
* Unhandled exception when attempting to delete a non-existent bookmark
[#1071](https://github.com/owncloud/music/issues/1071)
* Method `getPlaylist` failing if the playlist contains any invalid track references (since v1.8.0)
[#1087](https://github.com/owncloud/music/issues/1087)
- Scanning breaking if any out-of-bounds numeric value gets scanned from any audio file
[#1073](https://github.com/owncloud/music/issues/1073)
- File and folder selection dialogs not working on NC 27.1.0 and 27.1.1 (workaround for a NC bug which should get fixed in NC 27.1.2)
Expand Down
4 changes: 2 additions & 2 deletions lib/Db/Track.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ public function getAdjustedTrackNumber(bool $enablePlaylistNumbering=true) : ?in
}

public function getFileExtension() : string {
$parts = \explode('.', $this->getFilename());
return \end($parts);
$parts = Util::explode('.', $this->getFilename());
return empty($parts) ? '' : \end($parts);
}

}

0 comments on commit c889b89

Please sign in to comment.