Jump to content

Advice please - Channel plugin not refreshing


Cheesegeezer

Recommended Posts

Cheesegeezer

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.

  1. Restart server.
  2. Refresh Channel in Sch Tasks
  3. run lib scan
  4. run meta scan
  5. 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

2 hours ago, Cheesegeezer said:
  1. Restart server.
  2. Refresh Channel in Sch Tasks
  3. run lib scan
  4. run meta scan
  5. 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?

  • Thanks 1
Link to comment
Share on other sites

Cheesegeezer
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

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

Cheesegeezer

Lets say, we have a category for History and favourites. 

Link to comment
Share on other sites

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

Cheesegeezer
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

Cheese create your channel items list, then run a refresh internet channels task. You should be good to go. 

Edited by chef
  • Thanks 1
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

Cheesegeezer
52 minutes ago, softworkz said:

I have created an example channel plugin for you: 

 

Wowzers, thanks fella, I’ll take a look tomorrow.  Cheers 👍👍

  • Like 1
Link to comment
Share on other sites

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