Support for JPEG folder thumbnails

Post Reply
tuliolazarini
Posts: 17
Joined: Sat Apr 16, 2011 12:19 am

Support for JPEG folder thumbnails

Post by tuliolazarini »

Hello, Eugene,

I recently migrate my movie collection from an old NAS to a bigger one. This made me very sad because I lost all my collection's thumbnails (collected from IMDb individually) when I did a folder rescan. Well, this might be avoided, in the future, if WMS could load thumbnails from images with the same name as movies (except file extension). For example, 'Salt.jpg' could be used as thumbnail for 'Salt.mkv' if they're on the same folder. The same logic applies to music folders, in which 'folder.jpg' could be used as thumbnail for entire album.

I tried to make some adjustments on a script you provided many time ago (this one) and didn't worked as expected. Are there plans to develop such functionality?

Thanks in advance, Tulio.
Eugene
Posts: 2940
Joined: Tue Nov 17, 2009 8:05 pm

Re: Support for JPEG folder thumbnails

Post by Eugene »

Hello,

Settings - "Media-resources" - "Photo-resources, Thumbnails" - "Movie covers directory"

WMS support folder.jpg for music folders.
tuliolazarini
Posts: 17
Joined: Sat Apr 16, 2011 12:19 am

Re: Support for JPEG folder thumbnails

Post by tuliolazarini »

Eugene wrote:Settings - "Media-resources" - "Photo-resources, Thumbnails" - "Movie covers directory"
Eugene, I'm afraid to say it's not working as expected... :(

Let me tell you about my home environment: all my media resources are located on a Synology NAS. I mapped the remote network share "\\ds411\video" as V:, and WMS sees it perfectly well. Movies are classified by genre, one folder for each. Here's the 'Suspense' folder (Thriller, in Portuguese). Note thal all movies has its associated JPEG cover image:

Code: Select all

V:\Suspense>dir /on
 O volume na unidade V é video
 O Número de Série do Volume é 02CA-04EC

 Pasta de V:\Suspense

17/12/2011  07:08    <DIR>          .
16/12/2011  20:44    <DIR>          ..
16/12/2011  20:33            15.596 Angels and Demons.jpg
28/08/2009  16:19    12.881.119.851 Angels and Demons.mkv
29/08/2009  09:26           199.958 Angels and Demons.srt
16/12/2011  20:27            14.079 Black Swan.jpg
19/03/2011  22:58     9.366.493.965 Black Swan.mkv
16/12/2011  20:28            25.345 Inception.jpg
04/12/2010  22:00     9.231.951.803 Inception.mkv
19/02/2011  14:09           125.720 Inception.srt
16/12/2011  20:32            22.643 Ocean's Eleven.jpg
18/08/2008  01:58     8.532.017.051 Ocean's Eleven.mkv
10/05/2009  15:33            84.627 Ocean's Eleven.srt
16/12/2011  20:32            18.379 Ocean's Twelve.jpg
21/01/2010  02:10     8.535.181.482 Ocean's Twelve.mkv
16/12/2011  20:29             9.551 Salt.jpg
20/12/2010  17:12     9.689.095.482 Salt.mkv
19/02/2011  14:04            72.131 Salt.srt
16/12/2011  20:34            17.466 Shutter Island.jpg
18/05/2010  04:35    11.739.768.877 Shutter Island.mkv
18/05/2010  20:54           109.362 Shutter Island.srt
16/12/2011  20:29            12.124 The Box.jpg
10/12/2010  23:07     8.730.848.589 The Box.mkv
19/02/2011  14:07            69.250 The Box.srt
16/12/2011  20:33            17.144 The Da Vinci Code.jpg
01/09/2009  23:12    14.655.216.267 The Da Vinci Code.mkv
10/09/2009  12:37           134.906 The Da Vinci Code.srt
16/12/2011  20:30            23.432 The Happening.jpg
02/09/2011  10:43     9.066.253.473 The Happening.mkv
01/09/2011  20:53            66.319 The Happening.srt
16/12/2011  20:30            12.964 Twilight Eclipse.jpg
05/12/2010  11:48     9.375.785.347 Twilight Eclipse.mkv
19/02/2011  14:19            91.119 Twilight Eclipse.srt
16/12/2011  20:31            19.408 Unknown.jpg
12/06/2011  00:26     5.010.768.029 Unknown.mkv
12/06/2011  00:26            63.978 Unknown.srt
16/12/2011  20:31             9.144 X.jpg
19/10/2011  07:35    16.165.047.691 X.mkv
17/10/2011  19:19            41.157 X.srt
              37 arquivo(s) 132.980.823.709 bytes
               2 pasta(s)   4.619.672.637.440 bytes disponíveis
So, I cleared thumbnail cache in C:\ProgramData\Wild Media Server\Thumbnails and enabled "Movie covers directory", setting it to V:\Suspense. I rescanned media folders, and nothing happened. Tried to put \\ds411\video\Suspense on "Moviel covers directory", rescanned again, and nothing yet. Am I doing something wrong?

Thanks in advance.
Eugene
Posts: 2940
Joined: Tue Nov 17, 2009 8:05 pm

Re: Support for JPEG folder thumbnails

Post by Eugene »

Select a file - right click - "Load file properties"

Folder "All movies" - List [Movies]- right click - "Select all" - right click - "Load file properties"
tuliolazarini
Posts: 17
Joined: Sat Apr 16, 2011 12:19 am

Re: Support for JPEG folder thumbnails

Post by tuliolazarini »

Eugene wrote:Select a file - right click - "Load file properties"

Folder "All movies" - List [Movies]- right click - "Select all" - right click - "Load file properties"
Hooray! Worked like a swiss clock!
Thanks again! :D
tuliolazarini
Posts: 17
Joined: Sat Apr 16, 2011 12:19 am

Re: Support for JPEG folder thumbnails

Post by tuliolazarini »

Eugene, one question:
I tried to specify multiple directories (separated by semicolons, ";") for "Movie covers directory", as I did with subtitles, like "V:\Ação;V:\Suspense;V:\Drama;V:\Romance;V:\Documentários;V:\Comédia"... When I restarted application and tried to load file properties, thumbnais did'nt get properly loaded.
Is it necessary all movie covers be in an unique folder?
Thanks again.
Eugene
Posts: 2940
Joined: Tue Nov 17, 2009 8:05 pm

Re: Support for JPEG folder thumbnails

Post by Eugene »

Yes, support only one folder, but you can try another solution

Settings - Processing - Add

Name: Attach thumbnail
Script:

Code: Select all

var
  sItemPath: string;
begin
  if (CurrentMediaItem <> nil) and (CurrentMediaItem.MediaType = mtVideo) then begin  
    sItemPath := CurrentMediaItem.Properties[mpiFilePath];
    if ((Pos('\\', sItemPath) = 1) or (Pos(':\', sItemPath) = 2)) and FileExists(ChangeFileExt(sItemPath, '.jpg')) then
      CurrentMediaItem.Properties[mpiThumbnail] := ChangeFileExt(sItemPath, '.jpg')  
  end
end.
Ok - Ok

Events - "After reading of properties of a media resource" - "Attach thumbnail"

Ok

Select a file - right click - "Load file properties"
tuliolazarini
Posts: 17
Joined: Sat Apr 16, 2011 12:19 am

Re: Support for JPEG folder thumbnails

Post by tuliolazarini »

Absolutely amazing! Did the trick!
Thank you again!
Post Reply