Launch a random trailer before movie

jonaskp

Portal Pro
October 23, 2006
438
18
Cool. So does this only grab trailers for movies that you already have? And what is the naming of the files?
 

SimplyC

Portal Member
September 13, 2009
34
0
Yep, it extracts the movie title from the filename (removing the extension), searches movie-list.com for that movie (via google!). It then searches for any .mov trailers on the page and downloads the first one it finds. As I said, I've assumed that each movie has it's own folder, and it just saves each trailer as "trailer.mov" in the movies folder.

You can tell it to only download files > Xmb, which is my way of filtering quality. Movie-List generally lists trailers from high quality to low, so if you set a high limit then you'll get the 1080 versions. I default to 60mb as I'm happy to take the low quality versions. You can also tell it to skip files where a "trailer.mov" already exists.

I've rushed this out a bit, so if you have any ideas as to how it could be improved, let me know.
 

bodiroga

Portal Pro
January 1, 2008
241
28
Country flag
Yep, it extracts the movie title from the filename (removing the extension), searches movie-list.com for that movie (via google!). It then searches for any .mov trailers on the page and downloads the first one it finds. As I said, I've assumed that each movie has it's own folder, and it just saves each trailer as "trailer.mov" in the movies folder.

You can tell it to only download files > Xmb, which is my way of filtering quality. Movie-List generally lists trailers from high quality to low, so if you set a high limit then you'll get the 1080 versions. I default to 60mb as I'm happy to take the low quality versions. You can also tell it to skip files where a "trailer.mov" already exists.

I've rushed this out a bit, so if you have any ideas as to how it could be improved, let me know.
Hi SimplyC!

Thanks for your plugin, it looks GREAT! Nevertheless, I have one problem with the scraper, because my film aren't only named with the film name (+ extension). As an example, here you have my filename for the film Annie Hall:

Annie Hall [DVDRip-Dual(Eng-Spa)-XviD-AC3(2.0)-Mp3].avi

As you can see, I've added to the film name relevant information about the film, such as video codec, audio codec, languages...

Can you solve this problem just like TVSeries does? Ignoring words like BDrip, DVDrip, XviD, Mp3, [ ],... for example.

What do you think?

Thanks again for your work, it would be great if you could integer your scraper in the Moving Pictures configuration. That would be perfect!

Regards,

Aitor
 

SimplyC

Portal Member
September 13, 2009
34
0
ok, give this a go.

I've added a field so you can enter a regular expression to clean your filename. I've copied the expression from the moving pictures config (see below), so don't ask me too many questions about it, if there's any words you need to add, i think you can just add them to the list.

(\b(576p|720p|1080p|1080i|dircut|directors cut|dvdrip|dvdscreener|dvdscr|avchd|wmv|ntsc|pal|mpeg|dsr|hd|r5|dvd|dvdr|dvd5|dvd9|bd5|bd9|dts|ac3|bluray|blu-ray|hdtv|pdtv|stv|hddvd|xvid|divx|x264|dxva|(?-i)FESTIVAL|LIMITED|WS|FS|PROPER|REPACK|RERIP|REAL|RETAIL|EXTENDED|REMASTERED|UNRATED|CHRONO|THEATRICAL|DC|SE|UNCUT|INTERNAL|DUBBED|SUBBED)\b([-].+?$)?)

I've also added a save settings button which copies you current settings and should make them default. Should save entering the same details over and over again.

I'm not sure what language all the other scrappers are written in (best guess, java?). It's nto something i'm familiar with, but if anyone wants to give me a steer in the right direction, i'd love to help out and get this integarted into MP!

Enjoy
 

Attachments

kiwijunglist

Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    113
    New Zealand
    Country flag
    SimplyC - Nice little app.

    If you save trailers.mov in each movie folder, then wont movingpictures scan those files into the database?

    I thought it would be better to have option to scrape the movie title from the directory name,
    alternatively an even better way would be to scrape the movie name from movingpictures.db3 file
     

    SimplyC

    Portal Member
    September 13, 2009
    34
    0
    @SimplyC - Nice little app.

    If you save trailers.mov in each movie folder, then wont movingpictures scan those files into the database?

    I thought it would be better to have option to scrape the movie title from the directory name,
    alternatively an even better way would be to scrape the movie name from movingpictures.db3 file
    Hello again,

    been dead busy, so no time to look at this.

    Most trailers are .mov files, so I'm quite happy for mp to ignore those, as all my movies are mp4 or avi
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    113
    New Zealand
    Country flag
    I have a feeling that moving pictures 0.8 will sort of support trailers using the filters category using the following hack / file naming scheme

    Here is my method/idea

    I have the following files in a directory

    \MOVIES\HITMAN (2008)\Hitman.avi
    \MOVIES\HITMAN (2008)\movieinfo.nfo (txt file containing the imdb id)
    \MOVIES\HITMAN (2008)\Trailer.mov
    \MOVIES\HITMAN (2008)\folder.jpg
    \MOVIES\HITMAN (2008)\backdrop.jpg


    Currently moving pictures 0.75 will scan the movie folder and create two entries
    1. Hitman the movie as one would expect
    2. Another movie called Trailer, that uses the same folder/backdrop as hitman movie


    With the addition of filters in 0.8 hopefully you can do the following;

    Use this standalone program to populate the movie folder with movienfo.nfo/folder.jpg/backdrop.jpg using the moving pictures database
    https://forum.team-mediaportal.com/moving-pictures-284/app-copy-artwork-details-movie-folder-71649/
    Movingpictures will automatically parse the movieinfo.nfo for the imdb id# to correctly identify the movie.
    Create two filters
    1. Filter Name = "Movies" , Properties = "filename extension =/= .mov"
    This will display all your movies
    2. Filter Name = "Trailers" , Properties = "filename extension = .mov"
    This will display all your trailers


    Hopefully the category/filters will let you filter by filename or file extension
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    Top Bottom