Jump to content


Photo

Change recording menu


  • Please log in to reply
63 replies to this topic

Re: Change recording menu #41 ims

  • PLi® Core member
  • 13,624 posts

+212
Excellent

Posted 13 March 2015 - 22:48

i am building clear image now ... it spends some time


Kdo nic nedělá, nic nezkazí!

Re: Change recording menu #42 ims

  • PLi® Core member
  • 13,624 posts

+212
Excellent

Posted 13 March 2015 - 22:49

#32 was recording to usb hdd


Kdo nic nedělá, nic nezkazí!

Re: Change recording menu #43 ims

  • PLi® Core member
  • 13,624 posts

+212
Excellent

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.

Kdo nic nedělá, nic nezkazí!

Re: Change recording menu #44 ims

  • PLi® Core member
  • 13,624 posts

+212
Excellent

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.

Kdo nic nedělá, nic nezkazí!

Re: Change recording menu #45 tension

  • Senior Member
  • 117 posts

+4
Neutral

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 ims

  • PLi® Core member
  • 13,624 posts

+212
Excellent

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.

Kdo nic nedělá, nic nezkazí!

Re: Change recording menu #47 tension

  • Senior Member
  • 117 posts

+4
Neutral

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 ims

  • PLi® Core member
  • 13,624 posts

+212
Excellent

Posted 14 March 2015 - 09:13

You could replace this line in patch manualy as me... :)

 

 

Attached Files


Kdo nic nedělá, nic nezkazí!

Re: Change recording menu #49 littlesat

  • PLi® Core member
  • 56,272 posts

+691
Excellent

Posted 14 March 2015 - 09:17

Until now we had only one trash... The one that is standard in /hdd/movies..... So when you want more local trashes, more code should be changed and then I think there is a better place to patch it... Then more code could be revised.... And what if you want to purge the files in such a new decentrilized trash?

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 ims

  • PLi® Core member
  • 13,624 posts

+212
Excellent

Posted 14 March 2015 - 09:19

I do not know, how you can write, that there is one trash only...???  I have trash automaticaly created on each device, where is recorded...

 

You must try mount next device time to time...


Edited by ims, 14 March 2015 - 09:20.

Kdo nic nedělá, nic nezkazí!

Re: Change recording menu #51 littlesat

  • PLi® Core member
  • 56,272 posts

+691
Excellent

Posted 14 March 2015 - 09:20

And can you also purge the files in them..?

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 ims

  • PLi® Core member
  • 13,624 posts

+212
Excellent

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.

Kdo nic nedělá, nic nezkazí!

Re: Change recording menu #53 littlesat

  • PLi® Core member
  • 56,272 posts

+691
Excellent

Posted 14 March 2015 - 09:51

As far I can see I cannot push 48.... Can you give me a patch that works and what is inline what we usually do

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Change recording menu #54 ims

  • PLi® Core member
  • 13,624 posts

+212
Excellent

Posted 14 March 2015 - 09:54

Moment. I must make it again...   ( I am almost on the way to roasting pig )


Kdo nic nedělá, nic nezkazí!

Re: Change recording menu #55 ims

  • PLi® Core member
  • 13,624 posts

+212
Excellent

Posted 14 March 2015 - 09:58

here it is, i hope  - nothing forgot ...

Attached Files


Kdo nic nedělá, nic nezkazí!

Re: Change recording menu #56 jpuigs

  • Senior Member
  • 1,143 posts

+32
Good

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....

 

Spoiler

Re: Change recording menu #57 littlesat

  • PLi® Core member
  • 56,272 posts

+691
Excellent

Posted 14 March 2015 - 19:03

Yep

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Change recording menu #58 jpuigs

  • Senior Member
  • 1,143 posts

+32
Good

Posted 14 March 2015 - 19:15

Then, we have to manually delete files again.....

If it's not in the movie list but in the trash can, we don't save any manual deletion.

Is it not possible (if the trash can is disabled) to delete it permanently ?


Enigma is getting old....

 

Spoiler

Re: Change recording menu #59 Dimitrij

  • PLi® Core member
  • 10,019 posts

+338
Excellent

Posted 14 March 2015 - 19:18

2013(Vlamo)


GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: Change recording menu #60 littlesat

  • PLi® Core member
  • 56,272 posts

+691
Excellent

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