Jump to content

Test - Trakt List To Collections


Recommended Posts

Posted
4 minutes ago, bakes82 said:

I didn’t need either of those setting and mine worked fine. I’m already filtering the data down to a a specific parentId so not sure what the type is doing for me since the parentid would be restricted on most cases, also you don’t use recursive when looking for series so …... Why would I use the include type when there is movie flag?  What’s the difference. So the sdk logic is very much broken and not intuitive and you guys don’t provide any guides and allow systems to differ from version to version/system to system which then cause the api to function completely differently then you claim.  For a commercial product the sdk is horrible, signatures on methods differ from one call to another. Some services have a get method or create then others don’t, it’s just wild.  There honestly just needs to better simplified CRUD type methods, it could even just be a helper nuget that maybe is open sourced so people could PR some commonly used method like GetMovies, GetSeries, GetCollection, GetLibraries. This way they are just abstractions but can easily be referenced across multiple projects.

There could be other things in the library based on all of the features that the server supports. That's why specifying the type is best.

bakes82
Posted

 @shorty1483 @rbjtech @zerodayz

Refactored code and added option to not delete on recreation (it will add extra processing, but it should keep the collectionId the same for permissions and custom images - it should still remove all items and readd though) Progress bar should update on the schedule task as it loops the collections as well.

Emby.TraktListCollections.dll

  • Thanks 1
rbjtech
Posted
3 hours ago, bakes82 said:

 @shorty1483 @rbjtech @zerodayz

Refactored code and added option to not delete on recreation (it will add extra processing, but it should keep the collectionId the same for permissions and custom images - it should still remove all items and readd though) Progress bar should update on the schedule task as it loops the collections as well.

Emby.TraktListCollections.dll 136 kB · 1 download

New version working well.    Thanks for the updates.  I'll also try MDB later as well.

image.png.cd0e56cce204c83bccdcf35f672901fb.png

rbjtech
Posted

Also - while not strictly related to this plugin but as we have eyes on it - why can I only show a collection by 'Collection Order' but not actually show what that collection order is on the items ?

As an example - 

Screenshot2024-07-07083755.png.8dabab2740ee020bcab875f5795de60e.png

Can emby not add the field underneath that was used to order the collection  ?   

  • Like 1
sh0rty
Posted
4 hours ago, rbjtech said:

Also - while not strictly related to this plugin but as we have eyes on it - why can I only show a collection by 'Collection Order' but not actually show what that collection order is on the items ?

As an example - 

 

Can emby not add the field underneath that was used to order the collection  ?   

I asked a similar question here, since e.g. for a Collection like IMDb250, the IMDb Rating as collection order would not exactly fit the right order, but it would be close to it.
But your question is better since it would reflect the order exactly.

 

bakes82
Posted
9 hours ago, rbjtech said:

Also - while not strictly related to this plugin but as we have eyes on it - why can I only show a collection by 'Collection Order' but not actually show what that collection order is on the items ?

As an example - 

Screenshot2024-07-07083755.png.8dabab2740ee020bcab875f5795de60e.png

Can emby not add the field underneath that was used to order the collection  ?   

Pretty sure I asked this else where and it’s one of those who even know what the option means. To me collection order means the order they were added to the collection or an order number on the item. I don’t believe that’s what it actually does.  But I believe I process the lists in the order on the lists.  Trakt has a rank field so I order by that and add the found items in that order. Now what emby chooses to do after the fact is beyond me.  I believe plex honors the order added to list so can do some custom sorting before adding it to the list.

  • Like 1
Happy2Play
Posted
17 minutes ago, bakes82 said:

To me collection order means the order they were added to the collection or an order number on the item. I don’t believe that’s what it actually does

For Emby it is the metadata Display order value so Release date or Sort Title.  So pretty much the same as Title or Year.

  • Like 1
sh0rty
Posted (edited)
12 hours ago, Happy2Play said:

For Emby it is the metadata Display order value so Release date or Sort Title.  So pretty much the same as Title or Year.

As i said in the other thread to Luke, I could live with an extra option to sort by IMDb Rating like in the movie or TV Show section. This would not be 100% accurate, but better than the status quo.

Edited by shorty1483
rbjtech
Posted

I get what it's sorting by - but it doesn't display the sort order in the items - so it's all but useless.    So in my example it's IMDB rating - but it doesn't display 10 as the best and 1 as the worst - so you are clueless on what the rating actually is until you click on the item...

Posted (edited)

@bakes82

I have one collection that doesn't seem to work when "Do not delete Collection" is activated. Tried the same list with the mdblist plugin since the list is also available there, and I got the same error. Any clue?

https://trakt.tv/users/robflate/lists/metacritic-all-time-90?sort=rank,asc

2024-07-14 16:25:01.808 Info TraktListCollectionsCreateCollectionsTask: CollectionId: 0
2024-07-14 16:25:01.809 Error TraktListCollectionsCreateCollectionsTask: Error on collection - Metacritic: 90plus -
	*** Error Report ***
	Version: 4.8.8.0
	Command line: C:\Users\blingbling\AppData\Roaming\Emby-Server\system\EmbyServer.dll -service
	Operating system: Microsoft Windows 10.0.22631
	Framework: .NET 6.0.30
	OS/Process: x64/x64
	Runtime: C:/Users/blingbling/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
	Processor count: 12
	Data path: C:\Users\blingbling\AppData\Roaming\Emby-Server\programdata
	Application path: C:\Users\blingbling\AppData\Roaming\Emby-Server\system
	System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
	   at Emby.TraktListCollections.ScheduledTasks.CreateCollectionsTask.DeleteCollectionItems(TraktCollectionEO collection)
	   at Emby.TraktListCollections.ScheduledTasks.CreateCollectionsTask.ProcessCollection(TraktCollectionEO collection, PluginUIOptions pluginUiOptions, TraktApi traktApi, User adminUser)
	   at Emby.TraktListCollections.ScheduledTasks.CreateCollectionsTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
	Source: Emby.TraktListCollections
	TargetSite: Void DeleteCollectionItems(Emby.TraktListCollections.Models.TraktCollectionEO)

The CollectionId: 0 seems to be suspicious to me, since the Collection ID is 427734, when I create it with "Do not delete Collection" turned off.

Config json:

"CollectionName": "- Metacritic: 90plus -",
            "ListUri": "https://trakt.tv/users/robflate/lists/metacritic-all-time-90?sort=rank,asc",
            "ListMediaType": "Movie",
            "LibraryId": "3358",
            "DontDeleteOnRecreate": true,
            "CollectionId": 0,
            "Delete": {
...

So I changed 

"CollectionId": 0,

to 

"CollectionId": 427734,

and now it works flawlessly.

Edited by shorty1483
bakes82
Posted
3 hours ago, shorty1483 said:

@bakes82

I have one collection that doesn't seem to work when "Do not delete Collection" is activated. Tried the same list with the mdblist plugin since the list is also available there, and I got the same error. Any clue?

https://trakt.tv/users/robflate/lists/metacritic-all-time-90?sort=rank,asc

2024-07-14 16:25:01.808 Info TraktListCollectionsCreateCollectionsTask: CollectionId: 0
2024-07-14 16:25:01.809 Error TraktListCollectionsCreateCollectionsTask: Error on collection - Metacritic: 90plus -
	*** Error Report ***
	Version: 4.8.8.0
	Command line: C:\Users\blingbling\AppData\Roaming\Emby-Server\system\EmbyServer.dll -service
	Operating system: Microsoft Windows 10.0.22631
	Framework: .NET 6.0.30
	OS/Process: x64/x64
	Runtime: C:/Users/blingbling/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
	Processor count: 12
	Data path: C:\Users\blingbling\AppData\Roaming\Emby-Server\programdata
	Application path: C:\Users\blingbling\AppData\Roaming\Emby-Server\system
	System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
	   at Emby.TraktListCollections.ScheduledTasks.CreateCollectionsTask.DeleteCollectionItems(TraktCollectionEO collection)
	   at Emby.TraktListCollections.ScheduledTasks.CreateCollectionsTask.ProcessCollection(TraktCollectionEO collection, PluginUIOptions pluginUiOptions, TraktApi traktApi, User adminUser)
	   at Emby.TraktListCollections.ScheduledTasks.CreateCollectionsTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
	Source: Emby.TraktListCollections
	TargetSite: Void DeleteCollectionItems(Emby.TraktListCollections.Models.TraktCollectionEO)

The CollectionId: 0 seems to be suspicious to me, since the Collection ID is 427734, when I create it with "Do not delete Collection" turned off.

Config json:

"CollectionName": "- Metacritic: 90plus -",
            "ListUri": "https://trakt.tv/users/robflate/lists/metacritic-all-time-90?sort=rank,asc",
            "ListMediaType": "Movie",
            "LibraryId": "3358",
            "DontDeleteOnRecreate": true,
            "CollectionId": 0,
            "Delete": {
...

So I changed 

"CollectionId": 0,

to 

"CollectionId": 427734,

and now it works flawlessly.

Did you run it w/the Do not delete flag "on" from the start?  Ill check the logic for that use case, I probably tested with an existing collection where the ID would of been set.

Posted (edited)
2 hours ago, bakes82 said:

Did you run it w/the Do not delete flag "on" from the start?  Ill check the logic for that use case, I probably tested with an existing collection where the ID would of been set.

Yes, do not delete from the start. Then I get the error. When I deactivate the setting, it works. But also when I turn on the setting after the first run and try to update the existing Collection with the task, it throws the error then.

Edited by shorty1483
Posted

Yes sir, working well now. Thanks!

rbjtech
Posted

Now we just need to work out how to get nested collections to work ...

As now more than ever, there is an obvious need to not just have a single collections folder .. :(

 

bakes82
Posted
22 hours ago, rbjtech said:

Now we just need to work out how to get nested collections to work ...

No idea what you’re talking about. But I use Plex 99.999% of the time so.  In emby aren’t the collections made under each library. Except the navigation shows them all for some odd reason.  

rbjtech
Posted (edited)
1 hour ago, bakes82 said:

No idea what you’re talking about. But I use Plex 99.999% of the time so.  In emby aren’t the collections made under each library. Except the navigation shows them all for some odd reason.  

I want/need to be able to create a collection consisting of other collections - ie nested.

Oscars for example - a collection called 'Oscars' and then under that a yearly collection of all the winners etc.

Yes collections appear in the library, but with the frakly crazy decision to then remove the original title ! 🤬

So if I want to manually browse/find a movie that happens to appear in a collection by name, I'm outa luck as it won't be listed - I have to magically 'know' it's in that particular collection or use search to find it ... :(

 

Edited by rbjtech
pwhodges
Posted
17 minutes ago, rbjtech said:

So if I want to manually browse/find a movie that happens to appear in a collection by name, I'm outa luck as it won't be listed - I have to magically 'know' it's in that particular collection or use search to find it ... :(

Or turn off collection grouping in that library - which might be as quick...

Paul

dsmitty166
Posted

Thanks for this! Any thoughts on adding options for setting Sort title on creation, as well as setting a custom poster? Can do this manually for now but need to make sure you set plugin to not delete collection.

rbjtech
Posted
15 hours ago, pwhodges said:

Or turn off collection grouping in that library - which might be as quick...

Paul

How do I know it's in a collection before I cannot find it ... ;)

Collection grouping is a very poorly thought out function designed for a single purpose of grouping collections where the titles are obviously in the collection.   For all the other collections - IMDB etc - it's all but useless.

The only way around this, is to create an STRM file per collection entry, and use that to add to the collection - leaving the original in it's normal position.

Lately it seems emby always needs a 'workaround' - it's never just works out the box as you think it should ... 

  • Agree 1
  • 3 weeks later...
rbjtech
Posted

 

@bakes82

Hi - I'm getting the error below -

Quote

This version of the plugin is no longer supported. Please update to the latest version. at Emby.TraktListCollections.ScheduledTasks.CreateCollectionsTask.CheckPluginExpiration() at Emby.TraktListCollections.ScheduledTasks.CreateCollectionsTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)

I'm using the version from July 14th above - v 2024.7.14.1

Thanks !

Posted

Same here, latest plugin, Server 4.8.8.0

  • 2 weeks later...
Neminem
Posted

Not sure if this is him.

But this one is active on reddid.

And made some comments, it might be some other person.

 

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