NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Wishlist v
1 2 3 4 5 … 194 Next »
Sanitize file name when recording from EPG

 
  • 0 Vote(s) - 0 Average
Sanitize file name when recording from EPG
Vlado99
Offline

Junior Member

Slovakia
Posts: 7
Threads: 2
Joined: Feb 2026
#1
2026-02-08, 11:01 PM
Hello.

Usually, I schedule recording from the "TV Guide" page. If the program name contains ellipsis "...", e.g. "Nesnesitelná lehkost bytí, Unbearable Lightness of Being, The, Velikáni filmu... Juliette Binocheová", the recording fails. Inside devide-adapter0.log I found this:


2026-02-08 22:10:00:101 [INFO] received request
2026-02-08 22:10:00:101 [DEBUG] about to process request...
2026-02-08 22:10:00:101 [DEBUG] got 722 bytes
2026-02-08 22:10:00:101 [DEBUG] got request:
POST /stream/start?slipseconds=1200&target=%2Fdata%2Fvideo%2Frecordings%2FNesnesiteln%C3%A1%20lehkost%20byt%C3%AD%2C%20Unbearable%20Lightness%20of%20Being%2C%20The%2C%20Velik%C3%A1ni%20filmu...%20Juliette%20Binocheov%C3%A1%20%281988%29%2FNesnesiteln%C3%A1%20lehkost%20byt%C3%AD%2C%20Unbearable%20Lightness%20of%20Being%2C%20The%2C%20Velik%C3%A1ni%20filmu%20Juliette%20Binocheov%C3%A1%20%281988%29.ts HTTP/1.1
Host: localhost:44107
Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 193

<tuning>
  <type>DVB-C</type>
  <name>CT 2 HD</name>
  <locator>
    <conf>314000000OFF</conf>
  </locator>
  <service_id>5800</service_id>
  <service_type>27</service_type>
</tuning>

2026-02-08 22:10:00:101 [ERROR] Parent directory (..) path names not supported

Can You Improve the program name string sanitization before it is used as file name, please?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 55,021
Threads: 983
Joined: May 2006
#2
2026-02-10, 01:36 PM
In the next version there is an improvement in the filenaming logic but this use case might need further review.  It would help to get a full mux to see why the title and description are not split better.

Martin
Vlado99
Offline

Junior Member

Slovakia
Posts: 7
Threads: 2
Joined: Feb 2026
#3
2026-02-18, 12:21 PM
There are several aspects related to this error:
- The user doesn't get information that something is wrong when he/she requests recording. He/she does't know he/she should take action to fix situation.
- File name/directory name of pending recordings are not editable. User must delete recording from Scheduler and place the Manual recording, which is much more difficult to set-up than from Guide page. Choosing Recording Name in Manual Recording he/she influence file name.
- The part of program which protects from escaping recordings from configured directory is poorly written. Insted of splitting path to components and compare each component if equal to "..", it searches the whole string.

I hope this problem will be solved soon. (In the meantime I lost another recording :-(. )
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 55,021
Threads: 983
Joined: May 2006
#4
2026-02-18, 02:06 PM (This post was last modified: 2026-02-18, 03:14 PM by mvallevand.)
The next version is awaiting final package by the author sub, but without the requested full mux it is hard to ensure that the issue is resolved. If that fullmux is impossible to provide perhaps you can send a link to your database and I can look at other example.

The current logic for processing the ellipsis is based on the end of the title and the beginning of the description which is working for the UK data it was designed for. However in this case I don't think that is the issue. I have tried recreating the issue but on my Linux system the following are possible

Code:
mkdir "Nesnesitelná lehkost bytí, Unbearable Lightness of Being, The, Velikáni filmu... Juliette Binocheová (1988)"
touch "Nesnesitelná lehkost bytí, Unbearable Lightness of Being, The, Velikáni filmu... Juliette Binocheová (1988)/Nesnesitelná lehkost bytí, Unbearable Lightness of Being, The, Velikáni filmu Juliette Binocheová (1988).ts"

so the ellipsis doesn't necessarily need to be escaped

However I can't actually duplicate that here because of this

Code:
2026-02-18 09:09:36.966    [DEBUG][11]    Requesting wake up for 'RecordingOID30317' [Nesnesitelná lehkost bytí, Unbearable Lightness of Being, The, Velikáni filmu... Juliette Binocheová (1988)] at 2/18/2026 8:57 a.m.
2026-02-18 09:09:36.974    [WARN][11]    Truncating really long show name: Nesnesitelná lehkost bytí, Unbearable Lightness of Being, The, Velikáni filmu... Juliette Binocheová (1988)
2026-02-18 09:09:36.974    [WARN][11]    Truncated to: Nesnesitelná lehkost bytí, Unbearable Lightness of
2026-02-18 09:09:36.977    [DEBUG][11]    allocating recording target filename: /home/martin/recordings/Nesnesitelná lehkost bytí, Unbearable Lightness of/Nesnesitelná lehkost bytí, Unbearable Lightness of_20260218_09001000.ts
2026-02-18 09:09:36.977    [DEBUG][11]    About to start recording (30317 on 1613): /home/martin/recordings/Nesnesitelná lehkost bytí, Unbearable Lightness of/Nesnesitelná lehkost bytí, Unbearable Lightness of_20260218_09001000.ts

so I don't see the ellipsis anyway and I am not sure why since you didn't post complete logs.

However when I fake them earlier ellipsis strings are removed completely in 7.0.5 so the change may work for you.

Code:
2026-02-18 09:17:22.157    [WARN][11]    Truncating really long show name: Nesnesitelná lehkost bytí, Unbearable... Lightness of Being, The, Velikáni filmu... Juliette Binocheová (1988)
2026-02-18 09:17:22.157    [WARN][11]    Truncated to: Nesnesitelná lehkost bytí, Unbe1arable... Lightness
2026-02-18 09:17:22.159    [DEBUG][11]    allocating recording target filename: /home/martin/recordings/Nesnesitelná lehkost bytí, Unbearable Lightness/Nesnesitelná lehkost bytí, Unbearable Lightness_20260218_09001000.ts

Martin
Vlado99
Offline

Junior Member

Slovakia
Posts: 7
Threads: 2
Joined: Feb 2026
#5
2026-03-02, 07:52 PM
In the meantime, I had a successful recording with "..." too, but yesterday: nextpvr-logs.zip


Attached Files
.zip   nextpvr-logs.zip (Size: 4.1 KB / Downloads: 1)
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 55,021
Threads: 983
Joined: May 2006
#6
2026-03-02, 08:10 PM
Right it works when the .. is later in the filename since the filename gets truncated. Wait for 7.0.5

Martin
Vlado99
Offline

Junior Member

Slovakia
Posts: 7
Threads: 2
Joined: Feb 2026
#7
2026-03-15, 08:03 PM (This post was last modified: 2026-03-15, 08:04 PM by Vlado99.)
The 7.0.5.260307 works well so far. Thank you very much!
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Ability to create xml tv guide file from npvr.db3 database grubbs.stephen@gmail.com 3 1,144 2025-11-12, 12:46 AM
Last Post: spin35
  ENVAR style recordings dir in exported XML file bgowland 4 1,338 2025-08-17, 06:11 PM
Last Post: bgowland
  Overwrite oldest recording with lock feature djenson 0 1,013 2023-09-28, 10:37 AM
Last Post: djenson
  Recording status displayed when finished coreymichael 6 2,314 2023-08-31, 05:32 PM
Last Post: sub
  Recording scheduling mzanetti 2 1,729 2023-07-28, 05:24 PM
Last Post: sub
  Request for XMLTV EPG Export Link or/and File t2t4 3 2,522 2022-11-24, 01:15 PM
Last Post: mvallevand
  Import m3u on device list - file/folder navigator psycik 1 1,648 2022-09-28, 08:25 PM
Last Post: mvallevand
  Feature Request: EIT Support, plus Stop and Save Recording. Chris4877 8 3,121 2022-09-12, 12:58 AM
Last Post: mvallevand
  Import m3u file VCR58 3 4,779 2022-02-18, 03:39 AM
Last Post: sub
  Add manual recording - default time markn62 0 1,441 2022-02-14, 12:46 AM
Last Post: markn62

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

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

Linear Mode
Threaded Mode