Release context menu manage tags
#16
thank you for the reply and the great info.
i am using it to make a watch list of films we want to be next on our viewing list.
also a list of wife only films sounds like a great idea

thanks again
Reply
#17
zosky, thanks so much for this add-on.  I have been using Tag Overview but have had problems with it since upgrading to Krypton, and your add-on fills the gap.

Do you think you might be able to alphabetize the tags for a future release?  They seem to be listed in the order they were created, and if you have a lot of tags, they are hard to find.  It's also a way to prioritize the tags (e.g. i have a tag "AAA Watch Soon" which for Tag Overview showed up at the top so i could easily select it while browsing my library).

Regardless of whether or not you do any further updates, thanks so much for what you've done!
Maintaining a few add-ons for v18 including PseudoTV (Classic), Tag Overview, and Autosub: https://github.com/fnord12
Reply
#18
thank you for this add-on, it is exactly what me and my wife use to create 3 smart playlists (his, hers, common) Smile. I was wondering if it is possible to create a shortcut to show the tags selector window? anyhow - thank you so much!!!
Reply
#19
great work on the addon - this is (almost) exactly what I was looking for to tag "Kids" movies.

Would it be possible to add the "Tags" context menu to the "Recently Added" (or even the "UnWatched") context menu? 

I find that when I add movies in bulk, it would be easier to tag them from the "Recently Added" menu versus going into the full list of movies.  Like you, I have about 1,600 movies in my collection.

EDIT: another approach might be to add the "Manage" option to the "Recently Added" (or even the "UnWatched") context menu.  Not sure how hard that would be though.

Note that I am currently running Kodi 17.4.

Thoughts?
Reply
#20
Hi…  Does this addon still work?   When I go to Manage->Tags I get an error, says see Log.  Log says:

8:
ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: Error Contents: invalid literal for int() with base 10: '' Traceback (most recent call last): File "/home/osmc/.kodi/addons/context.tags/addon.py", line 76, in main() File "/home/osmc/.kodi/addons/context.tags/addon.py", line 26, in main assetID = int(xbmc.getInfoLabel('ListItem.DBID')) ValueError: invalid literal for int() with base 10: '' -->End of Python script error report<--]8   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ValueError'>
                                            Error Contents: invalid literal for int() with base 10: ''
                                            Traceback (most recent call last):
                                              File "/home/osmc/.kodi/addons/context.tags/addon.py", line 76, in <module>
                                                main()
                                              File "/home/osmc/.kodi/addons/context.tags/addon.py", line 26, in main
                                                assetID = int(xbmc.getInfoLabel('ListItem.DBID'))
                                            ValueError: invalid literal for int() with base 10: ''
                                            -->End of Python script error report<--

Reply
#21
Sorting can be accomplished by adding the following code to the "addon.py" module, just BEFORE the "# MASSAGE TAG LIST INTO MULTI-SELECT FORMAT" comment:

    # SORT TAGS ALPHABETICALLY
    allTAGS.sort()

Note that spelling is CaSe-SeNsItIvE, so type it exactly as it's spelled.

The "addon.py" module is located in the "C:\Users\YOURUSERID\AppData\Roaming\Kodi\addons\context.tags" folder, where "YOURUSERID" is your Windows logon id.
I'm not sure where it's located for other platforms, as I'm a Windows guy.

I also updated the code for the author (Zosky) in a personal repository on GitHub, which he has to approve and merge into his code base.  Hopefully he can merge the changes, create a new zip file, and publish to the Kodi repository so it automatically gets updated from the Kodi UI.

Hope it helps!
Reply
#22
Not sure if you're still following this thread or not ...

Sorting can be accomplished by adding the following code to the "addon.py" module, just BEFORE the "# MASSAGE TAG LIST INTO MULTI-SELECT FORMAT" comment:

    # SORT TAGS ALPHABETICALLY
    allTAGS.sort()

Note that spelling is CaSe-SeNsItIvE, so type it exactly as it's spelled.

The "addon.py" module is located in the "C:\Users\YOURUSERID\AppData\Roaming\Kodi\addons\context.tags" folder, where "YOURUSERID" is your Windows logon id.
I'm not sure where it's located for other platforms, as I'm a Windows guy.

I also updated the code for the author (Zosky) in a personal repository on GitHub, which he has to approve and merge into his code base.  Hopefully he can merge the changes, create a new zip file, and publish to the Kodi repository so it automatically gets updated from the Kodi UI.  I have not heard back from him yet on this, so not sure if he is still active in the Kodi community or not.  If not, I have an updated AddOn install .ZIP file I can send you with the changes, if you would rather update it via the Kodi UI instead of modifying the Python code manually.  Just private message me and I'll send it your way.

Hope it helps!
Reply
#23
It's been a while since anyone it seems has posted about this add-on. Hopefully it is still supported. 

I just installed Kodi 18.1 with the new Aeon MQ8 skin on Linux Mint 18.3. I now have a need to use tags and found this add-on which is promising. 

I want to add a single tag to a show (movie or series) I can add a tag from the context menu (Manage > Tags) to a movie just fine. But when I try to do the same to a TV series I get the following error. (Sorry, I couldn't figure out how to properly post the error info)

Any thoughts?
Quote: ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.KeyError'>
Error Contents: 'tags'
Traceback (most recent call last):
File "/home/user/.kodi/addons/context.tags/addon.py", line 76, in <module>
main()
File "/home/user/.kodi/addons/context.tags/addon.py", line 44, in main
allTAGS = allTAGS['result']['tags']
KeyError: 'tags'
-->End of Python script error report<--
Reply
#24
I'm still running Kodi 17.4, and received the same error that you did.

I got around it by adding a new tag via the "Tags" dialog and assigning 1 TV series to it.  I was then able to use the "Manage.Tags" dialogs after that.

It appears the ManageTags context menu does not properly handle the condition where no tags are initially defined.  Once you define a tag, it appears to work correctly.  I'll see if I can put some logic in there to account for the condition, and at least warn the user to create and assign 1 new tag name. 

I just want to make you aware that this is not my plugin.  I have tried contacting the author prior to this, but they have yet to respond.  I just started tinkering with the plugin since I use it quite alot, and I have some programming background.

I'll keep you posted as to progress on this thread.

Hope it helps!

Thanks - Todd
Reply
#25
I just created a 0.0.7 version that contains the warning dialog if no tags are defined.  I have a repository update zip file ready if you want it - just PM me and I'll send it your way.

Thanks - Todd
Reply
#26
I ended up adding the tag I wanted through the web interface. That worked quite well. I am using the Aeon MQ8 skin and I cannot find the tags dialog you speak of. I might have to temporarily switch back to estuary and look for it. 

But you are right. Since I added tags through the web interface, if I again attempt to add a tag using ManageTags, it works fine. Thanks for that info.

Cheers
Reply
#27
(2019-03-04, 08:53)thlucas Wrote: I just created a 0.0.7 version that contains the warning dialog if no tags are defined.  I have a repository update zip file ready if you want it - just PM me and I'll send it your way.

Thanks - Todd
 I would be grateful if you can send me your updated version! Smile

Regards,

Bart
Reply
#28
Hi thlucas,

You said we could PM you if we want an update of this add-in, but you have Private Messaging disabled.  I saw your offer to send an update of the tags add-on and would love to get a copy if possible.  Does it address both the "warning dialog if no tags are defined" and the tag sorting?

Thanks,
fnord12
Maintaining a few add-ons for v18 including PseudoTV (Classic), Tag Overview, and Autosub: https://github.com/fnord12
Reply
#29
I'm not a coder, but I wound up editing the addon.py file per thlucas's instructions and found it easy to do.

As an encore, I found that it's possible to change the line setting the dialogue box title to:
Quote:title = xbmc.getInfoLabel('ListItem.label')

This displays the name of the selected movie/show instead of the generic "Select Tags" dialogue.  I find this helpful because I think there is a minor bug where the movie that gets selected for tag editing depends on the location of the mouse cursor when you select Manage Tags, and that may be (unintentionally) different than the movie that you right-clicked on.  So seeing the title of the movie you are editing helps confirm that you're editing the right one.

There are two more things that I think this add-on needs:

1) The original Tag Overview that this add-on replaces allowed you to launch the tag editor with a key:
Quote:<F8>RunScript(script.tagoverview)</F8>
That saved time compared to going through two sets of context menus (and would avoid the mouse cursor bug described above).

2) It seems like an error always occurs when trying to edit tags for movies in a set.  I think this is the relevant error in the log:
Quote: ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ValueError'>
                                            Error Contents: invalid literal for int() with base 10: ''
                                            Traceback (most recent call last):
                                              File "C:\Users\IMATV2\AppData\Roaming\Kodi\addons\context.tags\addon.py", line 79, in <module>
                                                main()
                                              File "C:\Users\IMATV2\AppData\Roaming\Kodi\addons\context.tags\addon.py", line 26, in main
                                                assetID = int(xbmc.getInfoLabel('ListItem.DBID'))
                                            ValueError: invalid literal for int() with base 10: ''
                                            -->End of Python script error report<--

The add-on is already helpful as is, but thlucas' update has made me hopeful (greedy) for a few more improvements.  Angel
Maintaining a few add-ons for v18 including PseudoTV (Classic), Tag Overview, and Autosub: https://github.com/fnord12
Reply
#30
(2019-03-04, 08:53)thlucas Wrote: I just created a 0.0.7 version that contains the warning dialog if no tags are defined.  I have a repository update zip file ready if you want it - just PM me and I'll send it your way.

hi all -- firstly, a big thanks to @thlucas for turning what i made into something the community wants

my motivation was really to stop getting texts like 'put this in my section' ... now the wife can do it.

my goal is to merge Todd's updates this summer.
rPi 2&3 | android phones | fireHD8 | linux | win10 + NFS NAS w/ mySQL + props to...
libreElecyatse, titan, AELflexGet, context.manageTags (a zosky original)
Reply

Logout Mark Read Team Forum Stats Members Help
context menu manage tags2