JosefNemec / Playnite

Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.
https://playnite.link
MIT License
9.45k stars 504 forks source link

Metadata download priority doesn't work if a plugin fails #1970

Closed DeN-AlB closed 4 years ago

DeN-AlB commented 4 years ago

Is it possible that Playnite has a general problem with downloading metadata with 3rd party metadata plugins automatically?

Actually I use the following metadata plugins: https://playnite.link/forum/thread-194.html https://playnite.link/forum/thread-291.html

In the metadata settings of Playnite I selected these plugins and moved them to the top of the lists. When selecting some games and only download metadata for these games nothing happens. But when manually downloading metadata with the help of F3 for each game and selecting each pluging manually then metadata will be downloaded.

Here are some screenshots to help you understand the problem with the help of "Age of Empires: Definitve Edition (Steam)".

Try to automatically download metadata: Metadata_1 Metadata_2 Metadata_3 Metadata_4 Metadata_5

Manually download metadata: MetadataManual_1 MetadataManual_2 MetadataManual_3 MetadataManual_4 MetadataManual_5 MetadataManual_6 MetadataManual_7 MetadataManual_8 MetadataManual_9

I thought that it could be a problem with the used plugins but it seems to be a problem of Playnite in general?

JosefNemec commented 4 years ago

Can you reproduce it with built-in IGDB plugin? It's used in the same way as other plugins, so if it works properly with IGDB, then it's an issue in those specific plugins.

Also, attach diagnostics package that was requested in the issue template.

DeN-AlB commented 4 years ago

When disabling 3rd party plugins it works as expected. But could it realy be that both plugins have this problem? May be Playnite is blocking something from 3rd party plugins? I don't know.

Here's the diagnostic package: ae927d70-6a4d-4211-9d9d-d07cfd2e1b41

Lacro59 commented 4 years ago

For information, the problem is only when a 3rd party plugins is defined in first.

JosefNemec commented 4 years ago

At least for MetadataLocal, it's an issue in the plugin, there's a ton of errors in logs related to it:

08-17 16:35:50|ERROR:Failed to download metadata for game Die V�lker, 25104415-806c-4c71-95ae-ef755ce29d04System.NotImplementedException: Die Methode oder der Vorgang ist nicht implementiert.
   bei MetadataLocal.MetadataLocalProvider.get_AvailableFields() in H:\Lacro59\playnite-metadatalocal-plugin\MetadataLocalProvider.cs:Zeile 30.

I don't see any use of SGDB plugin in the logs.

DeN-AlB commented 4 years ago

I don't see any use of SGDB plugin in the logs.

But I used it more than one time... At least I used it to create the screenshots... :(

JosefNemec commented 4 years ago

It's probably because MetadataLocal fails the whole process and it doesn't get to SGDB. I will have to change that. You have to either disable MetadataLocal or move SGDB up in the priority list.

DeN-AlB commented 4 years ago

I already moved SGDB up to the top as you can see in my previous screenshots.

image

But after disabling MetadataLocal images are automatically downloaded with SGDB plugin as you can see on next screenshots.

image image image

So it seems to be a problem with the plugin MetadataLocal.

Lacro59 commented 4 years ago

For information. If we keep the default code generated with toolbox, there is the error mentioned on Library -> Metadata download...: https://github.com/JosefNemec/Playnite/issues/1970#issuecomment-678251437

The default code: public override List<MetadataField> AvailableFields => throw new NotImplementedException(); Example solution: private List<MetadataField> availableFields; public override List<MetadataField> AvailableFields { get { if (availableFields == null) { availableFields = GetAvailableFields(); } return availableFields; } }

In addition, you need to add a code to allow you to continue with the other plugin metadata: Example solution: if (Description.IsNullOrEmpty()) { return base.GetDescription(); } else { return Description; }

JosefNemec commented 4 years ago

That's not a problem in the template. Mandatory things in the plugin have NotImplementedException exception assigned to them because it's a mandatory thing you have to implement.

Lacro59 commented 4 years ago

Yes. But shouldn't Playnite continue with the other plugin metadata only to stop at the error?

JosefNemec commented 4 years ago

Yes it should, I'll fix that.

DeN-AlB commented 4 years ago

After installing the new version of MetadataLocal Plugin (0.4.1) it looks much better now. Now metadata (images & descriptions) are downloaded automatically!

Thanks @Lacro59 ! :)

JosefNemec commented 4 years ago

Done in devel8.