• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 7
[RELEASE] Tag Generator (IMDb, Trakt, Oscars + Stand-up)
#16
Hi, is there a way to have this addon go through all the movies in our database and have it write imdb tags to all our movies (Using IMDB tags)?

EDIT: I think IMDB calles them Plot Keywords.
My Madnox Mods | Nox Version Guide
---------------------------------------------------------------
Movie Logo Requests | Studio Logo Requests
Logo's Made So Far:
838
Reply
#17
yes there is a way to look at all of your movies on imdb. The problem is, when you go over 100 movies on imdb watch list, it displays it on more than one page. this add-on only looks at the 1rst page only.

The way you can fix this is by going to your imdb watch list and go to the bottom of the page and click page 2. once you're on your second page, copy that URL in the add-on settings. it should add the 2nd page of 100 movies. you can do this up to 500 movies i guess.(limitations of 5 URL)

It's kind of a flaw for this add-on to look at the http://www.imdb.com. it could be unlimited if it looked at the RSS feed. Plus it would simplify it. Hopefully we will see this on future releases.


...i realize this post is really old but i just spent hours trying to figure this out. hopefully this will help someone else.
Reply
#18
Fixed for Kodi 14 and 15, removed Trakt and Music. Use RSS instead of the normal URL - see OP. Have also submitted to the official repo now, so should be much easier to install and manage.
Reply
#19
@wellspokenman,
Really love your addon, thank you.

a)
Can we hope on getting more than 5 URL to add more watchlists?
As a Watchlist fan, I really love to add much more lists and watch them growing with my database over the time.

b)
Also have a question, when running as a service.
I set the refresh-interval-hours to 96, which should be ok for my database.
I turn off my OpenElec RP2 Kodi from time to time for a couple of days.
What happens to the counter (96 hours) then? Does it start all over or does it continue or will it eventually skip the database update?

c)
possible to add https://en.wikipedia.org/wiki/List_of_st...ed_Kingdom
to the "URLs that we will be searching for comedians" (from main.py) ?
Reply
#20
(2016-02-24, 04:42)xbozzo Wrote: @wellspokenman,
Really love your addon, thank you.

a)
Can we hope on getting more than 5 URL to add more watchlists?
As a Watchlist fan, I really love to add much more lists and watch them growing with my database over the time.

b)
Also have a question, when running as a service.
I set the refresh-interval-hours to 96, which should be ok for my database.
I turn off my OpenElec RP2 Kodi from time to time for a couple of days.
What happens to the counter (96 hours) then? Does it start all over or does it continue or will it eventually skip the database update?

c)
possible to add https://en.wikipedia.org/wiki/List_of_st...ed_Kingdom
to the "URLs that we will be searching for comedians" (from main.py) ?

Thank you Smile

I have to upgrade some stuff at home before I can release an official update to the repo, but in case you feel like getting friendly with your pet python:

a) More watchlists is easy; have a look at line 13 of settings.xml, just add another value to that enum, ie:
<setting label="30905" visible="eq(-1,true)" default="1" type="enum" id="32099" values="1|2|3|4|5|6"/>

this would give you one more. Then add a pair of these ones at the end of that list (these would become line 24 and 25, with /category being line 26)
<setting label="30906" type="text" visible="gt(-9,3) + eq(-10,true)" id="32054" default="http://rss.imdb.com/user/ur12345678/watchlist"/>
<setting label="30903" type="text" visible="gt(-10,3) + eq(-11,true)" id="32084" default="DefaultText"/>
just increment the id (not the label) ie 32054 becomes 32055 and 32084 becomes 32085. Wash, rinse repeat. The code keeps on taking URLs until the number it gets from line 13 is reduced 0. So long as you increment the ids, it will keep on finding the next one.

b)
Good point. The timer is pretty basic (read: not very clever). It's just a big number that gets slowly smaller. If the device is sleeping I have to imagine that the number is not getting smaller. I could implement a date-based version. Good idea.

c)
I think I did - if something isn't matching there are a few possibilities. First though i should explain that all I'm doing for Standup is searching for 'movies' containing the comedians name in the title. This protects me from all the false positives where comedians become actors and visa versa. But it makes a big assumption: comedian name in title. The wiki URLs I'm searching are on 349-353 of main.py (feel free to add more):
wikiurllist=["http://en.wikipedia.org/wiki/List_of_British_stand-up_comedians",
"http://en.wikipedia.org/wiki/List_of_stand-up_comedians",
"http://en.wikipedia.org/wiki/List_of_Australian_stand-up_comedians",
"http://en.wikipedia.org/wiki/List_of_Canadian_stand-up_comedians",
"http://en.wikipedia.org/wiki/List_of_United_States_stand-up_comedians"]

Some possibilities: wiki has changed their formatting and it broke my regex, comedian name is somehow irregular (dashes, three names, one name etc) and my regex isn't smart enough to recognise this, movie title does not contain comic name, etc. See if you can narrow it down a little - also try the debug option - it will give you a lot of info. Then just search your XBMC log for all the 'teg-gen' entries. Are other UK comics being tagged? How about other titles for this comic? Is his/her name in the title? Comics from other regions? You get the idea.
Reply
#21
Thank you :-)

a)
I was looking at the source code and tried to change something into something other, but now, with your explanaitions, I'll try again :)
Also, I'm not sure, what happens to my additions, when you update the addon in the repo and Kodi automaticly updates it on my system. I guess, my additions will be overwritten?
So I'd better contribute to your code at github, but I never have done this before and need to read some documentation first, which...will...take...some...time...

c)
I asked, because I didn't saw the UK URL in the lines of main.py.
So I assumed, they're not checked, beside the listed ones, like US- or Aussie-ones.

But again, with your explanation, I found, that some of my StandUp-Movies does not contain the comedians name, so that could be a reason too.
I was thinking also, if it could be "better" to include the comedians name as an actor, but then we would end up with too many movies not being StandUpComedies, but bad movies, where the comedian showed up as an terrible actor ;-) So the way it is, is ok, imho.


EDIT:
ok,
here is my settings.xml which allows up to 19 Watchlists (limitation was given by the already existing ID 32099 and I didn't want to change the main.py atm)
I also changed the example-URLs from "http://rss.imdb.com/user/ur12345678/watchlist/" to "http://rss.imdb.com/list/ls012345678/" which seems to be the actual format now.

Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
    <category label="30900">
        <setting label="30901" type="bool" id="32011" default="true"/>
        <setting label="30902" type="number" visible="eq(-1,true)" id="32012" default="4"/>
              <setting type="sep"/>
        <setting id="32030" type="bool" label="Debug" default="false"/>
        <setting id="32015" type="bool" label="Write Stand-Up Tags" default="true"/>
        <setting label="30903" type="text" visible="eq(-1,true)" id="32016" default="30904"/>
    </category>
    <category label="IMDB">
        <setting id="32020" type="bool" label="Use IMDB" default="true"/>
        <setting label="30905" visible="eq(-1,true)" default="1" type="enum"  id="32099" values="1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19"/>
        <setting label="30906" type="text" visible="eq(-2,true)" id="32050" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="eq(-3,true)" id="32080" default="30908"/>
        <setting label="30906" type="text" visible="gt(-3,0) + eq(-4,true)" id="32051" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-4,0) + eq(-5,true)" id="32081" default="30909"/>
        <setting label="30906" type="text" visible="gt(-5,1) + eq(-6,true)" id="32052" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-6,1) + eq(-7,true)" id="32082" default="30910"/>
        <setting label="30906" type="text" visible="gt(-7,2) + eq(-8,true)" id="32053" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-8,2) + eq(-9,true)" id="32083" default="30911"/>
        <setting label="30906" type="text" visible="gt(-9,3) + eq(-10,true)" id="32054" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-10,3) + eq(-11,true)" id="32084" default="30912"/>
        <setting label="30906" type="text" visible="gt(-11,4) + eq(-12,true)" id="32055" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-12,4) + eq(-13,true)" id="32085" default="30913"/>
        <setting label="30906" type="text" visible="gt(-13,5) + eq(-14,true)" id="32056" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-14,5) + eq(-15,true)" id="32086" default="30914"/>
        <setting label="30906" type="text" visible="gt(-15,6) + eq(-16,true)" id="32057" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-16,6) + eq(-17,true)" id="32087" default="30915"/>
        <setting label="30906" type="text" visible="gt(-17,7) + eq(-18,true)" id="32058" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-18,7) + eq(-19,true)" id="32088" default="30916"/>
        <setting label="30906" type="text" visible="gt(-19,8) + eq(-20,true)" id="32059" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-20,8) + eq(-21,true)" id="32089" default="30917"/>
        <setting label="30906" type="text" visible="gt(-21,9) + eq(-22,true)" id="32060" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-22,9) + eq(-23,true)" id="32090" default="30918"/>
        <setting label="30906" type="text" visible="gt(-23,10) + eq(-24,true)" id="32061" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-24,10) + eq(-25,true)" id="32091" default="30919"/>
        <setting label="30906" type="text" visible="gt(-25,11) + eq(-26,true)" id="32062" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-26,11) + eq(-27,true)" id="32092" default="30920"/>
        <setting label="30906" type="text" visible="gt(-27,12) + eq(-28,true)" id="32063" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-28,12) + eq(-29,true)" id="32093" default="30921"/>
        <setting label="30906" type="text" visible="gt(-29,13) + eq(-30,true)" id="32064" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-30,13) + eq(-31,true)" id="32094" default="30922"/>
        <setting label="30906" type="text" visible="gt(-31,14) + eq(-32,true)" id="32065" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-32,14) + eq(-33,true)" id="32095" default="30923"/>
        <setting label="30906" type="text" visible="gt(-33,15) + eq(-34,true)" id="32066" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-34,15) + eq(-35,true)" id="32096" default="30924"/>
        <setting label="30906" type="text" visible="gt(-35,16) + eq(-36,true)" id="32067" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-36,16) + eq(-37,true)" id="32097" default="30925"/>
        <setting label="30906" type="text" visible="gt(-37,17) + eq(-38,true)" id="32068" default="http://rss.imdb.com/list/ls0123456789/"/>
        <setting label="30903" type="text" visible="gt(-38,17) + eq(-39,true)" id="32098" default="30926"/>
        </category>
   <!-- <category label="Trakt">
        <setting id="32023" type="bool" label="Use Trakt Movie Watchlist" default="true"/>
        <setting label="30903" type="text" visible="eq(-1,true)" id="32024" default="Trakt Movies"/>
        <setting id="32029" type="bool" label="Use Custom Movie Lists" default="true"/>
        <setting label="username" type="text" id="32025" default="" />
        <setting label="password" type="text" option="hidden" id="32026" default="" />
    </category>-->
    <category label="Extras">
        <!--<setting id="32022" type="action" label="Write Trakt Tags" action="RunScript(script.tag-generator, trakt)"/>-->
        <setting id="32027" type="action" label="30913" action="RunScript(script.tag-generator, imdb)"/>
        <setting id="32028" type="action" label="30914" action="RunScript(script.tag-generator, standup)"/>
        <setting id="32017" type="action" label="30915" action="RunScript(script.tag-generator, manual)"/>
        <setting id="32018" type="action" label="30916" action="RunScript(script.tag-generator, wipeout)"/>
        <!--<setting id="32021" type="bool" label="Background Music" default="true"/>-->
    </category>
</settings>
Reply
#22
Hi,
playing with some lists, I'd like to suggest a feature whish :-)

Add a RadioButton (or somewhat) to let the user chose what the given List contains. (klick on the links below to see)

i.e.

IMDB Watchlist URL (rss): http://www.imdb.com/list/ls054398016/
Set this tag in Kodi: WL_FAV_DIRECTORS_TAG
Chose type of list: ( ) Actors (o) Directors ( ) Movie Titles

IMDB Watchlist URL (rss): http://www.imdb.com/list/ls058718139/
Set this tag in Kodi: WL_FAV_ACTORS_TAG
Chose type of list: (o) Actors ( ) Directors ( ) Movie Titles
Reply
#23
EDIT:
Hmmmm... nevermind. Must be something weird with fetching the data from IMDB... I restored the version, which had problems and its working right now as expected.... murphy...

U don't need to read the rest...



Hello,

(when using the "write all tags" or "write IMDB tags" feature)

is it possible to specify this error message a little bit in the next releases of this useful addon?
I really don't know, where I can start my search for solving this error.

If its a rss URL from the config, the number or name would be good to see 8-)

Opening all the rss feeds from my config to the browser showed valid results.

So I'm stuck here...


Image

EDIT:
I fiddled a little bit in with the settings and now I get a message:
Quote:03:06:01 T:7272 NOTICE: TAG-GEN: http://rss.imdb.com/list/ls004187379/ contains no IMDB IDs. Check URL and retry.
but, when you open the list, you see, it has a lot of entries, so still no luck.



the log wasn't helpful either:
Code:
01:19:16 T:12048  NOTICE: Previous line repeats 1 times.
01:19:16 T:12048   ERROR: Unable to activate the previous window
01:19:17 T:10724  NOTICE: Thread JobWorker start, auto delete: true
01:19:21 T:10364  NOTICE: Thread BackgroundLoader start, auto delete: false
01:20:00 T:12012  NOTICE: Previous line repeats 1 times.
01:20:00 T:12012  NOTICE: Thread JobWorker start, auto delete: true
01:20:22 T:5640  NOTICE: Previous line repeats 1 times.
01:20:22 T:5640  NOTICE: Thread BackgroundLoader start, auto delete: false
01:21:10 T:12048  NOTICE: Previous line repeats 2 times.
01:21:10 T:12048 WARNING: RunScript called for a non-script addon 'script.tag-generator'. This behaviour is deprecated.
01:21:10 T:11092  NOTICE: Thread LanguageInvoker start, auto delete: false
01:21:11 T:11092  NOTICE: -->Python Interpreter Initialized<--
01:21:11 T:11092  NOTICE: TAG-GEN: Starting scraped tag generation.
01:23:48 T:11092  NOTICE: TAG-GEN: Starting IMDB tag writing.
01:28:54 T:10468  NOTICE: Thread JobWorker start, auto delete: true
01:29:08 T:11092  NOTICE: TAG-GEN:  contains no IMDB IDs. Check URL and retry.
01:32:05 T:12048 WARNING: RunScript called for a non-script addon 'script.tag-generator'. This behaviour is deprecated.
01:32:05 T:12232  NOTICE: Thread LanguageInvoker start, auto delete: false
01:32:05 T:12232  NOTICE: -->Python Interpreter Initialized<--
01:32:05 T:12232  NOTICE: TAG-GEN: Starting scraped tag generation.
01:34:48 T:12232  NOTICE: TAG-GEN: Starting IMDB tag writing.

Debug-Log:
Code:
01:50:18 T:12048 WARNING: RunScript called for a non-script addon 'script.tag-generator'. This behaviour is deprecated.
01:50:18 T:10660  NOTICE: Thread LanguageInvoker start, auto delete: false
01:50:18 T:10660    INFO: initializing python engine.
01:50:18 T:10660   DEBUG: CPythonInvoker(11, C:\Users\user\AppData\Roaming\Kodi\addons\script.tag-generator\main.py): start processing
01:50:18 T:10660  NOTICE: -->Python Interpreter Initialized<--
01:50:18 T:10660   DEBUG: CPythonInvoker(11, C:\Users\user\AppData\Roaming\Kodi\addons\script.tag-generator\main.py): the source file to load is "C:\Users\user\AppData\Roaming\Kodi\addons\script.tag-generator\main.py"
01:50:18 T:10660   DEBUG: CPythonInvoker(11, C:\Users\user\AppData\Roaming\Kodi\addons\script.tag-generator\main.py): setting the Python path to C:\Users\user\AppData\Roaming\Kodi\addons\script.tag-generator;C:\Users\user\AppData\Roaming\Kodi\addons\script.module.simplejson\lib;E:\Programme\Kodi\system\python\DLLs;E:\Programme\Kodi\system\python\Lib;E:\Programme\Kodi\python27.zip;E:\Programme\Kodi\system\python\lib\plat-win;E:\Programme\Kodi\system\python\lib\lib-tk;E:\Programme\Kodi;E:\Programme\Kodi\system\python;E:\Programme\Kodi\system\python\lib\site-packages
01:50:18 T:10660   DEBUG: CPythonInvoker(11, C:\Users\user\AppData\Roaming\Kodi\addons\script.tag-generator\main.py): entering source directory C:\Users\user\AppData\Roaming\Kodi\addons\script.tag-generator
01:50:18 T:10660   DEBUG: CPythonInvoker(11, C:\Users\user\AppData\Roaming\Kodi\addons\script.tag-generator\main.py): instantiating addon using automatically obtained id of "script.tag-generator" dependent on version 2.19.0 of the xbmc.python api
01:50:18 T:10660   DEBUG: LocalizeStrings: no translation available in currently set gui language, at path C:\Users\user\AppData\Roaming\Kodi\addons\script.tag-generator\resources\language\English (US)
01:50:18 T:10660   DEBUG: POParser: loaded 104 strings from file C:\Users\user\AppData\Roaming\Kodi\addons\script.tag-generator\resources\language\English\strings.po
01:50:18 T:10660  NOTICE: TAG-GEN: Starting scraped tag generation.
01:50:18 T:10660   DEBUG: DialogProgress::StartModal called
01:50:18 T:10660   DEBUG: ------ Window Init (DialogProgress.xml) ------
01:50:20 T:10660   DEBUG: CVideoDatabase::RunQuery took 2586 ms for 11892 items query: select * from movie_view
01:50:43 T:4384   DEBUG: Thread JobWorker 4384 terminating (autodelete)
01:50:44 T:12048   DEBUG: SECTION:UnloadDelayed(DLL: special://xbmcbin/system/ImageLib.dll)
01:52:52 T:10660  NOTICE: TAG-GEN: Starting IMDB tag writing.
01:52:53 T:12048   DEBUG: ------ Window Init (DialogOK.xml) ------
01:54:16 T:12048   DEBUG: CAnnouncementManager - Announcement: OnScreensaverActivated from xbmc
01:54:16 T:12048   DEBUG: GOT ANNOUNCEMENT, type: 4, from xbmc, message OnScreensaverActivated
01:54:16 T:12048   DEBUG: ------ Window Init () ------
01:54:36 T:12048   DEBUG: CAnnouncementManager - Announcement: OnScreensaverDeactivated from xbmc
01:54:36 T:12048   DEBUG: GOT ANNOUNCEMENT, type: 4, from xbmc, message OnScreensaverDeactivated
01:54:36 T:12048   DEBUG: ------ Window Init (Pointer.xml) ------
01:54:37 T:12048   DEBUG: CInputManager::ProcessMouse: trying mouse action leftclick
01:54:37 T:12048   DEBUG: ------ Window Deinit () ------
01:54:37 T:12048   DEBUG: ------ Window Deinit (DialogOK.xml) ------
01:54:37 T:10660  NOTICE: TAG-GEN:  contains no IMDB IDs. Check URL and retry.
01:54:37 T:10660    INFO: CPythonInvoker(11, C:\Users\user\AppData\Roaming\Kodi\addons\script.tag-generator\main.py): script aborted
01:54:37 T:10660    INFO: Python script stopped
01:54:37 T:10660   DEBUG: Thread LanguageInvoker 10660 terminating
01:54:38 T:12048   DEBUG: ------ Window Deinit (DialogProgress.xml) ------
Reply
#24
glad you got it fixed - as a general rule, Debug Mode should make things more verbose (good for cases where a specific movie/standup isn't behaving as expected) and 'I found no IMDB IDs' means that either IMDB changed their website and it broke my regex, or somehow we have internet access but that page isn't loading any text for us to search. Sooner or later the former will happen.
Reply
#25
Just found this addon and it's the perfect solution I was looking for to create a list of all my Standup specials.

Kudos, wellspokenman
4x R-Pi4b LibreELEC v10 | Aeon Nox: SiLVO | Flirc cases
Storage Synology DS411 | 4 x WD RED 6TB
Software MariaDB 10.4.19 | Filebot | Ember Media Manager
wiki (wiki) | First time user (wiki) | Debug_Log (wiki) | mysql (wiki) | artwork (wiki)
Reply
#26
(2015-10-28, 03:06)wellspokenman Wrote: Fixed for Kodi 14 and 15, removed Trakt and Music. Use RSS instead of the normal URL - see OP. Have also submitted to the official repo now, so should be much easier to install and manage.

Is there any chance that the Trakt option could be re-added? The trakt plugin no longer supports tagging from watchlists since v3.0.
Reply
#27
Nice, just seen this, I guess it can work well with nodes!

I wonder if its possible to extend to sports and other types of video genres.
Reply
#28
(2016-09-30, 10:52)barbsy42 Wrote:
(2015-10-28, 03:06)wellspokenman Wrote: Fixed for Kodi 14 and 15, removed Trakt and Music. Use RSS instead of the normal URL - see OP. Have also submitted to the official repo now, so should be much easier to install and manage.

Is there any chance that the Trakt option could be re-added? The trakt plugin no longer supports tagging from watchlists since v3.0.
Oh - I didn't know that. I dropped trakt support when they changed their API so would have to rewrite it from scratch. No promises but I will have a look at their new API and see how much work is involved.
Reply
#29
(2016-10-17, 11:21)zag Wrote: Nice, just seen this, I guess it can work well with nodes!

I wonder if its possible to extend to sports and other types of video genres.
Not sure I follow. Could you please link to some external lists that could add value if used to tag an internal video library?
Reply
#30
(2016-10-17, 12:53)wellspokenman Wrote:
(2016-10-17, 11:21)zag Wrote: Nice, just seen this, I guess it can work well with nodes!

I wonder if its possible to extend to sports and other types of video genres.
Not sure I follow. Could you please link to some external lists that could add value if used to tag an internal video library?

Something like https://www.themoviedb.org/movie/26023-deck-dogz

So the keyword "Skateboarding"

So I could categorize all my skateboarding movies together.

I have not looked at the TMDB api, but i'm guessing there is a way to access the keywords.
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 7

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Tag Generator (IMDb, Trakt, Oscars + Stand-up)3