Code Monkey home page Code Monkey logo

Comments (6)

mdhiggins avatar mdhiggins commented on May 23, 2024

I would just use a different filename to not interfere with the routine process. just name is something like customPostSonarr.sh and point Sonarr to that file instead

from sonarr-sma.

mdhiggins avatar mdhiggins commented on May 23, 2024

Additionally when you do make your new file you need to give it execute permissions, that's where your error is coming from

from sonarr-sma.

Zeusy123 avatar Zeusy123 commented on May 23, 2024

Thats works great im nearly there:)

Would it be possible to make a copy of the source file sent from sonarr to a fixed location?
Maybe editing the postsonarr.sh?
So copy sourcefile to /720import/ folder, before your encoding starts?

from sonarr-sma.

mdhiggins avatar mdhiggins commented on May 23, 2024

Yeah you could easily just add a line to postSonarr.sh to copy a file using usual operating system commands

from sonarr-sma.

mdhiggins avatar mdhiggins commented on May 23, 2024

https://github.com/Sonarr/Sonarr/wiki/Custom-Post-Processing-Scripts

Those are all the environment variables sonarr passes so you can use them too

from sonarr-sma.

Zeusy123 avatar Zeusy123 commented on May 23, 2024

Thanks bro, Im no coder, but I try:)

so if i change contents my_postsonarr.sh file too:

`#!/usr/bin/env bash

$replace = array(
'1280 Series' => '720 Series',
'test1' => 'test2'
'testa' => 'testb'
);

function strReplaceAssoc(array $replace, $filePath) {
return str_replace(array_keys($replace), array_values($replace), $filePath);
}

cp "$filePath" "str_replace_assoc($replace,$filePath);"

$SMA_PATH/venv/bin/python3 $SMA_PATH/postSonarr.py`

Will this work??

orginal path: /tv/1280 Series/Mandalorian, The/Season 1/testing.mkv

copy "/tv/1280 Series/Mandalorian, The/Season 1/testing.mkv" "/tv/720 Series/Mandalorian, The/Season 1/testing.mkv"
When completed. then execute your : $SMA_PATH/postSonarr.py

from sonarr-sma.

Related Issues (20)

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.