PDA

View Full Version : [ET10x00] Trashcan Location



EMJB
14-04-17, 16:33
For a while I have has a problem with the trashcan which I hoped would be cleared when I moved 5.0.xxx, but this has not been the case. My problem is that:

(1) The red button in the movie list moves files to /media/hdd/.Trash, and it is the content of this folder whose size is reported.

(2) The Trash folder in the list is at /media/hdd/Recordings/.Trash, but is always empty as there is no mechanism for filling it other than file manipulation at the Linux level.

(3) There are no trashcan settings in Main menu -> Setup -> System -> Recording and playback settings

The only relevant settings in /etc/enigma2/settings seem to be:


config.movielist.last_timer_videodir=/media/hdd/Recordings/
config.movielist.last_videodir=/media/hdd/Recordings/
config.movielist.videodirs=['/media/hdd/movie/', '/media/hdd/', '/media/hdd/Recordings/', '/media/hdd/Recordings/.Trash/']

I use "Recordings" rather than "movie" to avoid confusing the family when the vast majority of recordings are not films, but the trashcan problem occurred some months after I made this change.

Can anyone tell me what has gone wrong, and how to fix it?

T.I.A.,

EMJB

1999gtv
14-04-17, 16:46
While in movie list if you press menu then setting, the first item in menu gives option to use the trash can in movie list if set to yes your recordings will be sent to trash can. If set to no the trash can still appears in movie list but will not be used items are deleted.

EMJB
14-04-17, 17:03
While in movie list if you press menu then setting, the first item in menu gives option to use the trash can in movie list if set to yes your recordings will be sent to trash can. If set to no the trash can still appears in movie list but will not be used items are deleted.

Thanks - I was looking in the wrong menu for the trashcan settings. The first item showed the trash can to be in use, but the problem remains that it is moving the files to the wrong place and not displaying the resultant contents, just their size. Tried setting this item to No, rebooting, setting this to Yes, & finally rebooting in the hope that would reset things, but no change.

EMJB

1999gtv
14-04-17, 17:30
Must admit I normally have it set to just delete and not use trashcan. Will have a go with trashcan enabled and see what happens on mine.

1999gtv
14-04-17, 18:28
My paths are standard
config.movielist.last_videodir=/media/hdd/movie/
config.movielist.root=/media/hdd/movie
config.movielist.useextlist=1
config.movielist.videodirs=['/media/hdd/movie/']
Using them and trash can in standard movielist location I can record then send to trashcan and they appear there. I tried your custom settings and encounter same problem as you. It seems the trash can will not appear correctly and instead reverts to media/hdd/.Trash

EMJB
14-04-17, 18:37
@ 1999gtv: I definitely had it working correctly with /Recordings instead of /movie, so either a bug appeared somewhere between 4.1.0 and 4.1.26, or something else about my settings is causing the problem. At least now I should be able to identify just which bit of my settings is causing the problem. Thanks.

EMJB

EMJB
14-04-17, 19:41
@ 1999gtv: What is the significance of the "config.movielist.useextlist=1" entry? - I haven't got an entry like this.

Have tried to modify the settings file to match yours with "movie" changed to "Recordings" saving it between an "init 4" and an "init 3", and the problem remained.

I then moved the contents of "/media/hdd/.Trash" to "/media/hdd/Recordings/.Trash" and it is recognised as a trashcan in the file list (correctly appearing as "Deleted Items" with a dustbin icon and "Trash can" in lieu of "Directory") and when opened in the list showed the correct contents, but the trashcan size was reported as zero even though "/media/hdd/Recordings/.Trash" contained ~15 GB. "Deleting" a recording led to it appearing in "/media/hdd/.Trash", and its size was reflected in a new size for the trashcan.

I can only conclude that a bug was introduced between around 4.1.005 & 4.1.023 which prevents correct operation if the default directory is changed from "/media/hdd/movie".

EMJB

1999gtv
14-04-17, 20:50
accidental post

1999gtv
14-04-17, 21:00
I believe the config.movielist.useextlist=1 refers to a setting in my skin for show extended info in movie list and has no bearing to the issue. I had copy pasted a section of my settings and tbh had not noticed it was there before you mentioned it. It may well be you have to go back to stock locations to get things to work and let the family know where stuff now resides to get correct functioning of trash can. Or if you speak linux and can create a symlink from one trash location to another, beyond my knowledge though.

EMJB
15-04-17, 14:59
Looking at the MovieSelection.py code, a setting called "config.usage.movielist_trashcan" is referenced @ lines 109/114 in a manner that seems relevant to my problem, and I wondered whether I ought to have such setting (I do not currently). However setting it to "/media/hdd/Recordings/.Trash" between an "init 4" and an "init 3" turns the trashcan selection off, and turning it back on removes the settings file entry. Can anyone clarify what, if anything, this should be set to?

Returning to the standard locations as 1999gtv has suggested is a way round my problem, but still leaves an apparent bug for someone else to trip over. Ideally either alternative locations should work again, or the option to change should be removed.

EMJB

EMJB
27-07-18, 14:36
At long last, I have got round to looking at this problem and what might be causing it. At least part of the problem would appear to be in the following bit of code in Trashcan.py:

def getTrashFolder(path=None):
# Returns trash folder without symlinks
try:
if path is None or os.path.realpath(path) == '/media/autofs':
print 'path is none'
return ""
else:
if '/movie' in path:
mountpoint = Harddisk.findMountPoint(os.path.realpath(path))
trashcan = os.path.join(mountpoint, 'movie')
else:
trashcan = Harddisk.findMountPoint(os.path.realpath(path))
return os.path.realpath(os.path.join(trashcan, ".Trash"))
except:
return None

where "movie" is hard-coded in, rather than using "config.usage.default_path.value" or part thereof. However I do not really understand what is going on here - I would have expected the trashcan to always appear in the default path.

Am I barking up the wrong tree?

EMJB