<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Thanks for this Jim. I was confused by refresh list on leanfront
thinking that would refresh videos. Only after running the scan
videos on my desktop instance of mythtv frontend was I able to
see the videos on leanfront. I installed the systemd service on
my backend. It fails.</p>
<p><br>
</p>
<p><br>
</p>
<p>Here is the systemd I installed.<br>
</p>
<p># /lib/systemd/system/mythtv-scanvideos.service<br>
[Unit]<br>
Description=mythtv-scanvideos<br>
<br>
[Service]<br>
ExecStart=# This timer unit is for mythtv-scanvideos ; # by Jim
Abernathy ; # Licensed under GPL V2 ; # ; ; [Unit] ;
Description=start mythtv-scanvideos ; ; [Timer] ;
Unit=mythtv-scanvideos.service ; OnCalendar=*-*-* 04:30:00 ;
AccuracySec=5minutes ; RandomizedDelaySec=10minutes ;
Persistent=true ; ; [Install] ; WantedBy=timers.target ; ; #
This service unit is for scanning mythtv videos ; # ; [Unit] ;
Description=mythtv scanvideos has started ; Requires=mysql.service
; After=mysql.service ; Requires=mythtv-backend.service ;
After=mythtv-backend.service ; ; [Service] ; Type=oneshot ;
User=mythuser ; Group=mythtv ; ExecStart=/usr/bin/mythutil
--scanvideos<br>
<br>
[Install]<br>
WantedBy=multi-user.target<br>
<br>
</p>
<p>mythuser@amethi:~$ systemctl status mythtv-scanvideos.service<br>
○ mythtv-scanvideos.service - mythtv-scanvideos<br>
Loaded: bad-setting (Reason: Unit mythtv-scanvideos.service
has a bad unit file setting.)<br>
Active: inactive (dead)<br>
</p>
<p>I manually run mythutils --scanvideos on backend and get</p>
<p>mythuser@amethi:~$ /usr/bin/mythutil --scanvideos<br>
2024-05-13 09:56:05.003264 C mythutil version: fixes/34
[v34.0+fixes.202404071918.d6398e090f~ubuntu22.04.1] <a class="moz-txt-link-abbreviated" href="http://www.mythtv.org">www.mythtv.org</a><br>
2024-05-13 09:56:05.003272 C Qt version: compile: 5.15.3,
runtime: 5.15.3<br>
2024-05-13 09:56:05.003294 I Ubuntu 22.04.4 LTS (x86_64)<br>
2024-05-13 09:56:05.003295 N Enabled verbose msgs: general<br>
2024-05-13 09:56:05.003300 N Setting Log Level to LOG_INFO<br>
2024-05-13 09:56:05.013759 I Added logging to the console<br>
2024-05-13 09:56:05.014887 I Setup Interrupt handler<br>
2024-05-13 09:56:05.014898 I Setup Terminated handler<br>
2024-05-13 09:56:05.014907 I Setup Segmentation fault handler<br>
2024-05-13 09:56:05.014915 I Setup Aborted handler<br>
2024-05-13 09:56:05.014924 I Setup Floating point exception
handler<br>
2024-05-13 09:56:05.014931 I Setup Illegal instruction handler<br>
2024-05-13 09:56:05.014943 I Setup Bus error handler<br>
2024-05-13 09:56:05.014982 I Setup Real-time signal 0 handler<br>
2024-05-13 09:56:05.014990 I Setup Hangup handler<br>
2024-05-13 09:56:05.015180 N Using runtime prefix = /usr<br>
2024-05-13 09:56:05.015183 N Using configuration directory =
/home/mythuser/.mythtv<br>
2024-05-13 09:56:05.015409 I Assumed character encoding:
en_US.UTF-8<br>
2024-05-13 09:56:05.015921 I Empty LocalHostName. This is
typical.<br>
2024-05-13 09:56:05.015936 I Using a profile name of: 'amethi'
(Usually the same as this host's name.)<br>
2024-05-13 09:56:05.016166 I Start up testing connections. DB
192.168.1.105, BE , attempt 0, status dbAwake, Delay: 2000<br>
2024-05-13 09:56:05.548287 N Setting QT default locale to EN_US<br>
2024-05-13 09:56:05.548294 I Current locale EN_US<br>
2024-05-13 09:56:05.548330 N Reading locale defaults from
/usr/share/mythtv//locales/en_us.xml<br>
2024-05-13 09:56:05.570067 I PowerDBus: Failed to delay
sleep,shutdown: Permission denied<br>
2024-05-13 09:56:05.572571 I PowerDBus: Added UPower.Device
'/org/freedesktop/UPower/devices/ups_hiddev0'<br>
2024-05-13 09:56:05.572799 I Power: On AC power<br>
2024-05-13 09:56:05.616856 I Power: Supported actions: None<br>
2024-05-13 09:56:05.621067 I
MythCoreContext::ConnectCommandSocket(): Connecting to backend
server: 192.168.1.105:6543 (try 1 of 1)<br>
2024-05-13 09:56:05.622275 I
MythCoreContext::CheckProtoVersion(): Using protocol version 91
BuzzOff<br>
2024-05-13 09:56:05.634987 I Requested video scan<br>
2024-05-13 09:56:05.635003 I PowerDBus: Closing interfaces<br>
2024-05-13 09:56:05.635303 I Exiting<br>
<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 1/20/24 11:09, James Abernathy
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CANFv2EkprQ2T7YDb+zWKUAXvXJh+OUk56GBYqPdVJ4hcph+R1Q@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, Jan 20, 2024 at
12:02 PM Will Dormann <<a
href="mailto:wdormann@gmail.com" moz-do-not-send="true"
class="moz-txt-link-freetext">wdormann@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I'm
a recent-ish Leanfront convert, having lived my prior life
with a <br>
combined FE/BE system plugged directly into the TV. And I
absolutely <br>
*love* it, so thanks much to anyone involved in making that
happen.<br>
<br>
The one thing I encountered recently was that my "Videos"
collection <br>
wasn't picking up new files that I put in the directory.
Even after <br>
clicking re-scan or refresh or whatever it was in the
Leanfront UI.<br>
<br>
I ended up going back to my BE system (which still has the
FE on it) and <br>
manually re-scanning videos using the normal MythTV frontend
UI. And <br>
after this, the videos showed up on Leanfront.<br>
<br>
My question is: Is there a way to manually trigger a re-scan
of MythTV <br>
Videos in a world where the backend system isn't readily
available?<br>
<br>
<br>
Thanks!<br>
-WD<br>
</blockquote>
<div><br>
</div>
<div>I set up a systemd service/timer on the backend to rescan
every night late.</div>
<div><br>
</div>
<div>Something like:</div>
<div># This timer unit is for mythtv-scanvideos<br>
# by Jim Abernathy<br>
# Licensed under GPL V2<br>
#<br>
<br>
[Unit]<br>
Description=start mythtv-scanvideos<br>
<br>
[Timer]<br>
Unit=mythtv-scanvideos.service<br>
OnCalendar=*-*-* 04:30:00<br>
AccuracySec=5minutes<br>
RandomizedDelaySec=10minutes<br>
Persistent=true<br>
<br>
[Install]<br>
WantedBy=timers.target</div>
<div><br>
</div>
<div># This service unit is for scanning mythtv videos<br>
#<br>
[Unit]<br>
Description=mythtv scanvideos has started<br>
Requires=mysql.service<br>
After=mysql.service<br>
Requires=mythtv-backend.service<br>
After=mythtv-backend.service<br>
<br>
[Service]<br>
Type=oneshot<br>
User=jim<br>
Group=mythtv<br>
ExecStart=/usr/bin/mythutil --scanvideos</div>
<div> <br>
</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
mythtv-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a>
<a class="moz-txt-link-freetext" href="http://lists.mythtv.org/mailman/listinfo/mythtv-users">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a>
<a class="moz-txt-link-freetext" href="http://wiki.mythtv.org/Mailing_List_etiquette">http://wiki.mythtv.org/Mailing_List_etiquette</a>
MythTV Forums: <a class="moz-txt-link-freetext" href="https://forum.mythtv.org">https://forum.mythtv.org</a>
</pre>
</blockquote>
</body>
</html>