Jump to content

Trakt Plugin, Channels From List, Simplification


bakes82

Recommended Posts

bakes82

Using the "Trakt" plugin that already exists I was able to make a Channel of Emby content from a user list.  But I'm looking to simplify it or maybe @chef you can simplify it down for me now that I have it working.  I think the best solution would be 1 channel per list with distinct job/plugin name.

From what I can see I cant make a channel dynamically so ideally I would need to simplify the work down to template.
Trakt has many lists you can look here:
https://trakt.tv/search/lists

In the code Im using this one: https://trakt.tv/users/movistapp/lists/horror

In the Trakt API I made a new method and a new Match helper.

var listData = await TraktApi.GetTraktUserListItems(adminUserTraktUser, "movistapp", "horror", new CancellationToken());

The two values could be set in a config to make life easy and so people dont need to modify too much code, just set the two fields in a config class.

The one issue with Trakt plugin currently is that its setup per user, this doesnt need multi users, I just needs 1, so in the channel I have it filtering down the the Administrator, again if the config page could just store the PIN and do the rest of the magic would be wonderful, or can it pull the config from trakt and pick any users that has be setup, there is nothing user specific, I dont even know if it requires auth, but I didnt want to refactor the trak api yet.

One thing I didnt see was the ability to purge a channel before recreation, maybe that can be a toggle in the options, otherwise I would clear it every time it refreshes.

Code is published here, it will generate a library called AppleTV and it will pull the items if they exist in your collection and match whats on the list I referenced above:

https://github.com/bakes82/Trakt

unknown.png?width=573&height=406

unknown.png?width=541&height=406

 

 

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