IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> [WS] imdb, movie tagging
dano
post Nov 10 2009, 11:23
Post #1


Moderator


Group: Moderators
Posts: 5688
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.65



Mp3tag v2.45 mandatory

How do I install the script? / Wie installiere ich das Script?


imdb
Tag movies or tv shows with mp4 container.

Scripts:
imdb#Search Movies
imdb#Search TV Episodes
imdb#URL imdb id

Imported Tags:
  • Standard:
    Artist, Album, Title, Year, Comment, Composer, Cover
  • Custom:
    Releasedate, Airdate, Cast, Language, Rating, IMDB Id, Country
  • iTunes supported:
    Releasetime, ITUNESMEDIATYPE, Subtitle, ITUNESPODCASTDESC, TVEpisode, TVSeason, TVShow


## Scroll down for updates ##


This post has been edited by dano: Oct 18 2010, 20:54


--------------------
Go to the top of the page
 
+Quote Post
morrison
post Nov 10 2009, 17:40
Post #2


Member


Group: Full Members
Posts: 66
Joined: 11-October 07
From: Russia
Member No.: 5762
Mp3tag Version: 2.50



Good news

Perhaps in the future will be possible to get info for all formats and save them in separate xml files? Excellent.
Go to the top of the page
 
+Quote Post
edrikk
post Mar 31 2010, 17:17
Post #3


Member


Group: Full Members
Posts: 69
Joined: 8-October 09
Member No.: 11061
Mp3tag Version: 2.48e



In case anyone is interested, the following (when added to end of the Movie script) should get you the MPAA Certification (which will show up in iTunes).

Please note that because (as far as I can tell) the scripting language does not support writing the pipe ("|") symbol (can't even be escaped to get it in), you have to run an action after the fact to replace the "@" symbol with an "|" for iTunEXTC.


CODE
# Cert
findline "USA:" 1 1
unspace
if "USA:"
    movechar 4
    outputto "iTunEXTC"
    
    replace "|" ""
    replace " " ""
        replace "USA:G" "mpaa@G@100@"
        replace "USA:PG-13" "mpaa@PG-13@300@"
        replace "USA:PG" "mpaa@PG@200@"
        replace "USA:R" "mpaa@R@400@"
        replace "USA:NC-17" "mpaa@NC-17@500@"
        replace "USA:Unrated" "mpaa@Unrated@???@"
        replace "USA:Approved" "mpaa@PG-13@300@"
        replace "USA:Passed" "mpaa@PG-13@300@"
        replace "USA:NotRated" "mpaa@Not Rated@000@"
        replace "USA:TV-MA" "us-tv@TV-MA@600@"
        replace "" "mpaa@Not Rated@000@"
        sayuntil "</a>"
else
    outputto "iTunEXTC"
        say "mpaa@Not Rated@000@"
        findline "<html>" -1
endif



Also, I think iTunes may have some problems with the fact that MP3Tag writes the iTunEXTC tag in all upper case... So I have created (as part of the "@" to "|" Action) a rule that properly re-writes the tag:

Replace with regular Expression
_FIELDNAME
ITUNEXTC
iTunEXTC

This post has been edited by edrikk: Mar 31 2010, 17:17
Go to the top of the page
 
+Quote Post
edrikk
post Aug 31 2010, 22:54
Post #4


Member


Group: Full Members
Posts: 69
Joined: 8-October 09
Member No.: 11061
Mp3tag Version: 2.48e



I have attached an updated IMDB web source script for IMDB, which meets my needs for "all the metadata that I can get"... smile.gif

In addition, I have attached 3 Actions which should be run on the file(s) in question, AFTER the web script has been run to complete the "work".


Download the web script
Place the script in: %appdata%\mp3tag\data\sources

- Download the 3 action files "Finish Setting Video Tags.mta" and "Fix Tag Case (iTunEXTC, etc).mta" and "Find bad plist.mta"

- Copy the files to directory:
%appdata%\Mp3tag\data\actions


I recommend running the actions in this order (so place them in the actions dialog of MP3Tag in this order):
1) Find Bad Plist (in case the script screwed up, and the plist is broken)
2) Finish Setting Video Tags (copies information to other relevant tags
3) Fix Tag Case (so for example, ITUNEXTC becomes iTunEXTC)



The web script as it stands pull and populates/stores the following data in your mp4 file:
- Artists ("/" delimited)
- Genre (the first non-"Drama". If only "Drama" exists, use it)
- Composer (i.e. writters, "/" delimited)
- IMDB ID
- IMDB Rating
- Director ("/" delimited)
- Producer ("/" delimited)
- ReleaseDate
- MPAA Rating and REASON (stored in iTunEXTC. Reason is not used anywhere yet AFAIK).
- If rating is "USA:NC-17", then the itunes "Advisory" tag is also set.
- Description
- Tagline
- IMDB Keywords
- iTunMOVI (which Apple TV etc uses), containing:
* Studio
* Screenwriters
* Directors
* Producers
* Cast



Given a couple of limitations/bugs in mp3tag, you have then then create and run the following action on the file AFTER running the web script:


- Right click on the file you just ran the script on, and select: "Convert" and then "Actions"
- Make sure only "Finish Setting Video Tags" and "Fix Tag Case (iTunEXTC, etc)" and "Find bad plist" have their checkboxes "checked", and are in the order that I originally mentioned at the top of this post.

- Click "Ok"




Hope this helps people.


<<EDIT: "Country" was a little finiky, so I removed it... Makes the script more stable overall...>>

This post has been edited by edrikk: Sep 1 2010, 05:00
Attached File(s)
Attached File  imdb_web_source_and_actions.zip ( 3.84K ) Number of downloads: 542
 
Go to the top of the page
 
+Quote Post
edrikk
post Oct 12 2010, 20:04
Post #5


Member


Group: Full Members
Posts: 69
Joined: 8-October 09
Member No.: 11061
Mp3tag Version: 2.48e



I have updated the script to correct an issue with updated IMDB format (for example, previously you could type in the ttXXXXXX number from IMDB into the search box, but the IMDB changes broke that... This has been corrected.

Also, I have added an action which you may or may not want to use... This action ("Set iTunesHD") sets the iTunes HD flag, if the file size is greater than 1400 MB. That's the only check, as that's all the MP3Tag provides... So yes, even a non-HD video could be tagged as HD. Use if you are fine with that, ignore that action if you don't like it...


[EDIT: Note that you need version 2.46c or newer for this version (unless you don't use the HD action]

This post has been edited by edrikk: Oct 12 2010, 20:07
Attached File(s)
Attached File  imdb_web_source_and_actions.zip ( 4.13K ) Number of downloads: 299
 
Go to the top of the page
 
+Quote Post
edrikk
post Oct 29 2010, 20:34
Post #6


Member


Group: Full Members
Posts: 69
Joined: 8-October 09
Member No.: 11061
Mp3tag Version: 2.48e



Updated to work with the field name changes introduced in version 2.46d of MP3Tag.
Will not work with versions earlier than 2.46d
Attached File(s)
Attached File  imdb_web_source_and_actions_2.46d.zip ( 4.11K ) Number of downloads: 306
 
Go to the top of the page
 
+Quote Post
edrikk
post Jan 30 2011, 15:26
Post #7


Member


Group: Full Members
Posts: 69
Joined: 8-October 09
Member No.: 11061
Mp3tag Version: 2.48e



A small update, and note:

  1. You might notice that the script sometimes gives errors when you search IMDB by name, and if the name is a direct hit. In this case, I recommend that you simply enter the IMDB ID in the search box (easiest way to find the IMDB ID is to "ttXXXXXX" part of the IMDB URL of the video.
  2. I have modified the actions so that the ALBUMARTIST is now the first artist listed in IMDB. Previously, the same value as the ARTIST tag was used (full list).
  3. I have included an extra Web Source which uses the Apple Web Services to retrieve the CATALOGID tag. This is a bit "janky" at the moment, so use your judment to ensure it is the correct one. To help in ensuring the number is the correct one, the name of the video from the source is also returned.

Attached File(s)
Attached File  imdb_web_source_and_actions_2.48.zip ( 4.77K ) Number of downloads: 216
 
Go to the top of the page
 
+Quote Post
edrikk
post Feb 1 2011, 19:20
Post #8


Member


Group: Full Members
Posts: 69
Joined: 8-October 09
Member No.: 11061
Mp3tag Version: 2.48e



Quick update.
Exactly the same as the previous item, just fixed the Apple Web Script to make it not "janky"...


Attached File(s)
Attached File  imdb_web_source_and_actions_2.48.zip.zip ( 5K ) Number of downloads: 239
 
Go to the top of the page
 
+Quote Post
edrikk
post May 26 2011, 03:56
Post #9


Member


Group: Full Members
Posts: 69
Joined: 8-October 09
Member No.: 11061
Mp3tag Version: 2.48e



Updated for version 2.48e.
Please note that for some of the tags to work "properly" (e.g. Rate, Keyword), version 2.48e or higher of mp3tag must be used.

Additions / Changes:
  1. Using the new "_video_width" property to set iTunesHD flag if the width is greater or equal to 1280. Previously (without this attribute being present), the file size was used to set the flag (as a guess, which could easily be incorrect).
  2. The new "Rate" tag is set based on the IMDB Rating. This value is out of "100" so if the imdb rating is "8.2/10" the value will be "82"
  3. The new "Kewords" tag is set to the keywords found in IMDB



[Edit] As an FYI, as mentioned in previous threads, I find that using the IMDB ID as the search criteria is the most fail proof means of using the script. [/edit]

This post has been edited by edrikk: May 26 2011, 14:52
Attached File(s)
Attached File  imdb_web_source_and_actions_2.48e.zip ( 5.07K ) Number of downloads: 317
 
Go to the top of the page
 
+Quote Post
edrikk
post Jan 6 2012, 20:51
Post #10


Member


Group: Full Members
Posts: 69
Joined: 8-October 09
Member No.: 11061
Mp3tag Version: 2.48e



A small update...

Addition:
  1. The SUBTITLE tag will now be populated, and also contains the same description as that which is in PODCASTDESC.


Attached File(s)
Attached File  imdb_web_source_and_actions_2.48e_20120106.zip ( 5.3K ) Number of downloads: 263
 
Go to the top of the page
 
+Quote Post
edrikk
post Apr 24 2012, 19:17
Post #11


Member


Group: Full Members
Posts: 69
Joined: 8-October 09
Member No.: 11061
Mp3tag Version: 2.48e



A few changes - Note that version 2.50 is required to run the script:

  • Use the new $verticalbar() function in the Web Source (for iTunEXTC tag)
  • As part of the Actions, if the "iTunMovi" atom has value '7:720p' within it (the default value set in the Web Source), the Action will update to 720p or 480p based on video width
  • As part of the Actions, if the "iTunMovi" atom has the 'high-definition' key within it (the default value set to 'true' in the Web Source), the Action will update to true/false based on video width
  • Take into account, and set the new 1080i/p value of hdvd (which is 2).




PS. If you've tagged old videos using previous version, simply running the Actions on the files again will update the relevant tags.

This post has been edited by edrikk: Apr 24 2012, 19:18
Attached File(s)
Attached File  imdb_web_source_and_actions_2.50_20120424.zip ( 5.56K ) Number of downloads: 389
 
Go to the top of the page
 
+Quote Post
boundless
post Oct 21 2012, 14:54
Post #12


Member


Group: Members
Posts: 1
Joined: 17-April 05
Member No.: 1734
Mp3tag Version: 2.30



QUOTE (edrikk @ Aug 31 2010, 23:54) *
I have attached an updated IMDB web source script for IMDB, which meets my needs for "all the metadata that I can get"... smile.gif

In addition, I have attached 3 Actions which should be run on the file(s) in question, AFTER the web script has been run to complete the "work".

<snipped instructions>


Thanks for this script, maybe I can test them out on some of my mistagged for trakt TV shows on my XBMC TV-Show playlist.... smile.gif
Go to the top of the page
 
+Quote Post
edrikk
post Dec 11 2012, 17:14
Post #13


Member


Group: Full Members
Posts: 69
Joined: 8-October 09
Member No.: 11061
Mp3tag Version: 2.48e



Update to IMDB scraper due to IMDB page re-designs.
Attached File(s)
Attached File  imdb_web_source_and_actions_2.50_20121211.zip ( 5.56K ) Number of downloads: 408
 
Go to the top of the page
 
+Quote Post
CyberDemon
post Jan 4 2013, 09:46
Post #14


Member


Group: Members
Posts: 1
Joined: 1-January 13
Member No.: 17365
Mp3tag Version: 2.53



Edrikk,
This is a very nice script, thanks for your work keeping it well maintained. Your work has inspired me to build my own revision based heavily on your design.

I have included my script in this post so that you may take from it any features you like.

I added a new column in the search results window that displays the type of result. (Movie, TV Show, Game etc.)

I've also added several tags as well as image scraping/tagging to this script.

Thanks again for all your work on this script, I hope you find my additions as useful as I've found your script. smile.gif


CyberDemon
Attached File(s)
Attached File  IMDB__iTunes_mp4__mp3tag_Web_Source_Script.zip ( 3.56K ) Number of downloads: 482
 
Go to the top of the page
 
+Quote Post
niconic
post Sep 19 2013, 20:06
Post #15


Member


Group: Members
Posts: 1
Joined: 19-September 13
Member No.: 18400
Mp3tag Version: 2.57



This is a great script and does exactly what I want it to, however it seems The Actors (cast) and Director fields doesn't apply to the mp4 file when I run the script.

Any suggestions would be helpful. Here is what I am using from CyberDemon, Edrikk and Dano's scr. Do I need to adjust the code?

CODE
### Directors ###
findline "<html" -1
findline "<h5>Director" 1 1
unspace
if "<h5>Director"
#Save Directors
outputto "Director"
joinuntil "</div>"
sayregexp "(?<=;\">)[^<]+(?=<)" ", "

# Append Directors to iTunMOVI
outputto "iTunMOVI"
say "<key>directors</key><array><dict><key>name</key><string>"
joinuntil "</div>"
sayoutput "Director"
say "</string></dict></array>"
saynewline
endif

### Actors ###
findline "<html" -1
findline "<h3>Cast</h3>" 1 1
if "<hr/>"
#Save Actors
outputto "Artist"
sayregexp "(?<=(/|;)\">)[\s\S]{1,50}(?=</a></td><td\sclass=\"ddd\">)" ", " "</table>"

# Append Directors to iTunMOVI
outputto "iTunMOVI"
say "<key>cast</key><array><dict><key>name</key><string>"
sayoutput "Artist"
say "</string></dict></array>"
saynewline
endif

### Close iTunMOVI XML ###
outputto "iTunMOVI"
say "</dict>"
saynewline
say "</plist>"
saynewline

Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st October 2014 - 08:06