•   
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 10
  •   
Beta Metadata Editor - Update library + .nfo informations
#31
I knew I forgot one. I've decllined "es" but added es_ES.
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
#32
(2019-11-08, 16:21)sualfred Wrote: @nessus 

I guess that is what you wanted.
Nod Yes!... that's it.

Let me know when you are ready to test this.

By the way, i just check your scripts that they don't have Greek translations. I soon as i find some free time i will send you requests on transifex.

Cheers
Nessus
Reply
#33
@nessus 

It took me a few hours, but I hope everything is working.
Please create a own OMDb API key if you don't have one yet and add it to the addon settings.

During the updating process it will also store TMDb and IMDb ID if found and it was missing before.

Edit:
And ListItem.Status will be also updated if found.

Code:

## Run the script / context menu

The script can be called with the context menu or RunScript() commands (useful for skinners).
A library updating task can be started by starting the addon itself.

Context menu entries:

* `Metadata Editor` / `Open Editor` = Editor dialog or sub menu if more options are available
* `Add/remove available genres` = Quickly edit the genres which the item belongs to
* `Add/remove available tags` = Quickly edit the tags which the item belongs to
* `Add/remove favourite tag` = Shortcut to toggle the library tags `Movie Watchlist`, `TV Show Watchlist` and `Music Video Watchlist`. Can be used to create custom splitted favourite widgets (like a watchlist).
* `Update ratings` = Will update ratings by using the OMDb and TMDb API


RunScript calls:

*  `RunScript(script.metadata.editor,dbid=$INFO[ListItem.DBID],type=$INFO[ListItem.DBType])` = opens editor
*  `RunScript(script.metadata.editor,action=setgenres,dbid=$INFO[ListItem.DBID],type=$INFO[ListItem.DBType])` = opens genre selector
*  `RunScript(script.metadata.editor,action=settags,dbid=$INFO[ListItem.DBID],type=$INFO[ListItem.DBType])` = opens tags selector
*  `RunScript(script.metadata.editor,action=togglefav,dbid=$INFO[ListItem.DBID],type=$INFO[ListItem.DBType])` = toggle watchlist tag
*  `RunScript(script.metadata.editor,action=updaterating,dbid=$INFO[ListItem.DBID],type=$INFO[ListItem.DBType])` = Updates rating for the requested item
*  `RunScript(script.metadata.editor,action=updaterating)` = Updates all movie and TV show ratings
*  `RunScript(script.metadata.editor,action=updaterating,type=movie)` = Updates all ratings for movies
*  `RunScript(script.metadata.editor,action=updaterating,type=tvshow)` = Updates all ratings for TV shows

Embuary | Skin | Helper | Info | Repo | GitHub
Reply
#34
Hello @sualfred

Sorry, had to find some quiet time to test again. I am testing music and no more errors when invoking the editor, but I noticed
1. Artist- Description- Cannot be edited
2. Song- Votes- Does not accept entry
3. Song- Artists- When editing the Artist, a new Artist is created rather than editing the existing. See next comments

My other concern with Music is that you are offering a level of editing that may conflict with scraped MBID's. For example, allowing users to edit the Artist, Album Artist, Song Artist, Album, Album title, track numbers etc but if MBID's are also scraped for these items, then there could be corruption. I see that in Song editor, the MBID's are available for editing, but most users won't know to edit them in tandem, or how to edit correctly and, realistically, song files should be correctly tagged before they are scanned into Kodi. Not adjusted after. Especially as some of these settings can never be saved for a future rescrape as it requires the Music Files to be correctly tagged.

Maybe @DaveBlake could confirm if this is correct.

Apart from the above concern, it is looking great and I found no other issue. Thanks Smile
My Signature
Links to : Forum rules (wiki) | Banned_Add-ons (wiki) | Debug Log (wiki)  
Links to : HOW-TO:Create_Music_Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#35
1 -> Works fine here
2 -> Hmmm... JSON returns "OK" for setting it but I've noticed that "votes" is missing in "Audio.Details.Song" scheme in methods.json. @DaveBlake  I guess this needs another PR, doesn't it?
3 -> The music editing is a little bit strange and I don't know which values are save to offer as editing field. Editing the artist name to "blalblablbalbalbalbal" and it still shows albums of the artist "Metallica" looks like a messed up database. @DaveBlake  I know that the music DB is your playground. What values are save to be editable and which not?
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
#36
(2019-11-10, 09:03)sualfred Wrote: 1 -> Works fine here
Still not working here. Tried on two different Win10 computers. Kodi v18.5 nightly. Nothing in the log is shown for the add-on.

Subject to daveblake's confirmation, I think the editing should be limited to the following

Artists
<gender></gender>
<disambiguation></disambiguation>
<genre></genre>
<style></style>
<mood></mood>
<yearsactive></yearsactive>
<instruments></instruments>
<born></born>
<formed></formed>
<biography></biography>
<died></died>
<disbanded></disbanded>

Albums
<genre></genre>
<style></style>
<mood></mood>
<theme></theme>
<compilation></compilation>
<review></review>
<type></type>
<label></label>
<rating max="10"></rating>
<userrating max="10"></userrating>
<votes></votes>
<year></year>
<albumArtistCredits>
<artist></artist>
<musicBrainzArtistID></musicBrainzArtistID>
</albumArtistCredits>
*Not sure about the <albumArtistCredits>. Possibly best to leave it out.

Songs
Rating
Votes
Userrating
Comment
Mood
My Signature
Links to : Forum rules (wiki) | Banned_Add-ons (wiki) | Debug Log (wiki)  
Links to : HOW-TO:Create_Music_Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#37
Please enable logging in the addon and test it again. It's working here.

Code:

2019-11-10 08:39:27.795 T:18756  NOTICE: [ script.metadata.editor ] --> JSON CALL: {
                                                "id": 1,
                                                "jsonrpc": "2.0",
                                                "method": "AudioLibrary.SetartistDetails",
                                                "params": {
                                                    "artistid": 3,
                                                    "description": "test asdkfasdf"
                                                }
                                            }
2019-11-10 08:39:27.796 T:18756  NOTICE: [ script.metadata.editor ] --> JSON RESULT: {
                                                "id": 1,
                                                "jsonrpc": "2.0",
                                                "result": "OK"
                                            }

Image

Your suggestions:
- I assume <disambiguation> is description?
- Sadly, not all of these are available via JSON
- Because you removed fields like albumartist, album title, etc: What about music that have no musicbrainz ID? Like local, regional bands/releases?
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
#38
Here is the log. Line 1031... uperotabed.kodi (paste) but it says OK, but nothing happens here.

First image shows the entry I would like to edit...
Image


The second image is a dead page. I can navigate around the keyboard, but nothing works...
Image


As for your other question, I will leave that for daveblake to respond.
My Signature
Links to : Forum rules (wiki) | Banned_Add-ons (wiki) | Debug Log (wiki)  
Links to : HOW-TO:Create_Music_Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#39
So you are saying that the keyboard has no prefilled text with the current label information?
Could you provide me your music db file, because I cannot reproduce it here? That makes it easier to test with the same data. Just want to be sure it's not a char, encoding, etc. that is causing it.
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
#40
Sure. It is a small test library... https://ufile.io/10emoj6x
My Signature
Links to : Forum rules (wiki) | Banned_Add-ons (wiki) | Debug Log (wiki)  
Links to : HOW-TO:Create_Music_Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#41
Thanks. Found the issue. Long text with special characters, line breaks, etc. have to be converted to a unicode string before.

Edit:
Stupid me. Caused only by line breaks. I'll add a convertion from \n to [CR] for editing and [CR] to \n on saving.
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
#42
Updating the music library using JSON.
No idea how much this API facility has been uised in the past (Chorus?) so you may well shake out some bugs @sualfred Smile

I would recommend that you stick to updating just the additional album and artist data that is fetched by scraping (online or NFO) and the song rating and playback history. While the API allows the update of other data especially song, as soon as the user does a library update song data  will be wiped and the values revert to those scanned from the embedded tags. The fundamental music lib values are best edited by editing the music files using a tag editor. Music library entries are created from the scanned data, and you can't add songs, albums or genres using JSON (you can add artists in a round about way, but more a side effect than an "add artist" facility). There is also potentially a consistency issue as Karellen suggests, although any index conflicts should just results in a failed request. Give users enough rope and they will get in a mess.

I will provide a list of what properties that is, but in a rush this morning so tempted to point you at the code (even if you don't know C++ it isn't too hard to read what is happening). More from me later
Reply
#43
(2019-11-10, 09:03)sualfred Wrote: 2 -> Hmmm... JSON returns "OK" for setting it but I've noticed that "votes" is missing in "Audio.Details.Song" scheme in methods.json. @DaveBlake  I guess this needs another PR, doesn't it?
Both schema and code will need to change for this. No surprize, the changes to rating (to make it similar to video) was a botched job by someone else, I have been fixing the implementation ever since. Grrr....

(2019-11-10, 09:03)sualfred Wrote: 3 -> The music editing is a little bit strange and I don't know which values are save to offer as editing field. Editing the artist name to "blalblablbalbalbalbal" and it still shows albums of the artist "Metallica" looks like a messed up database. @DaveBlake  I know that the music DB is your playground. What values are save to be editable and which not?
SetArtistDetails should change the artist name, I will test when I get back. Although it is something I would be tempted not to offer because artist names are also held as denormalised data in other tables so the user may not see the effects that they want. See my previous post.
Reply
#44
@DaveBlake 
Thanks.

Votes -> FYI it works for albums, just not for songs. I'll remove the votes field on my end and add it back when you have fixed it.

Artist labels -> Yeah, I've noticed the artistid and artistalbumid table. I'll remove it. I mean, I could update it for all other items as well, but with the limited JSON cmds that will be a pita and cause very loooong processing times.

Genres, moods, etc -> How is Kodi handling the audio library scan? Does it rescan already added songs or does it just handle new ones and already added items have to be refreshed manually?
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
#45
@Karellen 

Pushed a new version that has removed a lot of the edit fields for music + includes the plot/description fix. For line breaks you can use [CR].

Could you also test the rating updater please? You just have to add a OMDb API key. If you don't have a own key you can use my test key, which is limited to 1000 calls a day: bf25dae2. Or create a own one http://www.omdbapi.com/apikey.aspx
Embuary | Skin | Helper | Info | Repo | GitHub
Reply
  •   
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 10
  •   
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Metadata Editor - Update library + .nfo informations00
This forum uses Lukasz Tkacz MyBB addons.