Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.
Page 2 of 9 FirstFirst 1234 ... LastLast
Results 16 to 30 of 132

Thread: Movie list directory sort order

  1. #16
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,797
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Quote Originally Posted by Huevos View Post
    Certain sorts are not available on a per directory basis. Only global.

    I think this thread is a déjà vu of one we had in the private area about a year ago, but I can't find it at the moment.
    It's not. The sort code has been changed - supposedly as a Py3 change. See post #13.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  2. #17
    Willo3092's Avatar
    Title
    ViX Beta Tester
    Join Date
    Oct 2016
    Location
    East Midlands
    Posts
    1,067
    Thanks
    752
    Thanked 403 Times in 303 Posts
    Quote Originally Posted by Joe_90 View Post
    This would be true, but I think the OP does not have subdirectories. He just wants his top directories sorted in date order.
    Yes that's correct, no sub-directories.
    On ViX 5.4 I could tell instantly which directory had a new recording in it because it was at the top of the list.

  3. The Following User Says Thank You to Willo3092 For This Useful Post:

    Joe_90 (18-11-21)

  4. #18
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,632
    Thanks
    2,007
    Thanked 4,956 Times in 3,276 Posts
    Quote Originally Posted by birdman View Post
    The code to do the sort (for "by date" - this hasn't changed in 6.0) is:
    Code:
                   elif self.current_sort == MovieList.SORT_RECORDED: 
                            self.list = sorted(self.list[:numberOfDirs], key=self.buildBeginTimeSortKey) + sorted(self.list[numberOfDirs:], key=self.buildBeginTimeSortKey)
    so the intention is to put all of the directories first, sorted by time, then any files, sorted by time.

    The thing that has changed is buildBeginTimeSortKey(). It now returns 3 items, not 2. I'm not sure why....

    EDIT: oddly, it can now return a name, despite the function supposedly setting up a time key.

    It's this change that did it (lines 969/970):
    Code:
    https://github.com/OpenViX/enigma2/commit/ea343a1977250596d4c9669dcfc5f0e80b56bf13
    I don't know why the 3rd argument has been added. It does nothing as it will be the same for all. If anything if there is an empty argument it should be the first argument and then the double sort should not be necessary.

    I'm not sure why Tony changed this code, possibly because of Simon's changes to eServiceRef code. But this should be sorting by date only.
    Help keep OpenViX servers online.Please donate!

  5. #19
    twol's Avatar
    Title
    Moderator
    Join Date
    Apr 2012
    Posts
    8,417
    Thanks
    997
    Thanked 2,894 Times in 2,247 Posts
    Quote Originally Posted by Huevos View Post
    I don't know why the 3rd argument has been added. It does nothing as it will be the same for all. If anything if there is an empty argument it should be the first argument and then the double sort should not be necessary.

    I'm not sure why Tony changed this code, possibly because of Simon's changes to eServiceRef code. But this should be sorting by date only.
    Looking back (with my limited access at the moment) I haven‘t been able to see why this change was made from my git, but I am pretty sure somebody else was in the loop because Movielist is not something I play around with usually!
    Gigablue Quad 4K & UE 4K
    .........FBC Tuners:
    ------------------> GT-Sat unicable LNB to 1.5M dish(28.2E)
    ------------------> Gigablue unicable LNB to 80 cm dish(19.2E)
    .......................> FBC & DVB-S2X into 90cm dish (27.5W) Opticum robust Unicable LNB
    AX HD61, Edision Osmio 4K+, Zgemma H9Combo, Octagon SF8008 , gbtrio4k, h9se using unicable ports
    Zgemma H9 C/S into Giga4K

  6. #20
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,632
    Thanks
    2,007
    Thanked 4,956 Times in 3,276 Posts
    Quote Originally Posted by twol View Post
    Looking back (with my limited access at the moment) I haven‘t been able to see why this change was made from my git, but I am pretty sure somebody else was in the loop because Movielist is not something I play around with usually!
    Don't worry, I've reverted it.
    https://github.com/OpenViX/enigma2/c...d76fe5c1a6fa93

    Considering the scale of the Py3 conversion it is not surprising the odd thing has slipped through net.
    Help keep OpenViX servers online.Please donate!

  7. The Following 2 Users Say Thank You to Huevos For This Useful Post:

    Joe_90 (18-11-21),Willo3092 (18-11-21)

  8. #21
    Willo3092's Avatar
    Title
    ViX Beta Tester
    Join Date
    Oct 2016
    Location
    East Midlands
    Posts
    1,067
    Thanks
    752
    Thanked 403 Times in 303 Posts
    It works fine on /media/hdd/movies/ but crashing on network drives

    ViX 6.0.002 default_skin

    Enigma2_crash_2021-11-18_17-53-20.log

  9. #22
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,632
    Thanks
    2,007
    Thanked 4,956 Times in 3,276 Posts
    Quote Originally Posted by Willo3092 View Post
    It works fine on /media/hdd/movies/ but crashing on network drives

    ViX 6.0.002 default_skin

    Enigma2_crash_2021-11-18_17-53-20.log
    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.
    Help keep OpenViX servers online.Please donate!

  10. #23
    Willo3092's Avatar
    Title
    ViX Beta Tester
    Join Date
    Oct 2016
    Location
    East Midlands
    Posts
    1,067
    Thanks
    752
    Thanked 403 Times in 303 Posts

  11. #24
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,632
    Thanks
    2,007
    Thanked 4,956 Times in 3,276 Posts
    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>)
    Help keep OpenViX servers online.Please donate!

  12. #25
    ccs's Avatar
    Title
    ViX Beta Tester
    Join Date
    Sep 2014
    Posts
    5,836
    Thanks
    554
    Thanked 1,277 Times in 1,089 Posts
    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 by ccs; 18-11-21 at 20:13.

  13. #26
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,797
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Append "or 0.0" to both return statements from that function?
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  14. #27
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,632
    Thanks
    2,007
    Thanked 4,956 Times in 3,276 Posts
    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.
    Help keep OpenViX servers online.Please donate!

  15. #28
    Willo3092's Avatar
    Title
    ViX Beta Tester
    Join Date
    Oct 2016
    Location
    East Midlands
    Posts
    1,067
    Thanks
    752
    Thanked 403 Times in 303 Posts
    Quote Originally Posted by Huevos View Post
    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.jpg

  16. #29
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,632
    Thanks
    2,007
    Thanked 4,956 Times in 3,276 Posts
    Quote Originally Posted by Willo3092 View Post
    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.jpg
    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]
    Help keep OpenViX servers online.Please donate!

  17. #30
    ccs's Avatar
    Title
    ViX Beta Tester
    Join Date
    Sep 2014
    Posts
    5,836
    Thanks
    554
    Thanked 1,277 Times in 1,089 Posts
    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 by ccs; 18-11-21 at 22:29.

Page 2 of 9 FirstFirst 1234 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.