the reason is that rerecord and delete are ultimately the same.. thus the only place we make the difference visible is in the presentation layer.. where we pass the false|true flag to indicate whether to add the rerecord flag to the delete phase.airdrummer wrote: ↑Thu Jan 10, 2019 9:50 amjust found this & installed on my server, many thanx, demonrik, looks great!-) i'm looking into branching it for my needs, as clicking on play tries to d/l stream to local browser, but i want it to open in vlc on my dvr connected to my hdtv...
so i started inspecting the html, & saw how you do rerecord:which is passed to the engine via a hidden field in the form:Code: Select all
<a onclick="RecordingDeleteReveal(event,'74247630',false);" class="delete">Delete</a> <a onclick="RecordingDeleteReveal(event,'74247630',true);" class="rerecord">ReRecord</a>
which is poked in ur RecordingDeleteReveal.js:Code: Select all
<input id="drerecord" name="rerecord" value="true" type="hidden">
but as u r reusing the delete form, the form & button say deleteCode: Select all
document.getElementById("drerecord").value = rerecord;
which is rather offputting, not to mention confusing;-}Code: Select all
<a onclick="submitDeleteRecording()">Delete</a>
the play/delete/rerecord buttons shouldn't be repeated in the delete/rerecord dialogs (which is confusing) and the rerecord dialog & button really should be labeled rerecord, nicht wahr?-) i've modded scripts/hdhomerundvr_ui.js and style/recordingdeletereveal.html to fix this, but i never grokked git, so lemme know if u want to see my mods...
So... the changes you mention all just depend on your philosophy of how fast to move from user experience to the hardware nuances. I wanted to keep the php interface as close to the hardware as possible and then propogate that through to the html/js doing a delete in both cases but pretending to the user it's doing something different.
To get player to work you will probably have to do mime types, etc..
I didn't bother really working that aspect because I didn't need it. Would be interested to take in those changes when you get them done. If you PM me your github repo I can track and pull into the baseline at some point (real way to do it is a pull request).