NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support v
« Previous 1 … 39 40 41 42 43 Next »
Calling PostProcessing

 
  • 0 Vote(s) - 0 Average
Calling PostProcessing
geniepro
Offline

Junior Member

Posts: 6
Threads: 3
Joined: Sep 2019
#1
2019-09-27, 02:31 AM
I'm using the latest version available in docker.

I have configured to have a PostProcessing.sh script available. When the show name has a "'" (single quote) in the name the bash command that is getting generated is incorrect. Please see below an except from trhe logs:

[HTML]2019-09-27 01:03:01.040 [DEBUG][8] Starting: bash -c "'/config/scripts/PostProcessing.sh' '/recordings/Greys Anatomy/Season 16/Greys.Anatomy.S16E01.Nothing.Left.to.Cling.To.ts' 13.1 1073 23 'Grey's Anatomy'"
2019-09-27 01:03:01.388 [ERROR][122] bash: -c: line 0: unexpected EOF while looking for matching `''
2019-09-27 01:03:01.389 [ERROR][122] bash: -c: line 1: syntax error: unexpected end of file
[/HTML]

If I manually change the command:

[HTML]bash -c "'/config/scripts/PostProcessing.sh' '/recordings/Greys Anatomy/Season 16/Greys.Anatomy.S16E01.Nothing.Left.to.Cling.To.ts' 13.1 1073 23 'Grey's Anatomy'"[/HTML]

to

[HTML]bash -c "'/config/scripts/PostProcessing.sh' '/recordings/Greys Anatomy/Season 16/Greys.Anatomy.S16E01.Nothing.Left.to.Cling.To.ts' 13.1 1073 23 'Greys Anatomy'"[/HTML]

and I execute it inside docker everything works fine.
donbrew
Offline

Member

Posts: 120
Threads: 22
Joined: Mar 2014
#2
2019-09-27, 09:34 PM
Why not use the automatic name pass? windows "#1" linux "$1" (with the quotes) I don't know what in docker.
geniepro
Offline

Junior Member

Posts: 6
Threads: 3
Joined: Sep 2019
#3
2019-09-28, 01:16 AM
The command is generated by NextPVR and it's logged in the nrecord.log.

There is another therad that handles the same issue - https://forums.nextpvr.com/showthread.ph...-Show-Name

Docker is a "self contained" Linux image with NextPVR installed.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,723
Threads: 767
Joined: Nov 2003
#4
2019-09-28, 02:59 AM
geniepro Wrote:The command is generated by NextPVR and it's logged in the nrecord.log.
I've just been googling this, but haven't yet been able to find an method to escape a single quote inside a single quoted string. It doesn't want to let me slash to escape.

ie, like executing this in a terminal:
Code:
echo 'Grey's Anatomy'

It can use the single quote if I surround the text in double quotes instead, but that isn't an option because it breaks other stuff.

If someone more Linux knowledgeable than me can tell me the correct way to escape it, I'll add logic to handle the scenario.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,723
Threads: 767
Joined: Nov 2003
#5
2019-09-28, 03:06 AM
Ok, looks like it'd need to be:

Code:
echo $'Grey\'s Anatomy'

I've added logic to do this in the next build.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  migrating PostProcessing scripts to v 5.0 scJohn 2 888 2021-08-19, 09:59 PM
Last Post: BrettB
  PostProcessing with ! in filenames daneo 4 1,415 2020-05-19, 12:00 PM
Last Post: daneo
  PostProcessing.sh Fails if Recording Has Single Quote in Name pkscout 3 1,269 2020-05-14, 12:31 AM
Last Post: pkscout

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode