INTERACT FORUM

Windows => Third Party Plug-ins, Programs, and Skins => Topic started by: zybex on March 14, 2020, 06:49:52 pm

Title: MCRatings v3.0 released
Post by: zybex on March 14, 2020, 06:49:52 pm

Edit: please get sample Post-processing script from the v3.1 announcement:
https://yabb.jriver.com/interact/index.php/topic,124516.msg866064.html#msg866064

Hi,
I've just published MCRatings v3.0, with the following changes:

The original v1 announcement is here (https://yabb.jriver.com/interact/index.php/topic,119792.0.html).

Links: Screenshots (https://github.com/zybexXL/MCRatings/wiki/Screenshots) - Quick Start (https://github.com/zybexXL/MCRatings/wiki#Quick-Start) - User Guide (https://github.com/zybexXL/MCRatings/wiki) - Source code (https://github.com/zybexXL/MCRatings)
Download: latest version (https://github.com/zybexXL/MCRatings/releases/latest)

(https://raw.githubusercontent.com/zybexXL/MCRatings/master/Screenshots/PosterTooltip.png)

(https://raw.githubusercontent.com/zybexXL/MCRatings/master/Screenshots/PosterBrowser2.png)
Title: Re: MCRatings v3.0 released
Post by: arcspin on March 15, 2020, 01:20:45 am
Thank you so much!
This is such great news.

A donation has been made in your name to the Human Fund.
(Classic Seinfeld quote)

I made an PayPal donation the minute a read your update message.
GREAT WORK!


Ok, a couple of questions.
"This can be useful to prevent your movie disks/NAS from spinning up to load the poster while you are browsing movies in JRiver."
Q: Where would be the best place to store the posters, will my NAS not spin up if I save the posters on a folder on my NAS or should I choose a folder on a separate HDD?
Q: If i choose to save the poster in their respective movie folder, will that some how slow down my browsing movies with JRiver?


This is what I have been waiting for:
"Save actor/crew thumbnails to this folder - Set this option and enter a folder location to enable downloading actor/crew profile thumbnails for each movie when you do Get Movie Info. These thumbnails can be used on JRiver's Theater View and Movie Tooltips (see JRiver's Interact forum for details)"
Q: Can someone point me to the correct thread, this will for sure involve some expression skills that I surely do not have.
Q: Where would be the best place to store actor/crew thumbnails, on my NAS or on a different HDD, like
"C:\Users\arcsp\AppData\Roaming\J River\Media Center 25\" or
"C:\Program Files\J River\Media Center 25\Data"


I would like to do this right from the beginning so I don't have to make changes later.

//arcspin
Title: Re: MCRatings v3.0 released
Post by: zybex on March 15, 2020, 05:19:32 am
Arcspin,
Thank you for your donation, and welcome to a select group of gentlehumans :)

Quote
Q: If i choose to save the poster in their respective movie folder, will that some how slow down my browsing movies with JRiver?
This is the default JRiver behavior - next to each movie file, you'll see the corresponding poster as a JPG file. So if you use this option in MCRatings it will just keep doing what JRiver does. For setups like mine where I have all the movies in a NAS, what this causes is a delay of 10-15 seconds when I start using JRiver to browse movies, because it's waiting for the NAS to wakeup and spin up the disks. This is just for the first movie/tooltip but it's still annoying sometimes as JRiver just freezes waiting for the NAS response. Also, sometimes I don't even want to play anything so I'm waking up the NAS for nothing.
The alternative provided by MCRatings - saving all posters to a defined folder - avoids this. Personally I still like to have a copy of the poster next to the movie too, so I select both the "save posters to folder xxxx" and the "also save to the movie folder". This keeps 2 copies of the poster, but the "official" one for JRiver is the Common folder one.

Quote
Q: Where would be the best place to store the posters, will my NAS not spin up if I save the posters on a folder on my NAS or should I choose a folder on a separate HDD?
Some considerations for selecting a folder location:
- obviously, not on the NAS - it would still have to wake up.
- I have my HTPC connected to my TV - it's always on, has an SSD, and it runs the JRiver server. This is the best place for me
- Keep in mind that the path you use needs to be accessible by JRiver. I have the JRiver server, but I also use JRiver clients on other laptops/machines. If I set the folder to "C:\Posters" on the HTPC, this will work on that machine but not on the others as "C:\Posters" won't exist there. So the proper way to do it is to share the c:\posters folder on the HTPC and then use something like "\\HTPC\Posters" as the poster folder. Make sure share/folder permissions allow the share to be accessed by other machines on your LAN, and written to by MCRatings.

Quote
Q: Can someone point me to the correct thread, this will for sure involve some expression skills that I surely do not have.
Err, well, I was thinking of this thread (https://yabb.jriver.com/interact/index.php/topic,119385.msg862028.html) where you're also active. Moe and Lepa seem to be the experts :)

Quote
Q: Where would be the best place to store actor/crew thumbnails, on my NAS or on a different HDD
The same considerations apply as above - if you're using JRiver server+clients, you'll need to use a shared folder.
Other considerations:
- the easiest folder to use if you have a single JRiver install (no clients) is the Tooltip folder. I suggest this path:
C:\Program Files\J River\Media Center 26\Data\Tooltip\Actors
(or the "Program Files (x86)" variant if you use JRiver 32bit)
- the path above can be easily referenced in JRiver Expressions. If you have a picture there called "Keanu Reeves.png", you can reference it with:
Code: [Select]
<img src="tooltip:Actors\Keanu Reeves" width="100">
Note the "png" extension is gone.
- you'll need to create an expression that translates the movie's "Actors" field content into a list of the corresponding <img> tags. I think the other thread referenced above has examples on how to do that, and Lepa/Moe can help further.
- to allow MCRatings to write to that folder, you'll have to reset its permissions (right-click, properties, security, add "everyone/full access" to the folder permissions)

If you have multiple JRiver clients though... it gets trickier. For the same reason I explained above for the posters, the Actors folder needs to be a shared folder. In this case:
- create and share a folder somewhere on your LAN - let's say \\HTPC\Actors
- give R/W access to all users
- enter it in MCRatings as the download folder for Thumbnails
- on JRiver, the Expression to reference a given Actor profile becomes:
Code: [Select]
<img src="\\HTPC\Actors\Keanu Reeves" width="100">
Of course, this expression needs to be more complicated as you don't want Keanu Reeves to be in all your movies, no matter how popular he is.

I hope this helps. I'm sure we'll go back and forth a few times, refining the solution until it works as desired!

Zybex
Title: Re: MCRatings v3.0 released
Post by: Moe on March 16, 2020, 01:10:08 am
The poster stuff looks great! Can't wait to give it a whirl.  Excellent work!

What are you using for post-processing on images?  if it's imagemagik, this is going to be a real game changer for people not comfortable working on the command line.
Title: Re: MCRatings v3.0 released
Post by: arcspin on March 16, 2020, 01:31:24 am
And please Moe and others.
If you could look into making the most out of the crew and cast  thumbnails as well.

Thank you and take care!
Title: Re: MCRatings v3.0 released
Post by: MagerClab on March 16, 2020, 01:34:21 am
Thanks a lot!
Title: Re: MCRatings v3.0 released
Post by: zybex on March 16, 2020, 05:24:51 am
The poster stuff looks great! Can't wait to give it a whirl.  Excellent work!
Thanks Moe! I should have used a screenshot of John Wick instead, then it would be breathtaking instead of just great!  ;D

Quote
What are you using for post-processing on images?  if it's imagemagik, this is going to be a real game changer for people not comfortable working on the command line.

It doesn't work like that. I'm just providing a command line box where you can enter whatever command you like, and it gets called after each image is downloaded. It's up to the user to enter a command, or create a .bat that calls ImageMagik or other tools with whatever parameters needed to do whatever you like.

I'm hoping that people here start sharing some useful scripts/commands to put there :) *hint hint*
I expect the most common setup would be:
- have ImageMagik installed
- create a batch script to call ImageMagik to transform a picture the way you want
- add the command "c:\scripts\myScript.bat $image $name $role" (or whatever args the script needs) to MCRatings.

And that's it! Customizeable post-processing FTW.

Zybex
Title: Re: MCRatings v3.0 released
Post by: Moe on March 16, 2020, 10:58:20 am
Unfortunately, I am not a programmer (yet).  So, while I can somewhat follow along with what you're saying, it's going to be above my current skill set.  I could share my imagemagik templates that achieve what I have done but I wouldn't be able to merge the image and actor/role information together.
Title: Re: MCRatings v3.0 released
Post by: zybex on March 16, 2020, 11:22:03 am
Programming should not be needed for this - it's just calling ImageMagick's "convert" with a bunch of parameters (template) to achieve what we want. I haven't used IM much, but it should be straightforward (once you navigate the hundreds of IM options available...)

Please share a couple of your templates, maybe I can try it out and come up with an example on how to use it with MCRatings (next weekend).
Title: Re: MCRatings v3.0 released
Post by: lepa on March 16, 2020, 04:02:28 pm
Thanks zybex for new version.
Moe, MCUtils is basically doing the same. We'll give our parameters how to start ImageMagick (source image >> postprocessing >> destination image) So you can experiment by starting ImageMagick in command line by giving it source image, commands what to do with that image and where to save the changes  e.g "magick convert rose.jpg -resize 50% rose.png" then when you're satisfied with the end result you can add that command (program start + parameters) to MCRatings

https://imagemagick.org/script/command-line-processing.php
I have for example made following perl script which tells MCUtils to run image through ImageMagick using these command line parameters.

Code: [Select]
definePostprocCommand(caption_rsplit => {
    format  => 'magick "%s" -set option:WIDTH "%%w"
                    "(" -size "%%[WIDTH]x120" -background "#0008" -fill white -gravity south -kerning 4 -pointsize 50 -interline-spacing -20 -font Segoe-UI-Bold caption:"%s" -gravity south ")"
                    -composite -bordercolor "#414056" -border 5 +repage "(" +clone -background white -shadow 40x2+5+5 ")" +swap -background none -layers merge +repage "%s"',
    args    => [ '<file>', 'rsplit(<person>)', '<actor1>' ]
});
Title: Re: MCRatings v3.0 released
Post by: Moe on March 16, 2020, 07:42:09 pm
Yes, I know that it's essentially doing what MCUtils is doing.  The part that I figured would take "programming" would be generating the token for the actors name and role to append to the image.  From what I understood of MCRatings it could do post processing on the image itself, but I don't know if it can use other fields that MCRatings receives and merge them with the image.

This is the code from MCUtils that generates the images that you see in my screenshots

Code: [Select]
definePostprocCommand(caption_ac => {
    format  => 'magick "%s" -gravity center -extent 2:3 -resize 130x195
                    "(" -size 130x -background none -fill white -pointsize 16 -gravity northwest -font Segoe-UI-SemiBold caption:"%s" ")"
                    "(" -size 130x -background none -fill white -pointsize 14 -gravity northwest -font Segoe-UI-Italic caption:"%s" ")"
                    -append "%s"',
    args    => [ '<file>', '\<person>', '\<role>', '<actor2>' ]
});


This is the code to generate a circular image, like what Plex uses

Code: [Select]
definePostprocCommand(caption_circle => {
    format  => 'magick "%s" -gravity center
                    "(" -size 342x342 xc:Black -fill White -draw "circle 171 171 171 1" -alpha Copy ")"
                    -compose CopyOpacity -composite -trim
                    "(" -size 342x75 -background none -fill white -gravity west -font "Times-New-Roman" caption:"%s" ")"
                    "(" -size 342x75 -background none -fill white -gravity west -font "Times-New-Roman" caption:"%s" ")"
                    -append "%s"',
    args    => [ '<file>', '\<person>', '\<role>', '<actor2>' ]
});

Title: Re: MCRatings v3.0 released
Post by: lepa on March 17, 2020, 03:44:33 am
From the MCRating configuration picture I posted I get that there are input parameters like $name and $role which are passed to e.g. imageMagick script
Title: Re: MCRatings v3.0 released
Post by: zybex on March 17, 2020, 04:26:19 pm
OK, I made it work with ImageMagick, and the ingredients are below. The devil is in the details :)
I've used Moe's ImageMagick script (modified to run on a .bat script) to add Name/Role to MCRs downloaded thumbnails:

(https://raw.githubusercontent.com/zybexXL/MCRatings/master/Screenshots/Cast/Gwyneth Paltrow.png) -> (https://raw.githubusercontent.com/zybexXL/MCRatings/master/Screenshots/Cast/Gwyneth Paltrow [Beth Emhoff].png)         (https://raw.githubusercontent.com/zybexXL/MCRatings/master/Screenshots/Cast/J.J. Abrams.png) -> (https://raw.githubusercontent.com/zybexXL/MCRatings/master/Screenshots/Cast/J.J. Abrams [Director].png)

Instructions:
1. install ImageMagick - select option to Add To Path
2. Create a folder C:\Scripts and extract the attached .7z file there (c:\scripts\caption.bat should be there)
3. upgrade to MCRatings v3.0.4 or above - I've made some tweaks today and added a couple of new script $tags (you can use the embedded Upgrade button)
4. In Settings->Posters:
    - Turn on Save Actor/Crew thumbnails, enter a folder accessible by JRiver (or leave the default)
    - Turn on Save As PNG, and select Thumbnail size = Medium (or better)
    - On the Run Post-processing command for thumbnails, enter this:
Code: [Select]
c:\scripts\caption.bat $image $name $role "$namerole.png" $type5. Run MCRatings, and do Get Movie Info on some movies

That's it! You will see a spinner on MCRs bottom-right corner while the scripts are running. Then you can look at the folder you selected in 4. and the new thumbnails with name+role should be there.

To use them in JRiver, there are several steps too:
- turn on the MCR option Add role to actor names in Settings->Misc
- update your movies with Get Movie Info + Save to JRiver with this option on (to get the updated "Actor Name [Role]" names)
- On theaterView/Tooltip expressions, the expression must now use these Actor names to get the corresponding PNGs. I think Moe/Lepa can take it from here :)

I hope this guide helps! I'll do another post dissecting the caption.bat script and the MCRs post-processing command line, since there are some details there that should be documented.

Br,
Zybex
Title: Re: MCRatings v3.0 released
Post by: zybex on March 17, 2020, 05:06:17 pm
<insert expletive>
I've just spent half an hour typing a detailed explanation, only to lose it to a browser refresh. Grrrr...
I'll post it later tomorrow.

EDIT: I'll add it to the Wiki soon.
Title: Re: MCRatings v3.0 released
Post by: Moe on March 17, 2020, 08:51:52 pm
Awesome stuff Zybex!

Here is how I display one actor in Theater View. 

I have all my actor images stored at R:\Actors in a folder corresponding to their first name.  It looks like this

R:\Actors\A\
R:\Actors\B\
R:\Actors\C\
...
R:\Actors\Y\
R:\Actors\Z\

I have over 75,000 images so that is why I have separated them into individual letter folders.

I created a new field called [Actor 1] (I also created Actor 2 - 10)

Code: [Select]
<img src="R:\Actors\Left(listitem([TMDB Actors Name],0), 1)\listitem([TMDB Actors Name],0) - [tmdb id].png"  width="130">
To break this down,

Code: [Select]
Left(listitem([TMDB Actors Name],0), 1)\
Takes the first letter of the actors name and appends it to R:\Actors\  So, if the Actor in question is Tom Hanks I end up with R:\Actors\T\

Next, this part of the code

Code: [Select]
listitem([TMDB Actors Name],0)
returns the first Actors name from the [TMDB Actors Name field].  This may be a different field for you, it might just be [Actors].  if you want to return the second actors name you'd change the above to

Code: [Select]
listitem([TMDB Actors Name],1)and for the third actor you'd use
Code: [Select]
listitem([TMDB Actors Name],2)and so on and so forth

Finally this bit of code

Code: [Select]
- [tmdb id].png
adds a dash and then the movies tmdb-id appended with .png

So, I end up with something like this - R:\Actors\T\Tom Hanks - m11974.png

You've done the community a really great service with this Zybex.  While I love MCUtils, I know that it's lack of a GUI is a big roadblock to a lot of people.  I have a feeling this is going to get used a lot.


Title: Re: MCRatings v3.0 released
Post by: JimH on March 17, 2020, 09:15:40 pm
<insert expletive>
I've just spent half an hour typing a detailed explanation, only to lose it to a browser refresh. Grrrr...
I'll post it later tomorrow.
Sometimes you can recover by backing up in the browser.
Title: Re: MCRatings v3.0 released
Post by: JimH on March 17, 2020, 09:16:15 pm
Very nice work.  Thanks.
Title: Re: MCRatings v3.0 released
Post by: Moe on March 18, 2020, 12:18:57 pm
Zybex, if you're looking to further expand MCRatings, it would be nice to see it be able to get clearart, banners, etc. from https://fanart.tv/  I get that artwork now from Mediaelch (https://www.kvibes.de/mediaelch/l) but it would be cool to consolidate programs.  Once again, stellar work on this.
Title: Re: MCRatings v3.0 released
Post by: thorsten on March 18, 2020, 01:14:24 pm
+1

And also a big THANK YOU for MCR! Love the program  ;D
Title: Re: MCRatings v3.0 released
Post by: Moe on March 18, 2020, 05:59:32 pm
I got to put the poster finder to work today.  Works wonderfully, much better than the one built into MC, I love being able to choose which one I want. 
Title: Re: MCRatings v3.0 released
Post by: Moe on March 20, 2020, 10:52:05 am
Zybex, I have a small feature request.  Would it be possible to add a "ignore articles" option, so that movies like The Big Lebowski show up under B and not T?
Title: Re: MCRatings v3.0 released
Post by: arcspin on March 21, 2020, 04:27:36 am
Solved: I created another folder to save the pictures and now the pictures are appearing with actors name/roll.
Title: Re: MCRatings v3.0 released
Post by: arcspin on March 21, 2020, 04:48:29 am
I have all my actor images stored at R:\Actors in a folder corresponding to their first name.  It looks like this

R:\Actors\A\
R:\Actors\B\
R:\Actors\C\
...
R:\Actors\Y\
R:\Actors\Z\


Question:
How do you get all actor images sorted in the correct folder?
When saved from MCR they are only saved in one folder

Is this a feature only found in MCUtils?


//arscpin


ps.
(I did a search and this is how many files you can save in one folder)
4,294,967,295 files into a single folder if drive is formatted with NTFS

So, if there isn't any way of sorting pictures using only MCR I can live with all pictures are saved in one folder. ;o)
Title: Re: MCRatings v3.0 released
Post by: arcspin on March 21, 2020, 05:19:30 am
This post is inescapable and I'm in need of assistance

I have manage to create thumbnails with name & roll for actors/producers/composer/and so on.
All my thumbnails are saved in this location: F:\JRiver\Actors

Now what do I have to do in JRiver to get them to appear in the file info panel?

Great many thank you and stay healthy!

//arcspin
Title: Re: MCRatings v3.0 released
Post by: Moe on March 21, 2020, 11:46:03 am
Question:
How do you get all actor images sorted in the correct folder?
When saved from MCR they are only saved in one folder

Is this a feature only found in MCUtils?

Saving to individual letters is a custom function for MCUtils that MrC generated for me.  If you asked really nicely, maybe Zybex could implement something in MCR or he could make you a batch script that would do it.

(I did a search and this is how many files you can save in one folder)
4,294,967,295 files into a single folder if drive is formatted with NTFS

While it's true that a folder can hold that many files, you may start running into performance issues long before that, I know that I did.

Now what do I have to do in JRiver to get them to appear in the file info panel?

One potential problem I can see is how MCR is saving the images.  The built in template is saving them in this format

Adam Driver [Kylo Ren].png

While, with how I have MCUtils setup, that same image would save as

Adam Driver - m181812.png

The number after the actors name being the TMDB ID, which is a unique identifier for each movie.

As far as I am aware, MCR does not save the actors role anywhere, in text form, to MC.  Since the image is saved with the role in the filename, eg. Adam Driver [Kylo Ren], I see no easy way to incorporate the image into MC.  If MCR could be tweaked a bit to create a new list field formatted like "Actor Name [Role]; Actor Name [Role]; Actor Name [Role]" etc.  Then it could pretty easily be done. For the sake of this conversation, lets say MCR created a new field called [MCR Actor Role] Then you could easily add images the images to MC by doing something like:

<img src="R:\Actors\listitem([MCR Actor Role],0).png"  width="130">
<img src="R:\Actors\listitem([MCR Actor Role],1).png"  width="130">
<img src="R:\Actors\listitem([MCR Actor Role],2).png"  width="130">

Which would return the first three actors. (I would put each of the above three lines into their own field, called Actor 1, Actor 2, Actor 3)

Another option would be to have MCR capture the movies TMDB ID to a field (or add an IMDB ID token), you could then use the same method that I use to display images. 
 

I'm a moron
Title: Re: MCRatings v3.0 released
Post by: Moe on March 21, 2020, 12:08:35 pm
I decided to see if I could make a batch script myself to move the images to individual letter folders and I figured it out.

put this in a text file and save as something like _move_to_letters.bat (make sure to put the _ at the start of the file name, otherwise it will move itself)  Save to the same folder that the images are saved to.

Code: [Select]
@ECHO ON

SET Letters=(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z)
SET Numbers=(0,1,2,3,4,5,6,7,8,9)
SET SourceDir=C:\YourPathHere
SET DestLetterDir=C:\YourPathHere\
SET DestNumDir=C:\YourPathHere\#

FOR %%A IN %Letters% DO MOVE "%SourceDir%\%%~A*.*" "%DestLetterDir%\%%~A\"
FOR %%B IN %Numbers% DO MOVE "%SourceDir%\%%~B*.*" "%DestNumDir%\"
GOTO EOF

You will have to change the YourPathHere to the path where your images are being saved.  In the folder where the images are being saved, you will need to manually create folders for each letter, A, B, C, etc.  Once all the individual letter folders are created, simply double click your .bat file and the images will move to their respective folders.
Title: Re: MCRatings v3.0 released
Post by: arcspin on March 21, 2020, 01:31:11 pm
I decided to see if I could make a batch script myself to move the images to individual letter folders and I figured it out.

It works!

I also added the Swedish letter å,ä,ö after the letter z but that didn't take when I tried to batch-move an actor with an Swedish sounding name and do the the bat-file. All other names got sorted out just fine but my fake actor with the letter Å didn't get moved.

When I look in the MCR settings I see ImdB ID taken from the source OMDb, it can be changed to TMDb.


@zybex
I'm sure you are reading this as well and are on the case when you have the time regarding unique id-filenames and (batch)move files to a corresponding folder.


Suggestion, if we can add info to actors pictures, is there anything that prevents MCR to add info text to posters as well?
I'm thinking a UHD, HD, 720, 480 Logo of sorts and perhaps other information that might be useful.
Perhaps making another folder named Posters and under that folder add a-z & 0-1 folders and add posters there?




This is great progress that are being made here and I thank you all for the effort!!!

//arcspin
Title: Re: MCRatings v3.0 released
Post by: thorsten on March 22, 2020, 03:54:22 pm
I got it!

Thanks to Zybex's script with Magicks and Moe's like-usual perfect description of his expression and sorting, I got the pictures up and running! Wonderful! I gave MCutils a try, but it was too complex for me so I opted to wait for a smarter solution and voilà: we got it  ;D

But I think I found a bug:
if I run the script with my whole collection of 700 films at once, it only gets the first movie(role) of each actor. E.g. "Sylvester Stallone [Rocky Balboa Jr.]" but not "Sylvester Stallone [Barney]" from Expendibles. Seems as if MCRatings is just searching the name of the actor only for the first result.

I now run my library for every first letter of the alphabet in MCratings, therefore I should get mot of the pictures.

BR,

Thorsten
Title: Re: MCRatings v3.0 released
Post by: thorsten on March 22, 2020, 04:33:57 pm
Based on numbers:
whole collection: 3,500 actor pictures
letter by letter: 4,900 actor pictures
Title: Re: MCRatings v3.0 released
Post by: thorsten on March 22, 2020, 04:41:56 pm
And to finish for today: this is my "Actors" code, with standard values from MCRatings and sorted in directories per letter:
Code: [Select]
<img src="E:\JRiver\Actors\Left(listitem([Actors],0), 1)\listitem([Actors],0).png" width="130"> <img src="E:\JRiver\Actors\Left(listitem([Actors],1), 1)\listitem([Actors],1).png" width="130"> <img src="E:\JRiver\Actors\Left(listitem([Actors],2), 1)\listitem([Actors],2).png" width="130"> <img src="E:\JRiver\Actors\Left(listitem([Actors],3), 1)\listitem([Actors],3).png" width="130"> <img src="E:\JRiver\Actors\Left(listitem([Actors],4), 1)\listitem([Actors],4).png" width="130"> <img src="E:\JRiver\Actors\Left(listitem([Actors],5), 1)\listitem([Actors],5).png" width="130"> <img src="E:\JRiver\Actors\Left(listitem([Actors],6), 1)\listitem([Actors],6).png" width="130">
Always use "space" between each Actor, so that they are shown side by side.
Title: Re: MCRatings v3.0 released
Post by: thorsten on March 22, 2020, 04:53:06 pm
Aaaand…. another "bug"/feature  ?

Movie: baby driver
Actor/role: Ansel Elgort [Miles "Baby"]
Picture: Ansel Elgort [Miles Baby]

@Zybex: perhaps such "system" typos (don't know the english word for it) should be automatically ignored right in the name of the actor/role ?

I just corrected it directly in mc-tagging.
Title: Re: MCRatings v3.0 released
Post by: zybex on March 23, 2020, 04:36:47 am
As far as I am aware, MCR does not save the actors role anywhere, in text form, to MC. 
There's an option in Settings->Misc to "Add Role to Actor Name". This option causes the Actors names to be saved to JRiver as "Actor Name [Role]".

The actor profiles are saved with the same template, this is designed so that each name+role saved to JRiver matches the filename exactly.
Title: Re: MCRatings v3.0 released
Post by: zybex on March 23, 2020, 04:38:24 am
@zybex
I'm sure you are reading this as well and are on the case when you have the time regarding unique id-filenames and (batch)move files to a corresponding folder.

I'll add that option on next version. One think I'm concerned with is "option bloating". I don't want to add too many options... one way is to add them only on the config file, not on the UI. So you would have to edit the MCR config file to change that setting.

Quote
Suggestion, if we can add info to actors pictures, is there anything that prevents MCR to add info text to posters as well?
I'm thinking a UHD, HD, 720, 480 Logo of sorts and perhaps other information that might be useful.
Perhaps making another folder named Posters and under that folder add a-z & 0-1 folders and add posters there?

You can use the Poster post-processing [PP] command to do that with ImageMagick, I suppose, though none of the current PP $tags include that kind of information.

At his point, I wonder if it wouldn't be easy to just generate the entire Tooltip/TheaterView info for each movie as a full PNG image, with all info in it and designed in some external application, and then in JRiver the tooltip would just be <img src="imdbID.png">  ;)
Title: Re: MCRatings v3.0 released
Post by: zybex on March 23, 2020, 04:46:40 am
But I think I found a bug:
if I run the script with my whole collection of 700 films at once, it only gets the first movie(role) of each actor. E.g. "Sylvester Stallone [Rocky Balboa Jr.]" but not "Sylvester Stallone [Barney]" from Expendibles. Seems as if MCRatings is just searching the name of the actor only for the first result.

That's a bug indeed, thank you for reporting. It shall be fixed.

Quote
Movie: baby driver
Actor/role: Ansel Elgort [Miles "Baby"]
Picture: Ansel Elgort [Miles Baby]

Double quotes are a pain to deal with in code. Yes, they should be preserved there, I'll fix it.
Title: Re: MCRatings v3.0 released
Post by: zybex on March 23, 2020, 04:53:38 am
Thorsten, are you using the caption to put the actor AND role on the image?  If so, you're going to run into problems.  If an actor is in more than one movie, since the image is only being saved by the actors name, you can only have one image per actor. 

MCR saves multiple pictures for the same actor:
"Keanu Reeves [Neo].png"
"Keanu Reeves [John Wick].png"

The option "Add Role to Actor Name" saves the actors using this same format, so you can split [Actors] in JRiver directly into a list of PNGs.

Note that is is better than using the tmdbID or imdbID, as the same actor may have multiple roles on the same movie. If you want the role to be embedded into the picture, then having a single "Actor - tmdbID.png" file won't work.
Title: Re: MCRatings v3.0 released
Post by: zybex on March 23, 2020, 04:59:27 am
Based on numbers:
whole collection: 3,500 actor pictures
letter by letter: 4,900 actor pictures

There are 2 bugs in MCR causing this:
- During a GET of multiple movies, MCR has multiple threads working in parallel. If one of them is downloading Jessica Alba's profile for movie 1, a second thread for movie 2 which also stars Jessica Alba will skip it, because it's already in the download queue - so you end up with only 1 PNG of Jessica instead of 3 (one per role, plus one extra just to drool over because it's Jessica Alba). You can work around this by just doing GET multiple times until all actors+roles are covered.
- As you've found out, if a movie has the same actor in multiple roles, only the first is fetched.

I'm quite busy lately with work, when I have some free time I'll fix these.
Seems that working from home doesn't make it less work somehow  >:(
Title: Re: MCRatings v3.0 released
Post by: Moe on March 23, 2020, 11:33:18 am
Aww, sorry, I missed that setting.  Apologies for clouding the water.

Quote
Note that is is better than using the tmdbID or imdbID, as the same actor may have multiple roles on the same movie. If you want the role to be embedded into the picture, then having a single "Actor - tmdbID.png" file won't work.

I am not sure why you say this though.  As that doesn't have to be the case at all.  As an example (it may be hard to see, the image is transparent, but there are multiple lines of text below it)

(http://moesrealm.com/img/MC/James%20McAvoy%20-%20m381288.png)

Why would you generate an image of the actor for each role rather than list each role under the actors name in the same image?

Actually, from doing some testing before posting this (in an effort to keep my foot out of my mouth) I think I uncovered a bug.  Movies like Glass (https://www.themoviedb.org/movie/450465-glass?language=en-US) (where my image above comes from) or something like X-Men First Class (https://www.themoviedb.org/movie/49538-x-men-first-class?language=en-US) where actors are credited with more than one role and there is a slash / it seems to break the image generation with MCR. I tested with a few movies and everyone where the role contains a slash, no image was created.

Sorry again for missing that setting and posting irrelevant things.
Title: Re: MCRatings v3.0 released
Post by: zybex on March 23, 2020, 01:04:22 pm
Quote
Why would you generate an image of the actor for each role rather than list each role under the actors name in the same image?
You have a point, I hadn't considered that way of doing it. For some reason I assumed the TMDB data has the same actor multiple times, but you're right - the actor is listed once, with multiple roles listed with a slash separator.

It's likely that the slash breaks MCR image output, that's one more bug to fix. Thanks for reporting!
Title: Re: MCRatings v3.0 released
Post by: thorsten on March 23, 2020, 01:30:52 pm
Moe, I use actor[role] as zybex wrote. It works really good!

One movie is back tomfuture part 2 or 3: Michael J. Fox has up to 3 roles and names. MCR gets it correct from the data bases, but writes only one role name in the .png name (or even none, I‘m not sure).

But, this is peanuts regarding the steps I needed to do before! MC search in tmdb, MCR, Mediaelch, MCutil for combining the picture/name... now, it is a breeze  :D
Title: Re: MCRatings v3.0 released
Post by: Mans on March 24, 2020, 04:56:30 pm
Great day Zybex,

Many thanks for all the hard work.
I've updated MCR to the latest version and trying to get the name and role added.

Quote
That's it! You will see a spinner on MCRs bottom-right corner while the scripts are running. Then you can look at the folder you selected in 4. and the new thumbnails with name+role should be there.

I'm noticing the folder gets continues filled but also gets immediately flushed within the process.
I've got some 800 movies and at the end there are only some 10 images left within the folder.

With the initial version of MCR and so without the additional script, there were some 5000 images within the folder.

Any idea sir ?
Thanks for your help !
Title: Re: MCRatings v3.0 released
Post by: zybex on March 24, 2020, 05:16:21 pm
Hi Mans,
I wrote a line-by-line explanation for that script I provided, but then lost it :P It would explain what you're seeing.

MCR downloads an actor picture and names it "Joe Actor.png". Then it calls the post-processing script on it.
The PP script I provided does this:

So, what you're seeing is step 2 failing, and step 3 doing what it was written to do.
I suggest you remove step 3 from the script (last line) and run the script manually on some PNG to find out why it's failing.
My guess it that "magick" is not on your PATH, so it's failing to run. Just type "magick" on cmd prompt to confirm if it works.

Title: Re: MCRatings v3.0 released
Post by: Mans on March 25, 2020, 04:15:28 am
Thanks Zybex,

I've checked via CMD and this is the feedback, any hint or suggestion sir ?
Another thanks,


Usage: magick tool [ {option} | {image} ... ] {output_image}
Usage: magick [ {option} | {image} ... ] {output_image}
       magick [ {option} | {image} ... ] -script {filename} [ {script_args} ...]
       magick -help | -version | -usage | -list {option}
Title: Re: MCRatings v3.0 released
Post by: zybex on March 25, 2020, 04:51:24 am
The attached script adds logging to c:\scripts\caption.log.
Replace the script with this new one, run MCR and do GET on 1 or 2 movies, then check the log file. It should show some ImageMagick errors.

Please post a sample error so we can check if it's something that needs improvement in MCR.
Title: Re: MCRatings v3.0 released
Post by: Mans on March 25, 2020, 05:00:15 am
Hi Zybex, ok, here we go:

************* Invoking magick ************* 
magick "\\NAS1\Film_Collection\Actor Images\Benicio del Toro.png" -gravity center -extent 2:3 -resize 130x195   "(" -size 130x -background none -fill white -pointsize 16 -gravity northwest -font Segoe-UI-SemiBold caption:"Benicio del Toro" ")"   "(" -size 130x -background none -fill lightgreen -pointsize 14 -gravity northwest -font Segoe-UI-Italic caption:"Jack Jordan" ")"   -append "Benicio del Toro [Jack Jordan].png"
Deleting "\\NAS1\Film_Collection\Actor Images\Sean Penn.png"
Deleting "\\NAS1\Film_Collection\Actor Images\Benicio del Toro.png"
************* Invoking magick ************* 
magick "\\NAS1\Film_Collection\Actor Images\Naomi Watts.png" -gravity center -extent 2:3 -resize 130x195   "(" -size 130x -background none -fill white -pointsize 16 -gravity northwest -font Segoe-UI-SemiBold caption:"Naomi Watts" ")"   "(" -size 130x -background none -fill lightgreen -pointsize 14 -gravity northwest -font Segoe-UI-Italic caption:"Cristina Peck" ")"   -append "Naomi Watts [Cristina Peck].png"
magick: unable to open image 'Naomi Watts [Cristina Peck].png': Permission denied @ error/blob.c/OpenBlob/3496.
magick: WriteBlob Failed `Naomi Watts [Cristina Peck].png' @ error/png.c/MagickPNGErrorHandler/1715.
Deleting "\\NAS1\Film_Collection\Actor Images\Naomi Watts.png"
************* Invoking magick ************* 
magick "\\NAS1\Film_Collection\Actor Images\Amy Brenneman.png" -gravity center -extent 2:3 -resize 130x195   "(" -size 130x -background none -fill white -pointsize 16 -gravity northwest -font Segoe-UI-SemiBold caption:"Amy Brenneman" ")"   "(" -size 130x -background none -fill lightgreen -pointsize 14 -gravity northwest -font Segoe-UI-Italic caption:"Shelly Barnes" ")"   -append "Amy Brenneman [Shelly Barnes].png"
magick: unable to open image 'Amy Brenneman [Shelly Barnes].png': Permission denied @ error/blob.c/OpenBlob/3496.
magick: WriteBlob Failed `Amy Brenneman [Shelly Barnes].png' @ error/png.c/MagickPNGErrorHandler/1715.
Deleting "\\NAS1\Film_Collection\Actor Images\Amy Brenneman.png"
Title: Re: MCRatings v3.0 released
Post by: zybex on March 25, 2020, 05:18:32 am
magick: unable to open image 'Naomi Watts [Cristina Peck].png': Permission denied @ error/blob.c/OpenBlob/3496.
magick: unable to open image 'Amy Brenneman [Shelly Barnes].png': Permission denied @ error/blob.c/OpenBlob/3496.

magick is failing to write to your NAS1 share. Several possibilities:
- your NAS share permissions are wrong; add RW permissions for "everyone/world" if you can (not the best advice ever, but...)
- there are already files with the same name on the folder, and they're marked read-only or have the wrong permissions
- your NAS limits the number of simultaneous accesses; MCR is downloading 4 images at the same time, then the script is also processing another 4 at a given time. This is not much, any NAS should cope with it... but it's a possibility.
- disk full?

You can also try to change the thumbnail folder to C:\something to see if it works.
Title: Re: MCRatings v3.0 released
Post by: Mans on March 25, 2020, 05:49:17 am
Hi Zybex,

Your guess was correct :-)

The images are there when adding a local path/folder.
Not sure why the NAS access is causing this problem, as the user and machine are granted with correct rights and never caused issues or limitations before.

Testing as we speak and another thanks sir for the nice work !
Title: Re: MCRatings v3.0 released
Post by: zybex on March 25, 2020, 08:41:10 am
Mans,

I know what the problem is and reproduced it on my own NAS: the script is not providing the full path for the output file, just the filename - so ImageMagick is trying to write it to its install folder which is in C:\ProgramFiles, hence the permission denied.

MCR tries to set the "working folder" before calling the PP script. This works fine for C: folders, but it's not possible to set the WorkingDir of a process to a network location.

Additionally, it looks like the logging I added to the BAT script makes things worse since it sometimes fails with parallel downloads and crashes Magick.

You can work around this by using the attached script and this PP command in MCR:
c:\scripts\caption.bat $image $name $role "%imagedir\%namerole.png" $type

This is working fine on my NAS, but I'll also fix the WorkingDir issue in MCR :)
Title: Re: MCRatings v3.0 released
Post by: Mans on March 25, 2020, 08:55:58 am
Bam !
You've found two issues and solved them in one go :-)

Many thanks Zybex, I'm away for a couple of hours, but once back I'll swap the script and the MCR command.

Take care !
Title: Re: MCRatings v3.0 released
Post by: Mans on March 25, 2020, 02:20:53 pm
Hi Zybex,

Works like a charm sir :-):-):-)

Thanks and take care !
Title: Re: MCRatings v3.0 released
Post by: Mans on March 28, 2020, 10:48:27 am
Greatday Zybex,

One more :-)
Additionally, how should i continue on the [Director], [Producer], etc, fields.

I've found MCR will grab and add the images for p.e. the Directors and puts [Director] behind the names.
But noticed these images aren't maching with the [Director] field.

Would it make sense to have MCR also adding [Director], etc, into the data fields ? So we can match the field with the generated images ?

Thanks again for your help sir !
Title: Re: MCRatings v3.0 released
Post by: zybex on March 29, 2020, 11:40:43 am
Hi Le Mans,
Well, my reasoning on that was that it was kind of redundant to add [Director] to all names on the Director field, same for [Producer].
You can just adjust your expression in MCRatings to fetch the correct picture like so:

<img src=\\my\profile\pics\[director] /[Director/].png>

For movies where Director is a list, the expression needs to be split first which complicates a bit (similar to Actors).

I made a proposal to Matt about a new expression language function that would make this kind of list-splitting and processing much easier:
https://yabb.jriver.com/interact/index.php/topic,124543.msg862439.html#msg862439

With that, the Actors expression to fetch pictures for ALL actors at once would be just like:
transform(<img src=\\my\profile\pics\[L1].png>,,[Actors])

And the directors would be:
transform(<img src=\\my\profile\pics\[L1] \[Director\].png>,,[Director])

... but perhaps Matt didn't see the value in that.
Title: Re: MCRatings v3.0 released
Post by: arcspin on March 30, 2020, 10:34:24 am
Great work Zybex,
If the expression language do get implemented in future updates it will be the sole reason for me to start using my already paid version 26 of MC.

Please let us know when that happens as I'm patiently waiting for an update so I can get a stable routine going implementing pictures for actors, producers, directors and so on into my theater view.



Take care,

//arcspin
Title: Re: MCRatings v3.0 released
Post by: arcspin on April 13, 2020, 04:45:00 am
Hi,
I have updated JRiver to MC 26 in preparation before adding pictures of actors, directors, and so on to my Theater view.

What is the proper work flow for implementing expressions and other tasks to get pictures of cast and crew in Theater view?
I have made a post-processing command in MCRatings v3.0.4 that don't seem to work as the actors and directors are not sorted in their respective folder.
Code: [Select]
c:\scripts\caption.bat $image $name $role "$namerole.png" $type

Is there a proper way of doing this or are we still waiting for Matt and others to first add functionality to JRiver MC 26?


Best regards,
//arcspin



Caption.bat code below:

Code: [Select]
@echo off
rem call script from MCRatings with:
rem c:\scripts\caption.bat $image $name $role "$namerole.png" $type

rem check if output file already exists, skip processing if so
if exist %4 goto end

if "%5"=="CREW" goto crew

rem CAST image processing - green Character name
magick %1 -gravity center -extent 2:3 -resize 130x195 ^
  "(" -size 130x -background none -fill white -pointsize 16 -gravity northwest -font Segoe-UI-SemiBold caption:%2 ")" ^
  "(" -size 130x -background none -fill lightgreen -pointsize 14 -gravity northwest -font Segoe-UI-Italic caption:%3 ")" ^
  -append %4
goto end

:crew
rem CREW image processing - yellow Job title
magick %1 -gravity center -extent 2:3 -resize 130x195 ^
  "(" -size 130x -background none -fill white -pointsize 16 -gravity northwest -font Segoe-UI-SemiBold caption:%2 ")" ^
  "(" -size 130x -background none -fill yellow -pointsize 14 -gravity northwest -font Segoe-UI-Italic caption:%3 ")" ^
  -append %4

:end
rem delete original file so that MCRatings downloads it again for the same actor/different role
del %1
Title: Re: MCRatings v3.0 released
Post by: zybex on April 13, 2020, 03:35:04 pm
Arcspin,
There's a post on this thread by Thorsten with the Expression he's using to show the actor thumbnails. You just need to change the folder he used to the folder where you have your own images (the download folder from MCRatings). Other posts in this thread have the remaining details, but here's a synopsis:

- enable the option "Add Role to Actor Names" in MCR's misc settings
- setup the Cast/Crew download folder in MCR, enable the "save as PNG" option
- Get Movie Info for the movies you want - make sure to SAVE the changes (Actor names will now include their role too)
- use the expression from Thorsten's post, make sure to change the folder to match your own

That's it. You should now have actor thumbnails.
If you want the actor name/role to also show up on the picture itself, you'll need to setup the post-processing with ImageMagick as described on this thread.

Title: Re: MCRatings v3.0 released
Post by: arcspin on April 14, 2020, 01:20:13 pm
Hi and thanx for the explanation.
It works out just fine and I now have 10 beautiful actors on display for each movie!

//arcspin

Title: Re: MCRatings v3.0 released
Post by: arcspin on April 15, 2020, 01:04:45 pm
Hi again,
Before I dive into batch fetching pictures with some added post-processing I would like to ask if you have any update regarding the discovered bugs?
(I have 1000+ movies and do not want to start something that I have to redo later.)

The bugs being:
MCR don't play nice with "" and '' like Ansel Elgort [Miles "Baby"] or Mako Iwamatsu [Akiro 'The Wizard'] and the same goes with actors name that starts with an apostrophe, like Álvaro Monje.

"If a movie has the same actor in multiple roles, only the first is fetched."

"f I run the script with my whole collection of 700 films at once, it only gets the first movie(role) of each actor. E.g. "Sylvester Stallone [Rocky Balboa Jr.]" but not "Sylvester Stallone [Barney]" from Expendibles."


Proposed solutions:
"The actor is listed once, with multiple roles listed with a slash separator."

"I made a proposal to Matt about a new expression language function",
Could it be of any help if I and others made a reply to that thread to get Matt;s attention?

I do appreciate your time and effort you have put into MCR and are grateful for your work!
My Theater view are looking better than ever!


Stay safe,

//arcspin
Title: Re: MCRatings v3.0 released
Post by: zybex on April 15, 2020, 04:17:43 pm
Hi Arcspin,
Yes, I've been procrastinating but it's time to fix these issues. I've already fixed some of them, and will work on the rest this next weekend. I'm also adding a couple of minor features that were requested, such as saving Actors to different folders according to their name (like A/B/C...).

Regarding the ListTransform() expression language function, it didn't seem to get much traction from Matt, though it would be super useful. Feel free to vote for it in that thread.
Title: Re: MCRatings v3.0 released
Post by: arcspin on April 15, 2020, 11:53:14 pm
Good news indeed,
I have posted a plea to Matt to look into your suggestions.
I hope others with more gravitas also makes a case for your suggestions.

https://yabb.jriver.com/interact/index.php/topic,124543.50.html (https://yabb.jriver.com/interact/index.php/topic,124543.50.html)

I have found another bug of sorts.
Adam Driver in Star Wars is listed in MCRatings as Adam Driver [Kylo Ren / Ben Solo] but is named in his picture as "Adam Driver [Kylo Ren].png" and therefor not showing up in Theater View.


//arcspin
Title: Re: MCRatings v3.0 released
Post by: zybex on April 16, 2020, 02:11:34 am
Quote
I have found another bug of sorts.
Adam Driver in Star Wars is listed in MCRatings as Adam Driver [Kylo Ren / Ben Solo] but is named in his picture as "Adam Driver [Kylo Ren].png" and therefor not showing up in Theater View.

This was known, it's already fixed and will be on next release. A filename cannot have slashes, so I've replaced them with commas.
Title: Re: MCRatings v3.0 released
Post by: arcspin on April 18, 2020, 12:04:39 pm
Hi,
I was listening to a podcast where they were talking about the cinematographer Roger Deakins.
It got me thinking if McRatings could fetch the name of the cinematographer as well?

Have a great Saturday,

//arcspin
Title: Re: MCRatings v3.0 released
Post by: zybex on April 18, 2020, 12:31:13 pm
MCRatings already pulls a LOT of information from TMDB. But it's actually too much to put up on the UI.

Check this Cast/Crew page, for instance:
https://www.themoviedb.org/movie/335984-blade-runner-2049/cast?language=en-US

All those 800+ job roles come in the data MCR pulls from TMDB. Currently it only uses a few key roles (Director, Producer, Writers, Actors...). It's very easy to add more (like the Director of Photography), but I don't want to end up with hundreds of data columns in the UI, it would become unusable. So I need to decide which are the most important ones, and the problem is different people want different things. Of course, no one cares about the Grips, the Foley Mixer, the coffee boy, etc... but even so, there are too many roles to put up on the UI.

I may eventually add a way to select which roles are desired, even if they don't show up on the UI/datagrid, or perhaps a Crew/Cast Browser (like the Poster Browser) which would show everything and automatically select whatever fields the user considers important. That's something on the backburner...
Title: Re: MCRatings v3.0 released
Post by: wer on April 20, 2020, 02:16:09 am
Hi Zybex,

Do you think you could update MCRatings to also get "Aspect Ratio" from IMDB?  That's something that's very helpful to have.

People have been trying to pull it from Mediainfo, but that doesn't take matted presentations into account, so the info is almost never correct.

Thanks for the great utility!

-Will
Title: Re: MCRatings v3.0 released
Post by: zybex on April 20, 2020, 04:17:25 am
MCR currently doesn't fetch any info from IMDB, only from TMDB and OpenMovieDB. Neither of these have the AR available.

IMDB doesn't provide an API to get data (only for movie studios and such). It's easy to scrape the info from their pages but that breaks easily each time they change their page layout (even non-visible changes might break scraping), so it requires constant tool updates to keep it working. Also, it's against their ToS (so it's illegal). Despite this there are many tools out there doing page scraping from IMDB.

Third problem is the AR mentioned on IMDB [usually] refers to the initial theatrical release. Your particular copy/rip of the movie might be in a different format. The same movie can be released in multiple ARs to confirm to different media types (DVD/BluRay/Web/IMAX/etc), different world region standards, adapted-for-TV conversions, etc. Nowadays it's more standartized, but for older movies (10+) it's rather meaningless. You want to know the AR for YOUR copy, so MediaInfo is actually the right source for that.

EDIT: To detect the actual AR of media with black bars, you need to run the video through a filter/detector. FFMPEG can do this:
https://takla.wordpress.com/2012/06/01/ffmpeg-autocrop-bash-script-function/
https://ffmpeg.org/ffmpeg-filters.html#cropdetect
http://forum.doom9.org/archive/index.php/t-140177.html
Title: Re: MCRatings v3.0 released
Post by: wer on April 20, 2020, 04:33:30 am
Ah, I was looking at your data sources and must have got my I's and T's muddled, sorry.  TMDB doesn't even have AR.
Title: Re: MCRatings v3.0 released
Post by: wer on April 22, 2020, 04:15:59 pm
Hi Zybex,

I'm been messing around with the actor image generation...

I don't put a bunch of junk in the root directory of my drive, so I relocated the scripts directory for the imagemagick post-processing, and I noticed that the preference for the location of the post-processing script silently chokes if the path contains a space.  No error, just a failure to execute.

It also seems that within the poster browser, there is no way to select or confirm the CURRENT poster.  The only way I could find to keep the current poster is to X out of the poster browser, and then right click to revert the poster field.  Did I miss something?  It would be nice if there were a "Keep the current poster" link, like there is select for all the new ones.

-Will
Title: Re: MCRatings v3.0 released
Post by: wer on April 23, 2020, 05:06:53 pm
If you'll permit me one more comment/suggestion...

The image retrieval capabilities of MCRatings are awesome.  I love it.  The poster browser is insanely great, and the actor image retrieval, especially integrated with ImageMagick, is beyond wonderful.  It adds so much to MC to be able to get those images in there.  Thank you so much for all your work on this.

My suggestion has to do with actor image retrieval.  The images (for understandable reasons) are generally current images of the actors.  But the thing is, I hate seeing a picture of an 85 year old Tom Skerritt in my Alien metadata when he was 45 in that movie.  Or likewise seeing a pic of a 57 year old Jodie Foster when she was 13 when she made Taxi Driver.

What about having a browser for Actor images, that populates with a google image search for the actor along with the year the movie was made (since MCRatings knows that year)?  So a search for "Jodie Foster 1976" would produce images from that year, and the user could just pick one from the browser. A little automagic resize and away we go.  This could be accessed by clicking on the Actors field in MCRatings, after it has finished its initial retrieval, as happens now with posters.

Since MCRatings already has the ability to incorporate the role into the image name, there would be no issue with having several different pictures of the actor, at several different ages, each as they appeared that specific film, since they would be separated by the role info.

It seems to me this would make the image info much more accurate and pleasing...

What do you think?

Thanks again,

Will
Title: Re: MCRatings v3.0 released
Post by: zybex on April 24, 2020, 11:43:15 am
(...) I noticed that the preference for the location of the post-processing script silently chokes if the path contains a space.  No error, just a failure to execute.

I just tested and it works fine. Are you pointing it to the Tooltip folder of JRiver? If so, the problem is likely to be related to folder permissions - MCRatings is not running as Administrator, so it cannot write any file there. If that's the case, you have 2 options:
- run MCRatings as Administrator
- [Preferred] change the folder permissions to add Write/Modify permission for your users, or All Users

Quote
It would be nice if there were a "Keep the current poster" link, like there is select for all the new ones.

Good idea, thanks for the suggestion. I'll add it.
Title: Re: MCRatings v3.0 released
Post by: lepa on April 24, 2020, 11:45:21 am
I think I saw at TMDb forums some time ago that there was also a discussion about character based images and that support for that was being considered
Title: Re: MCRatings v3.0 released
Post by: zybex on April 24, 2020, 11:54:20 am
The image retrieval capabilities of MCRatings are awesome.  I love it.  The poster browser is insanely great, and the actor image retrieval, especially integrated with ImageMagick, is beyond wonderful.  It adds so much to MC to be able to get those images in there.  Thank you so much for all your work on this.

Thanks, you're welcome 8) Props also to my friend Xpto who did an awesome amount of testing and nagged me until I fixed all issues  ;D

Quote
What about having a browser for Actor images, that populates with a google image search for the actor along with the year the movie was made (since MCRatings knows that year)?

Hmm. Interesting idea, but I'm not sure it would work consistently for most actors. I tried a few google image searches and, while we mostly get expected results for the well known mainstream actors, results usually suck for everyone else. As Lepa said, the ideal would be for TMDB to have such a facility where users could upload those contemporary pics. Let's wait to see if that happens.
Title: Re: MCRatings v3.0 released
Post by: wer on April 24, 2020, 12:42:10 pm
I just tested and it works fine. Are you pointing it to the Tooltip folder of JRiver?

No I'm taking about the location of the BAT file.  App is run as administrator.  The BAT file is located in C:\Program Files (x86)\Image Processing Apps\Scripts\caption.bat

If I use that path, it won't execute.  If I use the SFN equivalent, C:\Progra~2\ImageP~1\Scripts\caption.bat then it will.  Simple as that. No other changes.



Title: Re: MCRatings v3.0 released
Post by: wer on April 24, 2020, 01:04:14 pm
Hmm. Interesting idea, but I'm not sure it would work consistently for most actors. I tried a few google image searches and, while we mostly get expected results for the well known mainstream actors, results usually suck for everyone else. As Lepa said, the ideal would be for TMDB to have such a facility where users could upload those contemporary pics. Let's wait to see if that happens.

I guess it depends who you test.  I've been shocked at the gaps in the tmdb/omdb images.
Gary Lockwood, one of the 2 stars of 2001 is not there.  Yaphet Kotto of Alien and Live and Let Die and Homicide (tv) is not there.  I have lots and lots of actors, significant ones, who are just missing.

When that happens, a google search always returns something usable.  If the search is "imdb actor name" a good image is almost always the first result.

When a Director image is missing, as happens a lot, it throws off the formatting of templates.  It might be nice if there were an option to generate a silhouette image for cast/crew when the search fails.  With these new templates, actors without an image aren't in the film at all apparently.

Regarding age appropriate photos, from what I saw, those conversations on tmdb are years old and were rejected, so I don't think it's happening.  We're on our own.

I suppose one could manually run the convert.bat script for every missing image against a manually downloaded photo, but since there's no easy way to extract the individual actor/role names from the MC field, that will be a lot of manual typing. :(

Re the google search, I don't think the spotty results you saw matter much, because it's only used as a refinement after grabbing tmdb.  If it were the primary, consistency would be a problem. 

But what I'm suggesting is: oh, this tmdb image is bad or missing, let's see if a refinement search does better.... Ah, there's a good one, use that one!  Or, nope, nothing better, I guess I'm stuck.

It never makes things worse, it can only make things better.
Title: Re: MCRatings v3.0 released
Post by: zybex on April 24, 2020, 01:05:03 pm
Ah, ok. You need to add quotes around the path+script name to tell windows that it's a single thing, or else windows breaks it up on the spaces and tries to execute "c:\program.exe" with the rest as arguments:
"C:\Program Files (x86)\Image Processing Apps\Scripts\caption.bat" arg1 arg2 arg3

For the same reason, some arguments also need quotes when they include spaces - MCR automatically adds them in most cases.
Title: Re: MCRatings v3.0 released
Post by: zybex on April 24, 2020, 01:16:12 pm
I guess it depends who you test.  I've been shocked at the gaps in the tmdb/omdb images.
TMDB is crowdsourced, you can create an account an upload pics. Then MCR picks them up ;)

Quote
It might be nice if there were an option to generate a silhouette image for cast/crew when the search fails.
That's doable. The only snag I see is that, once MCR creates the placeholder image, on subsequent runs it won't be able to easily detect that that person is a placeholder - so if a new profile pic is available for it, it won't be easy to detect that it should now be downloaded/replaced. I'll consider this problem.

Quote
But what I'm suggesting is: oh, this tmdb image is bad or missing, let's see if a refinement search does better.... Ah, there's a good one, use that one!  Or, nope, nothing better, I guess I'm stuck.
OK, that's reasonable. But in general I try to avoid scraping info out of webpages (without an API) because it breaks easily when they make minor layout changes. We'll see what happens (spoken with an orange accent)
Title: Re: MCRatings v3.0 released
Post by: wer on April 24, 2020, 01:42:39 pm
Ah, ok. You need to add quotes around the path+script name to tell windows that it's a single thing, or else windows breaks it up on the spaces and tries to execute "c:\program.exe" with the rest as arguments:
"C:\Program Files (x86)\Image Processing Apps\Scripts\caption.bat" arg1 arg2 arg3

For the same reason, some arguments also need quotes when they include spaces - MCR automatically adds them in most cases.

I know all about quotes. The reason it stood out to me was because the save actors/crew thumbnails location has no problem with spaces, and they don't need to be quoted.  In the post processing command box, since you're passing variables, I assumed that the app would recognize the leading part as the executable and pass it to the shell appropriately.  Bad assumption  ;D   ALthough MCRatings is unquestionably better documented than MC itself, it might not hurt to put a notation near the dialog on in the help that the user may have to include quotes in the path.

The only place I see discussion of actually using that option, how to with ImageMagick, mentioned is in your post here on the forum, and the issue "doesn't come up" there because you use C:\Scripts\convert.bat.  A nice short name with no spaces.  That post would be good info to include in the settings help.

But that's a minor point.  The documentation/help included with MCRatings is very good, and you deserve nothing but kudos.
Title: Re: MCRatings v3.0 released
Post by: wer on April 24, 2020, 01:49:08 pm
That's doable. The only snag I see is that, once MCR creates the placeholder image, on subsequent runs it won't be able to easily detect that that person is a placeholder - so if a new profile pic is available for it, it won't be easy to detect that it should now be downloaded/replaced. I'll consider this problem.

Yes, this had occurred to me.  But I was thinking about it in the context of the refinement search, so it's something of a 2-fer.  The refinement search must by definition have the ability to re-fetch and overwrite.  If someone sees bad images, or no images, they'll run a refinement search.

Conversely, think about the case when the refinement search does not exist (like now).  Once someone has run an MCRatings search against their movie, are they going to run it a second time? I doubt it.  What more is there to do, so why would they.  And you already have a note (in the convert.bat as I recall) admonishing the user they need to delete the original image if they want to reprocess it.  So I consider this a non-issue.  Mostly people won't try a second time, and if they do, they can just delete the silhouette images first, which is easy to do by just looking at the thumbnails in the folder itself.
Title: Re: MCRatings v3.0 released
Post by: wer on April 24, 2020, 01:57:54 pm
Just as a nota bene for people, if you want your actor/role names CENTERED when you superimpose them on the images (which I think looks much better) you just have to change the gravity to "north" in the caption lines in the convert.bat file.  So you would change lines to look like the following:

  "(" -size 130x -background none -fill white -pointsize 16 -gravity north -font Segoe-UI-SemiBold caption:%2 ")" ^


Do NOT change the lines that begin "magick %1".



Title: Re: MCRatings v3.0 released
Post by: zybex on April 24, 2020, 02:05:50 pm
Quote
The only place I see discussion of actually using that option, how to with ImageMagick, mentioned is in your post here on the forum, and the issue "doesn't come up" there because you use C:\Scripts\convert.bat.  A nice short name with no spaces.  That post would be good info to include in the settings help.

Yes, the documentation is lacking on that front, it's on the TODO list. I have some changes coming on the post-processing flow, so I'll update the documentation after that.
Title: Re: MCRatings v3.0 released
Post by: lepa on April 24, 2020, 02:16:00 pm
Regarding age appropriate photos, from what I saw, those conversations on tmdb are years old and were rejected, so I don't think it's happening.  We're on our own.
Oh, screw that then. I though it might have discussed after the website upgrade but didn't check the dates I guess
Title: Re: MCRatings v3.0 released
Post by: arcspin on April 24, 2020, 02:55:05 pm
  "(" -size 130x -background none -fill white -pointsize 16 -gravity north -font Segoe-UI-SemiBold caption:%2 ")" ^

Great advise, it looks better!

To follow up and to have both text lines centered you have to erase "west" from the second line as well in the code.
(just to be more specific for anyone wanting to try this)

"(" -size 130x -background none -fill yellow -pointsize 14 -gravity north -font Segoe-UI-Italic caption:%3 ")" ^
Title: Re: MCRatings v3.0 released
Post by: wer on April 24, 2020, 04:28:16 pm
All the lines that look like the one I posted need to be modified.  I didn't want to repost Zybex's entire script.
Title: Re: MCRatings v3.0 released
Post by: lepa on April 25, 2020, 04:12:51 am
There seems to be some action on character images front
https://www.themoviedb.org/talk/5e9fd5d9db72c00019eefe2e
Title: Re: MCRatings v3.0 released
Post by: wer on April 25, 2020, 04:22:48 am
I just looked at it.  I'm not optimistic.

Their plan is ambitious, to create a whole new structure centered around characters, info about the character, everyone who's ever played the character, etc.  it's ambitious, and therefore might take a long time to implement.  And then because it's crowdsourced, it could take a longer time to get a suitable amount of data in it. 

It wouldn't surprise me if it's a year or more before it begins to become useful.

Google image search is available now.
Title: Re: MCRatings v3.0 released
Post by: zybex on April 25, 2020, 04:31:05 am
Quote
It wouldn't surprise me if it's a year or more before it begins to become useful.
Google image search is available now.

You're assuming it would take me less than a year ;D
Title: Re: MCRatings v3.0 released
Post by: wer on April 25, 2020, 04:39:55 am
I have faith in you Zybex!

(Although it has been a month with that bug where you only get the first image of an actor when downloading multiple films!)  ::)

I have faith in you!
Title: Re: MCRatings v3.0 released
Post by: zybex on April 25, 2020, 04:53:44 am
(Although it has been a month with that bug where you only get the first image of an actor when downloading multiple films!)  ::)

Working on it. I said I would release a fix last week but didn't have the time. I'm planning on working on it today.
My day job has kept me quite busy lately (thankfully, but you might get lucky and they'll just layoff everyone :P). Weekends are spent half working, half sitting in zombie mode with the brain turned off...

EDIT: the fix is also taking longer because I realized I need to rework part of the post-processing code instead of just applying a band-aid.
Title: Re: MCRatings v3.0 released
Post by: wer on April 25, 2020, 01:27:30 pm
Haha... No worries! 

I assume you're on the traditional programmer's diet of Coke and Cheetos, to keep you going?  If not, you may find it provides a productivity boost.
Title: Re: MCRatings v3.0 released
Post by: zybex on April 26, 2020, 03:39:15 pm
MCRatings v3.1 released!

This release fixes a number of reported issues and adds some goodies. Some notes on this release:

Fixes:
This fixes reported issues with Actor profile downloads: names with quotes, actors with multiple roles/jobs, actor on multiple movies, etc.

Post-processing:
IMPORTANT: the post-processing flow is a bit changed. If you were using the Caption.bat script I provided before, please update it to the attached version and change the PP script command to:
Code: [Select]
c:\scripts\caption.bat $image $name $role $typeThis script also handles UTF8 characters in names, such as chinese/japanese/other chars.
MCR now knows if a given image is already post-processed, so it won't try to re-download/re-process it again.

Placeholders for missing actor pics:
MCR now adds a placeholder for missing cast/crew (option can be disabled). There's a male and a female placeholder, and you can customize them by just replacing the avatar PNG files in %localAppData%\MCRatings folder.
MCR can detect when a given image is a Placeholder and, when a picture becomes available on TMDb, it will replace it (when you do GET Info).

Folder structure for actors/posters:
MCR can now put downloaded posters/actors into different folders, with a customizable folder structure. This is achieved by using $tags in the Poster/Actor download path provided in Settings. The $tags were already available for the post-processing script, but now can be used for the folder Paths as well. To view a list of available tags, just right-click on top of the Path or Post-Processing boxes.
You can use $tag[index] or $tag[index,len] to get a substring of the $tag value. This is useful, for instance, to split Actors into folders named from A to Z (all actors starting with A go into "\A" subfolder, etc).
Examples:
c:\media\actors                      : put all files in the same folder
c:\media\actors\$name[0]       : put actors in an A-Z subfolder
c:\media\posters\$year           : divide posters by movie Year
c:\media\posters\$year[2,2]    : divide posters by last 2 digits of Year
c:\media\$tmdb\actors            : one folder per movie ID, subfolder \Actors

Other:
Added a TMDB ID column: you may need to create a field for it in JRiver and map it in MCR settings.
Ctrl+Click on the column opens the TMDB page, similar to imdb/trailer/file columns

TODO:
update the Documentation on GitHub, with more details on Post-processing and $tags.

Changelist:
NEW: Add placeholders for cast/crew with missing profile picture
NEW: detect and replace placeholders when image becomes available
NEW: Male/female placeholder customization (just replace default PNG files)
NEW: Poster Browser: Toggle placeholders display in Cast view
NEW: Poster Browser: Select/Select+Lock of current poster (left side)
NEW: Support $tags on Poster/Actor destination folders to split by year/tmdb/letter/etc
NEW: Support for $tag[index] and $tag[index,length] to get substrings of $tag
NEW: Option to ignore articles when sorting by Title; artile list is customizable
NEW: Add TMDbID column. CTRL+Click to open TMDb page.
FIX: handling of Actors with double-quotes in the role/name, eg: "Ansel Elgort [Miles "Baby"]"
FIX: handling of Actors with multiple roles, eg: "Actor Name [Role1 / Role2 / Role3]"
FIX: download of same actor for multiple movies/roles/jobs
FIX: occasional exception on download to TEMP folder
FIX: other minor fixes
other: avoid re-downloading Actor/Poster images
other: avoid reprocessing Actor/Poster images

Zybex
Title: Re: MCRatings v3.0 released
Post by: arcspin on April 26, 2020, 04:05:44 pm
A quick hot wash up,
Pictures are sorted in the correct folder (a-z)
The pictures however do not have any postscript, even though I did replace the caption.bat and PP script.

When I Get movie info the actors are sorted in the correct folder but as an .jpg.
When I do another Get movie info there is another picture saved for that actor but this time in .png.
Non with actors name and role added.

See screen shots.

It's getting late over here and I just wanted to leave a quick bug report.


Thanx for the update!

//arcspin
Title: Re: MCRatings v3.0 released
Post by: wer on April 26, 2020, 04:07:00 pm
Zybex, you're awesome!

The fixes for the actor images work great, just what I would have done myself.  I was actually eager beaver enough that I tried out the new version before your post here, so I of course found the PP script had to be modified. But then I came back here and you had posted the script above, so all's good.

I haven't tried out the new functionalities yet, but just the fix for the actors multiple roles and missing images is much appreciated!  And I see you took my gravity recommendation. ;)

Thanks again!

-Will
Title: Re: MCRatings v3.0 released
Post by: zybex on April 26, 2020, 04:26:46 pm
Arcspin,
Can you please find the MCR debug log and send it to me via pastebin.com or filebin.com?
The log is in the %temp%\MCRatings folder.

Edit: also try deleting the JPG/PNG files and GET again.
Title: Re: MCRatings v3.0 released
Post by: zybex on April 26, 2020, 04:35:11 pm
Arcspin, are you sure there are no labels?
The white part under the picture is actually transparent, and the actor name is in White. Since your Windows Explorer also has a white background, you won't see the text, but it's there. Try to open the picture in a viewer with a non-white background to check, or just change the colors in the Caption.bat script.

The behavior your describe is normal - the Actor is downloaded as a JPG, then converted to PNG, then post-processed. Check the spinner on the lower-right corner of MCR to confirm that it has finished all tasks.

Here's how it looks like with a black background:
Title: Re: MCRatings v3.0 released
Post by: zybex on April 26, 2020, 04:51:54 pm
I haven't tried out the new functionalities yet, but just the fix for the actors multiple roles and missing images is much appreciated!  And I see you took my gravity recommendation. ;)

It does look better centered :) I don't like how it looks with longer names/roles, but aside from using a smaller font there's not much we can do.
Let me know if you see any issue similar to Arcspin's.
Title: Re: MCRatings v3.0 released
Post by: wer on April 26, 2020, 05:20:16 pm
I do not have Arcspin's problem.

I've tried it out now and looked up quite a lot of movies. Everything worked extremely well, and I only see one small issue.

When handling characters with quotes in the name, there's a problem.  Aliens has a character with the nickname "Newt" with the word surrounded in double quotes, and TMDb presents it with the double-quote character.  The double-quote character is of course not valid for filenames.

When MCR pushes the information into MC, it seems to sanitize the double-quotes with single quotes.  This is the correct thing to do.  (If you're not doing it, MC does it for you, because the Actor's field in MC has 'Newt')

However, when saving the image files to disc, instead of replacing the " character with ' MCR replaces it with _

Now the field in MC and the filename don't match, and you have broken links.   The single-quote character needs to be used for filenames as well.

The same problem happens when an actor plays 2 roles in a movie.  For example in Peter Jackson's remake of King Kong, TMDb list Andy Serkis as two characters:   Kong, Lumpy
...with a comma in between them.  Also an invalid character.

MCR sanitizes the comma to an underscore in the filename, but inserts the comma as-is into MC.  The correct thing to do would be to sanitize the comma to a semi-colon  ;  in both places.  Equivalent meaning with no problems.

Can this be a quick fix?
Title: Re: MCRatings v3.0 released
Post by: zybex on April 26, 2020, 05:48:11 pm
It's a simple fix but it will have to wait for tomorrow.
Strange, I'm sure I tested both those scenarios...

Double quotes are valid in filenames, but Magick didn't handle them well so I'm replacing with single quotes.
Commas are also OK, I'm replacing slashes with commas. Semicolon is the list divider in MC, so I can't use it.

Both changes are supposed to be in sync in filenames and in the data written to MC.
Title: Re: MCRatings v3.0 released
Post by: wer on April 26, 2020, 06:04:33 pm
You're right about commas, but double quotes are not valid in filenames on Windows.  Windows will accept quotes as part of a path to enclose spaces, but you cannot insert a double-quote into an actual file name.

MCR is replacing commas in filenames even though they're valid, so I guess I didn't bother to check!

So commas should be included in the filename.

I'd forgotten that you're pushing actor names into an MC list.  That means if you find TMDb using a semicolon to separate parts/names (I wouldn't put it past them) you would also have to sanitize that to a comma in both places.  Is that being done already?
Title: Re: MCRatings v3.0 released
Post by: arcspin on April 26, 2020, 11:27:50 pm
Good morning,
No, there is no text below the picture (see attachement)

Same thing happens when I delete pictures (jpg & png) and do GET again.
First time I do GET there is: Denzel Washington [Robert 'Bobby' Trench].jpg
Second time I do GET there is: Denzel Washington [Robert 'Bobby' Trench].png


LOG FILE is here:
https://www.dropbox.com/s/9zzyaggzbfurehy/MCRatings.20200426.log?dl=0

LOG FILE in zip conatainer is here:
https://www.dropbox.com/s/155b4l157lawpah/MCRatings.20200426.zip?dl=0

Cheers,

//arcspin
Title: Re: MCRatings v3.0 released
Post by: zybex on April 27, 2020, 02:42:55 am
Hi Arcspin, good morning!
Thanks for the logs, hundreds of Exceptions there :)

I think your NAS is renaming my PNG files to JPG before MCR can convert them. Here's how it works:
1. MCR downloads an Actor.JPG to %temp%
2. MCR moves Actor.JPG to H:\JRiver\Actors.PNG (because you have the "save as PNG" on - but this is still in fact a JPG file)
3. MCR converts H:\JRiver\Actors.PNG to an actual PNG file (renames original to .TMP, writes a new .PNG, deletes the .TMP)
4. MCR calls post-processing script

So at no point does MCR write a JPG file to the target folder. I think your NAS looks at the just written PNG in step 2, recognizes that it's in fact a JPG and immediately renames it. When MCR goes to step 3, the PNG is now missing so it fails. On the second run, the NAS cannot rename it again bacause there's already a JPG there, so you end up with both files.

I'll make a change to convert the JPG file while it's still in %TEMP%, before copying to the destination folder.
Title: Re: MCRatings v3.0 released
Post by: zybex on April 27, 2020, 03:08:58 am
You're right about commas, but double quotes are not valid in filenames on Windows.
Right, that's why I'm replacing them - I shouldn't be posting at 1am, brain is already off ;)

Quote
I'd forgotten that you're pushing actor names into an MC list.  That means if you find TMDb using a semicolon to separate parts/names (I wouldn't put it past them) you would also have to sanitize that to a comma in both places.  Is that being done already?
Yes, that's being done.
Title: Re: MCRatings v3.0 released
Post by: zybex on April 27, 2020, 03:16:39 am
Published MCRatings v3.1.1:

- FIX: consistent handling of invalid chars in filenames for Actor/Roles
- Change: Convert images to PNG before copying to target folder (prevent NAS auto-renaming)

This should fix both reported issues above. Thanks for feedback!
Title: Re: MCRatings v3.0 released
Post by: arcspin on April 27, 2020, 10:24:13 am
I have tried out the updated MCRating
I'm sorry to say, but now no pictures of actors show up in Theater View.
BUT, they seem to be stuck in the Temp/MCRating folder.

See Screenshot.

Log file in .zip is here:
https://www.dropbox.com/s/7xqd70gwn259e0e/MCRatings.20200427.zip?dl=0


This is strange!
Title: Re: MCRatings v3.0 released
Post by: zybex on April 27, 2020, 11:12:08 am
Arcspin, thanks for the logs. This time it looks like you have an extra space at the end of the Save Actors path:
Code: [Select]
17:12:13.348  Process  8664 Executing PP command: c:\scripts\caption.bat "H:\JRiver\actors\D \Douglas Rain [HAL 9000 (voice)].png" "Douglas Rain" "HAL 9000 (voice)" CAST
magick: unable to open image 'H:\JRiver\actors\D \Douglas Rain [HAL 9000 (voice)].png': No such file or directory @ error/blob.c/OpenBlob/3496.

Note the space after the D:
"\actors\D \Douglas..."
. Please check and remove any space at the end of your save location:
"H:\JRiver\actors\$name[0]"
I'll add a Trim() to remove extra spaces on next release, as folders paths cannot end in spaces.

I hope this works for you now :)

Title: Re: MCRatings v3.0 released
Post by: arcspin on April 27, 2020, 11:18:52 am
TADA!  ;D

It works!

Title: Re: MCRatings v3.0 released
Post by: arcspin on April 27, 2020, 12:02:01 pm
What is the best way to start fresh.
I have only made some trial and error (regarding pictures) changes with MCRatings up until this new update.

Is the easiest way of again importing pictures of Actors/Directors to simply delete all the pictures in my A-Z folders and then "GET MOVIE INFO" again?


Title: Re: MCRatings v3.0 released
Post by: zybex on April 27, 2020, 12:06:27 pm
Yes, that's the simplest way.
Depending on how many movies you have and how fast is your PC, the Magick post-processing might take a long time. Hopefully once you do this once, you won't need to do it again - MCR knows when a file is already processed.
Title: Re: MCRatings v3.0 released
Post by: arcspin on April 27, 2020, 12:12:39 pm
Great, the weekend is booked for this endeavor!

One thing I have been thinking of is how often we should update the IMDB, TMDB, ROTTEN TOMATO and METACRITIC fields.
I mean the scores will change over time and to best reflect this would be to import new scores perhaps once per year or more often?

Is there a way in MCRatings to only GET and update critics ratings?
This could be a request for a future update.

Edit: I think I already know the answer because MCR only updates fields that have changed, it is as simple as doing another GET a year from now.

Title: Re: MCRatings v3.0 released
Post by: zybex on April 27, 2020, 01:13:24 pm
Right, MCR only updates changed fields. Even so, I also think some additional options to "get only X/Y/Z" columns might be useful.
You can do something like that now by doing GET and then Revert all unwanted columns, but that's awkward to do.

Personally I like to update all data more often, perhaps once a month - TMDb is crowdsourced and has thousands of daily updates, not only to Ratings but to most of the other fields. Corrections to actor lists, updated trailers, better plot descriptions, etc. With actor images, it's also good to check once in a while to see if an Actor now has a profile picture - MCR replaces the placeholder with the new picture when available.
Title: Re: MCRatings v3.0 released
Post by: wer on April 27, 2020, 01:23:17 pm
If he wants to update only specific fields, he could just turn off the overwrite option for the other fields in settings.

What I think would be more useful is an override for that, so that you could right-click a field and force an overwrite for that row/field even though overwrite is turned off in options.

This is most useful with something like the poster, where there are multiple choices.  I rarely want the default poster that tmdb offers.

It also might be useful to be able to right-click on a row to delete the actor photos for that row; they can be a little tedious to find by hand.

But I think you have much more important things to work on, Zybex. :). <wink wink hint hint>

Also, I tried the new version and everything works great with the photos!  Thanks!
Title: Re: MCRatings v3.0 released
Post by: zybex on April 27, 2020, 02:30:19 pm
It also might be useful to be able to right-click on a row to delete the actor photos for that row; they can be a little tedious to find by hand.
Good idea.

Quote
... update only specific fields ... bla bla bla ... force an overwrite ... mumble mumble ... multiple choices ...
So, perhaps something like this? ;D
Title: Re: MCRatings v3.0 released
Post by: wer on April 27, 2020, 03:18:12 pm
Not sure.  I'm having trouble seeing how that dialog is significantly different from what we already have.

Every column is a field, and every field already has a default to either overwrite or not.

What I proposed is being able to right-click on one cell, and force that one cell to overwrite the data in MC just that one time, regardless of settings.  So for example I could force an overwrite of the poster for 2001, while all the other movies behave according to settings.

That dialog seems to give you the ability to selectively RETRIEVE data.  Yes that could achieve the same result as what I describe, but I think it would more confusing.  When writing to MC, you'd have overwrite enabled, either globally or per column according to settings, and then you'd have to make sure you updated just the column you want.  I think that's more clicks, and more confusing.
Title: Re: MCRatings v3.0 released
Post by: zybex on April 27, 2020, 03:37:46 pm
Hmm. The idea was that you still get all the current functionality when you press the regular GET button, but you would also have this new (optional) dialog, accessed via some other way, to customize exactly what you want to get (overriding Settings).

This would allow you to update just the Ratings columns of all selected movies in one go, for instance.
What you propose can also be done with a right click on a cell, but then it only updates that single cell of that single movie.

Note that all this is before any Saving to MC takes place. All these options still only update the datagrid (changing colors to green/orange), and data is only saved to MC when you click the save button. There's no "instant save", though I also see that it would be nice to save things one by one as you review them.
Title: Re: MCRatings v3.0 released
Post by: wer on April 27, 2020, 04:00:44 pm
To me, that seems more confusing.  I think it's more straightforward for MCR to always get the data as specified in the main settings.  Let's call that "all data" for simplicity.

I think it's also more straightforward, once you're seeing current "all data" in the MCR screen, for you to be able to select what is pushed to MC.  In other words, place your restrictions on the output side, not the input side.

One thing I've noticed, the colors in the grid do not always match reality and the understanding of the description in the docs.  For example, with posters.  If overwrite is disabled on posters, I always see green text on a white background for posters.  But your docs say this:
"green text indicates that the current value is the same as returned from OMDb/TMDb (confirmed)"

But that's not the reality.  In reality the offered poster from tmdb is at a totally different resolution than my 667x1000 poster, but I still see 667x1000 as green text on white.  But Green on white is supposed to mean confirmed, and in fact the data is NOT confirmed. If I turn on overwrite for that field, and get movie info again, only then does MCR acknowledge that there is a different poster available.  Then the field shows orange.

I think perhaps that behavior needs to change, or maybe a new color is needed.  I think MCR should always retrieve data for all fields that are enabled, whether overwrite is enabled or not.  It should then give visual indication that new data is available for a cell, but that it will not be used because overwrite is disabled. (There does not seem to be a color defined that meets that condition.)  And then when you do push to MC, that new data is not written.  To me, that's what disabling overwrite means.  MCR seems to use it as "ignore this field" which means you don't know if there's an update available for a cell if overwrite is disabled for that field.  I think that's bad.

Is what I'm saying making sense?

Also just to be clear, I was not suggesting an "instant save", merely a per-cell override that is executed when "Save to JRiver" is clicked.

I do also think there would be value in having "Save to JRiver" respect the check boxes, so that you could update only certain movies if you want.  I achieve this now by putting the movies I want to update on their own MCRatings playlist.  That's fine, but perhaps not as convenient as being able to selectively update from the full list.
Title: Re: MCRatings v3.0 released
Post by: zybex on April 27, 2020, 04:20:43 pm
Quote
I think it's also more straightforward, once you're seeing current "all data" in the MCR screen, for you to be able to select what is pushed to MC.  In other words, place your restrictions on the output side, not the input side.
No, that's not MCR's philosophy. It gets data, shows what WILL be saved, allows you to REVERT changes you don't want, then SAVE pushes the remaining ones (highlighted) to JRiver.

Quote
If overwrite is disabled on posters, I always see green text on a white background for posters.  But your docs say this:
"green text indicates that the current value is the same as returned from OMDb/TMDb (confirmed)"
True, the colors in Posters behave slightly different. That's because it's comparing your current resolution with the best resolution available from TMDb. If what you have is same/better than TMDb, then it shows "confirmed" color, even if the poster is not the same. It's not trivial to actually compare your current poster with the one suggested by TMDb to check if they're actually the same poster, so MCR only compares resolutions.
For posters, Orange means that there's one with higher resolution available.

Quote
To me, that's what disabling overwrite means.  MCR seems to use it as "ignore this field" which means you don't know if there's an update available for a cell if overwrite is disabled for that field.  I think that's bad.
Well, think about it. What you're saying is that you want an indication that new data is available so that you can then chose if you want it or not. But... isn't that what happens when you turn Overwrite on? It shows you a color when there's new data, you can see the new and previous data on the cell tooltip, and then you can chose to SAVE or REVERT it.

Quote
I do also think there would be value in having "Save to JRiver" respect the check boxes
Me too, I've had this functionality before and disabled it for some reason. I might put it back.

Thanks for the suggestions.
Title: Re: MCRatings v3.0 released
Post by: wer on April 27, 2020, 05:01:16 pm
Well, think about it. What you're saying is that you want an indication that new data is available so that you can then chose if you want it or not. But... isn't that what happens when you turn Overwrite on? It shows you a color when there's new data, and then you can chose to SAVE or REVERT it.

I think it comes down to management by exception, and which is the more common action.

The first time you run MCR, you want it to load in all this new data you didn't have before, so lots of overwriting.

But after you've loaded your initial data, you make tweaks in MC.  You have posters you don't want overwritten, for example. Or you make changes to the order of the actors field so that silhouette pictures come later.

Now you're in maintenance mode.  Now overwrites become the exception rather than the rule.  Mostly you want your existing data preserved.  There are two ways of dealing with this in MCR: change the overwrite default, but now you will never be notified of updated data, or leave it enabled but you have to revert a bunch of fields, which is  lot of clicks.

Yes you can lock fields, but then you also do not get notified of an available update.

You said "For posters, Orange means that there's one with higher resolution available." 
Except that does not work if overwrite is disabled.  And it's not just posters, it's all  fields.

If overwrite is disabled, or if a field is locked, you get zero notification as to new data, no matter what field it is.  That's bad, so I think there should be a color for that.

What would be best is if there is new data available for a field that has overwrite disabled (or is locked) then you get some notification... maybe it blinks.  And then you could right click on it and click "Accept new data anyway".

Locked fields are hard to spot.  It would be nice if you could filter for them.  There are so many cells in a row, and so many rows, that being able to filter by condition (locked cells, changed cells, cells where new data is available but inhibited) would be very helpful.

Bottom line is that what I'm calling maintenance mode, management by exception, where changing an existing value is only sometimes desired, is a pain in MCR, because you essentially cannot do it unless overwrite is enabled for all fields.  So then you have to lock, or do a whole bunch of reverts.

Think about it in a similar way to software updates. If a user's policy is "I always want to be notified when new updates are available, but my default position is not to take them."  That can't be done in MCR, because to get the notification overwrites must be on.  And because you can't selectively push to MC, you must explicitly reject the 99 updates you don't want, instead of accepting the one you do.  That's the opposite default from what you want.

It just makes some modes of use more difficult than they need to be.  An additional color code to indicate an update is available but inhibited would be helpful in mitigating, as would selective writes to MC.

Thanks...
Title: Re: MCRatings v3.0 released
Post by: zybex on April 28, 2020, 06:21:17 am
Quote
Locked fields are hard to spot.  It would be nice if you could filter for them.
Select->Criteria...->With Locked Fields

I understand your position, and it has merits. I may implement some of the features you describe over time, but it may have to wait until I rework the datagrid code/functionality (long term plans). Meanwhile I'll add selective Save and easier ways to fetch only a few columns. I often find that an option "discard all except this column" would help my workflow - I often focus on updating a single field for all movies - so I'll probably add that too.
Title: Re: MCRatings v3.0 released
Post by: arcspin on April 28, 2020, 08:12:42 am
So, perhaps something like this? ;D

Hi,
Exactly, this is what I was asking for.

A straightforward and visual way of only selecting to update for examples ratings, description, or actors/crew pictures and nothing else.
I'm always cautious when batch editing my movies in fear of something going wrong with a large dataset.
This way I could take comfort in that there will only be changes regarding for examples ratings and nothing else.
Stay safe,

//arcspin
Title: Re: MCRatings v3.0 released
Post by: lepa on April 30, 2020, 03:34:52 am
Hi zybex!
Wer's Tom Skerritt in other thread looks really old for a man chasing some aliens so would you consider implementing image fetching using search engine image search for actor+year or rolename+actor or something like that. I guess it would also require ability to crop into a frame in order align image correctly.

I realize that this is a bit different than just fetching images from tmdb but while waiting for tmdb to get character image system up (if ever) this would make immersion a lot better when you could see young Arnold as a terminator.
Title: Re: MCRatings v3.0 released
Post by: zybex on April 30, 2020, 04:07:07 am
would you consider implementing image fetching using search engine image search for actor+year or rolename+actor or something like that. I guess it would also require ability to crop into a frame in order align image correctly.
This would take some time to implement. I'm short of that right now, let's see if/when it happens. No promises.

Quote
you could see young Arnold as a terminator.
He's an exterminator now :P
Title: Re: MCRatings v3.0 released
Post by: lepa on April 30, 2020, 04:58:16 am
He's an exterminator now :P
But the determination is still there. 
Title: Re: MCRatings v3.0 released
Post by: arcspin on April 30, 2020, 01:15:05 pm
OOOh man, I've been working the entire day downloading actors/crew pictures and at the same time went over all the movie posters for every movie I have.
I also did change the color of the actors role and crew titles before I started and ended up with using the color "gold" for actor role in non italic and the color "limegreen" for crew.

I went with 100 movies at a time so not to jinx the computer and I must say that the movie poster functionality in MCR is just awesome!
I have found so many great movie posters that I have selected and my Theater view looks better than ever.

I mean who doesn't love uniformity in a movies series like in the attached screenshot...



Many thanks zybex for this latest release, much appreciated!!!

Take care and have a great weekend y'all,

//arcspin
Title: Re: MCRatings v3.0 released
Post by: deanpref on May 12, 2020, 10:50:19 am
OOOh man, I've been working the entire day downloading actors/crew pictures and at the same time went over all the movie posters for every movie I have.
I also did change the color of the actors role and crew titles before I started and ended up with using the color "gold" for actor role in non italic and the color "limegreen" for crew.

I went with 100 movies at a time so not to jinx the computer and I must say that the movie poster functionality in MCR is just awesome!
I have found so many great movie posters that I have selected and my Theater view looks better than ever.

I mean who doesn't love uniformity in a movies series like in the attached screenshot...



Many thanks zybex for this latest release, much appreciated!!!

Take care and have a great weekend y'all,

//arcspin

Hey, can you tell me which skins do you use for the theater view ?
Title: Re: MCRatings v3.0 released
Post by: arcspin on May 12, 2020, 11:10:49 am
Hi,
The skin is called Obsidian and can be found in Tools/Options/Theater View and Skin: Obsidian
Title: Re: MCRatings v3.0 released
Post by: arcspin on May 29, 2020, 11:10:47 pm
@Zybex

Hi,
When I "Get Movie Info" with MCRatings the Studios field is not updated.
Can there be something that has changed back at OMDb that causes the Studios field not to update.
(For me it has been like this for some times and not only for this movie)



Best regards,
Title: Re: MCRatings v3.0 released
Post by: zybex on May 30, 2020, 05:38:45 am
Hey Arcspin,
Looks like it's just missing for that movie and many others. It's listed as "Production": "N/A", which MCRatings ignores. They might have purged their DB for some reason, I see it missing for many movies which did have a value before.

I guess I can enable the option to get it from TMDb instead. The reason I didn't do that is because while OMDb usually provides only 1 studio/producer (the main one), TMDb provides a list of them and it's not clear which one is the main one. For instance for Baby Driver (tt3890160):

OMDb:
   "Production": "Sony Pictures",

TMDb:
  "production_companies": [
    {
      "id": 559,
      "logo_path": "\/eC0bWHVjnjUducyA6YFoEFqnPMC.png",
      "name": "TriStar Pictures",
      "origin_country": "US"
    },
    {
      "id": 443,
      "logo_path": "\/deewJi8ncCh6Sc2STL91wvZ4O5X.png",
      "name": "Big Talk Productions",
      "origin_country": "GB"
    },
    {
      "id": 2531,
      "logo_path": "\/pC2iDCDCvV85vOBP7a5Ukxuc0Du.png",
      "name": "MRC",
      "origin_country": "US"
    },
    {
      "id": 10163,
      "logo_path": "\/16KWBMmfPX0aJzDExDrPxSLj0Pg.png",
      "name": "Working Title Films",
      "origin_country": "GB"
    },
    {
      "id": 34,
      "logo_path": "\/GagSvqWlyPdkFHMfQ3pNq6ix9P.png",
      "name": "Sony Pictures",
      "origin_country": "US"
    }
  ],

So here it would result in a list of 5 studios where the last one is the one that OMDb considers the most important. Not sure if that's preferable, but I can add the selector in Settings, then it's your choice.
Title: Re: MCRatings v3.0 released
Post by: Hendrik on May 30, 2020, 06:01:11 am
If you take IMDB as more of an authority on that (https://www.imdb.com/title/tt3890160/companycredits), they don't even list Sony directly (but of course Sony owns TriStar Pictures). Sony Pictures is the main distributor, while TriStar was the main production company.

No idea if there is some sort of sensible ordering to the TMDb results, but many movies are made by a partnership of at least two studio (in this case TriStar + MRC), and just mentioning one might not be really accurate.
Title: Re: MCRatings v3.0 released
Post by: zybex on May 30, 2020, 06:17:18 am
It looks like there's a pattern... OMDb mostly had the main Distributor company listed as Production, and they've now cleaned it up. TMDb lists the same/similar companies as IMDb.

For instance, for https://www.imdb.com/title/tt0298203/companycredits, OMDb had "Universal Pictures" and now is blank, but TMDb has the same 2 listed on IMDb.

I'll enable the TMDb option.
Title: Re: MCRatings v3.0 released
Post by: arcspin on May 30, 2020, 06:54:22 am
Great!
Glad it wasn't anything wrong at my end, so to speak.

Yeah, let´s try out the TMDb option and see if that floods that field with a lot of studio names or not.


Thank you,

//arcspin
Title: Re: MCRatings v3.0 released
Post by: zybex on May 30, 2020, 07:44:56 am
It sure does :)
Title: Re: MCRatings v3.0 released
Post by: arcspin on May 30, 2020, 12:44:00 pm
Yikees, thats a lot of studios for a single movie.

Guess i have to start to filter out and only show 2 or 3 studios in theater view.
To bad I don't know which studio is the main studio.

Anyways, lets try it and see how it goes.
Perhaps OMDb will come to its senses and bring back the "one studio" approach.
Title: Re: MCRatings v3.0 released
Post by: wer on May 30, 2020, 02:32:14 pm
They're not studios, they're fake studios.

It seems practically every producer in Hollywood has incorporated his own "studio" so he can have a vanity card to display before the opening titles.  I've seen movies that had 10 different vanity logos, many of them animated, roll before the opening titles.  It went on for minutes.  It's absurd, really.
Title: Re: MCRatings v3.0 released
Post by: arcspin on May 31, 2020, 02:17:48 pm
Thanks zybex for the update.

The studios part works fine and I have set a cap of two studios to be shown in Theater view.


Take care,

//arcspin
Title: Re: MCRatings v3.0 released
Post by: zybex on May 31, 2020, 02:19:30 pm
Hi,
I've released v3.2 - please check the announcement thread here:
https://yabb.jriver.com/interact/index.php/topic,125575.0.html

At JRiver's request, the tool is now called ZRatings.
Title: Re: MCRatings v3.0 released
Post by: mvandyke on November 28, 2020, 07:32:56 am
ZRatings works great and has been a big help to me.  There are many photos that are not available and I would like to add in their official photo rather than their silhouette.

I've downloaded about 50 pictures and can get them to work one by one by for example typing the following line on a Warren Zevon picture

caption.bat "warren zevon.png" "Warren Zevon"

I can't get it work by for all of the files at once (example caption.bat *.png *) using the standard caption.bat arg1 arg2

Is there an easy way to this without manually typing in picture by picture

Thanks
Matt
Title: Re: MCRatings v3.0 released
Post by: zybex on November 28, 2020, 08:25:33 am
Several ways... here's one, assuming you have all PNGs in same folder and with correct names:
forfiles /m *.png /c "cmd /c caption.bat @file @fname"
Title: Re: MCRatings v3.0 released
Post by: mvandyke on November 28, 2020, 01:21:15 pm
Several ways... here's one, assuming you have all PNGs in same folder and with correct names:
forfiles /m *.png /c "cmd /c caption.bat @file @fname"


Thanks that worked - I put all of my downloaded files in one directory and then ran the following

forfiles /m *.png /c "cmd /c c:\scripts\caption.bat @file @fname"

and it all worked.  Thanks as I don't think I would have figured it out !!!!