diff --git a/IMPLEMENTATION.md b/IMPLEMENTATION.md
index f95fa194..555f1bba 100644
--- a/IMPLEMENTATION.md
+++ b/IMPLEMENTATION.md
@@ -78,6 +78,14 @@ UI スレッドでするのは使うマップを決めることと画面の更
曲が終わったときの動きは `RepeatMode` の 4 つ。`None`(リストを 1 周して停止)、`Single`(その曲だけ演奏して停止)、`SingleRepeat`(その曲を繰り返す)、`All`(リストを繰り返す)。
+曲ごとのお気に入り(`PlaylistItem.Rating`)で、曲送りが通る曲を絞れる(`PlayFilter`、曲順やリピートと同じくプレイヤー全体の設定)。
+お気に入りはファイルのものとして扱い、星を変えると開いているほかのプレイリストの同じパスの曲も同じ状態にする(パスは大文字小文字を区別せずに比べる)。
+開いていないプレイリストには届かない。
+**絞り込みで外れた曲は、曲送りから見るとリストから外した曲と同じ扱いにする。**
+演奏中に外れても最後まで鳴り、次は後ろの対象の曲へ進む。
+外れた曲もダブルクリックすれば鳴らし、終わればリストでその後ろにある対象の曲へ進む(ランダムなら、その回でまだ鳴っていない曲へ)。
+星を変えたら、演奏中のリストなら曲送りに `Rearranged` で知らせる。知らせないと、外したはずの曲が流れる。
+
レジューム(前回の曲の途中から再開する機能)は作らない。技術的な障害は無い。
作らないのは、機能として採らないと決めたため。
@@ -106,7 +114,7 @@ UI スレッドでするのは使うマップを決めることと画面の更
Avalonia + CommunityToolkit.Mvvm。出力までの鎖は `PlayerService` が持ち、ビューモデルはそれを操作するだけにしてある。
-画面に出しているのは**曲名・再生時間・再生コントロール・表示器**だけ。曲順 / リピート / ポートマップは**設定メニューの下の選択メニュー**に移した。演奏中に何度も触るものではなく、常時出しておくと画面がそれらで埋まるため。
+画面に出しているのは**曲名・再生時間・再生コントロール・表示器**だけ。曲順 / リピート / 再生する曲 / ポートマップは**設定メニューの下の選択メニュー**に移した。演奏中に何度も触るものではなく、常時出しておくと画面がそれらで埋まるため。
音源が書くテキストは一度に 1 行で、Roland は 16 桁、XG は 32 桁。16×2 の表示器では Roland は上の行だけを使い、XG は下の行へ折り返す。
diff --git a/README.ja.md b/README.ja.md
index 61ff85e3..c133b59f 100644
--- a/README.ja.md
+++ b/README.ja.md
@@ -134,6 +134,10 @@ TMIDI Player の定義ファイルを読み込むと、TMIDI Player と同じ**
- 複数のプレイリストをタブで開けます。
タブや曲を右クリックすると、プレイリストや曲の操作が出ます。
- ほかの場所のプレイリストファイルは **ファイル → プレイリストを開く...** で開きます。
+- 曲の左の星をクリックすると、お気に入り(★)、好みでない(斜線の入った星)、なし(☆)の順に切り替わります。
+ 右クリックの **並べ替え → お気に入り順** で、お気に入りを上に、好みでない曲を下に並べられます。
+- **設定 → 再生する曲** で、曲送りで演奏する曲を **すべて**・**お気に入りと未評価のみ**・**お気に入りのみ** から選べます。
+ 外れた曲もダブルクリックすれば演奏し、その後は対象の曲へ進みます。
### 対象音源
diff --git a/README.md b/README.md
index ed66f1ed..59cac743 100644
--- a/README.md
+++ b/README.md
@@ -133,6 +133,8 @@ Which map is used is chosen in **Settings → Port Map**. "Auto" picks one for e
- Several playlists can be open in tabs. Right-click a tab or a song for what can be done with it.
- Playlist files kept elsewhere are opened with **File → Open Playlist...**.
+- Clicking the star to the left of a song cycles it through favorite (★), disliked (a star with a slash) and none (☆). **Sort → By Favorite** in the right-click menu puts favorites at the top and disliked songs at the bottom.
+- **Settings → Songs to Play** chooses which songs the player goes through: **All Songs**, **Favorites and Unrated Only** or **Favorites Only**. A song left out still plays when double-clicked, and the player then goes on to the songs it takes.
### Target modules
diff --git a/src/Glosa.App/Controls/EnumLabelConverter.cs b/src/Glosa.App/Controls/EnumLabelConverter.cs
index 51be6d31..4d0469af 100644
--- a/src/Glosa.App/Controls/EnumLabelConverter.cs
+++ b/src/Glosa.App/Controls/EnumLabelConverter.cs
@@ -22,6 +22,9 @@ public sealed class EnumLabelConverter : IValueConverter
[PlayOrder.Random] = Strings.OrderRandom,
[PlayOrder.FileName] = Strings.OrderFileName,
[PlayOrder.Title] = Strings.OrderTitle,
+ [PlayFilter.All] = Strings.FilterAll,
+ [PlayFilter.NotDisliked] = Strings.FilterNotDisliked,
+ [PlayFilter.FavoritesOnly] = Strings.FilterFavoritesOnly,
[MatchPosition.First] = Strings.DetectionFirst,
[MatchPosition.Last] = Strings.DetectionLast,
[PlaybackPriority.Low] = Strings.PriorityLow,
diff --git a/src/Glosa.App/Services/AppSettings.cs b/src/Glosa.App/Services/AppSettings.cs
index 9b9d4fb1..3a942f17 100644
--- a/src/Glosa.App/Services/AppSettings.cs
+++ b/src/Glosa.App/Services/AppSettings.cs
@@ -285,6 +285,9 @@ public sealed class AppSettings
/// What happens when a song ends.
public RepeatMode Repeat { get; set; } = RepeatMode.None;
+ /// Which songs the playlist is played through, by how they are rated.
+ public PlayFilter PlayFilter { get; set; } = PlayFilter.All;
+
///
/// Whether the display gets room of its own instead of taking the height of the
/// transport beside it. Off to begin with: the compact one lines the window up.
diff --git a/src/Glosa.App/Strings.Designer.cs b/src/Glosa.App/Strings.Designer.cs
index 92faabb9..1dedf34d 100644
--- a/src/Glosa.App/Strings.Designer.cs
+++ b/src/Glosa.App/Strings.Designer.cs
@@ -1001,6 +1001,33 @@ public static string FileTypeSongs {
}
}
+ ///
+ /// Looks up a localized string similar to All Songs.
+ ///
+ public static string FilterAll {
+ get {
+ return ResourceManager.GetString("FilterAll", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Favorites Only.
+ ///
+ public static string FilterFavoritesOnly {
+ get {
+ return ResourceManager.GetString("FilterFavoritesOnly", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Favorites and Unrated Only.
+ ///
+ public static string FilterNotDisliked {
+ get {
+ return ResourceManager.GetString("FilterNotDisliked", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to System default.
///
@@ -1145,6 +1172,15 @@ public static string MenuOrder {
}
}
+ ///
+ /// Looks up a localized string similar to Songs to Play.
+ ///
+ public static string MenuPlayFilter {
+ get {
+ return ResourceManager.GetString("MenuPlayFilter", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Port Map.
///
@@ -2333,6 +2369,33 @@ public static string RateUnlimited {
}
}
+ ///
+ /// Looks up a localized string similar to Disliked.
+ ///
+ public static string RatingDisliked {
+ get {
+ return ResourceManager.GetString("RatingDisliked", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Favorite.
+ ///
+ public static string RatingFavorite {
+ get {
+ return ResourceManager.GetString("RatingFavorite", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Not Rated.
+ ///
+ public static string RatingNone {
+ get {
+ return ResourceManager.GetString("RatingNone", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Rename Playlist.
///
@@ -2882,6 +2945,15 @@ public static string SortPath {
}
}
+ ///
+ /// Looks up a localized string similar to By Favorite.
+ ///
+ public static string SortRating {
+ get {
+ return ResourceManager.GetString("SortRating", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to By Title.
///
diff --git a/src/Glosa.App/Strings.ja.resx b/src/Glosa.App/Strings.ja.resx
index 11d6f984..751a093f 100644
--- a/src/Glosa.App/Strings.ja.resx
+++ b/src/Glosa.App/Strings.ja.resx
@@ -353,6 +353,15 @@ define.override.yaml を修正するか削除して Glosa を起動し直して
MIDI・圧縮ファイル
+
+ すべて
+
+
+ お気に入りのみ
+
+
+ お気に入りと未評価のみ
+
OSに合わせる
@@ -401,6 +410,9 @@ define.override.yaml を修正するか削除して Glosa を起動し直して
曲順
+
+ 再生する曲
+
ポートマップ
@@ -797,6 +809,15 @@ define.override.yaml を修正するか削除して Glosa を起動し直して
無制限
+
+ 好みでない
+
+
+ お気に入り
+
+
+ なし
+
プレイリスト名の変更
@@ -980,6 +1001,9 @@ define.override.yaml を修正するか削除して Glosa を起動し直して
パス順
+
+ お気に入り順
+
タイトル順
diff --git a/src/Glosa.App/Strings.resx b/src/Glosa.App/Strings.resx
index f29c083e..383b020f 100644
--- a/src/Glosa.App/Strings.resx
+++ b/src/Glosa.App/Strings.resx
@@ -356,6 +356,15 @@ Fix or delete define.override.yaml, and restart Glosa.
MIDI and archive files
+
+ All Songs
+
+
+ Favorites Only
+
+
+ Favorites and Unrated Only
+
System default
@@ -404,6 +413,9 @@ Fix or delete define.override.yaml, and restart Glosa.
Play Order
+
+ Songs to Play
+
Port Map
@@ -800,6 +812,15 @@ Fix or delete define.override.yaml, and restart Glosa.
Unlimited
+
+ Disliked
+
+
+ Favorite
+
+
+ Not Rated
+
Rename Playlist
@@ -983,6 +1004,9 @@ Fix or delete define.override.yaml, and restart Glosa.
By Path
+
+ By Favorite
+
By Title
diff --git a/src/Glosa.App/Themes/Dark.axaml b/src/Glosa.App/Themes/Dark.axaml
index 9ecf205e..39c3b897 100644
--- a/src/Glosa.App/Themes/Dark.axaml
+++ b/src/Glosa.App/Themes/Dark.axaml
@@ -211,6 +211,45 @@
+
+
+
+
+
+
+
+
+