i am building clear image now ... it spends some time
Change recording menu
Re: Change recording menu #41
Re: Change recording menu #42
Re: Change recording menu #43
Posted 14 March 2015 - 00:05
For internal hdd it works. But for USB or mounted net hdd it crashs still. Long time in Pli has each recording's device own .Trash. There must be used device's .Trash and not .Trash of internal device. I think, problem will in this. There is tried rename file from /media/exthdd/movie into /media/hdd/.Trash/
moveList: [('/media/exthdd/movie/20150313 2357 - Nova - P\xc5\x99epaden\xc3\xad v Pacifiku.ts', '/hdd/movie/.Trash/20150313 2357 - Nova - P\xc5\x99epaden\xc3\xad v Pacifiku.ts'), ('/media/exthdd/movie/20150313 2357 - Nova - P\xc5\x99epaden\xc3\xad v Pacifiku.eit', '/hdd/movie/.Trash/20150313 2357 - Nova - P\xc5\x99epaden\xc3\xad v Pacifiku.eit'), ('/media/exthdd/movie/20150313 2357 - Nova - P\xc5\x99epaden\xc3\xad v Pacifiku.ts.ap', '/hdd/movie/.Trash/20150313 2357 - Nova - P\xc5\x99epaden\xc3\xad v Pacifiku.ts.ap'), ('/media/exthdd/movie/20150313 2357 - Nova - P\xc5\x99epaden\xc3\xad v Pacifiku.ts.cuts', '/hdd/movie/.Trash/20150313 2357 - Nova - P\xc5\x99epaden\xc3\xad v Pacifiku.ts.cuts'), ('/media/exthdd/movie/20150313 2357 - Nova - P\xc5\x99epaden\xc3\xad v Pacifiku.ts.meta', '/hdd/movie/.Trash/20150313 2357 - Nova - P\xc5\x99epaden\xc3\xad v Pacifiku.ts.meta'), ('/media/exthdd/movie/20150313 2357 - Nova - P\xc5\x99epaden\xc3\xad v Pacifiku.ts.sc', '/hdd/movie/.Trash/20150313 2357 - Nova - P\xc5\x99epaden\xc3\xad v Pacifiku.ts.sc')]
rename: /media/exthdd/movie/20150313 2357 - Nova - PĹepadenĂ v Pacifiku.ts to: /hdd/movie/.Trash/20150313 2357 - Nova - PĹepadenĂ v Pacifiku.ts
[MovieSelection] Failed move: [Errno 18] Invalid cross-device link
Then line "trash = "/hdd/movie/.Trash"" in moveToTrash() is wrong and there must be used .Trash from device, where is recorded. When is more recording in same time, then for each deleted recording must be used own corresponding .Trash
Edited by ims, 14 March 2015 - 00:15.
Re: Change recording menu #44
Posted 14 March 2015 - 00:26
there in InfoBarGenerics in moveToTrash use for get trash:
trash = Tools.Trashcan.getTrashFolder(os.path.realpath(entry.Filename))
then:
def moveToTrash(self, entry): print "instantRecord stop and delete recording: ", entry.name import Tools.Trashcan trash = Tools.Trashcan.getTrashFolder(os.path.realpath(entry.Filename)) if not os.path.isdir(trash): trash = Tools.Trashcan.createTrashFolder(entry.Filename) from MovieSelection import moveServiceFiles moveServiceFiles(os.path.realpath(entry.Filename), trash, entry.name, allowCopy=False)
btw - is better import Tools.Trashcan once for whole InfoBarGenerics file or import it in function ? May be, MiLo could tell some about it ?
Q: Would not be better for "Stop and delete all recording" display there "Yes/No" question ?
Attached Files
Edited by ims, 14 March 2015 - 00:48.
Re: Change recording menu #45
Posted 14 March 2015 - 00:55
I test with usb pen and no problems, but absolutely
i agree, using a trash local to recordings it's better. no files moving across devices.
If a central trash is wanted, it could be set by a relative path in enigma2 config. And then try
the code i posted before: in function moveservicefiles in fact is considered error 18, with new
calls to other copy-move functions.
for central trash:
def moveToTrash(self, entry): print "instantRecord stop and delete recording: ", entry.name import Tools.Trashcan trash = Tools.Trashcan.createTrashFolder("/hdd") # "/hdd" or whatever stated in a config value, why not a cloud trash! from MovieSelection import moveServiceFiles moveServiceFiles(os.path.realpath(entry.Filename), trash, entry.name, allowCopy=True)
for walk-around trashes:
def moveToTrash(self, entry): print "instantRecord stop and delete recording: ", entry.name import Tools.Trashcan trash = Tools.Trashcan.createTrashFolder(entry.Filename) from MovieSelection import moveServiceFiles moveServiceFiles(os.path.realpath(entry.Filename), trash, entry.name, allowCopy=False)
getTrashFolder already checks for real path and is called by createTrash, that creates trash if not exists.
Re: Change recording menu #46
Posted 14 March 2015 - 07:56
"central trash" ??? it does not exist in this time...
Then there must be files moved into hidden local trashes and into "central" trash must be placed links only. Remove movie from "central" trash - remove link and remove file from local trash. But still check, if are all disks mounted before delete this link from central trash...
getTrashFolder already checks for real path and is called by createTrash, that creates trash if not exists.
Yes, I made it in hurry on 0:26
Attached Files
Edited by ims, 14 March 2015 - 08:47.
Re: Change recording menu #47
Posted 14 March 2015 - 09:02
hi ims
excuse me, i misunderstood what posted at #21, i did not want a cetral trash, as you can see at #20.
but i say one and write two. the realpath check is redundant, cause already checked in getTrashFolder, so:
-moveServiceFiles(os.path.realpath(entry.Filename), trash, entry.name, allowCopy=False) +moveServiceFiles(entry.Filename, trash, entry.name, allowCopy=False)
and it sholud be done.
Re: Change recording menu #48
Re: Change recording menu #49
Posted 14 March 2015 - 09:17
Edited by littlesat, 14 March 2015 - 09:19.
WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W
Re: Change recording menu #50
Re: Change recording menu #51
Posted 14 March 2015 - 09:20
How is this done in the movieselecter.... The same method should be used?
Then I suggest we could have one trash per device....
Edited by littlesat, 14 March 2015 - 09:20.
WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W
Re: Change recording menu #52
Posted 14 March 2015 - 09:22
each device has own trash , all have same behaviour. MiLo made it cca 2 years ago ...
In movieselector has each disk/mountpoint own .Trash and movie deleted from this disk is placed into this trash.
Push last patch (#48) and all is ok. (I tested #46, it works... but as wrote Tension in #47, I replaced this line)
Edited by ims, 14 March 2015 - 09:33.
Re: Change recording menu #53
Re: Change recording menu #54
Re: Change recording menu #55
Re: Change recording menu #56
Posted 14 March 2015 - 19:02
What a good idea I had......
just one question by looking @ the code.
if config.usage.movielist_trashcan.value: list += ((_("Stop and delete recording"), "stopdelete"),)
If I have the trash_can disabled in movielist (Menu -> Setup -> System -> Record -> ) It's not possible to use this function ??
Enigma is getting old....
Re: Change recording menu #57
Re: Change recording menu #58
Re: Change recording menu #59
Re: Change recording menu #60
Posted 14 March 2015 - 19:45
Confirmation is not required as the recording is copied into the .Trash subdir so you always are capable to revert it...
When you remove from .trash as far I know you're asked for confirmation.
Edited by littlesat, 14 March 2015 - 19:46.
WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users