[RELEASE] Tag Generator (IMDb, Trakt + Stand-up)

  Thread Rating:
  • 1 Votes - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
wellspokenman Offline
Senior Member
Posts: 117
Joined: Jul 2012
Reputation: 1
Smile  [RELEASE] Tag Generator (IMDb, Trakt + Stand-up)
Post: #1
My first effort at an xbmc addon - it searches IMDB and Trakt watchlists then writes tags locally to matching entries in your database. This requirement came about because my girlfriend wanted to see only her movies in a dynamic list, and since we use CouchPotato the IMDb list was an obvious choice. It will take up to 5 URLs in the imdb.com/user/ur11111111/watchlist format. Trakt integration requires only a username and password.

As an added bonus it also creates tags for Stand-up comedy. No such genre exists today, and I don't want comedy movies next to stand-up DVDs when browsing by genre. The comedians list comes from the wiki standup comic lists for UK, US, Canadian, Australian and international comedians. If you want someone to match that isn't, just add them to one of these wiki lists and trigger a manual generation.

Only works on Frodo (since this is when tag support began). Tested on linux and windows, the script runs as a service, at a configurable time interval.

Download 0.3 here, or 0.2 here. 0.1 still available for those who are not yet on Frodo. Get it here.

################## What's new in 0.3? #####################
# Added Trakt support for movie watchlist and custom watchlists
# Custom Trakt lists are tagged by their name
# Added debug mode
# Made a pretty icon
# code cleanup and speed tweaks
################## What's new in 0.2? #####################
# Uses JSON to write the tags so now it's much more portable.
# Should work for people using MySQL just fine.
# MUCH better progress updates, logging and error checking.
# Writes tags instead of playlists - much more flexible
# Preserves existing tags and only writes as needed
# New feature - much slower! That's just how JSON rolls I'm afraid.
# Background music (to comfort you while you wait)
# Uses the xbmc "label" to make a match (no more folder name dependence)
# Option to wipe all your tags if you want to start from scratch
###########################################################
What's next?
* More speed - will keep on optimising it
* Graphical notices in XBMC when the script fails. At the moment if IMDB, Trakt or Wikipedia are down there's just an ugly 'script failed' message.
* Thinking about adding a 'Coming Soon' tab that would be a pretty graphical aggregate of all the movies from all the watchlists that are not in XBMC.
* Couchpotato doesn't read custom Trakt lists at the moment. I could fix that by adding CP integration:
- if $movie in $xbmcdb and $trakt and not in $couchpotato:
- write_to_cp($movie)

[Image: tumblr_mmjglaMRRZ1rr6q1co1_1280.jpg]
[Image: tumblr_macfl375Sn1ro9ii5o1_1280.jpg]
[Image: tumblr_macflhJNWM1ro9ii5o1_1280.jpg]
[Image: tumblr_mohmoo1i5M1rr6q1co1_1280.png]
(This post was last modified: 2013-06-30 10:10 by wellspokenman.)
find quote
xtremesnow Offline
Junior Member
Posts: 13
Joined: Jan 2012
Reputation: 0
Post: #2
hey i'm receiving the error service.playlist-generator 01 . do you know how i can get this to work?
find quote
xtremesnow Offline
Junior Member
Posts: 13
Joined: Jan 2012
Reputation: 0
Post: #3
i got it to work by restarting it but now it says that everything is successful and that it put 24 movies in my playlist but there isn't any in the created playlist.
find quote
xtremesnow Offline
Junior Member
Posts: 13
Joined: Jan 2012
Reputation: 0
Post: #4
Sorry for answering most of my questions. but i think i found the problem, it is looking for paths and in the path it has the file name so its not finding anything usefull. i think it's because all of my movies are all in the same folder instead of each being in individual folders. i'm wandering if there is a way to modify the script so that it finds the file name only and in the smart playlist it would change it from path to file?
find quote
akuiraz Offline
Member
Posts: 76
Joined: Apr 2010
Reputation: 0
Post: #5
any chance of getting this working for mysql installations?

[Image: widget]
find quote
SirClayman Offline
Junior Member
Posts: 1
Joined: Jan 2013
Reputation: 0
Post: #6
Thank you for this smashing generator!

It seems like the generator only works for the main watchlist, when trying with an public "custom list" i get an error message.

Would it be possible to compare two of the playlists (say mine and my wifes) and to generate a list with movies that are in XBMC that appears in both of the playlists. This would then be a list of movies that both my wife and I want to see.
find quote
wellspokenman Offline
Senior Member
Posts: 117
Joined: Jul 2012
Reputation: 1
Post: #7
Very cool to see that others enjoyed this functionality too! I've just changed job so things are a bit too intense to sit down and code at the moment, but here are some quick answers:

@xtremeshow:
- you're correct, the script is looking for folder names, as file names are frequently meaningless. The assumption was that if XBMC movie scrapers couldn't resolve the name from the file (as in my case - my filenames are garbage) then my script wouldn't stand a chance. I could change the behaviour quite easily and add a radio button in the options screen.

@akuiraz
- That's coming up next - I've gone to my own sql setup too.

@SirClayman
- theoretically possible, sure. Hadn't thought about that. Maybe better with smart playlists in Frodo.

----

The plan was actually to wait for Frodo before making any updates. This script really exists due to a lack of customisable tags in the v11 database. If we could programmatically tag our movies with "Jim's IMDB" and "Janet's IMDB" then a simple smart playlist requiring both of those criteria would present the movies appearing in both (as in SirClayman's example).
find quote
wellspokenman Offline
Senior Member
Posts: 117
Joined: Jul 2012
Reputation: 1
Post: #8
Finally got a quiet moment in the new job - 0.2 released.

@xtremeshow:
now it looks for the 'label' field in the XBMC database

@akuiraz:
fixed - 0.2 uses JSON, so it doesn't matter what the backend DB is hosted with.

@SirClayman
please post some example URLs. I can update the regex. Your other wish has been granted: With tags instead of playlists you have the ability to create any playlist you like based on the new metadata.
(This post was last modified: 2013-05-09 23:35 by wellspokenman.)
find quote
steve1977 Offline
Posting Freak
Posts: 1,913
Joined: Dec 2006
Reputation: 0
Post: #9
I see you have trakt as a potential future feature. What I see even more exciting than the trakt watchlist, would be to create tags for the "trakt personal lists". Ideally, I wouldn't need to create a separate URL entry for all my 10 trakt lists, but just add it once and get different tags based on the name of the trakt list.

Any chance? Thanks for considering!

Server: Asus Sabertooth Z77 | Intel Core i5 3.4 GHz | 12 GB DDR3 | 256 GB SSD, 40 TB (1 x 4 TB, 6 x 3TB, 9 x 2 TB)
HTPC 1: Apple Mac Mini (mid-2011) | Intel Core i5 2.5 GHz | 4GB DDR3 | 500 GB
HTPC 2: Apple Mac Mini (mid-2007) | Intel Core 2 Duo 2.0 GHz | 4 GB DDR2 | 16 GB SSD
find quote
wellspokenman Offline
Senior Member
Posts: 117
Joined: Jul 2012
Reputation: 1
Post: #10
Shouldn't be too hard - trakt has an API for this sort of thing. I was thinking that you'd have to punch in your username and password, but no URLs.
find quote
steve1977 Offline
Posting Freak
Posts: 1,913
Joined: Dec 2006
Reputation: 0
Post: #11
(2013-05-12 12:20)wellspokenman Wrote:  Shouldn't be too hard - trakt has an API for this sort of thing. I was thinking that you'd have to punch in your username and password, but no URLs.

That would be fantastic - looking forward to some great news for the next release!

Server: Asus Sabertooth Z77 | Intel Core i5 3.4 GHz | 12 GB DDR3 | 256 GB SSD, 40 TB (1 x 4 TB, 6 x 3TB, 9 x 2 TB)
HTPC 1: Apple Mac Mini (mid-2011) | Intel Core i5 2.5 GHz | 4GB DDR3 | 500 GB
HTPC 2: Apple Mac Mini (mid-2007) | Intel Core 2 Duo 2.0 GHz | 4 GB DDR2 | 16 GB SSD
find quote
wellspokenman Offline
Senior Member
Posts: 117
Joined: Jul 2012
Reputation: 1
Post: #12
check out the 2.3 beta of the official trakt addon for xbmc - it creates tags from trakt watchlists:
http://forum.xbmc.org/showthread.php?tid=138745
find quote
wellspokenman Offline
Senior Member
Posts: 117
Joined: Jul 2012
Reputation: 1
Post: #13
Nevermind - that didn't actually work at all (it's beta though, so we can't complain). I just got Trakt watchlist and custom list tag writing working in Tag-Gen 0.3 - should have it polished and ready within a week. Update: done - see OP.
(This post was last modified: 2013-06-16 15:30 by wellspokenman.)
find quote
xtremesnow Offline
Junior Member
Posts: 13
Joined: Jan 2012
Reputation: 0
Post: #14
i keep getting the error main.py error. does anyone know how i can fix this?
find quote
Gade Offline
Skilled Skinner
Posts: 243
Joined: Jan 2013
Reputation: 8
Location: Copenhagen, Denmark
Post: #15
This is a really great and usefull add-on. Thanks a lot for the fantastic work :-)

Is it possible at some point to add support for imdb public lists (http://www.imdb.com/list/xxxxxxxxxxx)?
(This post was last modified: 2013-08-22 07:12 by Gade.)
find quote
Post Reply