Superb quality and spec AB-Com PULSe 4K SE. Crazy offer! Only £99! FREE UK DELIVERY! 4K UHD, Enigma 2, Multiboot 4 images & more!...
Superb quality and spec AB-Com PULSe 4K Rev II Twin Satellite tuner only £149! FREE UK DELIVERY! 4K UHD, Enigma 2, SATA HDD facility, Multiboot 4 images & more!...

[SF8008] Movie list directory sort order

It works fine on /media/hdd/movies/ but crashing on network drives :confused:

ViX 6.0.002 default_skin

View attachment 62843

Use this:
Code:
	def buildBeginTimeSortKey(self, x):
		print("x", x)
		ref = x[0]
		if ref.flags & eServiceReference.mustDescent and os.path.exists(ref.getPath()):
			print("x[1]", x[1])
			print("x[1] and -os.stat(ref.getPath()).st_mtime", x[1] and -os.stat(ref.getPath()).st_mtime)
			return 0, x[1] and -os.stat(ref.getPath()).st_mtime
		print("x[2]", x[2])
		return 1, -x[2]
And get a full debug log.
 
So, what is this doing in there?

Code:
<  2929.4290> 18:36:23.2748 x (eServiceReference(Name=/media/autofs/, String=2:47:1:0:0:0:0:0:0:0:/media/autofs/), None, 0, <Components.MovieList.MovieListData object at 0xae09b7c0>)
 
Crashes for me as well, (recordings now started, so no more time at the moment) ...

Could this be from .e2settings.pkl ?


Code:
root@vuultimo4k:/media/autofs/SYNOLOGY# cat .e2*
▒▒:}▒(▒ moviesort▒K▒
                    description▒Kmovieoff▒▒     movielist▒u.root@vuultimo4k:/media/autofs/SYNOLOGY#


Code:
18:58:51.0538 [Trashcan] Debug path /media/autofs/SYNOLOGY/ => /media/autofs/SYNOLOGY/.Trash
18:58:51.0712 x (eServiceReference(Name=/media/autofs/, String=2:47:1:0:0:0:0:0:0:0:/media/autofs/), None, 0, <Components.MovieList.MovieListData object at 0xb018a328>)

Code:
18:58:51.0850 x (eServiceReference(Name=/media/autofs/SYNOLOGY/Cradle To Grave/, String=2:47:1:0:0:0:0:0:0:0:/media/autofs/SYNOLOGY/Cradle To Grave/), <enigma.iStaticServiceInformationPtr; proxy of <Swig Object of type 'ePtr< iStaticServiceInformation > *' at 0xb017f518> >, -1, <Components.MovieList.MovieListData object at 0xb017f328>)
18:58:51.0851 x[1] <enigma.iStaticServiceInformationPtr; proxy of <Swig Object of type 'ePtr< iStaticServiceInformation > *' at 0xb017f518> >
18:58:51.0852 x[1] and -os.stat(ref.getPath()).st_mtime -1479654224.3432539
18:58:51.0853 x (eServiceReference(Name=/media/autofs/SYNOLOGY/Ripper Street/, String=2:47:1:0:0:0:0:0:0:0:/media/autofs/SYNOLOGY/Ripper Street/), <enigma.iStaticServiceInformationPtr; proxy of <Swig Object of type 'ePtr< iStaticServiceInformation > *' at 0xb017f380> >, -1, <Components.MovieList.MovieListData object at 0xb017f3e8>)
18:58:51.0854 x[1] <enigma.iStaticServiceInformationPtr; proxy of <Swig Object of type 'ePtr< iStaticServiceInformation > *' at 0xb017f380> >
18:58:51.0855 x[1] and -os.stat(ref.getPath()).st_mtime -1559057441.6611743
18:58:51.0857 x (eServiceReference(Name=/media/autofs/SYNOLOGY/Holby/, String=2:47:1:0:0:0:0:0:0:0:/media/autofs/SYNOLOGY/Holby/), <enigma.iStaticServiceInformationPtr; proxy of <Swig Object of type 'ePtr< iStaticServiceInformation > *' at 0xb017f440> >, -1, <Components.MovieList.MovieListData object at 0xb017f478>)
18:58:51.0858 x[1] <enigma.iStaticServiceInformationPtr; proxy of <Swig Object of type 'ePtr< iStaticServiceInformation > *' at 0xb017f440> >
18:58:51.0859 x[1] and -os.stat(ref.getPath()).st_mtime -1625487973.4663138
18:58:51.0861 x (eServiceReference(Name=/media/autofs/SYNOLOGY/Breathless/, String=2:47:1:0:0:0:0:0:0:0:/media/autofs/SYNOLOGY/Breathless/), <enigma.iStaticServiceInformationPtr; proxy of <Swig Object of type 'ePtr< iStaticServiceInformation > *' at 0xb017fba8> >, -1, <Components.MovieList.MovieListData object at 0xb017fbe0>)
18:58:51.0862 x[1] <enigma.iStaticServiceInformationPtr; proxy of <Swig Object of type 'ePtr< iStaticServiceInformation > *' at 0xb017fba8> >
18:58:51.0863 x[1] and -os.stat(ref.getPath()).st_mtime -1494857921.7117617
[MAIN] executing main
TuxTxt cache cleared
18:58:51.0866 Traceback (most recent call last):
18:58:51.0866   File "/usr/lib/enigma2/python/Screens/MovieSelection.py", line 1712, in reloadWithDelay
18:58:51.0893     self["list"].reload(self.current_ref, self.selected_tags, self.collectionName)
18:58:51.0893   File "/usr/lib/enigma2/python/Components/MovieList.py", line 630, in reload
18:58:51.0902     self.load(root, filter_tags, collection)
18:58:51.0903   File "/usr/lib/enigma2/python/Components/MovieList.py", line 841, in load
18:58:51.0913     self.list.sort(key=self.buildGroupwiseSortkey)
18:58:51.0914 TypeError: '<' not supported between instances of 'float' and 'NoneType'
18:58:51.0915 [ePyObject] (CallObject(<bound method MovieSelection.reloadWithDelay of <class 'Screens.MovieSelection.MovieSelection'>>,()) failed)
18:58:55.0753 [gRC] main thread is non-idle! display spinner!
/usr/bin/enigma2.sh: line 284:  5433 Killed                  LD_PRELOAD=$LIBS /usr/bin/enigma2

enigma2 has exited
========== Enigma2 log ends ==========
 
Last edited:
The question is why is there anything on /media/autofs as that is not a valid location for recordings. You can't even set that up.
 
The question is why is there anything on /media/autofs as that is not a valid location for recordings. You can't even set that up.

That's weird, I hadn't noticed that but ViX 6.0.002 won't let you select that as a recording path any more. I have used that as my default path for the last 5 years.
It WILL let you select it from the 'Edit autotimer defaults' though and that is where my box is recording to.

1_0_19_22D9_80D_2_11A0000_0_0_0_20211118201726.webp
 
That's weird, I hadn't noticed that but ViX 6.0.002 won't let you select that as a recording path any more. I have used that as my default path for the last 5 years.
It WILL let you select it from the 'Edit autotimer defaults' though and that is where my box is recording to.

View attachment 62846
Ok, so now we know what is happening switch to this:
Code:
	def buildBeginTimeSortKey(self, x):
		ref = x[0]
		if ref.flags & eServiceReference.mustDescent and os.path.exists(ref.getPath()):
			return 0, x[1] and -os.stat(ref.getPath()).st_mtime or 0
		return 1, -x[2]
 
Looks ok, no crashes on my ET10K, I never record directly to the NAS, but just use it to move recordings off the HD.

So sort by date looks very random, but probably reflects the random nature of me moving files around.

(Autofs mounts have been very flakey these last 2 days, but get used so infrequently that I can't say when it started happening.

I spent ages yesterday messing about, no pattern emerged. Literally every combination of ET10K, Ultimo4k, Py3, Py2 worked and didn't work at some point.)
 
Last edited:
That's weird, I hadn't noticed that but ViX 6.0.002 won't let you select that as a recording path any more. I have used that as my default path for the last 5 years.
It WILL let you select it from the 'Edit autotimer defaults' though and that is where my box is recording to.

View attachment 62846
You've lost me. You should be able to record to the NAS just not "/media/autofs".
 
My recording path is (or was) /media/autofs/recordings/
E2 is now saying it's not a valid partition.

I did update the synology firmware the other day though so I need to make sure it's not something to do with that.

I have checked the release notes and noticed this:

DSM 7.0.1 ends support for ext3. We strongly suggest backing up the data stored on your ext3 volumes and transferring the data to volumes with supported file systems before the update.

DSM 7.0.1 by default disables NTLMv1 and enables NTMLv2 only, so SMB clients (e.g., Windows XP devices, media players, network printers, smart TVs, and IP cameras) won’t be able to access your Synology NAS.
To restore the connection after the update, go to Control Panel > File Services > SMB > Advanced Settings > Others and enable NTLMv1 authentication.

As far as I remember I formatted all of the NAS drives as ext4 but can't remember how to check the filesystem now.

This is the message when trying to change the path:

1_0_19_22D9_80D_2_11A0000_0_0_0_20211118221047.webp

I'll boot into 5.4 when my good lady has finished watching TV and report back tomorrow.
 
Just managed to check and all is good on ViX 5.4 so nothing to do with the Synology update.


1_0_1_2841_7FE_2_11A0000_0_0_0_20211118223112.webp media-autofs.webp
 
As far as I remember I formatted all of the NAS drives as ext4 but can't remember how to check the filesystem now.

It's hidden away in Storage Manager, mine's ext4.
 
@willo3092 and @ccs please get the output from "cat /proc/mounts".
 
Hopefully sorting works properly from 6.0.003.003. Please test.
 
That came about as a result of: where an mtime was morphed into a pathname (and the other return had an extra value added!).
Which was a fix for: when all that was needed was the "or 0".
 
Last edited:
when all that was needed was the "or 0".
No. That is to fix a different bug.

The "or 0" fixes this:
Code:
18:58:51.0866 Traceback (most recent call last):
18:58:51.0866   File "/usr/lib/enigma2/python/Screens/MovieSelection.py", line 1712, in reloadWithDelay
18:58:51.0893     self["list"].reload(self.current_ref, self.selected_tags, self.collectionName)
18:58:51.0893   File "/usr/lib/enigma2/python/Components/MovieList.py", line 630, in reload
18:58:51.0902     self.load(root, filter_tags, collection)
18:58:51.0903   File "/usr/lib/enigma2/python/Components/MovieList.py", line 841, in load
18:58:51.0913     self.list.sort(key=self.buildGroupwiseSortkey)
18:58:51.0914 TypeError: '<' not supported between instances of 'float' and 'NoneType'
18:58:51.0915 [ePyObject] (CallObject(<bound method MovieSelection.reloadWithDelay of <class 'Screens.MovieSelection.MovieSelection'>>,()) failed)
18:58:55.0753 [gRC] main thread is non-idle! display spinner!

The empty string fixes this:
Code:
<  2483.1435> Traceback (most recent call last):
<  2483.1435>   File "/usr/lib/enigma2/python/Screens/MovieSelection.py", line 1712, in reloadWithDelay
<  2483.1457>     self["list"].reload(self.current_ref, self.selected_tags, self.collectionName)
<  2483.1458>   File "/usr/lib/enigma2/python/Components/MovieList.py", line 630, in reload
<  2483.1465>     self.load(root, filter_tags, collection)
<  2483.1466>   File "/usr/lib/enigma2/python/Components/MovieList.py", line 841, in load
<  2483.1476>     self.list.sort(key=self.buildGroupwiseSortkey)
<  2483.1476> TypeError: '<' not supported between instances of 'str' and 'int'

The crashes happen based on what is in the list of items to be sorted.

Hopefully, my last commit fixes it for once and for all.
https://github.com/OpenViX/enigma2/commit/4077877a710dc13f68c1e972038a72db6fc2e836
 

OpenViX Feeds Status

Back
Top