Kodi Community Forum

Full Version: Metadata Editor - Update library + .nfo informations
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
So it's working fine? Had no feedback yet.
Working great for me!  Most stuff is originally set using Media Companion.  Only thing I missed was auto updating the nfo watched status.  Not anymore Big Grin.  Haven't tried a lot of the other options yet.  If I find any problems, you'll be the first to know.  Wink
(2020-01-05, 12:11)sualfred Wrote: [ -> ]@Karellen 
I've reworked 50% of the addon. Could you run a test before I push it to the repo?

I've also added your request for a keymap:
Or do you want it in the context menu?

Thank you so much!!! The lack of this feature has been the bane of my existence... I haven't been able to test it yet, but I'll report back how it goes when I can free up some time. Again, thanks a lot.
Np. Also take a look at the settings for "Added dialog to add your own user rating after a playback has 100% ended (disabled by default)"
It looks like there is a bug with the Artist information. If you edit any Artist info then the standard Kodi Albums list (id=50) inside the MusicInformation dialog, it shows only the albums in your database.

Example artist: Bad Company. Before editing any info with Metadata Editor, the list in MusicInformation dialog it shows 16 albums. After editing it shows only those (4 items) that are in my library.

Using the latest github 2.0.5

? The music db does not store albums that aren't available in the database
I am not follow. The Universal Artist Scraper has scraped all artist's albums and they showing fine in MusicInformation dialog under Kodi's standard albums list (id=50). This was working like this in all Kodi versions so far. Now, when you edit any data with Metadata Editor, the script clears that list and leaves only whatever albums are in database. IMHO this is not a proper behavior. The addon is supposed to edit some data without changing any other data.

I think you are referring to the discography table in the MyMusic database.

When scraping an artist, a number of their albums are also scraped, even though you do not have them in your collection. All that is scraped is the album title and release year and it is displayed on the Artist Information Page in Estuary.

Sounds like the addon is clearing that data?
I only update the fields that have been edited.

Could this be a JSON issue?
Yeap, you are doing a well overdue shakedown of the JSON AudioLibrary.SetXXXDetails @sualfred Smile
It is one of the dark and dusty old areas, implemented long before me and never used seriously.

The API does not provide a means to set the discography of an artist (a list of album names released by that artist returned by the scrapers, nothing to do with what albums the user has in their library), but editing the artist via JSON clears any existing discography.

So two three things are needed,
1) API addition to allow an artist discography to be set via JSON
2) Any existing values need preserving when JSON does not edit the discography
3) API addition to get the artist discography via JSON
Not hard, volunterring? Smile
I think you overestimate me Smile
I understand the root of the problem, but no idea what has to be done in detail.
Dawl... OK @sualfred then raise lack of access and clearing of discography as an issue with JSON API AudioLibrary.SetArtistDetails and GetArtistDetails please. Otherwise I'm bound to forget it!!

My music data is not rich enough. Can you enable the loggin of the addon + debug log to capture it? I wanna attach it to the issue.
Sorry to keep you waiting on feedback, I requested a feature some posts back. I'm trying the script just now for the first time. I've installed the plugin with "Install from ZIP" and the "script.metadata.editor-2.0.6.zip" file on github. I've then modified my keymaps to <p>RunScript(script.metadata.editor,dbid=$INFO[ListItem.DBID],type=$INFO[ListItem.DBType])</p>, to test it out. When I focus a movie and press p, I'm then immediately prompted with an error telling me to check the log, where the relevant part says:

2020-02-16 00:19:15.515 T:123145502113792   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.AttributeError'>
                                            Error Contents: 'Database' object has no attribute '$INFO[ListItem.DBType]'
                                            Traceback (most recent call last):
                                              File "/Users/username/Library/Application Support/Kodi/addons/script.metadata.editor/default.py", line 98, in <module>
                                              File "/Users/username/Library/Application Support/Kodi/addons/script.metadata.editor/default.py", line 68, in __init__
                                              File "/Users/username/Library/Application Support/Kodi/addons/script.metadata.editor/default.py", line 89, in _editor
                                                editor = EditDialog(dbid=self.dbid, dbtype=self.dbtype)
                                              File "/Users/username/Library/Application Support/Kodi/addons/script.metadata.editor/resources/lib/editor.py", line 23, in __init__
                                              File "/Users/username/Library/Application Support/Kodi/addons/script.metadata.editor/resources/lib/editor.py", line 26, in get_details
                                                getattr(self.db, self.dbtype)()
                                            AttributeError: 'Database' object has no attribute '$INFO[ListItem.DBType]'
                                            -->End of Python script error report<--
Info labels do not work on a keymap.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14