Giter Site home page Giter Site logo

rbtr / pachinko Goto Github PK

View Code? Open in Web Editor NEW
27.0 6.0 1.0 234 KB

modular pluggable media sorter

License: Mozilla Public License 2.0

Makefile 1.35% Go 98.55% Dockerfile 0.09%
pachinko datastream tvdb media-sorter pipeline postprocessors subtypes processor options-pachinko trakt plex tmdb hacktoberfest

pachinko's People

Contributors

jvstein avatar rbtr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

gwylanscheeren

pachinko's Issues

Generated config sometimes unusable

The config generated by pachinko config is not always usable. This is because the order of the processors list is non-deterministic and potentially reordered each time it is written.

The particular issue I ran into is that the video-id processor must be executed before the tv-id processor (because of the check in video.go#L42. If the processors are out of order, it will not work.

Example bad config created by the command:

dry-run: false
inputs:
- name: path
  src-dir: ./src
log-format: text
log-level: info
outputs:
- create-dirs: true
  dry-run: true
  name: move
  overwrite: false
- name: stdout
pipeline:
  buffer: 0
processors:
- api-key: ""
  name: tvdb
  request-limit: 10
- dest-dir: dest
  episode-names: false
  format: not-implemented
  name: tv-dest
  season-dirs: true
  tv-prefix: tv
- matchers:
  - (?i)(?:s+\d+)(?:\.|\s|-|_|x)*(e+\d+)
  - (?i)(?:season)+(?:(?:\.|\s|-|_|x|\/)\d+)
  - (?i)(?:[^[:alpha:]\d])\d{1,3}[x-]\d{1,3}
  name: tv-id
- matchers:
  - (?i)\b([\s\w.-]*)[\s.\/-]+(?:\((\d+)\))?[\s.\/-]?(\d{1,3})[x-](\d{1,3})
  - (?i)\b([\s\w.-]*?)?(?:[\s\(.\/-](\d{4})[\s\).\/-])?[\s\w.-]?(?:s+(\d+))(?:\.|\s|-|_|x)*(?:e+(\d+))
  - (?i)\b([\s\w.-]*)[\s.\/-]+(?:\((\d+)\))?[\s.\/-]?(?:season|series).?(\d+).?(?:episode)?[^\d(]?(\d+)
  name: tv-meta
  sanitize-name: true
- file-types:
  - .avi
  - .divx
  - .m4v
  - .mkv
  - .mov
  - .mp4
  - .xvid
  name: video-id

extracting metadata from filename should start with the file and proceed up the tree, not the reverse

for example,
/src/My Cool Show Season 1-2-3-4-5-6-7/My Cool Show S01E01.mkv
will be incorrectly matched as "My Cool Show Season 1-2-3-4-5" Season 6 Episode 7, since the path parser extracts metadata from the entire path of the file, lazily, left to right.
it would be better to parse the leaf filename initially, then proceed up the dir tree if the full metadata is not present in just the filename. the extraction from the filename should be prioritized over subsequent extractions from the containing dirs, if in conflict.

Config command fails if ~/.pachinko.yaml exists

Found this one when trying to write up issue #6. The following error happens if the ~/.pachinko.yaml file exists and you then run pachinko config.

FATA[0000] 8 error(s) decoding:

* 'inputs[0]' expected type 'string', got unconvertible type 'map[interface {}]interface {}'
* 'outputs[0]' expected type 'string', got unconvertible type 'map[interface {}]interface {}'
* 'outputs[1]' expected type 'string', got unconvertible type 'map[interface {}]interface {}'
* 'processors[0]' expected type 'string', got unconvertible type 'map[interface {}]interface {}'
* 'processors[1]' expected type 'string', got unconvertible type 'map[interface {}]interface {}'
* 'processors[2]' expected type 'string', got unconvertible type 'map[interface {}]interface {}'
* 'processors[3]' expected type 'string', got unconvertible type 'map[interface {}]interface {}'
* 'processors[4]' expected type 'string', got unconvertible type 'map[interface {}]interface {}'

[plugin] add trakt plugin

plugin ideas:
trakt identifier - trakt version of the tvdb plugin for adding metadata
trakt collector - sink/output which "adds to collection" on trakt

[plugin] add file deletion plugin

something to clean up the extra trash - text files, images, subs - in the src directories
bonus delete the empty src directories when sorted

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.