NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support v
« Previous 1 … 33 34 35 36 37 … 43 Next »
PostProcessing with ! in filenames

 
  • 0 Vote(s) - 0 Average
PostProcessing with ! in filenames
daneo
Offline

Member

Germany
Posts: 194
Threads: 56
Joined: Sep 2006
#1
2020-05-18, 03:01 PM
Hi Sub,

I'm killing myself here trying to manage Windows batch processing of the completed recordings, and I'm using a lot of code with enabledelayedexpansion.

Unfortunately, recordings like

"H:\Recordings\Natürlich Blond! (2001)\Natürlich Blond! (2001).ts"

totally blow up because delayed expansion creates this string instead

"H:\Recordings\Natürlich Blond (2001).ts"

Is there any easy way to have NPVR remove some special characters from the filenames before recording starts?  Maybe a platform-independent replacement file so people can tune filenames as needed?

Thanks,
 Dane
- Dane

Cheap Medion Minitower, but it's quiet enough
- Windows 11x64
- Digital Devices DVB-C PCIe (1x Cine quad and 1x Cine dual)
- LG C2 with Jellyfin front end, NPVR back end
- 30TB storage, ~7,500 films
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,905
Threads: 955
Joined: May 2006
#2
2020-05-18, 03:11 PM
It already removes characters that the filesystem doesn't like and removing the explanation mark would be wrong IMO

For you scripts consider

setlocal DISABLEDELAYEDEXPANSION

Martin
daneo
Offline

Member

Germany
Posts: 194
Threads: 56
Joined: Sep 2006
#3
2020-05-18, 06:33 PM
Yes, however won't work as I need to enable for a FOR loop, and that's the exact spot where the data is being cut out by the ! <stuff> ! combination. I have three options - totally rewrite my scripts, live with it, or ask Sub for an OS-independent option to "tune" filenames - for example

replace ! with ""
replace & with "and"
replace % with "_"
etc...

All are legal filename elements under Windows 10 and thoroughly trash batch file programming. You can work around some of them, but sometimes you get backed into a corner. The problem with the ! is that there are two of them - which then signal a cutout for Windows cmd processing.

Dane
- Dane

Cheap Medion Minitower, but it's quiet enough
- Windows 11x64
- Digital Devices DVB-C PCIe (1x Cine quad and 1x Cine dual)
- LG C2 with Jellyfin front end, NPVR back end
- 30TB storage, ~7,500 films
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,905
Threads: 955
Joined: May 2006
#4
2020-05-18, 06:55 PM
I am quite sure you don't "need" to, you just have to script around you issue.

Martin
daneo
Offline

Member

Germany
Posts: 194
Threads: 56
Joined: Sep 2006
#5
2020-05-19, 12:00 PM
Never mind, I can't script around the issue as need expansion in the for loop - I will just whack the DB using PostLoadEPG SQL scripting and remove all ! from the event names.

UPDATE EPG_EVENT
SET
title = replace(title, '!', '')
WHERE
genres like '%Movie%';
- Dane

Cheap Medion Minitower, but it's quiet enough
- Windows 11x64
- Digital Devices DVB-C PCIe (1x Cine quad and 1x Cine dual)
- LG C2 with Jellyfin front end, NPVR back end
- 30TB storage, ~7,500 films
« 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 870 2021-08-19, 09:59 PM
Last Post: BrettB
  PostProcessing.sh Fails if Recording Has Single Quote in Name pkscout 3 1,243 2020-05-14, 12:31 AM
Last Post: pkscout
  Question regarding Recording filenames daphatty 11 4,339 2019-12-05, 12:30 PM
Last Post: mvallevand
  Calling PostProcessing geniepro 4 3,356 2019-09-28, 03:06 AM
Last Post: sub

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

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

Linear Mode
Threaded Mode