Fix File Paths plug-in for the Humax Foxsat HDR Web Interface

adrianf36

Well-known Member
Good Evening All,

I am pleased to announce the release of the Fix File Paths plug-in for the Humax Foxsat HDR Web Interface.

Have you ever moved multiple recordings/folders of recordings on your Fosxat HDR and then realised that the Foxsat no longer “sees” them or displays them in the media list? Have you used the NASMount Plug-in to cross-mount two or more HDRs and found that files played on one HDR “disappear” from the other?

If the answer to either of these questions is “yes” then Fix File Paths could be the utility you’ve been waiting for.

The problems above stem from the fact that a programme recording on the Foxsat consists of three files and that one of these (the .hmt file) contains the path to the primary audio/video file (the .ts file). Manually moving files does not update the .hmt file to contain the new path to the .ts file and, as a consequence, the files are ignored by the Foxsat user interface.

The Foxsat Web Interface facilitates the “fixing” of file paths in individual .hmt files using the Media Browser “rename” function. However, this is laborious and time consuming for large numbers of files.


That’s where Fix File Paths comes in. It will perform a recursive scan of the entire Video folder on your HDR and, for each .hmt file found will:
  • Check that all three recording files are present (.hmt, .ts and .nts)
  • Check the path to the .ts file contained within the .hmt file to determine if it is correct
  • If it isn’t, it will be corrected automatically
Fix File Paths has three run modes:
  • Automatic – will run on each boot
  • Once – will run on the next boot and then be switched to “off”
  • Off – needs no explanation
In addition Fix File Paths can be run on demand using the “Run Now” option in the Settings page of the Web Interface.

Huge thanks to the beta testers : raydon, REPASSAC, Partridge and David500. Your comments and feedback were invaluable as always. Special thanks to raydon for allowing me to steal many of the Fix File Names plug-in scripts for use in Fix File Paths.

Install in the usual way via the Web Interface : Package Management -> Update package list from Internet -> Available Tab -> Install

I hope you find this useful.

Regards to all,

Adrian.
 

grahamlthompson

In memoriam
Fantastic :smashin:
 

GaseousClay

Member
Excellent, now have my two HDR's cross mounted. previously had to rely on couple of raspbmc and a WD TV Play but aspect ratios were always an issue on some of the content. Now it's perfect. And the "Run Now" feature is brilliant.

One quick question though, if I playback something via the cross mounting can I delete from the remote HDR and achieve a "clean" removal of all the related files or is it best to do the "Run Now" to see the files on the original HDR and then delete the programme from there?

Thanks to all concerned for all the hard work put into this and other developments.
 

adrianf36

Well-known Member
Good question GC. Will need to do some tests but I don't think it will matter where you delete it. Both the Foxsat (via the UI) and the Web Interface should delete all three files. Will try and find some time to test later.
 

TJT1

Member
Great utility, thanks. It found some of my manually moved 'lost' recordings. Although not hard to find, it might possibly have been a good idea to tell folks how to run it, either in this thread or in the documentation:laugh:

Settings ~ Scroll to bottom ~ There it is
 

adrianf36

Well-known Member
One quick question though, if I playback something via the cross mounting can I delete from the remote HDR and achieve a "clean" removal of all the related files or is it best to do the "Run Now" to see the files on the original HDR and then delete the programme from there?
Did a quick test. Not fortunate enough to have two HDRs :( but cross mounted the Video samba share back onto the same box. Not quite the same as your setup but should be representative.

Successfully deleted files from the cross-mounted share both via the Foxsat UI and Web Interface media browser. In all cases, all three files were deleted.

So the answer to your question is that you can delete from the remote HDR and you should achieve a "clean" deletion of all related files.

Hope that helps.
 

ucfadll

Novice Member
This seems like a great tool, but can I just check that I am using it correctly with a USB drive and NAS mounted drive?

If I understand correctly, this tool only checks the paths of things it finds in /media/Video? If so, this means anything on my USB drive (at /media/sba1) is untouched? As is my NAS mount (at /media/sdb1/Humax)? At least, when I look at the log file, it has not seemed to trawl through those locations.

To solve this I have put a symbolic link in the Video folder to each of these folders. Is that the right way of doing things? Or should I do something else?
 

adrianf36

Well-known Member
You understand correctly. The tool only checks the primary Video folders on the built-in hard disk. That's because the Foxsat doesn't care about the file path in the HMT file for files located on USB drives (including drives mounted via NASMount). So there's no need to "correct" these file paths. The Foxsat does update these paths automatically when you play the file. On the other hand, files on the built-in hard disk will simply not play if the video file path in the HMT file is incorrect.

This utility was primarily built for those who (a) want to move a lot of files between folders on the internal hard disk and then automatically correct the file path or (b) those who cross-mount two or more HDRs using NASMount. In this latter scenario, because HDR2 sees the files from HDR1 as files on a USB drive, it plays them but automatically updates the HMT file path in so doing. This means that HDR1 can no longer play the files as they are located on the internal hard disk and the video file path in the HMT file is now incorrect.

Hope that all makes sense.

Adrian.
 

raydon

Well-known Member
This seems like a great tool, but can I just check that I am using it correctly with a USB drive and NAS mounted drive?

If I understand correctly, this tool only checks the paths of things it finds in /media/Video? If so, this means anything on my USB drive (at /media/sba1) is untouched? As is my NAS mount (at /media/sdb1/Humax)? At least, when I look at the log file, it has not seemed to trawl through those locations.

To solve this I have put a symbolic link in the Video folder to each of these folders. Is that the right way of doing things? Or should I do something else?
There is no need to scan HMT files in attached USB drives, or NAS shares mounted under virtual USB, since the HDR ignores the original file path stored in the HMT file in these circumstances. The restriction only applies to HMT files stored on the HDR's hard disk. These could be altered by moving recordings outwith the HDR's own GUI, or by playing video from another, cross-mounted HDR, so that it is seen by the other as an attached USB. So, the short answer to your query is that the symlinks you created are really not necessary.

Oops, looks like Adrian just beat me to it in responding !
 

ucfadll

Novice Member
Thanks Adrian and Raydon for coming back so quickly. I didn't realise that anything on a USB drive didn't need a "correct" HMT file. Though I did wonder why the videos I moved through SSH continued to work: I just assumed that copying via SSH somehow updated the HMT file...now I think about it, it seems much more likely that the HMT file on an external disk is completely ignored!

Whilst you're "here" Raydon, I just wanted to thank you (and everyone else involved) for everything you've done in making it possible for us to improve our Foxsat boxes. I'm delighted with everything I can do with it now!
 

raydon

Well-known Member
Whilst you're "here" Raydon, I just wanted to thank you (and everyone else involved) for everything you've done in making it possible for us to improve our Foxsat boxes. I'm delighted with everything I can do with it now!
I'll accept your thanks on behalf of the core team, namely myself raydon, adrianf36, partridge, REPASSAC, and david500. Much appreciated.
 

The latest video from AVForums

Samsung QN800B 8K TV Review
Subscribe to our YouTube channel

Full fat HDMI teeshirts

Support AVForums with Patreon

Top Bottom