Jump to content

RefreshInternetChannels for one specific channel only?


Recommended Posts

Posted

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. 

Posted

Hi, there is currently no way to do this, although it's not a bad idea to add.

Posted
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.

Posted

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!

  • Thanks 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...