Whishes for a genre/tag batch-manipulator
#1
Currently I see no way to efficently manipulate the genre-tags in the nfo-files of my movie archiv. TinyMediaManager is the only usable library manager for Debian GNU/Linux here but doesn't fit my needs for that special use-case. So I think about writing me an own script for that. But before I start I want to ask if someone would be interested in that. If so I would do the job in a more clean way to publish the code.

The current specifications are
  • Commandline tool written with Python3
  • Delete specific genre-tags. (e.g. "Adventure")
  • Replace specific genre-tags (e.g. "Horror" -> "Zombie")
  • Simulation.
  • List all genre-tags and find duplicates.
  • Handle specific files: e.g. nfo in current directory, recursive, what ever
  • Feel free to wish.

Sounds simple? I couldn't find a tool doing this for me in an elegant and quick way.
Reply
#2
Have you thought about using tags within Kodi?
For each (custom) genre you can create a tag and add that tag to that movie.
You can then simply filter on a tag.
Proud owner of comics42.shop 
Reply
#3
(2017-09-03, 11:52)rschiks Wrote: Have you thought about using tags within Kodi?
I see no difference between genre and tags. The tags need to be created, too.

The big point is that I want to do this efficient! I don't want to click on each movie entry and some dialogs and buttons - not in a library manager and not in kodi. btw: My Kodi has no write access to the movie files.
Reply
#4
(2017-09-03, 12:14)buhtz Wrote:
(2017-09-03, 11:52)rschiks Wrote: Have you thought about using tags within Kodi?
I see no difference between genre and tags. The tags need to be created, too.

The big point is that I want to do this efficient! I don't want to click on each movie entry and some dialogs and buttons - not in a library manager and not in kodi. btw: My Kodi has no write access to the movie files.

If you add a new movie to your library you have to run your script again, right? It can contain duplicate genres or genres that needs to be replaced.
My idea was to initially create the tags, add your movies to it. Yes, it's some work. But it's done then.
When you add a new movie just add the tags to it you want, and you're done. You also need to run your script again, so it's effort too.

The great part of this method is you are not interfering with the mediamanager / Kodi scrapers. They get the original genres from the source and they remain in the nfo files/ Kodi database.
Proud owner of comics42.shop 
Reply
#5
I see your point. But you use a different use-case. My Kodi "scrappes" only from the NFO files not from online scrappers. It reads the NFO - not more. And Kodi has no write access to the files! When I add one new movie I edit its meta data (nfo) file by myself and/or with the media library manager (e.g. tmm).

The use case for my software I described is an existing movie archiv (without NFO!) that need to migrate to Kodi. So I want to edit the genre-tags in the nfo-files of a lot of movies at one time. Because the media library manager or the scrapper add the genre infos from the scrapper website. They often doesn't fit my (special) needs. e..g I need to remove "Adventure". I need some special genres. Lot of detail work.
Reply
#6
I think you should just write the script according your own specifications and post it when ready (if you want to make it available). If needed, people will pick it up and give feedback.
Proud owner of comics42.shop 
Reply
#7
Or, you can use MediaElch which does both Genre and Tags, so you get the best of everything. Not to mention all the artwork you could ever want.

http://www.kvibes.de/en/mediaelch/download/
Reply
#8
I had a similar need and wrote my own but went the GUI route. I created an executable for Windows in the dist folder, but you should be able to run it from any platform if you have all of the required imported modules installed

https://github.com/flurpy/Kodi-Genre-Tag-Manager
Reply
#9
Looks nice. Greate! That is why I asked. Wink
I will take a deeper look to it later.

Does it only handle data in a datbase? Isn't it able to handle nfo-files?
Reply
#10
(2017-10-09, 09:48)buhtz Wrote: Looks nice. Greate! That is why I asked. Wink
I will take a deeper look to it later.

Does it only handle data in a datbase? Isn't it able to handle nfo-files?

It only manipulates the data in the MySQL Database. What I do is fix the genres/tags and then export the database to individual files so that the nfo files will get updated too. You can do this export from the Kodi Connection menu. This is done through a JSON-RPC call to Kodi to start the database export. It will overwrite the nfo files for everything in the database.
Reply
#11
So I am on the point that I have a working Python3 script that is able to look at all nfo-files and handle the genre tags in there. It is a command line tool. Currently it is in a quick and dirty state.

But if some is really interested in I would clean it up and create a GitLab project for it.
Reply
#12
(2017-10-08, 22:43)flurpy Wrote: I had a similar need and wrote my own but went the GUI route. I created an executable for Windows in the dist folder, but you should be able to run it from any platform if you have all of the required imported modules installed

https://github.com/flurpy/Kodi-Genre-Tag-Manager
The case you mention in the background statement on your GitHub page is exactly what I'm trying to do.
Can this be run directly with Python?  (I'm on a Mac)

update:

I think I've met all dependencies.  I now get the following:
 $ python KodiGenreTagManager.py 
------------------------------------------

Traceback (most recent call last):  File "KodiGenreTagManager.py", line 1321, in <module>    start()  File "KodiGenreTagManager.py", line 1155, in start    frame = KodiDBeditorFrame(None)  File "/Users/<userid>/Downloads/git/Kodi-Genre-Tag-Manager/GUI.py", line 26, in __init__    self.menuBar.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_INACTIVECAPTION ) )wx._core.wxAssertionError: C++ assertion "IsAttached()" failed at /Users/robind/projects/buildbots/macosx-vm6/dist-osx-py27/Phoenix/ext/wxWidgets/src/osx/menu_osx.cpp(711) in Refresh(): can't refresh unatteched menubar
Reply

Logout Mark Read Team Forum Stats Members Help
Whishes for a genre/tag batch-manipulator0