Giter Club home page Giter Club logo

mediabot's People

Contributors

aaginskiy avatar

Stargazers

 avatar

Watchers

 avatar

mediabot's Issues

Add Metadata Scanner to automatically update nfo, poster and fanart from TMDB

Base features:

Find TMDB ID

  • Search and return TMDB ID by name (required) and year (optional)
  • Return error if name is not provided
  • Propagate errors from underline TMDB lib

Scrape Movie by TMDB ID

  • Load movie information from TMDB
  • Return in MovieInfo object format

Scrape Movie by Name

  • Find TMDB ID by name (required) and year (optional)
  • Scrape movie by TMDB ID
  • Return in MovieInfo object format

Scrape and Save by TMDB ID

  • Scrape movie by TMDB ID
  • If forced, save all. If not forced, only save missing.
    • Save movie info as XML NFO
    • Save poster
    • Save fanart

Scrape and Save by Name

  • Find TMDB ID by name (required) and year (optional)
  • Scrape and save by TMDB ID

Add Job Workers service

Migrate to typescript

startScheduler

  • Schedule jobs at regular interval set at start

stopScheduler

  • Stop scheduling jobs at regular interval

scheduleJobs

  • Start job for each idle job worker
  • Schedule high priority job before low priority
  • If no worker is available, do not schedule a job
  • If worker is available, it should start a job
  • It should update progress when progress message emitted from job
  • it should complete job when done message is emitted from job
  • it should record error if error message is emitted from job

Add RefreshMovie command to ControllerService

RefreshMovie command refreshes the movie from file. Missing information is loaded from the internet.

refreshMovie

  • Scrape for missing information (nfo, images)
  • Save information in remoteInfo
  • Load mediaInfo from the media file
  • Load movie information from NFO
  • Save to database
  • Throw error if any steps fail

scanMovieLibrary

  • Adds new media that wasn't in library before
  • Removes missing media that was in library before
  • Refresh media from disk if refresh is requested
  • Do not refresh media from disk if refresh is not requested

refreshMovieLibrary

  • Refresh media from disk for existing movies in library
  • Remove missing media if removal is requested
  • Do not remove missing media from disk and mark missing if removal is not requested

refreshMediainfo

  • Refresh specific movie from file
  • Remove missing media if removal is requested
  • Do not remove missing media from disk and mark missing if removal is not requested

Add Metadata Validator and Auto-Fixer

checkTrackRule

  • when conditions match
    • returns true if rule is matched
    • returns false if rule is not matched
  • returns true if conditions do not match

executeTrackRule

  • when conditions match
    • returns track unmodified if rule is matched
    • returns modified track if rule is not matched
  • returns track unmodified if conditions do not match

checkRules

  • returns false if any rule is not followed
  • returns true if all rules are followed
  • when condition value is reference
    • returns false if any rule is not followed
    • returns true if all rules are followed
  • returns true if no rules provided
  • returns true if rules are undefined

executeRules

  • correctly sets track for removal
  • returns unmodified movie if rule already set
  • when action value is reference
  • returns unmodified movie if no rules provided
  • returns unmodified movie if rules are undefined

Add disk scanner utility

findAllMediaFiles

  • Finds new movies
  • Finds existing movies
  • Finds removed movies

loadMetadataFromFile

  • Throws a TypeError if filename is empty
  • Throws an error when file is not found
  • Throws an error of JSON cannot be read
  • Returns mediaFile object
  • It should set directory and filename
  • It should set list of files
  • It should set artwork
  • It should set NFO

writeMediainfo

  • Should mkvpropedit with correct command
  • should set the media title
  • should delete track parameters when they are empty
  • should not have track in command if no tracks present
  • should set each track parameter when not empty

muxMediaFile

  • Should call mkvmerge with correct command
    • should be an array
    • should contain ' -D' if no video tracks to mux
    • should contain ' -A' if no audio tracks to mux
    • should contain ' -S' if no subtitle tracks to mux
    • should contain ' -d track.number' if one video track to mux
    • should contain ' -a track.number' if one audio track to mux
    • should contain ' -s track.number' if one subtitles track to mux
    • should contain ' -M' to remove attachments
    • should reorder tracks by newNumber
    • should output to temporary file
    • should set title
  • should emit progress
  • should emit error when 'error' message is emitted
  • should emit done when 'exit' message is received with code 0
  • should emit done when 'exit' message is received with code 1
  • should emit error when 'exit' message is received with code 2

loadMetadataFromNfo

  • loads metadata from NFO

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.