diff --git a/docs/manual/using-lumina/index.md b/docs/manual/using-lumina/index.md
index 937a0c55..4859fc7c 100644
--- a/docs/manual/using-lumina/index.md
+++ b/docs/manual/using-lumina/index.md
@@ -73,7 +73,7 @@ Each artist is a card; selecting it opens the artist's page, and the card's acti
The artist page is also where you edit the artist. It lists the artist's albums as cards, each leading to its own album page, followed by the artist's general information, contributors, ratings, genres, tags, aliases, areas and identifiers. The album page holds the album's information and its tracks, and the track page holds the track's details. The album page also shows the artwork Lumina stored for the album as a strip of thumbnails beside the main image, and selecting a thumbnail displays that image in place of the cover. Deleting an artist, album or track removes it from Lumina's catalogue; your files are not touched.
-The music pages also play what they show. The artist page has a **Play all** control that plays the artist's releases in the order the page presents them, one release after another. The actions menu of a music library card on the home page, of an artist card, and of an album card offers **Play** and **Shuffle**. Play starts the library at its first artist and continues through the remaining artists in artist page order, starts the artist's discography in the order the artist page presents it, or starts the release in disc and track order. Shuffle starts the library, the artist's discography or the release with a list of up to 100 tracks sampled uniformly at random from every track of that scope, and continues in random order without repeating a track that is already queued. The album page has a **Play album** control that plays the release in disc and track order, and every track row has its own play control that plays just that track. The track page has a **Play track** control for the track it shows. Every track row on the album page also has an actions menu: **Add to playlist** opens the playlist picker for that track, **Add to play queue** appends it to the end of the player queue or starts it when the queue is empty, and **Play all from here** replaces the queue with that track and the rest of the album and starts playing. Starting playback opens the player bar at the bottom of the window. It keeps playing while you move between pages, and the bar shows the track name, with the album name underneath when the track belongs to a named album, the progress of the current track and the volume, together with previous, play or pause, stop, next and repeat controls. When you expand it, it also shows the cover art, the current track name, the release type, the release name and year, the artist name, and a carousel of the album's stored artwork, next to the queue, where every entry carries its album cover, including when only one track is queued. Selecting an artwork in the carousel shows it as the main cover. The expanded queue moves the current track to the top whenever playback advances, so it stays visible even in a long list. The double chevron at the right points up to expand the bar and down to collapse it. Stop is the square control next to play or pause; in the condensed bar it stops playback and slides the bar out of view.
+The music pages also play what they show. The artist page has a **Play all** control that plays the artist's releases in the order the page presents them, one release after another. The actions menu of a music library card on the home page, of an artist card, and of an album card offers **Play** and **Shuffle**. Play starts the library at its first artist and continues through the remaining artists in artist page order, starts the artist's discography in the order the artist page presents it, or starts the release in disc and track order. Shuffle starts the library, the artist's discography or the release with a list of up to 100 tracks sampled uniformly at random from every track of that scope, and continues in random order without repeating a track that is already queued. The album page has a **Play album** control that plays the release in disc and track order, and every track row has its own play control that plays just that track. The track page has a **Play track** control for the track it shows. Every track row on the album page also has an actions menu: **Add to playlist** opens the playlist picker for that track, **Add to play queue** appends it to the end of the player queue or starts it when the queue is empty, and **Play all from here** replaces the queue with that track and the rest of the album and starts playing. Starting playback opens the player bar at the bottom of the window. It keeps playing while you move between pages, and the bar shows the track name, with the album name underneath when the track belongs to a named album, the progress of the current track, a segmented VU meter that follows the level of the track, and the volume, together with previous, play or pause, stop, next and repeat controls. When you expand it, it also shows the cover art, the current track name, the release type, the release name and year, the artist name, and a carousel of the album's stored artwork, next to the queue, where every entry carries its album cover, including when only one track is queued. Selecting an artwork in the carousel shows it as the main cover. The expanded queue moves the current track to the top whenever playback advances, so it stays visible even in a long list. The double chevron at the right points up to expand the bar and down to collapse it. Stop is the square control next to play or pause; in the condensed bar it stops playback and slides the bar out of view.
## Playlists
@@ -106,4 +106,6 @@ The tools section holds your settings and the language picker.
Your **settings** decide how lists and books behave for you. Enable pagination and the number of items per page control how browsing is split. The alpha picker option decides whether titles beginning with "The" are filed under the next word. Theme caching decides whether the theme is fetched fresh each time. Rendering PDFs as images and preserving book styles shape how books are shown, and the metadata and artwork aggregation options decide whether missing fields are completed from your other providers. A final group of options shapes playback: whether the player keeps downloading while it is paused (for a track the server has to normalize, this keeps its bounded one-segment lookahead filled rather than downloading the whole file), whether it continues automatically at the end of an album or artist, whether consecutive tracks play without a gap, how ReplayGain normalizes loudness, and the quality cap used when the server has to normalize a track. That cap applies only when the server re-encodes a track into a lossy format; a remux only repackages the stored audio, and a lossless delivery is not reduced. The ones that touch libraries are described in more detail in [Managing Libraries](../managing-libraries/index.md).
+The **VU meter** group shapes the meter of the player bar. Orientation lays its channels out as columns that grow upwards or rows that grow to the right. Segments per channel sets how finely each channel is divided, and Segment gap sets the space between segments and channels. The medium and high thresholds decide the level at which a segment changes color; the high threshold cannot be lower than the medium one. Show peak keeps a mark at the loudest recent level of each channel. Peak hold is how long that mark stays in place before it falls, in milliseconds, and Level falloff and Peak falloff are how quickly the bars and the peak marks drop once the sound gets quieter, in level units per second. Larger falloff values drop faster. The meter follows the level of the track itself, so muting the player or moving the volume slider does not change the height of the bars, and saving these settings applies them to the player without reloading the page.
+
The **language** picker switches the interface between the languages Lumina ships with, and remembers your choice.
diff --git a/docs/technical/api/users-management/Api.Settings.md b/docs/technical/api/users-management/Api.Settings.md
index 0808961a..6dae4440 100644
--- a/docs/technical/api/users-management/Api.Settings.md
+++ b/docs/technical/api/users-management/Api.Settings.md
@@ -47,7 +47,16 @@ Returns the settings of the currently authenticated user.
"shouldAutoplay": true,
"isGaplessPlaybackEnabled": true,
"replayGainMode": "Off",
- "streamingQuality": "Auto"
+ "streamingQuality": "Auto",
+ "vuMeterOrientation": "Vertical",
+ "vuMeterSegmentCount": 12,
+ "vuMeterSegmentGap": 1,
+ "vuMeterMediumThreshold": 0.6,
+ "vuMeterHighThreshold": 0.8,
+ "vuMeterShowPeak": true,
+ "vuMeterPeakHoldDurationInMilliseconds": 650,
+ "vuMeterReleasePerSecond": 3,
+ "vuMeterPeakReleasePerSecond": 0.65
}
```
@@ -61,6 +70,8 @@ PUT api/v1/users/me/settings
Updates the settings of the currently authenticated user.
+The VU meter settings configure the segmented meter of the player bar: `vuMeterOrientation` is `Vertical` or `Horizontal`, `vuMeterSegmentCount` is between 1 and 128, `vuMeterSegmentGap` is between 0 and 32 pixels, `vuMeterMediumThreshold` and `vuMeterHighThreshold` are between 0 and 1 and the high threshold must not be lower than the medium one, `vuMeterPeakHoldDurationInMilliseconds` is between 0 and 10000, and `vuMeterReleasePerSecond` and `vuMeterPeakReleasePerSecond` are between 0 and 100 level units per second. All of them are required.
+
```json
{
"isPaginationEnabled": true,
@@ -74,7 +85,16 @@ Updates the settings of the currently authenticated user.
"shouldAutoplay": true,
"isGaplessPlaybackEnabled": true,
"replayGainMode": "Off",
- "streamingQuality": "Auto"
+ "streamingQuality": "Auto",
+ "vuMeterOrientation": "Vertical",
+ "vuMeterSegmentCount": 12,
+ "vuMeterSegmentGap": 1,
+ "vuMeterMediumThreshold": 0.6,
+ "vuMeterHighThreshold": 0.8,
+ "vuMeterShowPeak": true,
+ "vuMeterPeakHoldDurationInMilliseconds": 650,
+ "vuMeterReleasePerSecond": 3,
+ "vuMeterPeakReleasePerSecond": 0.65
}
```
diff --git a/docs/technical/requests/users-management/settings/UpdateUserSettings.http b/docs/technical/requests/users-management/settings/UpdateUserSettings.http
index c65e30c9..22804ce0 100644
--- a/docs/technical/requests/users-management/settings/UpdateUserSettings.http
+++ b/docs/technical/requests/users-management/settings/UpdateUserSettings.http
@@ -14,5 +14,14 @@ Content-Type: application/json
"shouldAutoplay": true,
"isGaplessPlaybackEnabled": true,
"replayGainMode": "Off",
- "streamingQuality": "Auto"
+ "streamingQuality": "Auto",
+ "vuMeterOrientation": "Vertical",
+ "vuMeterSegmentCount": 12,
+ "vuMeterSegmentGap": 1,
+ "vuMeterMediumThreshold": 0.6,
+ "vuMeterHighThreshold": 0.8,
+ "vuMeterShowPeak": true,
+ "vuMeterPeakHoldDurationInMilliseconds": 650,
+ "vuMeterReleasePerSecond": 3,
+ "vuMeterPeakReleasePerSecond": 0.65
}
diff --git a/docs/technical/theming/Theming.md b/docs/technical/theming/Theming.md
index 7e105e7a..6d0bfb2e 100644
--- a/docs/technical/theming/Theming.md
+++ b/docs/technical/theming/Theming.md
@@ -14,6 +14,7 @@ The web client of Lumina is a themed shell: every page is rendered inside the te
- [Template Resolution](#template-resolution)
- [The Layout Template (shared/layout)](#the-layout-template-sharedlayout)
- [The Audio Player Bar](#the-audio-player-bar)
+ - [The VU Meter](#the-vu-meter)
- [Play Affordances on the Music Pages](#play-affordances-on-the-music-pages)
- [The audio player sub templates](#the-audio-player-sub-templates)
- [The Navigation Template (shared/nav-menu)](#the-navigation-template-sharednav-menu)
@@ -306,6 +307,7 @@ The markup inside the bar exposes the hook attributes the audio player script bi
| `data-audio-player-now-playing-artist` | The artist name of the current track's album in the expanded player. It is left empty until the album details are available. |
| `data-audio-player-artwork-carousel` | The carousel of the stored artwork of the current track's album. The player appends one `button.artwork-carousel-item` per stored image, carrying `data-artwork-path`, and toggles the `selected` class and `aria-pressed` on the chosen item. The element is hidden with the `hidden` attribute while the album has no stored artwork. |
| `data-audio-player-cover-thumbnail`, `data-audio-player-cover-image` | The cover art of the condensed bar and of the expanded bar. Choosing an album artwork in the carousel replaces both images until the next track. |
+| `data-audio-player-vu-meter` | The root of the VU meter of the condensed bar, between the album art and the current time label. The player fills it with its channels, segments and peak markers, exactly as described in [The VU Meter](#the-vu-meter). A theme that does not render the hook gets the built-in meter inserted in that place. |
| `data-audio-player-volume` | The volume slider, a `role="slider"` element with `tabindex="0"` that the player scrubs and whose ARIA value attributes it writes. The fill is published as `--audio-player-volume-start` and `--audio-player-volume-width`. |
| `data-audio-player-volume-level` | The volume fill. It carries no geometry of its own: the stylesheet drives it from the custom properties above. |
| `data-audio-player-mute` | The mute toggle. The player toggles the `is-muted` class and the `aria-pressed` state on it. |
@@ -313,6 +315,34 @@ The markup inside the bar exposes the hook attributes the audio player script bi
Each progress layer also carries `data-audio-player-progress-layer` (`played`, `downloaded` or `undownloaded`) in the markup, so a theme can select a layer by its state as well as by its class. The player writes no inline geometry on any of the bar elements: it publishes the geometry of each state as the custom properties above, which the application stylesheet consumes, so a theme restyles or reorients either bar by consuming the same properties.
+#### The VU Meter
+
+The condensed bar shows a segmented VU meter that follows the level of the track itself. The renderer taps it after the track's ReplayGain normalization and before the output volume and mute stage, so lowering the volume or muting the player never changes the height of the meter for the same moment of audio. The meter is a spectrum meter with one channel per frequency band, with 24 logarithmically spaced bands between 40 Hz and 16 kHz, each drawn as a stack of segments. The number of segments, the gap between them, the two threshold zones, the peak marker and its hold and falloff times, and the orientation are per-user settings, so the meter reflects the values the user saved on the settings page.
+
+The meter is built from elements rather than a canvas, exactly like the three state progress bar, so a theme restyles every part of it. The root carries the `audio-player-vu-meter` class and the `data-audio-player-vu-meter` hook, and the player fills it with:
+
+| Element | Class and hook | State the player writes |
+| --- | --- | --- |
+| A channel, one per band | `audio-player-vu-channel`, `data-audio-player-vu-channel` (the zero based band index) | None. The channel is a layout container. |
+| A segment, one per configured segment of a channel | `audio-player-vu-segment`, `data-audio-player-vu-segment` | `data-audio-player-vu-segment-state` (`active` or `inactive`) and `data-audio-player-vu-segment-zone` (`normal`, `medium` or `high`). The zone is derived from the position of the segment and the two thresholds of the settings. |
+| A peak marker, one per channel | `audio-player-vu-peak`, `data-audio-player-vu-peak` | `data-audio-player-vu-peak-state` (`active` or `inactive`). The marker is removed with the `hidden` attribute while the show peak setting is off. |
+
+The segments are rendered in ascending level order, so the first segment of a channel is the quietest one. The root also carries `data-audio-player-vu-meter-orientation` (`vertical` or `horizontal`), `data-audio-player-vu-meter-segments` (the configured segment count) and `data-audio-player-vu-meter-show-peak` (`true` or `false`), so a theme can select a state or a layout from the root as well.
+
+The player publishes no geometry other than two custom properties, which a theme maps to whichever axis its own layout uses:
+
+| Custom property | Published on | Meaning |
+| --- | --- | --- |
+| `--audio-player-vu-segment-gap` | The meter root | The configured gap between segments and between channels, as a CSS length in pixels. |
+| `--audio-player-vu-segment-count` | The meter root | The configured number of segments per channel, as a plain number, so a stylesheet can size the meter from it. |
+| `--audio-player-vu-peak-position` | Each peak marker | The held peak of its channel, as a percentage of the channel axis, from `0%` at the quiet end to `100%` at the loud end. |
+
+The fallback stylesheet sizes the vertical meter from whole pixel square cells rather than stretching it over a box, because a box divided into rows gives fractional heights that browsers snap unevenly. The cell is the largest whole pixel size that fits the configured segments in `--audio-player-vu-extent` (48px by default), capped by `--audio-player-vu-max-cell` (4px), and a theme can override either property. With the default 12 segments and a 1px gap the cells are 3px squares.
+
+The application fallback stylesheet gives the meter its own default look: 24 columns of segments whose active state uses one of three colors, with the inactive segments transparent, and a peak line that spans the short axis of the channel. A theme can replace all of it. The colors are custom properties declared on the bar container (`--audio-player-vu-normal-color`, `--audio-player-vu-medium-color`, `--audio-player-vu-high-color`, `--audio-player-vu-inactive-color`, `--audio-player-vu-peak-color` and `--audio-player-vu-background-color`), so a theme recolors the meter without touching the markup, and it can give each zone, each state and each orientation its own shape, image or animation.
+
+The meter is decorative for assistive technology and carries `aria-hidden="true"`, because the same information is available through the now playing labels and the progress bar. It reads the analyzer that the player renderer taps after the track's ReplayGain normalization and before the output volume, so it needs no extra request and no extra decode, it is unaffected by the volume and mute controls, and it never affects playback. When the player is paused, stopped, ended or failed, the displayed levels fall to zero instead of freezing.
+
#### Play Affordances on the Music Pages
The artist page, the album page and the track page render play triggers, and the card actions menus render play and shuffle triggers, all handled by the global audio player script through event delegation. The music library cards on the home page, the artist cards and the album cards offer both actions, so the whole library, an artist or a release can be started in order or shuffled. A theme template that replaces one of those pages or menus opts in by rendering the same trigger attributes: the player binds one listener on the document, so a trigger works anywhere in the swapped page content and the page needs no script of its own.
diff --git a/src/Lumina.Application/Common/DataAccess/Entities/UsersManagement/UserSettingsEntity.cs b/src/Lumina.Application/Common/DataAccess/Entities/UsersManagement/UserSettingsEntity.cs
index cf6ed5a2..b472e933 100644
--- a/src/Lumina.Application/Common/DataAccess/Entities/UsersManagement/UserSettingsEntity.cs
+++ b/src/Lumina.Application/Common/DataAccess/Entities/UsersManagement/UserSettingsEntity.cs
@@ -91,6 +91,51 @@ public class UserSettingsEntity : IStorageEntity, IAuditableEntity
///
public PlaybackStreamingQuality StreamingQuality { get; set; }
+ ///
+ /// Gets or sets the direction in which each channel of the VU meter of the audio player grows.
+ ///
+ public VuMeterOrientation VuMeterOrientation { get; set; }
+
+ ///
+ /// Gets or sets the number of segments each channel of the VU meter is divided into.
+ ///
+ public int VuMeterSegmentCount { get; set; } = 12;
+
+ ///
+ /// Gets or sets the gap, in pixels, between the segments and the channels of the VU meter.
+ ///
+ public int VuMeterSegmentGap { get; set; } = 1;
+
+ ///
+ /// Gets or sets the level, between 0 and 1, above which a segment of the VU meter is drawn with its medium state.
+ ///
+ public double VuMeterMediumThreshold { get; set; } = 0.6;
+
+ ///
+ /// Gets or sets the level, between 0 and 1, above which a segment of the VU meter is drawn with its high state.
+ ///
+ public double VuMeterHighThreshold { get; set; } = 0.8;
+
+ ///
+ /// Gets or sets whether the VU meter holds the peak level of each channel after it falls, or not.
+ ///
+ public bool VuMeterShowPeak { get; set; } = true;
+
+ ///
+ /// Gets or sets the time, in milliseconds, a peak of the VU meter is held before it starts falling.
+ ///
+ public int VuMeterPeakHoldDurationInMilliseconds { get; set; } = 650;
+
+ ///
+ /// Gets or sets the number of level units the display of the VU meter falls per second when the input level drops.
+ ///
+ public double VuMeterReleasePerSecond { get; set; } = 3.0;
+
+ ///
+ /// Gets or sets the number of level units the peak of the VU meter falls per second after its hold time elapsed.
+ ///
+ public double VuMeterPeakReleasePerSecond { get; set; } = 0.65;
+
///
/// Gets or sets the last volume the player reported for the user. Written automatically by the player, and not part of the settings the user edits.
///
diff --git a/src/Lumina.Application/Common/Mapping/UsersManagement/Users/UpdateUserSettingsRequestMapping.cs b/src/Lumina.Application/Common/Mapping/UsersManagement/Users/UpdateUserSettingsRequestMapping.cs
index 6f6060af..098767b0 100644
--- a/src/Lumina.Application/Common/Mapping/UsersManagement/Users/UpdateUserSettingsRequestMapping.cs
+++ b/src/Lumina.Application/Common/Mapping/UsersManagement/Users/UpdateUserSettingsRequestMapping.cs
@@ -30,7 +30,16 @@ public static class UpdateUserSettingsRequestMapping
request.ShouldAutoplay,
request.IsGaplessPlaybackEnabled,
request.ReplayGainMode,
- request.StreamingQuality
+ request.StreamingQuality,
+ request.VuMeterOrientation,
+ request.VuMeterSegmentCount,
+ request.VuMeterSegmentGap,
+ request.VuMeterMediumThreshold,
+ request.VuMeterHighThreshold,
+ request.VuMeterShowPeak,
+ request.VuMeterPeakHoldDurationInMilliseconds,
+ request.VuMeterReleasePerSecond,
+ request.VuMeterPeakReleasePerSecond
);
}
}
diff --git a/src/Lumina.Application/Common/Mapping/UsersManagement/Users/UserSettingsEntityMapping.cs b/src/Lumina.Application/Common/Mapping/UsersManagement/Users/UserSettingsEntityMapping.cs
index d5e9da55..ab434cdd 100644
--- a/src/Lumina.Application/Common/Mapping/UsersManagement/Users/UserSettingsEntityMapping.cs
+++ b/src/Lumina.Application/Common/Mapping/UsersManagement/Users/UserSettingsEntityMapping.cs
@@ -39,6 +39,15 @@ public static class UserSettingsEntityMapping
repositoryEntity.IsGaplessPlaybackEnabled,
repositoryEntity.ReplayGainMode,
repositoryEntity.StreamingQuality,
+ repositoryEntity.VuMeterOrientation,
+ repositoryEntity.VuMeterSegmentCount,
+ repositoryEntity.VuMeterSegmentGap,
+ repositoryEntity.VuMeterMediumThreshold,
+ repositoryEntity.VuMeterHighThreshold,
+ repositoryEntity.VuMeterShowPeak,
+ repositoryEntity.VuMeterPeakHoldDurationInMilliseconds,
+ repositoryEntity.VuMeterReleasePerSecond,
+ repositoryEntity.VuMeterPeakReleasePerSecond,
repositoryEntity.Volume,
repositoryEntity.IsMuted
);
@@ -65,7 +74,16 @@ public static class UserSettingsEntityMapping
repositoryEntity.ShouldAutoplay,
repositoryEntity.IsGaplessPlaybackEnabled,
repositoryEntity.ReplayGainMode,
- repositoryEntity.StreamingQuality
+ repositoryEntity.StreamingQuality,
+ repositoryEntity.VuMeterOrientation,
+ repositoryEntity.VuMeterSegmentCount,
+ repositoryEntity.VuMeterSegmentGap,
+ repositoryEntity.VuMeterMediumThreshold,
+ repositoryEntity.VuMeterHighThreshold,
+ repositoryEntity.VuMeterShowPeak,
+ repositoryEntity.VuMeterPeakHoldDurationInMilliseconds,
+ repositoryEntity.VuMeterReleasePerSecond,
+ repositoryEntity.VuMeterPeakReleasePerSecond
);
}
}
diff --git a/src/Lumina.Application/Common/Mapping/UsersManagement/Users/UserSettingsMapping.cs b/src/Lumina.Application/Common/Mapping/UsersManagement/Users/UserSettingsMapping.cs
index edef94fc..5ad4a7d5 100644
--- a/src/Lumina.Application/Common/Mapping/UsersManagement/Users/UserSettingsMapping.cs
+++ b/src/Lumina.Application/Common/Mapping/UsersManagement/Users/UserSettingsMapping.cs
@@ -35,6 +35,15 @@ public static class UserSettingsMapping
IsGaplessPlaybackEnabled = domainEntity.IsGaplessPlaybackEnabled,
ReplayGainMode = domainEntity.ReplayGainMode,
StreamingQuality = domainEntity.StreamingQuality,
+ VuMeterOrientation = domainEntity.VuMeterOrientation,
+ VuMeterSegmentCount = domainEntity.VuMeterSegmentCount,
+ VuMeterSegmentGap = domainEntity.VuMeterSegmentGap,
+ VuMeterMediumThreshold = domainEntity.VuMeterMediumThreshold,
+ VuMeterHighThreshold = domainEntity.VuMeterHighThreshold,
+ VuMeterShowPeak = domainEntity.VuMeterShowPeak,
+ VuMeterPeakHoldDurationInMilliseconds = domainEntity.VuMeterPeakHoldDurationInMilliseconds,
+ VuMeterReleasePerSecond = domainEntity.VuMeterReleasePerSecond,
+ VuMeterPeakReleasePerSecond = domainEntity.VuMeterPeakReleasePerSecond,
Volume = domainEntity.Volume,
IsMuted = domainEntity.IsMuted
};
@@ -61,7 +70,16 @@ public static class UserSettingsMapping
domainEntity.ShouldAutoplay,
domainEntity.IsGaplessPlaybackEnabled,
domainEntity.ReplayGainMode,
- domainEntity.StreamingQuality
+ domainEntity.StreamingQuality,
+ domainEntity.VuMeterOrientation,
+ domainEntity.VuMeterSegmentCount,
+ domainEntity.VuMeterSegmentGap,
+ domainEntity.VuMeterMediumThreshold,
+ domainEntity.VuMeterHighThreshold,
+ domainEntity.VuMeterShowPeak,
+ domainEntity.VuMeterPeakHoldDurationInMilliseconds,
+ domainEntity.VuMeterReleasePerSecond,
+ domainEntity.VuMeterPeakReleasePerSecond
);
}
}
diff --git a/src/Lumina.Application/Common/Utilities/ValidatorUtilities.cs b/src/Lumina.Application/Common/Utilities/ValidatorUtilities.cs
index c0c5d385..f4ffb337 100644
--- a/src/Lumina.Application/Common/Utilities/ValidatorUtilities.cs
+++ b/src/Lumina.Application/Common/Utilities/ValidatorUtilities.cs
@@ -174,6 +174,26 @@ public static class ValidatorUtilities
return ruleBuilder.Must(value => !value.HasValue || value.Value >= valueToCompare);
}
+ ///
+ /// Defines a validation rule that ensures the nullable double property is greater than or equal to the value another property of the request selects.
+ ///
+ ///
+ /// If either the property or the selected comparison value is , this rule passes (use
+ /// to check for missing values).
+ ///
+ /// The type of the request being validated.
+ /// The rule builder instance.
+ /// A function that selects the value the property must be greater than or equal to.
+ /// The current instance for method chaining.
+ public static IRuleBuilder GreaterThanOrEqualTo(this IRuleBuilder ruleBuilder, Func comparisonSelector)
+ {
+ return ruleBuilder.Must((request, value) =>
+ {
+ double? comparisonValue = comparisonSelector(request);
+ return !value.HasValue || !comparisonValue.HasValue || value.Value >= comparisonValue.Value;
+ });
+ }
+
///
/// Defines a validation rule that ensures the property is not .
///
@@ -365,6 +385,22 @@ public static class ValidatorUtilities
return ruleBuilder.Must(value => !value.HasValue || (value.Value >= minimumValue && value.Value <= maximumValue));
}
+ ///
+ /// Defines a validation rule that ensures the nullable double property is within the specified inclusive range.
+ ///
+ ///
+ /// If the property is , this rule passes (use to check for missing values).
+ ///
+ /// The type of the request being validated.
+ /// The rule builder instance.
+ /// The minimum allowed value of the property.
+ /// The maximum allowed value of the property.
+ /// The current instance for method chaining.
+ public static IRuleBuilder InclusiveBetween(this IRuleBuilder ruleBuilder, double minimumValue, double maximumValue)
+ {
+ return ruleBuilder.Must(value => !value.HasValue || (value.Value >= minimumValue && value.Value <= maximumValue));
+ }
+
///
/// Defines a validation rule that ensures the property is equal to another property of the request.
///
diff --git a/src/Lumina.Application/Core/UsersManagement/Settings/Commands/UpdateUserSettings/UpdateUserSettingsCommand.cs b/src/Lumina.Application/Core/UsersManagement/Settings/Commands/UpdateUserSettings/UpdateUserSettingsCommand.cs
index 8fccc1a4..23acd6bf 100644
--- a/src/Lumina.Application/Core/UsersManagement/Settings/Commands/UpdateUserSettings/UpdateUserSettingsCommand.cs
+++ b/src/Lumina.Application/Core/UsersManagement/Settings/Commands/UpdateUserSettings/UpdateUserSettingsCommand.cs
@@ -21,6 +21,15 @@ namespace Lumina.Application.Core.UsersManagement.Settings.Commands.UpdateUserSe
/// Whether the player transitions between consecutive tracks without a gap, or not.
/// The way ReplayGain normalization is applied to the tracks the user plays.
/// The quality cap applied to the audio the server normalizes for the user.
+/// The direction in which each channel of the VU meter of the audio player grows.
+/// The number of segments each channel of the VU meter is divided into.
+/// The gap, in pixels, between the segments and the channels of the VU meter.
+/// The level, between 0 and 1, above which a segment of the VU meter is drawn with its medium state.
+/// The level, between 0 and 1, above which a segment of the VU meter is drawn with its high state.
+/// Whether the VU meter holds the peak level of each channel after it falls, or not.
+/// The time, in milliseconds, a peak of the VU meter is held before it starts falling.
+/// The number of level units the display of the VU meter falls per second when the input level drops.
+/// The number of level units the peak of the VU meter falls per second after its hold time elapsed.
public record UpdateUserSettingsCommand(
bool IsPaginationEnabled,
int ItemsPerPage,
@@ -34,5 +43,14 @@ public record UpdateUserSettingsCommand(
bool? ShouldAutoplay,
bool? IsGaplessPlaybackEnabled,
ReplayGainMode? ReplayGainMode,
- PlaybackStreamingQuality? StreamingQuality
+ PlaybackStreamingQuality? StreamingQuality,
+ VuMeterOrientation? VuMeterOrientation,
+ int? VuMeterSegmentCount,
+ int? VuMeterSegmentGap,
+ double? VuMeterMediumThreshold,
+ double? VuMeterHighThreshold,
+ bool? VuMeterShowPeak,
+ int? VuMeterPeakHoldDurationInMilliseconds,
+ double? VuMeterReleasePerSecond,
+ double? VuMeterPeakReleasePerSecond
) : ICommand;
diff --git a/src/Lumina.Application/Core/UsersManagement/Settings/Commands/UpdateUserSettings/UpdateUserSettingsCommandHandler.cs b/src/Lumina.Application/Core/UsersManagement/Settings/Commands/UpdateUserSettings/UpdateUserSettingsCommandHandler.cs
index 9298f87a..402f31f2 100644
--- a/src/Lumina.Application/Core/UsersManagement/Settings/Commands/UpdateUserSettings/UpdateUserSettingsCommandHandler.cs
+++ b/src/Lumina.Application/Core/UsersManagement/Settings/Commands/UpdateUserSettings/UpdateUserSettingsCommandHandler.cs
@@ -124,6 +124,15 @@ public class UpdateUserSettingsCommandHandler : ICommandHandler command.StreamingQuality is not null);
+
+ RuleFor(command => command.VuMeterOrientation)
+ .NotNull()
+ .WithError(Errors.UserSettings.VuMeterOrientationCannotBeNull);
+
+ RuleFor(command => command.VuMeterOrientation)
+ .IsInEnum()
+ .WithError(Errors.UserSettings.InvalidVuMeterOrientation)
+ .When(command => command.VuMeterOrientation is not null);
+
+ RuleFor(command => command.VuMeterSegmentCount)
+ .NotNull()
+ .WithError(Errors.UserSettings.VuMeterSegmentCountCannotBeNull);
+
+ RuleFor(command => command.VuMeterSegmentCount)
+ .InclusiveBetween(1, 128)
+ .WithError(Errors.UserSettings.VuMeterSegmentCountMustBeBetweenOneAndOneHundredTwentyEight);
+
+ RuleFor(command => command.VuMeterSegmentGap)
+ .NotNull()
+ .WithError(Errors.UserSettings.VuMeterSegmentGapCannotBeNull);
+
+ RuleFor(command => command.VuMeterSegmentGap)
+ .InclusiveBetween(0, 32)
+ .WithError(Errors.UserSettings.VuMeterSegmentGapMustBeBetweenZeroAndThirtyTwo);
+
+ RuleFor(command => command.VuMeterMediumThreshold)
+ .NotNull()
+ .WithError(Errors.UserSettings.VuMeterMediumThresholdCannotBeNull);
+
+ RuleFor(command => command.VuMeterMediumThreshold)
+ .InclusiveBetween(0d, 1d)
+ .WithError(Errors.UserSettings.VuMeterMediumThresholdMustBeBetweenZeroAndOne);
+
+ RuleFor(command => command.VuMeterHighThreshold)
+ .NotNull()
+ .WithError(Errors.UserSettings.VuMeterHighThresholdCannotBeNull);
+
+ RuleFor(command => command.VuMeterHighThreshold)
+ .InclusiveBetween(0d, 1d)
+ .WithError(Errors.UserSettings.VuMeterHighThresholdMustBeBetweenZeroAndOne);
+
+ RuleFor(command => command.VuMeterHighThreshold)
+ .GreaterThanOrEqualTo(command => command.VuMeterMediumThreshold)
+ .WithError(Errors.UserSettings.VuMeterHighThresholdMustBeGreaterThanOrEqualToMediumThreshold);
+
+ RuleFor(command => command.VuMeterShowPeak)
+ .NotNull()
+ .WithError(Errors.UserSettings.VuMeterShowPeakCannotBeNull);
+
+ RuleFor(command => command.VuMeterPeakHoldDurationInMilliseconds)
+ .NotNull()
+ .WithError(Errors.UserSettings.VuMeterPeakHoldDurationCannotBeNull);
+
+ RuleFor(command => command.VuMeterPeakHoldDurationInMilliseconds)
+ .InclusiveBetween(0, 10000)
+ .WithError(Errors.UserSettings.VuMeterPeakHoldDurationMustBeBetweenZeroAndTenThousandMilliseconds);
+
+ RuleFor(command => command.VuMeterReleasePerSecond)
+ .NotNull()
+ .WithError(Errors.UserSettings.VuMeterReleasePerSecondCannotBeNull);
+
+ RuleFor(command => command.VuMeterReleasePerSecond)
+ .InclusiveBetween(0d, 100d)
+ .WithError(Errors.UserSettings.VuMeterReleasePerSecondMustBeBetweenZeroAndOneHundred);
+
+ RuleFor(command => command.VuMeterPeakReleasePerSecond)
+ .NotNull()
+ .WithError(Errors.UserSettings.VuMeterPeakReleasePerSecondCannotBeNull);
+
+ RuleFor(command => command.VuMeterPeakReleasePerSecond)
+ .InclusiveBetween(0d, 100d)
+ .WithError(Errors.UserSettings.VuMeterPeakReleasePerSecondMustBeBetweenZeroAndOneHundred);
}
}
diff --git a/src/Lumina.Contracts/Requests/UsersManagement/Settings/UpdateUserSettingsRequest.cs b/src/Lumina.Contracts/Requests/UsersManagement/Settings/UpdateUserSettingsRequest.cs
index 53c5ec79..44ad87c3 100644
--- a/src/Lumina.Contracts/Requests/UsersManagement/Settings/UpdateUserSettingsRequest.cs
+++ b/src/Lumina.Contracts/Requests/UsersManagement/Settings/UpdateUserSettingsRequest.cs
@@ -21,6 +21,15 @@ namespace Lumina.Contracts.Requests.UsersManagement.Settings;
/// Whether the player transitions between consecutive tracks without a gap, or not. Required.
/// The way ReplayGain normalization is applied to the tracks the user plays. Required.
/// The quality cap applied to the audio the server normalizes for the user. Required.
+/// The direction in which each channel of the VU meter of the audio player grows. Required.
+/// The number of segments each channel of the VU meter is divided into. Required.
+/// The gap, in pixels, between the segments and the channels of the VU meter. Required.
+/// The level, between 0 and 1, above which a segment of the VU meter is drawn with its medium state. Required.
+/// The level, between 0 and 1, above which a segment of the VU meter is drawn with its high state. Required.
+/// Whether the VU meter holds the peak level of each channel after it falls, or not. Required.
+/// The time, in milliseconds, a peak of the VU meter is held before it starts falling. Required.
+/// The number of level units the display of the VU meter falls per second when the input level drops. Required.
+/// The number of level units the peak of the VU meter falls per second after its hold time elapsed. Required.
[DebuggerDisplay("IsPaginationEnabled: {IsPaginationEnabled}; ItemsPerPage: {ItemsPerPage}")]
public sealed record UpdateUserSettingsRequest(
bool IsPaginationEnabled,
@@ -35,5 +44,14 @@ public sealed record UpdateUserSettingsRequest(
bool? ShouldAutoplay,
bool? IsGaplessPlaybackEnabled,
ReplayGainMode? ReplayGainMode,
- PlaybackStreamingQuality? StreamingQuality
+ PlaybackStreamingQuality? StreamingQuality,
+ VuMeterOrientation? VuMeterOrientation,
+ int? VuMeterSegmentCount,
+ int? VuMeterSegmentGap,
+ double? VuMeterMediumThreshold,
+ double? VuMeterHighThreshold,
+ bool? VuMeterShowPeak,
+ int? VuMeterPeakHoldDurationInMilliseconds,
+ double? VuMeterReleasePerSecond,
+ double? VuMeterPeakReleasePerSecond
);
diff --git a/src/Lumina.Contracts/Responses/UsersManagement/Settings/UserSettingsResponse.cs b/src/Lumina.Contracts/Responses/UsersManagement/Settings/UserSettingsResponse.cs
index c4ea9fad..93c5da77 100644
--- a/src/Lumina.Contracts/Responses/UsersManagement/Settings/UserSettingsResponse.cs
+++ b/src/Lumina.Contracts/Responses/UsersManagement/Settings/UserSettingsResponse.cs
@@ -23,6 +23,15 @@ namespace Lumina.Contracts.Responses.UsersManagement.Settings;
/// Whether the player transitions between consecutive tracks without a gap, or not.
/// The way ReplayGain normalization is applied to the tracks the user plays.
/// The quality cap applied to the audio the server normalizes for the user.
+/// The direction in which each channel of the VU meter of the audio player grows.
+/// The number of segments each channel of the VU meter is divided into.
+/// The gap, in pixels, between the segments and the channels of the VU meter.
+/// The level, between 0 and 1, above which a segment of the VU meter is drawn with its medium state.
+/// The level, between 0 and 1, above which a segment of the VU meter is drawn with its high state.
+/// Whether the VU meter holds the peak level of each channel after it falls, or not.
+/// The time, in milliseconds, a peak of the VU meter is held before it starts falling.
+/// The number of level units the display of the VU meter falls per second when the input level drops.
+/// The number of level units the peak of the VU meter falls per second after its hold time elapsed.
[DebuggerDisplay("UserId: {UserId}")]
public sealed record UserSettingsResponse(
Guid UserId,
@@ -38,5 +47,14 @@ public sealed record UserSettingsResponse(
bool ShouldAutoplay,
bool IsGaplessPlaybackEnabled,
ReplayGainMode ReplayGainMode,
- PlaybackStreamingQuality StreamingQuality
+ PlaybackStreamingQuality StreamingQuality,
+ VuMeterOrientation VuMeterOrientation,
+ int VuMeterSegmentCount,
+ int VuMeterSegmentGap,
+ double VuMeterMediumThreshold,
+ double VuMeterHighThreshold,
+ bool VuMeterShowPeak,
+ int VuMeterPeakHoldDurationInMilliseconds,
+ double VuMeterReleasePerSecond,
+ double VuMeterPeakReleasePerSecond
);
diff --git a/src/Lumina.DataAccess/Common/Configuration/UserSettingsConfiguration.cs b/src/Lumina.DataAccess/Common/Configuration/UserSettingsConfiguration.cs
index c60b07e8..864b310d 100644
--- a/src/Lumina.DataAccess/Common/Configuration/UserSettingsConfiguration.cs
+++ b/src/Lumina.DataAccess/Common/Configuration/UserSettingsConfiguration.cs
@@ -86,14 +86,50 @@ public class UserSettingsConfiguration : IEntityTypeConfiguration settings.Volume)
+ builder.Property(settings => settings.VuMeterOrientation)
.IsRequired()
.HasColumnOrder(19);
- builder.Property(settings => settings.IsMuted)
+ builder.Property(settings => settings.VuMeterSegmentCount)
.IsRequired()
.HasColumnOrder(20);
+ builder.Property(settings => settings.VuMeterSegmentGap)
+ .IsRequired()
+ .HasColumnOrder(21);
+
+ builder.Property(settings => settings.VuMeterMediumThreshold)
+ .IsRequired()
+ .HasColumnOrder(22);
+
+ builder.Property(settings => settings.VuMeterHighThreshold)
+ .IsRequired()
+ .HasColumnOrder(23);
+
+ builder.Property(settings => settings.VuMeterShowPeak)
+ .IsRequired()
+ .HasColumnOrder(24);
+
+ builder.Property(settings => settings.VuMeterPeakHoldDurationInMilliseconds)
+ .IsRequired()
+ .HasColumnOrder(25);
+
+ builder.Property(settings => settings.VuMeterReleasePerSecond)
+ .IsRequired()
+ .HasColumnOrder(26);
+
+ builder.Property(settings => settings.VuMeterPeakReleasePerSecond)
+ .IsRequired()
+ .HasColumnOrder(27);
+
+ builder.Property(settings => settings.Volume)
+ .IsRequired()
+ .HasColumnOrder(28);
+
+ builder.Property(settings => settings.IsMuted)
+ .IsRequired()
+ .HasColumnOrder(29);
+
// audit
builder.Property(settings => settings.CreatedOnUtc)
.IsRequired()
diff --git a/src/Lumina.DataAccess/Common/Migrations/20261021134714_AddsVuMeterSettingsToUserSettings.Designer.cs b/src/Lumina.DataAccess/Common/Migrations/20261021134714_AddsVuMeterSettingsToUserSettings.Designer.cs
new file mode 100644
index 00000000..d2cbd08c
--- /dev/null
+++ b/src/Lumina.DataAccess/Common/Migrations/20261021134714_AddsVuMeterSettingsToUserSettings.Designer.cs
@@ -0,0 +1,3709 @@
+//
+using System;
+using Lumina.DataAccess.Core.UoW;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace Lumina.DataAccess.Common.Migrations
+{
+ [DbContext(typeof(LuminaDbContext))]
+ [Migration("20261021134714_AddsVuMeterSettingsToUserSettings")]
+ partial class AddsVuMeterSettingsToUserSettings
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "10.0.11");
+
+ modelBuilder.Entity("AlbumGenres", b =>
+ {
+ b.Property("AlbumId")
+ .HasColumnType("TEXT");
+
+ b.Property("GenreId")
+ .HasColumnType("TEXT");
+
+ b.HasKey("AlbumId", "GenreId");
+
+ b.HasIndex("GenreId");
+
+ b.ToTable("AlbumGenres", (string)null);
+ });
+
+ modelBuilder.Entity("AlbumTags", b =>
+ {
+ b.Property("AlbumId")
+ .HasColumnType("TEXT");
+
+ b.Property("TagId")
+ .HasColumnType("TEXT");
+
+ b.HasKey("AlbumId", "TagId");
+
+ b.HasIndex("TagId");
+
+ b.ToTable("AlbumTags", (string)null);
+ });
+
+ modelBuilder.Entity("ArtistGenres", b =>
+ {
+ b.Property("ArtistId")
+ .HasColumnType("TEXT");
+
+ b.Property("GenreId")
+ .HasColumnType("TEXT");
+
+ b.HasKey("ArtistId", "GenreId");
+
+ b.HasIndex("GenreId");
+
+ b.ToTable("ArtistGenres", (string)null);
+ });
+
+ modelBuilder.Entity("ArtistTags", b =>
+ {
+ b.Property("ArtistId")
+ .HasColumnType("TEXT");
+
+ b.Property("TagId")
+ .HasColumnType("TEXT");
+
+ b.HasKey("ArtistId", "TagId");
+
+ b.HasIndex("TagId");
+
+ b.ToTable("ArtistTags", (string)null);
+ });
+
+ modelBuilder.Entity("BookGenres", b =>
+ {
+ b.Property("BookId")
+ .HasColumnType("TEXT");
+
+ b.Property("GenreId")
+ .HasColumnType("TEXT");
+
+ b.HasKey("BookId", "GenreId");
+
+ b.HasIndex("GenreId");
+
+ b.ToTable("BookGenres", (string)null);
+ });
+
+ modelBuilder.Entity("BookTags", b =>
+ {
+ b.Property("BookId")
+ .HasColumnType("TEXT");
+
+ b.Property("TagId")
+ .HasColumnType("TEXT");
+
+ b.HasKey("BookId", "TagId");
+
+ b.HasIndex("TagId");
+
+ b.ToTable("BookTags", (string)null);
+ });
+
+ modelBuilder.Entity("Lumina.Application.Common.DataAccess.Entities.Authorization.PermissionEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT")
+ .HasColumnOrder(0);
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(4);
+
+ b.Property("CreatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(3);
+
+ b.Property("PermissionName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(1);
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(6);
+
+ b.Property("UpdatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(5);
+
+ b.HasKey("Id");
+
+ b.ToTable("Permissions", (string)null);
+ });
+
+ modelBuilder.Entity("Lumina.Application.Common.DataAccess.Entities.Authorization.RoleEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT")
+ .HasColumnOrder(0);
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(4);
+
+ b.Property("CreatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(3);
+
+ b.Property("RoleName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(1);
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(6);
+
+ b.Property("UpdatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(5);
+
+ b.HasKey("Id");
+
+ b.ToTable("Roles", (string)null);
+ });
+
+ modelBuilder.Entity("Lumina.Application.Common.DataAccess.Entities.Authorization.RolePermissionEntity", b =>
+ {
+ b.Property("RoleId")
+ .HasColumnType("TEXT");
+
+ b.Property("PermissionId")
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(2);
+
+ b.Property("CreatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(1);
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(4);
+
+ b.Property("UpdatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(3);
+
+ b.HasKey("RoleId", "PermissionId");
+
+ b.HasIndex("PermissionId");
+
+ b.HasIndex("RoleId", "PermissionId")
+ .IsUnique();
+
+ b.ToTable("RolePermissions", (string)null);
+ });
+
+ modelBuilder.Entity("Lumina.Application.Common.DataAccess.Entities.Authorization.UserPermissionEntity", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("TEXT");
+
+ b.Property("PermissionId")
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(2);
+
+ b.Property("CreatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(1);
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(4);
+
+ b.Property("UpdatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(3);
+
+ b.HasKey("UserId", "PermissionId");
+
+ b.HasIndex("PermissionId");
+
+ b.HasIndex("UserId", "PermissionId")
+ .IsUnique();
+
+ b.ToTable("UserPermissions", (string)null);
+ });
+
+ modelBuilder.Entity("Lumina.Application.Common.DataAccess.Entities.Authorization.UserRoleEntity", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(2);
+
+ b.Property("CreatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(1);
+
+ b.Property("RoleId")
+ .HasColumnType("TEXT");
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(4);
+
+ b.Property("UpdatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(3);
+
+ b.HasKey("UserId");
+
+ b.HasIndex("RoleId");
+
+ b.HasIndex("UserId", "RoleId")
+ .IsUnique();
+
+ b.ToTable("UserRoles", (string)null);
+ });
+
+ modelBuilder.Entity("Lumina.Application.Common.DataAccess.Entities.Common.GenreEntity", b =>
+ {
+ b.Property("Name")
+ .HasMaxLength(50)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Name");
+
+ b.ToTable("Genres", (string)null);
+ });
+
+ modelBuilder.Entity("Lumina.Application.Common.DataAccess.Entities.Common.TagEntity", b =>
+ {
+ b.Property("Name")
+ .HasMaxLength(50)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Name");
+
+ b.ToTable("Tags", (string)null);
+ });
+
+ modelBuilder.Entity("Lumina.Application.Common.DataAccess.Entities.MediaContributors.MediaContributorEntity", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(0);
+
+ b.Property("Biography")
+ .HasMaxLength(2000)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(3);
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(7);
+
+ b.Property("CreatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(6);
+
+ b.Property("DateOfBirth")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(4);
+
+ b.Property("DateOfDeath")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(5);
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(1)
+ .UseCollation("NOCASE");
+
+ b.Property("LegalName")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(2);
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(9);
+
+ b.Property("UpdatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(8);
+
+ b.HasKey("Id");
+
+ b.HasIndex("DisplayName")
+ .IsUnique();
+
+ b.ToTable("MediaContributors", (string)null);
+ });
+
+ modelBuilder.Entity("Lumina.Application.Common.DataAccess.Entities.MediaLibrary.AudioLibrary.MusicLibrary.AlbumContributorEntity", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(0);
+
+ b.Property("AlbumId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(1);
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(5);
+
+ b.Property("CreatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(4);
+
+ b.Property("MediaContributorId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(2);
+
+ b.Property("Role")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(3);
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(7);
+
+ b.Property("UpdatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(6);
+
+ b.HasKey("Id");
+
+ b.HasIndex("MediaContributorId");
+
+ b.HasIndex("AlbumId", "MediaContributorId", "Role")
+ .IsUnique();
+
+ b.ToTable("AlbumContributors", (string)null);
+ });
+
+ modelBuilder.Entity("Lumina.Application.Common.DataAccess.Entities.MediaLibrary.AudioLibrary.MusicLibrary.AlbumEntity", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(0);
+
+ b.Property("ASIN")
+ .HasMaxLength(20)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(28);
+
+ b.Property("ArtistId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(1);
+
+ b.Property("Barcode")
+ .HasMaxLength(13)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(25);
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(33);
+
+ b.Property("CreatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(32);
+
+ b.Property("Description")
+ .HasMaxLength(2000)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(5);
+
+ b.Property("Disambiguation")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(6);
+
+ b.Property("Label")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(27);
+
+ b.Property("LanguageCode")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(13);
+
+ b.Property("LanguageName")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(14);
+
+ b.Property("LanguageNativeName")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(15);
+
+ b.Property("LastMetadataUpdateUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(37);
+
+ b.Property("LibraryId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(2);
+
+ b.Property("MediaFormat")
+ .HasMaxLength(50)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(23);
+
+ b.Property("MetadataProvider")
+ .HasMaxLength(100)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(38);
+
+ b.Property("MetadataStatus")
+ .IsRequired()
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(20)
+ .HasColumnType("TEXT")
+ .HasDefaultValue("Pending")
+ .HasColumnOrder(36);
+
+ b.Property("MusicBrainzReleaseArtistId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(31);
+
+ b.Property("MusicBrainzReleaseGroupId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(30);
+
+ b.Property("MusicBrainzReleaseId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(29);
+
+ b.Property("OriginalLanguageCode")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(16);
+
+ b.Property("OriginalLanguageName")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(17);
+
+ b.Property("OriginalLanguageNativeName")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(18);
+
+ b.Property("OriginalReleaseDate")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(7);
+
+ b.Property("OriginalReleaseYear")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(8);
+
+ b.Property("OriginalTitle")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(4);
+
+ b.Property("Packaging")
+ .HasMaxLength(50)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(24);
+
+ b.Property("ReReleaseDate")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(9);
+
+ b.Property("ReReleaseYear")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(10);
+
+ b.Property("ReleaseCountry")
+ .HasMaxLength(2)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(11);
+
+ b.Property("ReleaseStatus")
+ .HasMaxLength(50)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(20);
+
+ b.Property("ReleaseTitle")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(26);
+
+ b.Property("ReleaseVersion")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(12);
+
+ b.Property("Script")
+ .HasMaxLength(50)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(19);
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(3);
+
+ b.Property("TotalDiscs")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(21);
+
+ b.Property("TotalTracks")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(22);
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(35);
+
+ b.Property("UpdatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(34);
+
+ b.HasKey("Id");
+
+ b.HasIndex("ArtistId", "Title");
+
+ b.HasIndex("LibraryId", "Title");
+
+ b.ToTable("Albums", (string)null);
+ });
+
+ modelBuilder.Entity("Lumina.Application.Common.DataAccess.Entities.MediaLibrary.AudioLibrary.MusicLibrary.ArtistContributorEntity", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(0);
+
+ b.Property("ArtistId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(1);
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(5);
+
+ b.Property("CreatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(4);
+
+ b.Property("MediaContributorId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(2);
+
+ b.Property("Role")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(3);
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(7);
+
+ b.Property("UpdatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(6);
+
+ b.HasKey("Id");
+
+ b.HasIndex("MediaContributorId");
+
+ b.HasIndex("ArtistId", "MediaContributorId", "Role")
+ .IsUnique();
+
+ b.ToTable("ArtistContributors", (string)null);
+ });
+
+ modelBuilder.Entity("Lumina.Application.Common.DataAccess.Entities.MediaLibrary.AudioLibrary.MusicLibrary.ArtistEntity", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(0);
+
+ b.Property("Country")
+ .HasMaxLength(2)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(7);
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(14);
+
+ b.Property("CreatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(13);
+
+ b.Property("Disambiguation")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(4);
+
+ b.Property("Gender")
+ .HasMaxLength(20)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(6);
+
+ b.Property("IsEnded")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(10);
+
+ b.Property("LastMetadataUpdateUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(18);
+
+ b.Property("LibraryId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(1);
+
+ b.Property("LifeSpanBegin")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(8);
+
+ b.Property("LifeSpanEnd")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(9);
+
+ b.Property("MetadataProvider")
+ .HasMaxLength(100)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(19);
+
+ b.Property("MetadataStatus")
+ .IsRequired()
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(20)
+ .HasColumnType("TEXT")
+ .HasDefaultValue("Pending")
+ .HasColumnOrder(17);
+
+ b.Property("MusicBrainzArtistId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(12);
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(2);
+
+ b.Property("SortName")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(3);
+
+ b.Property("Type")
+ .HasMaxLength(20)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(5);
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(16);
+
+ b.Property("UpdatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(15);
+
+ b.Property("Website")
+ .HasMaxLength(2048)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(11);
+
+ b.HasKey("Id");
+
+ b.HasIndex("LibraryId", "Name")
+ .IsUnique();
+
+ b.ToTable("Artists", (string)null);
+ });
+
+ modelBuilder.Entity("Lumina.Application.Common.DataAccess.Entities.MediaLibrary.AudioLibrary.MusicLibrary.MusicArtworkEntity", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(0);
+
+ b.Property("ArtworkType")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(3);
+
+ b.Property("ContentHash")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(6);
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(11);
+
+ b.Property("CreatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(10);
+
+ b.Property("FileName")
+ .HasMaxLength(2048)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(5);
+
+ b.Property("LastUpdateUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(9);
+
+ b.Property("Ordinal")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(4);
+
+ b.Property("OwnerId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(2);
+
+ b.Property("OwnerType")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(1);
+
+ b.Property("Provider")
+ .HasMaxLength(100)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(8);
+
+ b.Property("Status")
+ .IsRequired()
+ .HasMaxLength(20)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(7);
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(13);
+
+ b.Property("UpdatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(12);
+
+ b.HasKey("Id");
+
+ b.HasIndex("Status");
+
+ b.HasIndex("OwnerType", "OwnerId", "ArtworkType", "Ordinal")
+ .IsUnique();
+
+ b.ToTable("MusicArtwork", (string)null);
+ });
+
+ modelBuilder.Entity("Lumina.Application.Common.DataAccess.Entities.MediaLibrary.AudioLibrary.MusicLibrary.MusicLibraryScanItemMetadataEntity", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(0);
+
+ b.Property("AcoustId")
+ .HasMaxLength(64)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(25);
+
+ b.Property("ArtistName")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(4);
+
+ b.Property("AudioCodec")
+ .HasMaxLength(50)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(15);
+
+ b.Property("BitDepth")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(14);
+
+ b.Property("Bitrate")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(16);
+
+ b.Property("Channels")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(13);
+
+ b.Property("Container")
+ .HasMaxLength(50)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(31);
+
+ b.Property("DiscNumber")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(10);
+
+ b.Property("DurationInSeconds")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(11);
+
+ b.Property("LibraryId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(2);
+
+ b.Property("LibraryScanId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(1);
+
+ b.PrimitiveCollection("Moods")
+ .IsRequired()
+ .HasColumnType("TEXT")
+ .HasColumnOrder(30);
+
+ b.Property("MusicBrainzArtistId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(17);
+
+ b.Property("MusicBrainzRecordingId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(21);
+
+ b.Property("MusicBrainzReleaseArtistId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(18);
+
+ b.Property("MusicBrainzReleaseGroupId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(19);
+
+ b.Property("MusicBrainzReleaseId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(20);
+
+ b.Property("MusicBrainzTrackId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(22);
+
+ b.Property("MusicBrainzWorkId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(23);
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(2048)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(3);
+
+ b.Property("ReleaseName")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(7);
+
+ b.Property("ReleaseType")
+ .HasMaxLength(50)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(5);
+
+ b.Property("ReleaseYear")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(6);
+
+ b.Property("ReplayGainAlbumGain")
+ .HasColumnType("decimal(8,2)")
+ .HasColumnOrder(28);
+
+ b.Property("ReplayGainAlbumPeak")
+ .HasColumnType("decimal(8,6)")
+ .HasColumnOrder(29);
+
+ b.Property("ReplayGainTrackGain")
+ .HasColumnType("decimal(8,2)")
+ .HasColumnOrder(26);
+
+ b.Property("ReplayGainTrackPeak")
+ .HasColumnType("decimal(8,6)")
+ .HasColumnOrder(27);
+
+ b.Property("SampleRate")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(12);
+
+ b.Property("TrackNumber")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(9);
+
+ b.Property("TrackTitle")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(8);
+
+ b.Property("WorkTitle")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(24);
+
+ b.HasKey("Id");
+
+ b.HasIndex("LibraryScanId", "Path")
+ .IsUnique();
+
+ b.ToTable("MusicLibraryScanItemMetadata", (string)null);
+ });
+
+ modelBuilder.Entity("Lumina.Application.Common.DataAccess.Entities.MediaLibrary.AudioLibrary.MusicLibrary.MusicPlayRecordEntity", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(0);
+
+ b.Property("AlbumId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(4);
+
+ b.Property("ArtistId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(5);
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(12);
+
+ b.Property("CreatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(11);
+
+ b.Property("EndedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(9);
+
+ b.Property("LastPositionMilliseconds")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(7);
+
+ b.Property("LibraryId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(3);
+
+ b.Property("ListenedDurationMilliseconds")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(8);
+
+ b.Property("Status")
+ .IsRequired()
+ .HasMaxLength(20)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(6);
+
+ b.Property("TrackId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(2);
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(14);
+
+ b.Property("UpdatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(13);
+
+ b.Property("UserId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(1);
+
+ b.Property("Version")
+ .IsConcurrencyToken()
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(10);
+
+ b.HasKey("Id");
+
+ b.HasIndex("TrackId");
+
+ b.HasIndex("UserId", "CreatedOnUtc");
+
+ b.ToTable("MusicPlayRecords", (string)null);
+ });
+
+ modelBuilder.Entity("Lumina.Application.Common.DataAccess.Entities.MediaLibrary.AudioLibrary.MusicLibrary.TrackContributorEntity", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(0);
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(5);
+
+ b.Property("CreatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(4);
+
+ b.Property("MediaContributorId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(2);
+
+ b.Property("Role")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(3);
+
+ b.Property("TrackId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(1);
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(7);
+
+ b.Property("UpdatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(6);
+
+ b.HasKey("Id");
+
+ b.HasIndex("MediaContributorId");
+
+ b.HasIndex("TrackId", "MediaContributorId", "Role")
+ .IsUnique();
+
+ b.ToTable("TrackContributors", (string)null);
+ });
+
+ modelBuilder.Entity("Lumina.Application.Common.DataAccess.Entities.MediaLibrary.AudioLibrary.MusicLibrary.TrackEntity", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(0);
+
+ b.Property("AcoustId")
+ .HasMaxLength(64)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(44);
+
+ b.Property("AlbumId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(1);
+
+ b.Property("AudioCodec")
+ .HasMaxLength(50)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(24);
+
+ b.Property("BitDepth")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(23);
+
+ b.Property("Bitrate")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(25);
+
+ b.Property("Bpm")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(30);
+
+ b.Property("Channels")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(22);
+
+ b.Property("Container")
+ .HasMaxLength(50)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(49);
+
+ b.Property("CreatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(38);
+
+ b.Property("CreatedOnUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(37);
+
+ b.Property("Description")
+ .HasMaxLength(2000)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(6);
+
+ b.Property("Disambiguation")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(7);
+
+ b.Property("DiscNumber")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(27);
+
+ b.Property("DurationInSeconds")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(20);
+
+ b.Property("IsVideo")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(31);
+
+ b.Property("Key")
+ .HasMaxLength(50)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(29);
+
+ b.Property("LanguageCode")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(14);
+
+ b.Property("LanguageName")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(15);
+
+ b.Property("LanguageNativeName")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(16);
+
+ b.Property("LastMetadataUpdateUtc")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(42);
+
+ b.Property("LibraryId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(2);
+
+ b.Property("MetadataProvider")
+ .HasMaxLength(100)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(43);
+
+ b.Property("MetadataStatus")
+ .IsRequired()
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(20)
+ .HasColumnType("TEXT")
+ .HasDefaultValue("Pending")
+ .HasColumnOrder(41);
+
+ b.Property("MusicBrainzRecordingId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(34);
+
+ b.Property("MusicBrainzTrackId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(35);
+
+ b.Property("MusicBrainzWorkId")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(36);
+
+ b.Property("OriginalLanguageCode")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(17);
+
+ b.Property("OriginalLanguageName")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(18);
+
+ b.Property("OriginalLanguageNativeName")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(19);
+
+ b.Property("OriginalReleaseDate")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(8);
+
+ b.Property("OriginalReleaseYear")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(9);
+
+ b.Property("OriginalTitle")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(5);
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(2048)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(3);
+
+ b.Property("ReReleaseDate")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(10);
+
+ b.Property("ReReleaseYear")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(11);
+
+ b.Property("ReleaseCountry")
+ .HasMaxLength(2)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(12);
+
+ b.Property("ReleaseVersion")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(13);
+
+ b.Property("ReplayGainAlbumGain")
+ .HasColumnType("decimal(8,2)")
+ .HasColumnOrder(47);
+
+ b.Property("ReplayGainAlbumPeak")
+ .HasColumnType("decimal(8,6)")
+ .HasColumnOrder(48);
+
+ b.Property("ReplayGainTrackGain")
+ .HasColumnType("decimal(8,2)")
+ .HasColumnOrder(45);
+
+ b.Property("ReplayGainTrackPeak")
+ .HasColumnType("decimal(8,6)")
+ .HasColumnOrder(46);
+
+ b.Property("SampleRate")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(21);
+
+ b.Property("Script")
+ .HasMaxLength(50)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(28);
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("TEXT")
+ .HasColumnOrder(4);
+
+ b.Property("TrackNumber")
+ .HasColumnType("INTEGER")
+ .HasColumnOrder(26);
+
+ b.Property("UpdatedBy")
+ .HasColumnType("TEXT")
+ .HasColumnOrder(40);
+
+ b.Property