Skip to content

dbprv/dbprv.MultiMediaHelpers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dbprv.MultiMediaHelpers

Powershell module with various functions for working with multimedia files.

Links

Features

  • create .nfo files for Kodi for movies, TV shows
  • search information on Kinopoisk, TMDB
  • search trailers on TMDB, Youtube
  • parse complex file/directory name to title, year, etc.
  • search by reverse transliterated titles from english to russian

Configure

  • create config, see example

  • set environmet variable MMH_CONFIG_PATH = config path

  • get API key for kinopoisk.dev from https://api.kinopoisk.dev/documentation

  • set environmet variable KINOPOISK_API_KEY = this API key
    OR directly in config:

    Kinopoisk:
      ApiKey: '...'
  • get TMDB Access Token https://www.themoviedb.org/settings/api

  • set environmet variable TMDB_ACCESS_TOKEN = this access token
    OR directly in config:

    Tmdb:
      AccessToken: '...'

Some trailers from TMDB info may be already deleted or not available for your country. To search and validate trailers on Youtube:

  • go to https://console.developers.google.com
  • create project
  • select "ENABLE APIS AND SERVICES"
  • select "YouTube Data API v3", Enable
  • press "CREATE CREDENTIALS", select "Public data"
  • save API key somewhere
  • optionally - restrict API key: select "Credentials" - select your new API key - API restrictions - Restrict key - YouTube Data API v3 - Save
  • set environmet variable YOUTUBE_API_KEY = this API key
    OR directly in config:
Youtube:
  ...
  ApiKey: '...'
  Region: RU
  • set "Region" (2 letters, as country domain) - it is used to validate if video is available for your country

Powershell Functions

Create-KodiMoviesNfo

Create .nfo files for Kodi media player for movies and TV series.

Information about movies is obtained from:

Usage:

For movies:

Create-KodiMoviesNfo -Folder 'D:\Video\Movies' -ContentType 'Movie'

For TV shows:

Create-KodiMoviesNfo -Folder 'D:\Video\TVShows' -ContentType 'TVShow'

Required params:

  • Folder - folder with media files
  • ContentType - Movie | TVShow

Additional params:

  • SaveInfo - save internal info and logs to <Folder>\.media_info dir

Check-KodiNfo

Check nfo-files in media dir:

  • show common list
  • TMDB ID not found
  • no trailer

Usage:

Check-KodiNfo -Folder 'D:\Video\Movies'

Export-KodiNfoCsv

Export info from Kodi nfo-files to CSV.

Usage:

Export-KodiNfoCsv -Folders 'D:\Video\Movies', 'D:\Video\Movies2' -ResultPath 'D:\Video\Movies.csv'

Troubleshooting

Name of TV series is incorrect

Add file mmh.txt to TV series dir. Set file content:

tvshow name year

Alternatives