diff --git a/ErsatzTV.Application/Streaming/Queries/GetPlayoutItemProcessByChannelNumberHandler.cs b/ErsatzTV.Application/Streaming/Queries/GetPlayoutItemProcessByChannelNumberHandler.cs index b88cb12c7..08689be2f 100644 --- a/ErsatzTV.Application/Streaming/Queries/GetPlayoutItemProcessByChannelNumberHandler.cs +++ b/ErsatzTV.Application/Streaming/Queries/GetPlayoutItemProcessByChannelNumberHandler.cs @@ -148,8 +148,8 @@ namespace ErsatzTV.Application.Streaming.Queries { Id = -1, Chapters = new List(), - Width = 301, - Height = 162, + Width = 192, + Height = 108, SampleAspectRatio = "1:1", Streams = new List { @@ -157,8 +157,20 @@ namespace ErsatzTV.Application.Streaming.Queries } }; - // use ETV logo by default - string artworkPath = Path.Combine(FileSystemLayout.ResourcesCacheFolder, "ErsatzTV.png"); + string[] backgrounds = + { + "background_blank.png", + "background_e.png", + "background_t.png", + "background_v.png" + }; + + var random = new Random(); + + // use random ETV color by default + string artworkPath = Path.Combine( + FileSystemLayout.ResourcesCacheFolder, + backgrounds[random.Next() % backgrounds.Length]); // use thumbnail (cover art) if present foreach (SongMetadata metadata in song.SongMetadata) diff --git a/ErsatzTV/ErsatzTV.csproj b/ErsatzTV/ErsatzTV.csproj index e9d9c544e..489a404ad 100644 --- a/ErsatzTV/ErsatzTV.csproj +++ b/ErsatzTV/ErsatzTV.csproj @@ -51,6 +51,10 @@ + + + + diff --git a/ErsatzTV/Resources/background_blank.png b/ErsatzTV/Resources/background_blank.png new file mode 100644 index 000000000..d973d5d69 Binary files /dev/null and b/ErsatzTV/Resources/background_blank.png differ diff --git a/ErsatzTV/Resources/background_e.png b/ErsatzTV/Resources/background_e.png new file mode 100644 index 000000000..dc2148e54 Binary files /dev/null and b/ErsatzTV/Resources/background_e.png differ diff --git a/ErsatzTV/Resources/background_t.png b/ErsatzTV/Resources/background_t.png new file mode 100644 index 000000000..5e8f92058 Binary files /dev/null and b/ErsatzTV/Resources/background_t.png differ diff --git a/ErsatzTV/Resources/background_v.png b/ErsatzTV/Resources/background_v.png new file mode 100644 index 000000000..e47c4d9de Binary files /dev/null and b/ErsatzTV/Resources/background_v.png differ diff --git a/ErsatzTV/Services/RunOnce/ResourceExtractorService.cs b/ErsatzTV/Services/RunOnce/ResourceExtractorService.cs index d9a2b1ed9..22bf77002 100644 --- a/ErsatzTV/Services/RunOnce/ResourceExtractorService.cs +++ b/ErsatzTV/Services/RunOnce/ResourceExtractorService.cs @@ -19,6 +19,10 @@ namespace ErsatzTV.Services.RunOnce Assembly assembly = typeof(ResourceExtractorService).GetTypeInfo().Assembly; await ExtractResource(assembly, "background.png", cancellationToken); + await ExtractResource(assembly, "background_blank.png", cancellationToken); + await ExtractResource(assembly, "background_e.png", cancellationToken); + await ExtractResource(assembly, "background_t.png", cancellationToken); + await ExtractResource(assembly, "background_v.png", cancellationToken); await ExtractResource(assembly, "ErsatzTV.png", cancellationToken); await ExtractResource(assembly, "Roboto-Regular.ttf", cancellationToken); await ExtractResource(assembly, "OPTIKabel-Heavy.otf", cancellationToken); diff --git a/README.md b/README.md index ab2c05c92..9400660ef 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Want to join the community or have a question? Join us on [Discord](https://disc - [Plex](https://www.plex.tv/) media and metadata - [Jellyfin](https://jellyfin.org/) media and metadata - [Emby](https://emby.media/) media and metadata -- Music video libraries +- Song and music video libraries - Pre-roll, mid-roll, post-roll filler options ## License diff --git a/docs/user-guide/add-media-items.md b/docs/user-guide/add-media-items.md index c57bbf327..b6a4ecac8 100644 --- a/docs/user-guide/add-media-items.md +++ b/docs/user-guide/add-media-items.md @@ -11,7 +11,7 @@ With local libraries, ErsatzTV will read metadata from [NFO files](https://kodi. ### Add Libraries -ErsatzTV provides four local libraries by default, one for each supported media kind: `Movies`, `Shows`, `Music Videos` and `Other Videos`. +ErsatzTV provides four local libraries by default, one for each supported media kind: `Movies`, `Shows`, `Music Videos`, `Other Videos` and `Songs`. Additional libraries can be added under `Media Sources` > `Local`. ### Add Media Items diff --git a/docs/user-guide/local-libraries.md b/docs/user-guide/local-libraries.md index c302bd8cf..7703c1193 100644 --- a/docs/user-guide/local-libraries.md +++ b/docs/user-guide/local-libraries.md @@ -126,3 +126,25 @@ Your other video library will then have two media items with the following metad 1. title: `1990 Car Commercial 1`, tags: `Commercials`, `1990`, `Cars` 2. title: `1992 Car Commercial 1`, tags: `Commercials`, `1992`, `Cars` + +## Songs + +### Folder Layout + +The `Songs` library has no folder requirements, but folders can be a useful source of metadata. + +### Songs Metadata + +Songs will have basic metadata pulled from embedded tags (artist, album, title). + +### Songs Fallback Metadata + +Songs will have a tag added to their metadata for every containing folder, including the top-level folder. As an example, consider adding a commercials folder with the following files: + +- `Rock\Awesome Band\Awesome Album\01 Track 1.flac` +- `Rock\Awesome Band\Better Album\05 Track 5.flac` + +Your other video library will then have two media items with the following metadata: + +1. title: `01 Track 1`, tags: `Rock`, `Awesome Band`, `Awesome Album` +2. title: `05 Track 5`, tags: `Rock`, `Awesome Band`, `Better Album` \ No newline at end of file diff --git a/docs/user-guide/search.md b/docs/user-guide/search.md index 03b79f84d..1cccabaa4 100644 --- a/docs/user-guide/search.md +++ b/docs/user-guide/search.md @@ -90,6 +90,17 @@ The following fields are available for searching other videos: - `minutes`: the rounded-up whole number duration of the video in minutes - `type`: Always `other_video` +### Songs + +The following fields are available for searching songs: + +- `title`: The song title, or the filename of the song (without extension) +- `album`: The song album +- `artist`: The song artist +- `tag`: All of the song's parent folders +- `minutes`: the rounded-up whole number duration of the song in minutes +- `type`: Always `song` + ## Special Search Fields - `released_inthelast`: For any media type that supports `release_date`, `released_inthelast` takes a number and a unit (days, weeks, months, years) and returns items released between the specified time ago and now