Cheesegeezer 3089 Posted January 21, 2023 Share Posted January 21, 2023 Hey guys, hope someone can help me but my channel plugin and channels aren't refreshing. I'm obviously trying to test and ensure things are working properly, however for the past hour now, nothing has been update. Here are the steps i've gone thru to try to force a refresh. Restart server. Refresh Channel in Sch Tasks run lib scan run meta scan clear cache folder in the programdata folder it's like they are stashed somewhere. do i need to vac the db? ChannelItemInfo favInfo = new ChannelItemInfo(); favInfo.FolderType = (ChannelFolderType.Container); favInfo.Name = "Not very happy"; favInfo.Type = ((ChannelItemType) 1); favInfo.MediaType = ChannelMediaType.Video; favInfo.ImageUrl = GetDefaultImages("Favourites"); list.Add(favInfo); Any advise would be very helpful. Running Beta 4.8.0.21 Logs are showing nothing except that my categories are working. Thanks in advance Link to comment Share on other sites More sharing options...
softworkz 3350 Posted January 21, 2023 Share Posted January 21, 2023 2 hours ago, Cheesegeezer said: Restart server. Refresh Channel in Sch Tasks run lib scan run meta scan clear cache folder in the programdata folder it's like they are stashed somewhere. do i need to vac the db? 1 and 2 is all that is needed. Did you debug, does the server request any data from your plugin? 1 Link to comment Share on other sites More sharing options...
Cheesegeezer 3089 Posted January 21, 2023 Author Share Posted January 21, 2023 21 minutes ago, softworkz said: 1 and 2 is all that is needed. Did you debug, does the server request any data from your plugin? Thanks Softy that’s what i thought. i was just creating categories at this time and haven’t wired up the requests yet for GetCategoryItems() yet. as it’s my first channel plugin.. im crawl walk at the moment trying to figure it out. do i need it to get channel items in order for the categories to populate. cheers bud Link to comment Share on other sites More sharing options...
softworkz 3350 Posted January 21, 2023 Share Posted January 21, 2023 1 hour ago, Cheesegeezer said: i was just creating categories at this time and haven’t wired up the requests yet for GetCategoryItems() yet. as it’s my first channel plugin.. im crawl walk at the moment trying to figure it out. do i need it to get channel items in order for the categories to populate. Which "category items", what do you want to achieve? Link to comment Share on other sites More sharing options...
Cheesegeezer 3089 Posted January 21, 2023 Author Share Posted January 21, 2023 Lets say, we have a category for History and favourites. Link to comment Share on other sites More sharing options...
softworkz 3350 Posted January 21, 2023 Share Posted January 21, 2023 1 hour ago, Cheesegeezer said: Lets say, we have a category for History and favourites. I have no idea what you're talking about.. Link to comment Share on other sites More sharing options...
Cheesegeezer 3089 Posted January 21, 2023 Author Share Posted January 21, 2023 9 minutes ago, softworkz said: I have no idea what you're talking about.. No worries, I guess you confirmed that my process is not incorrect. the only question is.. does the sever need to populate channels before it updates? I see IHasCacheKey is now obselete so thinking it should always be cached or when a change is noticed it forces update. I even set the ChannelInfoItem to ForeceUpdate = true and still nothing. Link to comment Share on other sites More sharing options...
chef 3750 Posted January 21, 2023 Share Posted January 21, 2023 (edited) Cheese create your channel items list, then run a refresh internet channels task. You should be good to go. Edited January 21, 2023 by chef 1 Link to comment Share on other sites More sharing options...
softworkz 3350 Posted January 21, 2023 Share Posted January 21, 2023 1 minute ago, Cheesegeezer said: No worries, I guess you confirmed that my process is not incorrect. Haha, I think I didn't say that... 2 minutes ago, Cheesegeezer said: does the sever need to populate channels before it updates? Before it updates what? You should be able to see the items even while Emby is still querying them from your plugin - if that's what you're asking. You need to properly set up IDs for the items. The IDs need to remain constant for the same item. The most important method of your channel if GetChannelItems(). You can't do what you want there - you need to obey to what the server is requesting, like here: public async Task<ChannelItemResult> GetChannelItems(InternalChannelItemQuery query, CancellationToken cancellationToken) { if (query.FolderId == null) { return await this.GetRootFolders(cancellationToken).ConfigureAwait(false); } return await this.GetStreamItems(query, cancellationToken).ConfigureAwait(false); } The first call by the server is asking for root items (not necessarily folders like above) - in that case, the FolderId is null. For all folders that you return, Emby will call back later and ask you for the children of that folder (specified in the query). Then you must only return direct children of that older, etc. 1 Link to comment Share on other sites More sharing options...
softworkz 3350 Posted January 22, 2023 Share Posted January 22, 2023 I have created an example channel plugin for you: 1 Link to comment Share on other sites More sharing options...
Cheesegeezer 3089 Posted January 22, 2023 Author Share Posted January 22, 2023 52 minutes ago, softworkz said: I have created an example channel plugin for you: Wowzers, thanks fella, I’ll take a look tomorrow. Cheers 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