Sound applet: seek bar jumps back after seeking when player resends metadata (e.g. mpDris2/MPD)

オープン 初心者向け
#14,127 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 8 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript

調査の方向性

サウンドアプレットのSeekerの実装と、_setMetadata()からsetTrack()への呼び出しを探します。issueではこれらの入口が示されていますが、ファイルパスやテストは記載されていません。トラックIDと位置の更新がどのように処理されるかを読み、MPDとmpDris2で再現するか、同じトラックIDでメタデータが繰り返されるケースに絞った回帰テストを追加します。シーク時にスライダーが実際の位置を保ち、トラック変更時には引き続きリセットされれば完了です。

索引モデルが issue の本文から書いたものです。

説明

BUG
Distribution

Linux Mint 22.3

Package version

Cinnamon 6.6.9

Graphics hardware in use

No response

Frequency

Always

Bug description

Cinnamon version: 6.6.9
Player: MPD with mpDris2 (MPRIS bridge)

Problem
Clicking or dragging the position slider in the sound applet seeks correctly
(the track really jumps), but the slider immediately jumps back and only
catches up again after the next sync about 10 seconds later.

Analysis

  • The applet sends a correct SetPosition(trackid, position), and mpDris2
    answers with a matching Seeked signal (verified with dbus-monitor).
  • After seeking, MPD emits a player event and mpDris2 resends Metadata
    via PropertiesChanged (same mpris:trackid).
  • _setMetadata() then calls Seeker.setTrack(), which unconditionally
    sets this._currentTime = 0. The slider resets, and _timerCallback()
    counts up from 0 until the next _getPosition() sync.

Suggested fix (tested locally, works)

setTrack(trackid, length) {
    let sameTrack = (trackid !== "" && trackid === this._trackid);
    this._trackid = trackid;
    this._length = length;
    if (sameTrack) {
        this._getPosition();
    } else {
        this._currentTime = 0;
        this._updateValue();
    }
}

If the track ID is unchanged, the applet queries the real position instead
of resetting to 0. Track changes behave as before.

Steps to reproduce
Bildschirmfoto vom 2026-11-11 22-46-23
Expected behavior

It should seek the actual track

Additional information

No response

主要言語
JavaScript
スター
5.7k
フォーク
941
平均マージ
6日 18時間
マージ済み PR(30日)
12

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

linuxmint/cinnamon のほかの issue

linuxmint/cinnamon の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。