Introducing WMC mini-mods

Discussion of getting WMC to work on Windows 11 (unsupported)
Space

Posts: 2841
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#61

Post by Space » Mon Mar 04, 2024 6:27 am

I'm wondering if there is anything that can be done with the "enhanced conflict resolution" feature that was first introduced in Windows Vista Media Center...
Explanation:
https://web.archive.org/web/20191229043 ... a/2007/03/

This feature is meant for when two scheduled recording overlap by 5 minutes or less and there is no other free tuner... It records the earlier recording in full, and then after it is over, starts recording the second program on the same tuner. If the first program ended at 8:05pm and the second one started at 8:00pm, then the recording of the second program would start at 8:05pm and you would miss the first 5 minutes.

This feature has bit me a few times before I noticed it was happening and made recording schedule adjustments to prevent it. A 10-minute hard post-padding on the earlier program prevents this from occurring, however that means the second program will go in to conflict and will not record unless you make adjustments (if possible) such as scheduling the first show to record at a different time, or perhaps freeing up another tuner by re-prioritizing the recordings.

I've always wanted to have a way of turning this feature off, as I would usually rather have a conflict reported instead of it silently missing the first 5 minutes of a recording.

User avatar
IT Troll

Posts: 1193
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#62

Post by IT Troll » Mon Mar 04, 2024 9:17 am

Kevin Chalet wrote: Sun Mar 03, 2024 6:13 pm When I said the hard padding must always be less than the soft one, it's not because it'll lead to incorrect results but simply because it makes no sense in practice: the soft padding value will never be used :mrgreen:
Ah thanks, that clarifies things. In my case I don't care about the soft padding. I just want the 10 minute hard post padding which is the magic setting to ensure separate tuners are used for adjacent recordings.
Last edited by IT Troll on Mon Mar 04, 2024 9:42 am, edited 1 time in total.
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1

User avatar
IT Troll

Posts: 1193
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#63

Post by IT Troll » Mon Mar 04, 2024 9:41 am

Space wrote: Mon Mar 04, 2024 6:27 am I've always wanted to have a way of turning this feature off, as I would usually rather have a conflict reported instead of it silently missing the first 5 minutes of a recording.
Doesn't the 10 minutes hard post padding effectively give you this? Especially as we can now set that as the default for all recordings.
The only issue is you may get a few more conflicts for programmes that fall within the 10 minute padding when tuners are busy. But dealing with these fringe cases is probably better than missing portions of your recording.

Having said that, perhaps if "enhanced conflict resolution" can be disabled, then the 5 minutes hard padding setting will then work in the same way that 10 minutes does... :think:
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1

Space

Posts: 2841
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#64

Post by Space » Tue Mar 05, 2024 9:40 am

IT Troll wrote: Mon Mar 04, 2024 9:41 am
Space wrote: Mon Mar 04, 2024 6:27 am I've always wanted to have a way of turning this feature off, as I would usually rather have a conflict reported instead of it silently missing the first 5 minutes of a recording.
Doesn't the 10 minutes hard post padding effectively give you this? Especially as we can now set that as the default for all recordings.
The only issue is you may get a few more conflicts for programmes that fall within the 10 minute padding when tuners are busy. But dealing with these fringe cases is probably better than missing portions of your recording.

Having said that, perhaps if "enhanced conflict resolution" can be disabled, then the 5 minutes hard padding setting will then work in the same way that 10 minutes does... :think:
Yes, 10 minute post-padding would defeat the "enhanced conflict resolution" feature, however having 10 minute hard post-padding on every recording just in case the schedule changes causing two programs to overlap would be problematic, as it would result in many program conflicts if you record a lot of shows, say, during prime-time. I have three tuners and I know that I would have several unresolvable conflicts if I were to add 10 minutes hard padding to everything.

Fortunately, the networks seem to have gotten over their need to end programs a minute or two after the hour (for the most part), but back when it was in full-force, I would get a lot more shows missing anywhere from 1 to 5 minutes of the start of the show due to having many back to back programs recording on different channels.

One thing I noticed is that if two shows overlapped by 5 minutes or less, and there was no other free tuner, WMC would schedule them to record on the same tuner (which if it remained that way, would result in the later program missing the first X minutes), however, in real time, when it is time for the second program to start, if WMC is able to determine that there is another, later airing of that episode that it would be able to record without a conflict, it will abort the recording of the overlaped airing, and instead schedule the second airing to record instead. I'm not sure why it was done this way (instead of just scheduling that second airing to record from the start).

Kevin Chalet

Posts: 147
Joined: Mon Oct 08, 2018 12:00 pm
Location:

HTPC Specs: Show details

#65

Post by Kevin Chalet » Tue Mar 05, 2024 2:20 pm

Space wrote: Mon Mar 04, 2024 6:27 am This feature is meant for when two scheduled recording overlap by 5 minutes or less and there is no other free tuner... It records the earlier recording in full, and then after it is over, starts recording the second program on the same tuner. If the first program ended at 8:05pm and the second one started at 8:00pm, then the recording of the second program would start at 8:05pm and you would miss the first 5 minutes.
Interesting. I don't think I've ever seen it in action (even when I was using a dual-tuner-only Sony PlayTV back in 2009 :mrgreen:).

Edit: I think I found it: it seems that feature can already be tweaked using two undocumented registry values under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\Recording:
  • OverlapThresholdPercent, that is internally referred to as the "overlap allowance ratio". It defaults to 20% if the registry value doesn't exist (which is the case by default).
  • OverlapThreshold, that is internally referred to as the "overlap allowance duration". It defaults to 5 minutes if the registry value doesn't exist (which is also the case by default) and is represented as a .NET TimeSpan. It must be stored as a positive number of ticks (TicksPerMinute = 600000000).
Adding a REG_DWORD OverlapThresholdPercent or a REG_QWORD OverlapThreshold with a value of 0 under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\Recording should be enough to disable this feature 8-)

Edit 2: hum, setting one of the two registry hooks might not be enough as WMC seems to have a hardcoded minimal overlap of 100 seconds that is used if the computed overlap (based on the radio and the duration entries) is less than that value:

Code: Select all

internal void GetTimes(ScheduleEntry scheduleEntry, out DateTime contentStartTime, out DateTime contentEndTime, out DateTime requiredStartTime, out DateTime requiredEndTime, out DateTime requestedStartTime, out DateTime requestedEndTime)
{
	if (scheduleEntry == null)
	{
		throw new ArgumentNullException("scheduleEntry");
	}
	contentStartTime = scheduleEntry.StartTime;
	contentEndTime = scheduleEntry.EndTime;
	requiredStartTime = contentStartTime - PrePaddingRequired;
	requiredEndTime = contentEndTime + PostPaddingRequired;
	requestedStartTime = requiredStartTime - PrePaddingRequested;
	if (requestedStartTime > requiredStartTime)
	{
		requestedStartTime = requiredStartTime;
	}
	requestedEndTime = requiredEndTime + PostPaddingRequested;
	if (requestedEndTime < requiredEndTime)
	{
		requestedEndTime = requiredEndTime;
	}
	TimeSpan timeSpan = TimeSpan.FromSeconds((requiredEndTime - requiredStartTime).TotalSeconds * OverlapAllowanceRatio);
	if (timeSpan > OverlapAllowanceDuration)
	{
		timeSpan = OverlapAllowanceDuration;
	}
	DateTime dateTime = Min(requiredStartTime + Max(timeSpan, TimeSpan.FromSeconds(100.0)), requiredEndTime - TimeSpan.FromSeconds(60.0));
	if (PrototypicalScheduleEntry != null && scheduleEntry != null && PrototypicalScheduleEntry.Id == scheduleEntry.Id && dateTime < CreationTime)
	{
		dateTime = CreationTime;
	}
	requiredStartTime = dateTime;
}
Space> when you have a moment, please try setting one of these registry hooks to 0 to see what it does. If we can confirm it does indeed enforce a minimal overlap, I'll consider patching it :P

User avatar
IT Troll

Posts: 1193
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#66

Post by IT Troll » Tue Mar 05, 2024 10:33 pm

Space wrote: Tue Mar 05, 2024 9:40 am however having 10 minute hard post-padding on every recording just in case the schedule changes causing two programs to overlap would be problematic, as it would result in many program conflicts if you record a lot of shows, say, during prime-time. I have three tuners and I know that I would have several unresolvable conflicts if I were to add 10 minutes hard padding to everything.
In the UK, evening schedules often run late (mostly due to earlier news/sports events). So extra post padding is essential. The trouble is, you don't then want the start of a following recording to be missing (but at the end previous recording) if it was on time. So the only solution is the hard 10 minute post padding to force the use of a separate tuner for each. I have a quad tuner and only a handful of channels I record from, so it is rare for all four to be in use simultaneously.
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1

Space

Posts: 2841
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#67

Post by Space » Wed Mar 06, 2024 1:02 am

Kevin Chalet wrote: Tue Mar 05, 2024 2:20 pm...
Space> when you have a moment, please try setting one of these registry hooks to 0 to see what it does. If we can confirm it does indeed enforce a minimal overlap, I'll consider patching it :P
I suspected that there might be a way to disable this feature without any hacking... good to see that that might be the case.

I will have to find two show airings in the guide that overlap by 5 mins or less and then make all the other tuners busy by scheduling other higher-priority shows at the same time. I will them make sure it schedules both overlapping show airings to record. I will then make the registry change and see if the second airing shows up as a conflict instead of scheduled to record...

I'm not sure when I will get a chance to do this, but one question... what do I have to do, after making the registry changes, to get them to take effect? Do they work immediately or do I have to stop/start one of the services?

EDIT: If the minimal overlap is 100 seconds, then does that mean setting the registry value to 0 should disable this feature for any overlap that is 2 to 5 minutes, but not for 1 minute overlaps?

Kevin Chalet

Posts: 147
Joined: Mon Oct 08, 2018 12:00 pm
Location:

HTPC Specs: Show details

#68

Post by Kevin Chalet » Wed Mar 06, 2024 1:52 am

Space wrote: Wed Mar 06, 2024 1:02 am I'm not sure when I will get a chance to do this, but one question... what do I have to do, after making the registry changes, to get them to take effect? Do they work immediately or do I have to stop/start one of the services?
It shouldn't be needed, but just to be sure, you can restart the ehsched service.
Space wrote: Wed Mar 06, 2024 1:02 am EDIT: If the minimal overlap is 100 seconds, then does that mean setting the registry value to 0 should disable this feature for any overlap that is 2 to 5 minutes, but not for 1 minute overlaps?
Yes. At least, that's my theory. We'll know for sure once you have a chance to test it :mrgreen:

Kevin Chalet

Posts: 147
Joined: Mon Oct 08, 2018 12:00 pm
Location:

HTPC Specs: Show details

#69

Post by Kevin Chalet » Wed Mar 06, 2024 2:08 am

New 2.5.0 release:

ehshell.dll patches:

Option to remove the delete action for TV recordings pointing to read-only files:

(finding what to patch for this one wasn't an easy task!)

Like other users here, I store all my recordings on a Windows Server machine (using the fantastic StableBit DrivePool software!), but the share containing the TV recordings is read-only for security reasons (it reduces the chances of seeing a malware remotely deleting or altering them and avoids accidental deletions from other users :mrgreen:)

Unfortunately, while WMC is smart enough to display an error message indicating that a recording is read-only when trying to delete it, it still shows the "delete" action in both the contextual menu and the recording details panel, which sucks :lol:

WMC mini-mods 2.5.0 fixes that by introducing a new DisableDeleteActionForReadOnlyRecordings hook that "removes" the delete action if the file associated with a recording is marked as read-only:
WMC 1.png
WMC 2.png

Code: Select all

using System;
using System.Collections;
using MediaCenter.Tasks;
using MediaCenter.Video;
using Microsoft.MediaCenter.Guide;
using Microsoft.MediaCenter.Hosting.Infrastructure;
using Microsoft.MediaCenter.Playback;
using Microsoft.MediaCenter.Pvr;
using Microsoft.MediaCenter.UI;
using Microsoft.MediaCenter.UI.Drawing;
using Microsoft.Win32;
using ServiceBus.UIFramework;

namespace MediaCenter.Movies
{
    // Token: 0x02000655 RID: 1621
    internal sealed partial class RecordedTVMovieDataItem : TVMovieDataItem, IMovieGalleryData
    {
        // Token: 0x0600386B RID: 14443 RVA: 0x0010F2C8 File Offset: 0x0010D4C8
        protected override MovieActions GetSupportedMediaActions()
        {
            MovieActions movieActions = MovieActions.None;
            if (!this.DvrMediaItem.IsLocal)
            {
                movieActions |= MovieActions.CopyLocally;
            }
            else if (this.IsRecorded)
            {
                using var key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Media Center\\MiniMods");
                if (key is not null && key.GetValue("DisableDeleteActionForReadOnlyRecordings") is 1)
                {
                    if (string.IsNullOrEmpty(Recording?.FileName) || Library.CanDelete(Recording.FileName))
                    {
                        movieActions |= MovieActions.Delete;
                    }
                }
                else
                {
                    movieActions |= MovieActions.Delete;
                }
                if (BurnTask.Enabled())
                {
                    movieActions |= MovieActions.Burn;
                }
            }
            IList list = UCPUtility.MWTEntryPoints(ExtensibilityUtility.MWTContext.TV, true);
            if (UCPUtility.IsValid(list))
            {
                movieActions |= MovieActions.MoreWithThis;
            }
            return movieActions;
        }
    }
}

Code: Select all

using System;
using System.Collections;
using System.Collections.Generic;
using Microsoft.MediaCenter.Guide;
using Microsoft.MediaCenter.Hosting.Infrastructure;
using Microsoft.MediaCenter.Library;
using Microsoft.MediaCenter.Pvr;
using Microsoft.MediaCenter.Store;
using Microsoft.Win32;
using ServiceBus.UIFramework;

namespace Microsoft.MediaCenter.Playback
{
    // Token: 0x02000832 RID: 2098
    internal abstract partial class DvrMediaItem : BroadcastMediaItem
    {
        // Token: 0x170011F9 RID: 4601
        // (get) Token: 0x06004880 RID: 18560 RVA: 0x001470B4 File Offset: 0x001452B4
        public override IList ContextMenuItemIDs
        {
            get
            {
                IList contextMenuItemIDs = base.ContextMenuItemIDs;
                RequestedProgram requestedProgram = this.RequestedProgram;
                if (this.IsPlayable)
                {
                    contextMenuItemIDs.Add(ContextMenuID.Play);
                    if (this.IsRecording)
                    {
                        contextMenuItemIDs.Add(ContextMenuID.StopRecord);
                    }
                    else
                    {
                        using var key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Media Center\\MiniMods");
                        if (key is not null && key.GetValue("DisableDeleteActionForReadOnlyRecordings") is 1)
                        {
                            if (string.IsNullOrEmpty(Recording?.FileName) || Pvr.Library.CanDelete(Recording.FileName))
                            {
                                contextMenuItemIDs.Add(ContextMenuID.Delete);
                            }
                        }
                        else
                        {
                            contextMenuItemIDs.Add(ContextMenuID.Delete);
                        }

                        contextMenuItemIDs.Add(ContextMenuID.Burn);
                    }
                    IList list = UCPUtility.MWTEntryPoints(ExtensibilityUtility.MWTContext.TV, true);
                    if (UCPUtility.IsValid(list))
                    {
                        contextMenuItemIDs.Add(ContextMenuID.MoreWithThis);
                    }
                }
                else if (requestedProgram != null)
                {
                    return this.RequestedProgramContextMenuItemIDs;
                }
                return contextMenuItemIDs;
            }
        }
    }
}

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\MiniMods]
"DisableDeleteActionForReadOnlyRecordings"=dword:00000001

Attachments
WMC mini-mods 2.5.0.zip
(3.43 MiB) Downloaded 61 times

User avatar
IT Troll

Posts: 1193
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#70

Post by IT Troll » Wed Mar 06, 2024 10:10 pm

Another mod suggestion for you to consider. Something I have delved into in the past is the album art mosaic waterfall animation that displays in the background when you play music. Even when you have thousands of albums you will often see the same artwork being displayed and usually repeated several times on the screen in different locations.

WMCMosaic.jpg

There are a couple of registry settings that are meant to control the minimum and maximum artwork with default values of 6 and 1000.

Code: Select all

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\Audio]
"mosaicMinAlbumsRequired"=dword:00000006
"mosaicMaxAlbumsToFind"=dword:000003e8
However, I found these seem to have little effect. Except that if you set the Min to 40 (decimal) or above the animation would not be displayed at all. A Min value of 20 does seem to improve randomisation a little, but repeats are still common. I wonder if there are some hard coded values at play that could be modified. Or perhaps it is selecting art from individual tracks rather than once per album?
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1

Kevin Chalet

Posts: 147
Joined: Mon Oct 08, 2018 12:00 pm
Location:

HTPC Specs: Show details

#71

Post by Kevin Chalet » Thu Mar 07, 2024 2:38 pm

IT Troll wrote: Wed Mar 06, 2024 10:10 pm Another mod suggestion for you to consider. Something I have delved into in the past is the album art mosaic waterfall animation that displays in the background when you play music. Even when you have thousands of albums you will often see the same artwork being displayed and usually repeated several times on the screen in different locations.
It's something I've noticed too, but the random selection algorithm doesn't seem to be flawed. Most of the magic behind this cool feature happens in ALBUMARTBACKGROUND.XML, that relies on a backing C# AlbumArtBackground class that is responsible for searching the album covers.

The random selection is implemented as a C# property that returns the index of an element in the "already scanned covers" collection each time it's called by ALBUMARTBACKGROUND.XML:

Code: Select all

public int RandomAlbumCoverIndex
{
    get
    {
        if (_albumCovers == null)
        {
            return 0;
        }
        int num = 0;
        do
        {
            num = _random.Next(0, AlbumCovers.Count);
        }
        while (num == _currentAlbumArtIndex && AlbumCovers.Count > 5);
        _currentAlbumArtIndex = num;
        return num;
    }
}
IT Troll wrote: Wed Mar 06, 2024 10:10 pm A Min value of 20 does seem to improve randomisation a little, but repeats are still common. I wonder if there are some hard coded values at play that could be modified.
AFAICT, there's no hardcoded magic involved, except when there is fewer album covers than the value set via mosaicMinAlbumsRequired (this hook doesn't have any influence on the selection algorithm, it just defines the threshold below which the default covers will be loaded).

One thing I've noticed: the selection is very poorly randomized when it's generated for the first time (most likely because the scanning process didn't have enough time to collect enough covers) but it improves over time.
Tweaking the TimerForInitialization property in ALBUMARTBACKGROUND.XML to give it more time (10secs instead of just 1) seems to help a lot in my case:

Code: Select all

<Timer Name="TimerForInitialization" Interval="10000" Enabled="true" AutoRepeat="true"/>

Kevin Chalet

Posts: 147
Joined: Mon Oct 08, 2018 12:00 pm
Location:

HTPC Specs: Show details

#72

Post by Kevin Chalet » Thu Mar 07, 2024 3:45 pm

Since we're mentioning the album art background... :mrgreen:

New 2.6.0 release:

ehshell.dll patches:

Option to control the size of the album art background covers:

WMC doesn't use the the album covers as-is to generate the nice-looking album art background: instead, it resizes them to 124x124 images, which results in images that are a bit blurry, even on Full HD displays.
WMC mini-mods 2.6.0 addresses that by introducing a new AlbumArtBackgroundCoverSize hook that allows overriding the hardcoded 124x124 size:

Code: Select all

using System;
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using MediaCenter.Photos;
using Microsoft.MediaCenter.UI;
using Microsoft.Win32;
using ServiceBus.UIFramework;

namespace MediaCenter.Audio
{
    // Token: 0x02000096 RID: 150
    internal sealed partial class AlbumArtBackground : ModelItem
    {
        // Token: 0x060007FD RID: 2045 RVA: 0x00072F60 File Offset: 0x00071160
        private void GetItem(VirtualList list, int index, ItemRequestCallback callBack)
        {
            if (!AlbumArtBackground.HasInstance || this._albumCovers == null || index < 0 || this._albumCoverPaths == null || index >= this._albumCoverPaths.Count)
            {
                return;
            }
            try
            {
                using var key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Media Center\\MiniMods");
                if (key is null || key.GetValue("AlbumArtBackgroundCoverSize") is not int size)
                {
                    size = 124;
                }

                if (this._albumCoverPaths[index] != null)
                {
                    Microsoft.MediaCenter.UI.Image image = new Microsoft.MediaCenter.UI.Image(this._albumCoverPaths[index], new ImageRequirements(new Size(size, size)));
                    AlbumArtItem albumArtItem = new AlbumArtItem(this._albumCovers, this._albumCoverPaths[index], image);
                    callBack(list, index, albumArtItem);
                    return;
                }
            }
            catch (Exception)
            {
            }
            List<string> albumCoverPaths = this._albumCoverPaths;
        }
    }
}
Here's the incredible result with a x2 size (i.e 248 instead of 124):
WMC.png

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\MiniMods]
"AlbumArtBackgroundCoverSize"=dword:000000f8

Attachments
WMC mini-mods 2.6.0.zip
(3.43 MiB) Downloaded 70 times

User avatar
IT Troll

Posts: 1193
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#73

Post by IT Troll » Thu Mar 07, 2024 11:02 pm

Thanks for the new art quality mod, I’ll be sure to give that a go.

I note you still have quite a few duplicates, including three Norahs. I think ideally the search routine needs to remove duplicates from scanned artwork list based on album name or folder path.
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1

Kevin Chalet

Posts: 147
Joined: Mon Oct 08, 2018 12:00 pm
Location:

HTPC Specs: Show details

#74

Post by Kevin Chalet » Thu Mar 07, 2024 11:26 pm

IT Troll wrote: Thu Mar 07, 2024 11:02 pm I note you still have quite a few duplicates, including three Norahs. I think ideally the search routine needs to remove duplicates from scanned artwork list based on album name or folder path.
I don't think there are duplicate entries in the search list but I'll debug it to be sure.
I only have 144 albums and there are 7 x 11 = 77 covers on the screenshot, so it's not unreasonable to see a few duplicates.

If we wanted to avoid duplicates, we'd need to completely rework the AlbumArtBackground class and the corresponding XML file. Sadly, I'm not familiar enough with WMC's template system for that... it's a quite complex beast :cry:

User avatar
IT Troll

Posts: 1193
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#75

Post by IT Troll » Fri Mar 08, 2024 10:49 am

I have 1300 albums so the chances of getting a duplicate from a random search should be much lower. System and data drives are all SSD so speed shouldn't be a factor.
So either the search logic is flawed, or it only grabs a limited number of images at a time and then intentionally reuses them when constructing the mosaic grid. Anyway, don't spend a lot of time on this, it is only a minor cosmetic thing. The enhanced quality is already an improvement.
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1

Kevin Chalet

Posts: 147
Joined: Mon Oct 08, 2018 12:00 pm
Location:

HTPC Specs: Show details

#76

Post by Kevin Chalet » Tue Mar 12, 2024 7:25 pm

IT Troll wrote: Fri Mar 08, 2024 10:49 am The enhanced quality is already an improvement.
Speaking of enhanced quality...

New 2.7.0 release:

ehshell.dll patches:

Option to control the size of the album covers in the CD gallery:

This mini-mod is very similar to the one introduced in 2.6.0 but affects the size of the covers visible in the gallery, which is hardcoded by WMC to 150x150:

Code: Select all

using System;
using System.Collections.Generic;
using EHMedia;
using MediaCenter.XPShared;
using Microsoft.MediaCenter.Hosting.Infrastructure;
using Microsoft.MediaCenter.Shell;
using Microsoft.MediaCenter.UI;
using Microsoft.Win32;
using ServiceBus.UIFramework;

namespace MediaCenter.Audio
{
    // Token: 0x020000A0 RID: 160
    internal abstract partial class AlbumGalleryDataBase : MusicGalleryData, IUpdateThumbnailItem, IUpdateItem, IThumbnailCommand, ICommand, IAlbumMarkup, IModelItem, IPropertyObject, IModelItemOwner
    {
        // Token: 0x06000887 RID: 2183 RVA: 0x00074080 File Offset: 0x00072280
        private void CreateImage()
        {
            using var key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Media Center\\MiniMods");
            if (key is null || key.GetValue("AlbumGalleryCoverSize") is not int size)
            {
                size = 150;
            }

            ImageRequirements imageRequirements = new ImageRequirements();
            imageRequirements.sizeMaximumPxl = new Size(size, size);
            imageRequirements.nMask = ImageRequirements.Fields.MaximumSize;
            this._tmpImage = new Microsoft.MediaCenter.UI.Image(this.AlbumCoverUrl, imageRequirements);
            this._tmpImage.AcquireComplete += this.OnImageAcquireComplete;
            if (!this._tmpImage.Acquire())
            {
                this.OnImageAcquireComplete();
            }
        }
    }
}

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\MiniMods]
"AlbumGalleryCoverSize"=dword:0000012c

Attachments
WMC mini-mods 2.7.0.zip
(3.43 MiB) Downloaded 67 times

User avatar
IT Troll

Posts: 1193
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#77

Post by IT Troll » Tue Mar 12, 2024 10:41 pm

Kevin Chalet wrote: Tue Mar 12, 2024 7:25 pm This mini-mod is very similar to the one introduced in 2.6.0 but affects the size of the covers visible in the gallery, which is hardcoded by WMC to 150x150:
Interesting. So to be clear, both settings apply to the mosaic background? This one changes the rendered size of the image, whilst the previous setting changes the resolution of the image.
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1

Kevin Chalet

Posts: 147
Joined: Mon Oct 08, 2018 12:00 pm
Location:

HTPC Specs: Show details

#78

Post by Kevin Chalet » Wed Mar 13, 2024 12:37 am

IT Troll wrote: Tue Mar 12, 2024 10:41 pm Interesting. So to be clear, both settings apply to the mosaic background? This one changes the rendered size of the image, whilst the previous setting changes the resolution of the image.
Ah no, by "gallery", I meant this view:
WMC.png
Just like the album art background, CD covers shown on that page are a bit blurry even on a Full HD screen. Doubling the size (i.e 300 instead of 150) makes this gallery so gorgeous :mrgreen:

User avatar
IT Troll

Posts: 1193
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#79

Post by IT Troll » Wed Mar 13, 2024 9:18 pm

Kevin Chalet wrote: Wed Mar 13, 2024 12:37 am Ah no, by "gallery", I meant this view:
Ah excellent! Another great enhancement. :thumbup:
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1

Engineer

Posts: 10
Joined: Sat Oct 03, 2015 1:46 am
Location:

HTPC Specs: Show details

#80

Post by Engineer » Sat Mar 16, 2024 5:26 pm

Kevin;

Something that has bugged me for years:

The individual program information that is briefly display when switching live TV channels is too short - it often cuts off/fades away program information. Additionally, the network name under the channel number is also too short for some networks. It looks to me that fade out length does not even make it to halfway across the available screen area. Is it possible to individually lengthen these two areas?

Thank you,
Will

Post Reply