Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ One tag releases pine and spruce together. Write the release notes for the two p
Commit the notes and push them to `main`. Then use the release script.

```sh
${EDITOR:-vi} docs/releases/v0.9.0.md
./scripts/release.sh v0.9.0
${EDITOR:-vi} docs/releases/v0.9.1.md
./scripts/release.sh v0.9.1
```

When the script publishes the GitHub Release, the `Release` workflow builds the two programs for Linux, macOS, and Windows. It attaches one archive for each program and each system to the release.
Expand Down
248 changes: 248 additions & 0 deletions docs/releases/v0.9.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
# pine and spruce v0.9.1

This release corrects errors in pine and in spruce. It adds no feature.

The most important correction is in the metadata editor of pine. A save
changed the title or the description of an item on the Audiobookshelf server,
also if you did not edit that field. Upgrade pine before you use the metadata
editor again.

## Installation

```sh
go install github.com/Thelost77/pine@v0.9.1
go install github.com/Thelost77/pine/cmd/spruce@v0.9.1
```

As an alternative, download an archive from the release page. See "Binaries".

## Binaries

The release has one archive for each program and each system. The name of an
archive is `<program>_v0.9.1_<system>_<architecture>`:

| System | Architecture | File type |
|--------|--------------|-----------|
| `linux` | `amd64`, `arm64` | `.tar.gz` |
| `darwin` (macOS) | `amd64`, `arm64` | `.tar.gz` |
| `windows` | `amd64` | `.zip` |

Each archive contains the program, the `LICENSE` file of pine, and a `licenses`
directory. That directory has the license texts of Go and of the modules that
the program links.

- A binary needs libmpv. See "Requirements".
- On Windows, put `libmpv-2.dll` in the directory of the program. The archive
does not contain it.
- The binaries are not signed.
- A GitHub Actions workflow builds the binaries on Linux with `CGO_ENABLED=0`.
No binary of this release has run on a test machine.

## pine

### Reliability and Correctness

Metadata editor:

* **A save changed fields that you did not edit.** The editor cut a value at
the limit of its field, and put a space for each newline and each tab. Then
it compared that value with the value of the server. The two values were
different, so pine sent the changed value to Audiobookshelf.
* This occurred for a title with more than 256 characters, and for an
episode description with more than 2000 characters. It also occurred for a
value with a newline or a tab.
* pine now sends only the fields that you changed. A field keeps the full
value, also if the value is longer than the limit of the field.
* If you edit a field that has a newline or a tab, the save still puts a
space in place of each.
* This release does not repair a value that an earlier save changed.
* **A save removed the progress from the detail screen.** The answer of the
save has no progress of the user. pine now keeps the progress on the screen.

Playback:

* **A resume started before the saved position, or at 0.** pine gave mpv the
start position as a percent of the track. mpv used its own duration of the
track, which can be different from the duration on the server. If mpv had
no duration yet, the playback started at 0. pine now gives the start
position in seconds.
* **The number of syncs to the server increased at each change of the track.**
Each change started a new chain of syncs every 30 seconds, and the old chain
continued. pine now stops the old chain.
* **The sleep timer did not stop the playback at times.** If the timer ended
during a change of the track, pine ignored the timer, and the playback
continued. pine now stops the playback.
* **A sleep timer stopped the wrong playback.** If a change of the track
failed, the timer of that playback stayed active. It then stopped the next
playback that you started. pine now clears the timer when the playback ends.
* **A seek to the end of a book started the book again from the start.** pine
now plays the end of the last track.
* **A seek to the end of a podcast episode sent a play request for a book to
the server.** pine now seeks in the episode.
* **The restore of the last session replaced a playback that you started.**
If you started an item before the restore was complete, the restore stopped
that item. pine now skips the restore, and closes the session that the
restore opened.
* **After a delete, a quit did not send the last position.** After the delete
of an item or an episode, pine did not do its cleanup at a quit. It did not
send the last position to the server, and it did not close the session.

MPRIS:

* **pine sent no MPRIS signals.** The program used a copy of the model that
had no MPRIS bridge. A media control did not get a signal for a change of
the track, the status, or the volume.
* **pine sent the signal `Seeked` each second during playback.** pine now
sends `Seeked` only for a seek, for a playback that starts after 0, and for
a restart of the same item. The property `Position` changes at each position
update.
* **All episodes of a podcast had the track ID of the podcast.** Each episode
now has its own track ID.
* For the changes of the shared MPRIS server, see "Changes of Behavior".

Configuration:

* **pine did not start after it added the device identity to some
configuration files.** pine writes `device_name` and `device_id` to
`config.toml` if one of them is missing.
* With a UTF-8 byte order mark, the new file was not valid TOML.
* With a quoted key, such as `"device_id"`, the new file had the key two
times.
* In the two cases, the next start failed. pine now accepts these files.

Command palette and search:

* **A keystroke in the command palette waited for the server.** If the search
index of the library was not ready, the search built it in the keystroke.
pine now builds the index in the background. The palette shows the results
when the index is ready.
* **The context actions of the library screen did not show in the palette.**
They now show for the selected item.
* **"Browse Series" opened the series of a different library.** It used the
library of the home screen. It now uses the library of the screen.
* **The home, end, and page keys selected a header.** They now skip headers.
* **An earlier error removed a newer error from the banner.** The time limit
of the first error removed the second error. Each error now has its own time
limit.

Cache:

* **A request could write old data to the cache after a change.** If a request
started before a change, such as a metadata save or a delete, it wrote its
result after pine cleared the cache. The search index had the same problem.
pine now ignores the result of such a request.
* **A login kept the cache of the earlier account.** A cache key does not
contain the account. A login now clears the cache.

Screens:

* **The finished state of an episode used the state of the podcast.** After
you marked one episode as finished, the next mark of a different episode
removed its finished state. pine now uses the state of each episode.
* **An old error stayed on a screen after a load that succeeded.** The home
screen, the library screen, and the series list now clear the error.
* **A late page of a library added rows that were already in the list.** pine
now ignores that page.
* **The cursor blink removed an error of the metadata editor.** The error now
stays until you push a key.
* **The delete dialog ignored the results of loads.** A screen behind the
dialog now gets these results.

Captions:

* **pine ignored the first cue of a WebVTT file with no blank line after the
header.** pine now reads it.
* **pine removed the character `>` from the text of a cue.** pine now keeps
it.
* **pine accepted a cue time with `inf`, `NaN`, or a negative value.** pine
now skips that cue.

Logs and local data:

* The log does not contain the ID of a play session. The ID gives the audio
of the session with no login. The log shows a short tag of the ID.
* The log of mpv does not contain the user or the password of a URL.
* A second pine renamed the log of a running pine. A pine now renames the log
only if it has the lock of the file.
* The database does not keep the session ID or the position of the last
session. The restore gets the position from the server.
* An error of the server keeps at most 500 bytes of the response.
* A server address with a slash at the end gave each request a path that
started with `//`. pine now removes the slash.

### Changes of Behavior

* **`player.speed` and `player.seek_seconds` have limits.** `player.speed`
must be from 0.1 to 100. `player.seek_seconds` must be more than 0. For a
different value, pine stops at startup with an error that names the key.
Make sure that your `config.toml` obeys these limits before you upgrade.
* At a login, pine deletes the other accounts from its database. pine used
only the account of the last login.
* At a login, pine clears its cache. pine then gets the data of each screen
from the server.
* In the command palette, `p` plays only a search result. On a different
entry, `p` is a letter of the search. The palette shows `p play` only if
`p` plays the entry.
* If the search index of the library is not ready, the palette first shows no
results. It shows the results when the index is ready.
* The MPRIS server (shared by pine and spruce):
* `CanQuit` is false. `CanPlay` and `CanPause` are true only while an item
is active.
* A rate of 0 pauses the playback. The server limits a rate to
`MinimumRate` and `MaximumRate`, and a volume to 0 to 1.5.
* The server refuses a rate or a volume that is not a finite number.
* The server ignores a `SetPosition` outside the track.
* The theme key `warning` is removed from pine and spruce. The two programs
ignore it in an existing configuration file.

## spruce

### Reliability and Correctness

* **Jellyfin did not record the plays.** At a change of the track and at
"Clear Queue", spruce did not report the stop of the track. spruce now
reports it.
* **The metadata editor did not change the artists of an album.** spruce sent
the field `Artists`, which Jellyfin ignores. spruce now sends `ArtistItems`.
* **An album edit did not show in the album list.** The list now shows the
edit at once.
* **Previous at the first track stopped the playback.** It now plays the track
again from the start.
* **Next at the last track did nothing with queue repeat.** It now plays the
first track.
* **A queue result of the command palette added the track to the queue
again.** spruce now plays that track in the queue.
* **With a filter, the rows of the queue lost their index and the
selection.** Each row now keeps its index, and the selection stays.
* **During playback, the player took `S` and `r` from the screens.**
* On the library and playlists screens, `S` adds the selection to the queue
in shuffled order.
* On the queue screen, `r` repeats the selected track.
* **A late reply for a playlist replaced the open playlist.** spruce now
ignores the reply of a playlist that is not open.
* **After a new login, the screens showed the content of the earlier
session.** The screens now load their content again.
* **spruce sent the MPRIS signal `Seeked` each second during playback.** It
now sends `Seeked` only for a seek and for a restart of the same track.

The shared packages have changes that spruce also gets. These are the MPRIS
server, the error banner, the command palette, and the log rotation. See the
pine section. spruce no longer shows `p play` in the palette.

## Development

* Each correction changes or adds tests in the package that it corrects.
* `internal/app/mpris_linux_test.go` starts the MPRIS server of the pine model
on a private session bus. It checks the `Seeked` signals.
* `internal/db` has tests for the migrations of the earlier database schemas.
* CI passed on the merge commit `a9ec66f`. On Linux, `gofmt`, `go vet`,
`golangci-lint` 2.14.0, and the tests with `PINE_REQUIRE_LIBMPV=1` and
`PINE_REQUIRE_DBUS=1` passed.
* The dependencies have no change.

## Requirements

- Go 1.26.4 or newer, for an installation from source
- libmpv from [mpv](https://mpv.io/) 0.34 or later
- pine: an [Audiobookshelf](https://www.audiobookshelf.org/) server
- spruce: a [Jellyfin](https://jellyfin.org/) account with a music library
2 changes: 1 addition & 1 deletion docs/spruce/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Commit the notes and all release changes. Push them to `main`. Then use the
release script:

```sh
./scripts/release.sh v0.9.0
./scripts/release.sh v0.9.1
```

The script verifies the repository, creates and pushes the exact annotated tag,
Expand Down
Loading