SimplyMe 1 Posted November 15, 2022 Share Posted November 15, 2022 Executing the task "RefreshInternetChannels" refreshes all channels. Is there a way to programatically refresh just a specific channel? I tried to fetch the channel using the library manager (as done in https://github.com/MediaBrowser/Emby/blob/1d7c2ab4bfebdae31f89fdaabd3b68782ccf495a/Emby.Server.Implementations/Channels/ChannelManager.cs#L283) var id = _libraryManager.GetNewItemId("Channel " + channel.Name, typeof(Channel)); var embyChannel = _libraryManager.GetItemById(id) as Channel; await embyChannel.RefreshMetadata(new MetadataRefreshOptions(_fileSystem) { ForceSave = true }, cancellationToken); Sadly its not working. Link to comment Share on other sites More sharing options...
Luke 37132 Posted November 15, 2022 Share Posted November 15, 2022 Hi, there is currently no way to do this, although it's not a bad idea to add. Link to comment Share on other sites More sharing options...
softworkz 3341 Posted November 16, 2022 Share Posted November 16, 2022 10 hours ago, SimplyMe said: Executing the task "RefreshInternetChannels" refreshes all channels. Is there a way to programatically refresh just a specific channel? I tried to fetch the channel using the library manager (as done in https://github.com/MediaBrowser/Emby/blob/1d7c2ab4bfebdae31f89fdaabd3b68782ccf495a/Emby.Server.Implementations/Channels/ChannelManager.cs#L283) var id = _libraryManager.GetNewItemId("Channel " + channel.Name, typeof(Channel)); var embyChannel = _libraryManager.GetItemById(id) as Channel; await embyChannel.RefreshMetadata(new MetadataRefreshOptions(_fileSystem) { ForceSave = true }, cancellationToken); Sadly its not working. The code above is for refreshing metadata.. To refresh channel content, you need to use IChannelManager.RefreshChannelContent You can even restrict the refresh to a certain top-level folder in a channel with the restrictTopLevelFolderId parameter. Link to comment Share on other sites More sharing options...
SimplyMe 1 Posted November 16, 2022 Author Share Posted November 16, 2022 Ah, perfect. Thanks for the hint. Was still on Emby.Server.Core 4.6.x, where this didn't existed... Now see it in 4.7.x Merci! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now