Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display recordedid to allow simpler file access from the desktop #464

Closed
Jpilk opened this issue Jan 19, 2022 · 12 comments
Closed

Display recordedid to allow simpler file access from the desktop #464

Jpilk opened this issue Jan 19, 2022 · 12 comments

Comments

@Jpilk
Copy link

Jpilk commented Jan 19, 2022

Is your feature request related to a problem? Please describe.
Please describe the problem you are trying to solve.

http://lists.mythtv.org/pipermail/mythtv-users/2022-January/408670.html

file:///home/john/SGs/CoverArtSG1/Screenshot_20220119_220900.png


Fragment of MythCenter-wide/recordings-ui.xml

    <textarea name="channel" from="basetextarea">
        <area>30,444,245,30</area>
    </textarea>

    <textarea name="timedate" from="basetextarea">
         <area>280,444,465,30</area>
         <align>hcenter</align>
<template>%recstarttime% - %recendtime% %recstartdate%.%startyear% c%chanid% r%recordedid%</template>
    </textarea>

    <textarea name="filesize_str" from="basetextarea">
        <area>750,444,165,30</area>
        <align>right</align>
    </textarea>
@Jpilk
Copy link
Author

Jpilk commented Jan 19, 2022

Screenshot_20220119_220900

@Jpilk
Copy link
Author

Jpilk commented Jan 22, 2022

I would prefer to use the new 'recordedtime' format in the middle of the template definition here; being in the UK I'm not usually much affected by this. The form I carried over from Git behaves inconsistently with current and earlier years.

I think the display ought to give some indication of the duration of the recording, and the recordedtime as above, and the chanid and the recordedid. " %recstarttime% - %recendtime%" gives duration and has the advantage of being linked to the filename, but recordedid should eventually point more easily to the file in its StorageGroup

@Jpilk
Copy link
Author

Jpilk commented Jan 22, 2022

Putting %recordedtime% into the template doesn't deliver. I suppose that's because it doesn't come from programinfo.cpp ?

@kmdewaal
Copy link
Contributor

I think that this is not information that should be on the "Watch Recordings" page. It is not relevant for normal MythTV operation but it can be useful for debugging.

The correct place for this type of additional information, such as the database recordid, is in the "second i" window. This is the popup window with detailed information that comes when, after selecting a recording in the "Watch Recordings" window, you press "i" and then "i" again. After the first "i" there is one page of additional information and after the second "i" there is a lot more.
These popup windows contain a lot of information that is not needed for normal MythTV frontend operation but that is occasionally useful for debugging, such as the filename, the recording rule used and the tuner input used. The recordid can be added there.

@Jpilk
Copy link
Author

Jpilk commented Jan 24, 2022

Yes, I accept all that, and would see it as a good solution.

I now have a code fragment using the recordedid, inserted and apparently working well in one of my scripts. It's based on curl lines that I posted in issue #458, but those command lines are long, sprinkled with quotes and pipes, and don't fit easily on my screens. My attemps to get them both manageable and working aren't having much success.

Note that it's the RecordedId that I want, not RecordId. It autoincrements, and on this box is at 36576 :-)

@kmdewaal
Copy link
Contributor

kmdewaal commented Jan 25, 2022

Screenshot from 2022-01-25 17-59-43
It would then become something like this. Note that there is probably only a valid pathname when the frontend and backend are on the same machine and you do not go wild on storage groups, otherwise you get likely something like myth://hostname/filename without a path.

@Jpilk
Copy link
Author

Jpilk commented Jan 25, 2022

That looks good, and seems unlikely to cause protests. Great!

Getting full path from the RecordedId means that very little keyboard input is needed when working on a group of recent recordings. Did (or would) you get the path by probing, or from the SG mechanism, eg (in perl) at

https://www.mythtv.org/wiki/Dvbradioexport.pl ?

my $storagegroup = new MythTV::StorageGroup();
$dir = $storagegroup->FindRecordingDir($basename);

@kmdewaal
Copy link
Contributor

About where the information comes from.... this is from a bit of code that runs on the frontend and that accesses the database, usually on the backend, to get all the information. The information was already present in a ProgramInfo struct so this was low-hanging fruit. How to get the info via API calls I do not know.

@ulmus-scott
Copy link
Contributor

Depending on what exactly you want to do, mythlink.pl may be of relevance. https://github.com/MythTV/mythtv/blob/master/mythtv/contrib/user_jobs/mythlink.pl

@Jpilk
Copy link
Author

Jpilk commented Jan 26, 2022

Yes, thanks. That got into the thread I quoted on opening, but more conveniently here:

https://lists.archive.carbon60.com/mythtv/users/639453#639453

And now that the RecordedId is easily accessible let me push a bit further. I have scripts that take the full path as one of a series of parameters. It would perhaps be good to replace that item with a 'simple' function of just the RecordedId. Bill Meek sent me an example, using the python bindings, that requires Chanid plus filename, and I could probably hack that, but a good job would be better :-)

@kmdewaal
Copy link
Contributor

@paul-h yes I do read the irc logs once in a while. Thanks for the suggestion!

@Jpilk
Copy link
Author

Jpilk commented Jan 30, 2022

I now have a wrapper script that accepts RecordedId in the cl and will feed a modified cl to scripts requiring the fullpath; in tentative use. Paul suggested a clipboard option, maybe not seriously. I think I shall retain the RecordedId on my main screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants