Troubleshooting newk

MattAnorak

New Member
Hi,
Is there anything you'd recommend for troubleshooting the newk package? I've had this working a treat previously, but now when I look I see that there are a load of directories prefixed with New: This is in my newk watchlist, so they should be created without the "New:" prefix, but I have a sneaky suspicion that for whatever reason, newk isn't running.

Anything you'd suggest for troubleshooting?
Web interface version: 1.4.8-8
Custom firmware version: 3.13 (build 4028)
Humax Version: 1.03.12 (kernel HDR_CFW_3.13
newk Version: 1.0.5-1

Thanks!
 

rpb424

Active Member
I had a similar issue, so rather than using newk I used Sweeper instead. This has a pre-defined ruleset for removing the New: prefix. Applying this to the /media/My Video folder has worked fine for me since then.

In the Webif click 'Opt+' on the media/My Video folder, select 'Sweeper rules' (assuming you have sweeper installed) and at the bottom of the page is a drop-down to apply pre-defined rules.
 
OP
M

MattAnorak

New Member
Hi, @rpb424 ,
Did you have to make any specific alterations to your rule? I've set the default "Remove New: prefix" at the top level (/media/My Video), and when running the rule, nothing happens - even after reboot:

Code:
29/08/2020 22:19 - --- SWEEP(1) STARTING FOR /media/My Video/New_ The Deceived ---
29/08/2020 22:19 -
29/08/2020 22:19 - + Sweeper processing /media/My Video/New_ The Deceived/The Deceived_20200804_2202.ts
29/08/2020 22:19 - Processing [title New:* action {settitle {%orig%regsub,New:\s*,,}}]
29/08/2020 22:19 -    title(New:*)
29/08/2020 22:19 -      Nomatch
29/08/2020 22:19 - Processing [filename New_* action {renamefile {%orig%regsub,New_\s*,,}}]
29/08/2020 22:19 -    filename(New_*)
29/08/2020 22:19 -      Nomatch
29/08/2020 22:19 - + Sweeper processing /media/My Video/New_ The Deceived/The Deceived_20200803_2202.ts
29/08/2020 22:19 - Processing [title New:* action {settitle {%orig%regsub,New:\s*,,}}]
29/08/2020 22:19 -    title(New:*)
29/08/2020 22:19 -      Nomatch
29/08/2020 22:19 - Processing [filename New_* action {renamefile {%orig%regsub,New_\s*,,}}]
29/08/2020 22:19 -    filename(New_*)
29/08/2020 22:19 -      Nomatch
29/08/2020 22:19 - + Sweeper processing /media/My Video/New_ The Deceived/The Deceived_20200805_2203.ts
29/08/2020 22:19 - Processing [title New:* action {settitle {%orig%regsub,New:\s*,,}}]
29/08/2020 22:19 -    title(New:*)
29/08/2020 22:19 -      Nomatch
29/08/2020 22:19 - Processing [filename New_* action {renamefile {%orig%regsub,New_\s*,,}}]
29/08/2020 22:19 -    filename(New_*)
29/08/2020 22:19 -      Nomatch
29/08/2020 22:19 - + Sweeper processing /media/My Video/New_ The Deceived/The Deceived_20200806_2203.ts
29/08/2020 22:19 - Processing [title New:* action {settitle {%orig%regsub,New:\s*,,}}]
29/08/2020 22:19 -    title(New:*)
29/08/2020 22:19 -      Nomatch
29/08/2020 22:19 - Processing [filename New_* action {renamefile {%orig%regsub,New_\s*,,}}]
29/08/2020 22:19 -    filename(New_*)
29/08/2020 22:19 -      Nomatch
29/08/2020 22:19 -
Maybe I'm doing something wrong, as it says that it can find no matches, yet there are clearly some folders with a New: or New_ prefix there.

I had a similar issue, so rather than using newk I used Sweeper instead. This has a pre-defined ruleset for removing the New: prefix. Applying this to the /media/My Video folder has worked fine for me since then.

In the Webif click 'Opt+' on the media/My Video folder, select 'Sweeper rules' (assuming you have sweeper installed) and at the bottom of the page is a drop-down to apply pre-defined rules.
 
OP
M

MattAnorak

New Member
Having another play with it, I noticed that it seems to have changed the file names for the ones with a "New" or "New_" prefix. What it hasn't done is change the folder names. Any idea how to do that?
Also, is this supposed to run at boot?
 

rpb424

Active Member
I was about to respond along those lines. The files are all correct, they just happen to be in a folder with the errant prefix. This folder name was auto generated at some point in the past based on the original uncorrected file names, so you’ll probably just have to change this folder name manually as a one time change. Anything in future should hopefully happen correctly so long as sweeper is doing the renaming first, so make sure that the ruleset is at the top of the sweeper list prior to any moving of files into folders with names based on the filenames.
 

Black Hole

May contain traces of nut
The target folder is named according to the first programme name in the set, and is stored in the schedule database. If you change the folder name in the file system, new recordings will go into a recreated folder with the original name.

To change the name of the target recording folder, use WebIF >> Scheduled Events >> More >> Change Folder.
 

/df

Active Member
This.

You can change the folder name for a series recording in WebIf>Scheduled Events>Recording List.

You can run sweeper rules for a particular folder manually, but sweeper runs regularly as part of the WebIf auto-processing.

If a sweeper rule renamed a series folder before the series was finished, the next episode would be placed in a new copy of the original series folder. sweeper offers an action to move any recording in a certain folder to a new folder, but it doesn't have an action for renaming a folder.
 
OP
M

MattAnorak

New Member
Got it! Thanks everyone. Just had a good play with it and also added the 'change underscores into spaces' rule from elsewhere in the forum.
So from what you're saying, it looks like existing 'New:, New_" prefixes will need to be changed manually (just done this), but new ones should change themselves.

I've set the rules in the default folder to:

Code:
# Remove New: prefix
global title New:* action {settitle {%orig%regsub,New:\s*,,}}

# Remove New_ prefix
global filename New_* action {renamefile {%orig%regsub,New_\s*,,}}

# Remove "_" in Filename
global filename _ action {renamefile {%orig%replace,_, ,}}

# Replace Title Underscore
global title New: action {settitle {%orig%replace,_ ,-,}}
I noticed you can't have a recurse flag in there if you use global, but that should be OK.

Will see how it goes on over the next couple of days.

Thanks!
 
OP
M

MattAnorak

New Member
Damn, I should have written it down. Basically said there were no issues apart from a config file that already existed so it didn't update it. I guess fix-flash-packages just re-installs all the necessary packages again and where there's a config file it keeps it.
 
OP
M

MattAnorak

New Member
OK, ran fix-flash-packages again and this time copied the output :)

Code:
>>> Beginning diagnostic fix-flash-packages


Running: fix-flash-packages
Re-installing dbupdate
Removing package dbupdate from root...
Installing dbupdate (1.0.0) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/dbupdate_1.0.0_mipsel.opk.
Configuring dbupdate.
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.
Re-installing dlna-servername
Removing package dlna-servername from root...
Installing dlna-servername (1.0.3) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/dlna-servername_1.0.3_mipsel.opk.
Configuring dlna-servername.
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.
Re-installing fan
Removing package fan from root...
Installing fan (1.0.0) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/fan_1.0.0_mipsel.opk.
Configuring fan.
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.
Re-installing fix-disk
Removing package fix-disk from root...
Installing fix-disk (0.5) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/fix-disk_0.5_mipsel.opk.
Configuring fix-disk.
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.
Re-installing ir
Removing package ir from root...
Installing ir (1.17) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/ir_1.17_mipsel.opk.
Humax software version: 1.03.12
Configuring ir.
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.
Re-installing multienv
Removing package multienv from root...
Installing multienv (1.7-1) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/multienv_1.7-1_mipsel.opk.
Configuring multienv.
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.
Re-installing newk
Removing package newk from root...
Not deleting modified conffile /mod/boot/newk.conf.
Installing newk (1.0.5-1) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/newk_1.0.5-1_mipsel.opk.
Configuring newk.
Collected errors:
 * resolve_conffiles: Existing conffile /mod/boot/newk.conf is different from the conffile in the new package. The new conffile will be placed at /mod/boot/newk.conf-opkg.
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.
Re-installing nugget
Removing package nugget from root...
Installing nugget (1.0) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/nugget_1.0_mipsel.opk.
Configuring nugget.
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.
Re-installing redring
Removing package redring from root...
Installing redring (2.20-1) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/redring_2.20-1_mipsel.opk.
Redring install ()
Configuring redring.
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.
Re-installing rsvsync
Removing package rsvsync from root...
Installing rsvsync (1.1.13) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/rsvsync_1.1.13_mipsel.opk.
Configuring rsvsync.
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.
Re-installing tmenu
Removing package tmenu from root...
Installing tmenu (1.22) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/tmenu_1.22_mipsel.opk.
Configuring tmenu.
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.
Re-installing tunefix
Removing package tunefix from root...
Installing tunefix (2.0.0) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/tunefix_2.0.0_mipsel.opk.
Tunefix V2.0.0 (c) 2015-2020 prpr
Configuring tunefix.
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.
Re-installing tweak
Removing package tweak from root...
Installing tweak (1.0) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/tweak_1.0_mipsel.opk.
Configuring tweak.
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.
Re-installing undelete
Removing package undelete from root...
Installing undelete (1.6-4) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/undelete_1.6-4_mipsel.opk.
Configuring undelete.
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.
Re-installing virtual-disk2
Removing package virtual-disk2 from root...
Installing virtual-disk2 (2.0-4) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/virtual-disk2_2.0-4_mipsel.opk.
Configuring virtual-disk2.
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.
Re-installing webif
Removing package webif from root...
Not deleting modified conffile /mod/webif/html/favicon.ico.
Installing webif (1.4.8-8) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/webif_1.4.8-8_mipsel.opk.
SMART: (PASSED)
startstop: 20 realloc: 0 hours: 13 spinretry: 0 pending: 0 offline: 0
Queue database is up-to-date.
Configuring webif.
Collected errors:
 * file_md5sum_alloc: Failed to open file /mod/webif/html/favicon.ico: No such file or directory.
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.
Re-installing webshell
Removing package webshell from root...
Installing webshell (1.0.4) to root...
Downloading http://hpkg.tv/hdrfoxt2/base/webshell_1.0.4_mipsel.opk.
Configuring webshell.
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.



>>> Ending diagnostic fix-flash-packages
 

/df

Active Member
So it re-installed newk: is it working now?

Otherwise, the answer may lie in the log files suggested in the other thread.
 
OP
M

MattAnorak

New Member
No difference as far I can see - might be too soon. I’ll check back once we’ve recorded a few things and see what happens.

I checked the log files and didn’t see anything that stood out. What would I be looking for?
 

MymsMan

Ad detector
No difference as far I can see - might be too soon. I’ll check back once we’ve recorded a few things and see what happens.

I checked the log files and didn’t see anything that stood out. What would I be looking for?
I set up a couple of New series recordings, the recording folders in the schedule entries was renamed and the following appeared in rsvsync.log
Code:
1263    30/08/2020 17:02:24 - newk: removing New: from New: The Chase
1262    30/08/2020 17:02:24 - newk: removing New: from New: Tipping Point
Do you have Real Time Scheduling RTS enabled? Without RTS schedule updates only occur on reboot
 
Last edited:
OP
M

MattAnorak

New Member
Perfect - thanks. I’ll give that a try and come back and let you know when I find something out!
Not sure about RTS - I suspect so, but would need to check.

I set up a couple of New series recordings, the recording folders in the schedule entries was renamed and the following appeared in rsvsync.log
Code:
1263    30/08/2020 17:02:24 - newk: removing New: from New: The Chase
1262    30/08/2020 17:02:24 - newk: removing New: from New: Tipping Point
Do you have Real Time Scheduling RTS enabled? Without RTS schedule updates only occur on reboot
 
Top