Film Composers in DVDpedia

Any trouble you encounter with the Pedias, here's the place to ask for help.
reinklang
Captain
Captain
Posts: 21
Joined: Wed Nov 24, 2004 11:54 am

Film Composers in DVDpedia

Post by reinklang »

Happy New Year!

After spending a few days of maintenance on my movie collection I once again realized what a great piece of software DVDpedia is! :)

However, one thing I don't understand is: why are film composers not included as a field? Is there any clever way to add this field and retrieve the info from IMDB for example? Then it would also be cool to línk to the soundtrack album (locally or online). I'm not so familiar with customizing or scripting, but maybe someone has an idea?

UPDATE: O.K., I found out I can add fields like "Composer" or "Cinematographer" as custom fields. Also, I can check these under "IMDB Options" in the Plugins menu, but how can these fields be linked?
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Film Composers in DVDpedia

Post by Conor »

Although the fields can be added as custom fields, they won't be automatically filled in. The IMDb plugin places them directly in the credits. The plug-ins are open source and can be modified and rebuilt, you would need to have the developer tools (Xcode) installed on your computer. The source can be found here. This is a bit complicated as it requires a bit more than scripting and you can find information on how to set up a plug-in on this forum, but I can walk you through the change as you described what you wanted.

Inside IMDB.m search for:

Code: Select all

[creditsArray addObject:[NSDictionary dictionaryWithObjectsAndKeys:nameString, @"name", aRole, @"role", nil]];
And right after it add (you could change the custom number fields to match your database):

Code: Select all

if ([aRole isEqualToString:@"Composer"])
	[resultsDict setValue:nameString forKey:@"custom1"];
else if ([aRole isEqualToString:@"Cinematographer"])
	[resultsDict setValue:nameString forKey:@"custom2"];
Since I have now worked on it, I have built the above version for you [url=dvdpedia://www.bruji.com/download?temp/imdbspecial.zip]here[/url]. This link will install the plug-in automatically; but because it's the same version as the included plug-in you must delete the included plug-in. Find DVDpedia.app and control-click on it to use "Show Package Contents...". Navigate to the DVDpedia.app/Contents/Plug-ins folder and delete the imdb.plugin. Relaunch DVDpedia and you should have an "IMDb Special" search site. Your custom one should be named Composer and custom two Cinematographer.
reinklang
Captain
Captain
Posts: 21
Joined: Wed Nov 24, 2004 11:54 am

Re: Film Composers in DVDpedia

Post by reinklang »

Wow! Hey, this is fantastic. Thanks so much!

I installed as you explained and it works perfectly. OK, I do have to shuffle some data around now since my "custom1" and "custom2" fields we already in use but that's ok.

Thanks again!

UPDATE: now, perhaps you could help me with a few lines of terminal commands to move my existing custom field data? I tried a few things based on this info but only received errors:

http://www.bruji.com/forum/viewtopic.ph ... om1#p10833
reinklang
Captain
Captain
Posts: 21
Joined: Wed Nov 24, 2004 11:54 am

Re: Film Composers in DVDpedia

Post by reinklang »

O.K., wait... I got it! :)

(just made a mistake by mixing up the custom fields, but now everything is correct.)

Actually, it's not too difficult to edit the database file directly using Terminal. Sweet! :)

What's the trick again to edit multiple entried at once? I need to clear some fields now to make room for the new IMDB data.
User avatar
Nora
Site Admin
Posts: 2155
Joined: Sun Jul 04, 2004 5:03 am
Contact:

Re: Film Composers in DVDpedia

Post by Nora »

To edit multiple entries at once, just select them all (with the Command key held down or using Shift) and then click the Edit button in the toolbar. It'll automatically open a multiple edit window.
reinklang
Captain
Captain
Posts: 21
Joined: Wed Nov 24, 2004 11:54 am

Re: Film Composers in DVDpedia

Post by reinklang »

Got it! Thanks, Nora.
celtoslavica
Addicted to Bruji
Addicted to Bruji
Posts: 33
Joined: Fri Sep 10, 2004 5:50 am

Re: Film Composers in DVDpedia

Post by celtoslavica »

This was a long wish of mine! Download ImdB info right into the custom fields!

I followed Conor's instructions for XCode and managed to write the code in the plug-in project, but now when I try to "build", I always get these two error messages:

cp: /Users/markus/Downloads/ StWW/Release/DVDpedia.app/Contents/Plug-ins: No such file or directory
mkdir: StWW/Release/DVDpedia.app/Contents: No such file or directory

What am I missing? Do I have to create something else before? Or change the scripts?
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Film Composers in DVDpedia

Post by Conor »

To make writing a plug-in easier the project has an extra step where it copies the plug-in into DVDpedia, so that you don't have to do it by hand. It looks for DVDpedia inside the same folder as the current build. So in this case drop a copy of DVDpedia.app into "/Users/markus/Downloads/ StWW/Release/".

The other option is to turn off that step. Left hand side of Xcode window, open the target group and then IMDb group under that, the last step of the build will be "Quit Copy Launch", double click it to open the script. Add a "#" infront of the two lines that start with "mkdir" and "cp" to comment out the copy phase, the plug-in now will no longer be copied into the program after being built.
celtoslavica
Addicted to Bruji
Addicted to Bruji
Posts: 33
Joined: Fri Sep 10, 2004 5:50 am

Re: Film Composers in DVDpedia

Post by celtoslavica »

Thanks, Conor. I still can't figure it out, though.

1) When I download your Special IMDb plug-in from the link given, it just works fine, but not in the order I would like to arrange credits for cinematography and music score.

2) So I downloaded your xcode sourcecode/project

3) I managed to build the plug-in without error message and placed the plug-in the "Release" folder in the package of DVDpedia.app/Contents/Plug-ins, deleting the original one in this folder. Then I started DVDpedia, executed a search (many searches) on IMDb, but no option field is filled in.

4) This is true for your untouched xcode project built as well as for the xcode project built in which I added code according to the indications given to you.

I have no idea what could be wrong. :?

Markus
celtoslavica
Addicted to Bruji
Addicted to Bruji
Posts: 33
Joined: Fri Sep 10, 2004 5:50 am

Re: Film Composers in DVDpedia

Post by celtoslavica »

Got just now your email, followed your advise (deleted the comment code from the project, placed the new plug-in NOT in the app, but in the application support folder, deleted the old plug-in) and now it works! Great! :D Thank you so much.

I assume I have to repeat this procedure (deleting the IMDb plug-in inside the app) after each new version download?

Markus
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Film Composers in DVDpedia

Post by Conor »

The program will only load one plug-in class. Since you have the Xcode project you can change the class of your new version and then you will not have to remove the installed plug-in and updates will not be a problem. You will also have the option of using the regular IMDb plug-in.

In the left side pane of Xcode look for "Targets" group and open it. Double click on IMDB, it is the first and only item in that group. This opens a window, under the fourth properties tab change "Principal Class" from "IMDB" to anything else (as an example I use "MyIMDB").

Now on the left side pane select the "IMDB.h" file and right click it and choose rename and change to "MyIMDB.h". Repeat the process for the the .m file under it, should end up being "MyIMDB.m"

Inside the now MyIMDB.h file you will look for @interface IMDB change that to @interface MyIMDB.
Inside the now MyIMDB.m file you will look for @implementation IMDB change that to @implementation MyIMDB and #import "IMDB.h" changes to #import "MyIMDB.h"

Select the "info.plist" file inside the resources group and change the "PluginSearchName" to what you would like to see in the search site selection pop-up: "My IMDb".

Build in Release configuration and drop into the Plug-ins folder inside the data folder.
celtoslavica
Addicted to Bruji
Addicted to Bruji
Posts: 33
Joined: Fri Sep 10, 2004 5:50 am

Re: Film Composers in DVDpedia

Post by celtoslavica »

Super! It all worked like a charm! Thank you, Conor!!
reinklang
Captain
Captain
Posts: 21
Joined: Wed Nov 24, 2004 11:54 am

Re: Film Composers in DVDpedia

Post by reinklang »

Oops, what happened? Somehow I lost my beloved special IMDB option. I tried downloading/installing again from the link above, but no change. Any clues?
kbarnes70
Addicted to Bruji
Addicted to Bruji
Posts: 333
Joined: Tue Nov 11, 2008 3:15 pm
Location: United Kingdom

Re: Film Composers in DVDpedia

Post by kbarnes70 »

reinklang wrote:Oops, what happened? Somehow I lost my beloved special IMDB option. I tried downloading/installing again from the link above, but no change. Any clues?
Have you upgraded the main program? If so you will need to reinstall your IMDbSpecial plug in. You can put it in User/Library/Application Support/DVDpedia/Plugins but it will be overruled by the standard IMDb plugin in the program package itself. You need to delete the standard one by going to the DVDpedia application, right clicking it, selecting show package contents, clicking contents, then plugins and then deleting the IMDB plugin. You can put the special one there if you like to replace the standard one, but each time you update the program you will need to remember to delete the standard plugin and replace it with the special version.

I just keep the special one in User/Library/Application Support/DVDpedia/Plugins and then simply delete the standard one whenever I update the main program. I imagine that on the next non-beta release Conor might have a more elegant solution, but for now this works just fine.

Hope I answered the question you were asking :)

Best regards,

Keith
Britta
Inductee
Inductee
Posts: 1
Joined: Sat Mar 14, 2009 5:20 pm

Re: Film Composers in DVDpedia

Post by Britta »

kbarnes70 wrote:
reinklang wrote:Oops, what happened? Somehow I lost my beloved special IMDB option. I tried downloading/installing again from the link above, but no change. Any clues?
Have you upgraded the main program? If so you will need to reinstall your IMDbSpecial plug in. You can put it in User/Library/Application Support/DVDpedia/Plugins but it will be overruled by the standard IMDb plugin in the program package itself. You need to delete the standard one by going to the DVDpedia application, right clicking it, selecting show package contents, clicking contents, then plugins and then deleting the IMDB plugin. You can put the special one there if you like to replace the standard one, but each time you update the program you will need to remember to delete the standard plugin and replace it with the special version.

I just keep the special one in User/Library/Application Support/DVDpedia/Plugins and then simply delete the standard one whenever I update the main program. I imagine that on the next non-beta release Conor might have a more elegant solution, but for now this works just fine.

Hope I answered the question you were asking :)

Best regards,

Keith
Hallo, to introduce me: my name is Britta. I am new to this forum here and first I would like to say thank you for this work here, DVDpedia is a great application. I think it can be much more than a DVD library. But I think you already know ....
But to come to my question: the link above for installing the special imdb plugin version is not working. After removing original imdb plugin from app package and pressing "here" from this threat, DVDpedia opens, but nothing happend actually. No new plugin appears in Data folder or in app package content plugins folder. That's why sadly the IMDB option is not in the list of getting extra infos menue no more now ... Is the link still working? Maybe the link should lead to the downloadable file than to the install script? I think composer should be a standart field anyway. Any chance for it as a future request?

PS: I did the Xcode steps now, and it worked for me becuase you already took the two lines in comments in your source. thanks for that. But you should remove the not working "here"-link, or renew it .... ;)

sorry for this unqualified first post :) and thank you all for your great work,
best regards, britta
Post Reply