2024-09-07, 02:08 AM
I worked around this by setting my 13 year old's parental rating to 14.
Then, I logged in to my OpenMediaVault server via ssh (it's Debian Linux) and went to my movies directory (which I've set as /videos/Movies) and ran a sed command.
Before using sed in Linux, I first tried to do it using Windows Powershell commands on my SMB share but could not figure out a Powershell equivalent that worked.
Here are some attempts that might help someone else get on the right path - but these did not work for me as the errors show.
My SMB share for videos is V:, then went in to Movies
Windows Powershell Attempt 1 (failed):
Windows Powershell Attempt 2 (failed) :
I then tried Linux using sed...
Linux Attempt 1 (failed):
At first I tried including the <mpaa>...</mpaa> in both the search and replace fields, but sed did not like it and I had to CTRL-C to force quit the command
Linux Attempt 2 (worked):
Then I took out the <mpaa>...</mpaa> and it was happy
This gave no output but it worked.
This works because I have all my metadata stored in NFO (setting in Jellyfin).
I then re-scanned all metadata in Jellyfin, then went in to movies and filtered by Parental rating to check and adjusted any outliers manually, changing any that are actually AU-PG but I would prefer him not to watch or that would bore him to tears to AU-M.
Hope this helps someone...
Then, I logged in to my OpenMediaVault server via ssh (it's Debian Linux) and went to my movies directory (which I've set as /videos/Movies) and ran a sed command.
Before using sed in Linux, I first tried to do it using Windows Powershell commands on my SMB share but could not figure out a Powershell equivalent that worked.
Here are some attempts that might help someone else get on the right path - but these did not work for me as the errors show.
My SMB share for videos is V:, then went in to Movies
Windows Powershell Attempt 1 (failed):
Code:
PS V:\Movies> dir ".\*\*.nfo" -recurse |% { (gc $_) -replace '<mpaa>AU-PG</mpaa>', '<mpaa>PG-13</mpaa>' | (sc $_) }
ParserError:
Line |
1 | … c $_) -replace '<mpaa>AU-PG</mpaa>', '<mpaa>PG-13</mpaa>' | (sc $_) }
| ~~~~~~~
| Expressions are only allowed as the first element of a pipeline.
Windows Powershell Attempt 2 (failed) :
Code:
PS V:\Movies> $fileNames = Get-ChildItem ".\*\*.nfo" -Recurse |select Filename | foreach ($filename in $filenames) { (Get-Content $filename.Filename) -replace "<mpaa>AU-PG</mpaa>", "<mpaa>PG-13</mpaa>"|Set-Content $filename.Filename }
ParserError:
Line |
1 | … ".\*\*.nfo" -Recurse |select Filename | foreach ($filename in $filena …
| ~~
| Unexpected token 'in' in expression or statement.
I then tried Linux using sed...
Linux Attempt 1 (failed):
At first I tried including the <mpaa>...</mpaa> in both the search and replace fields, but sed did not like it and I had to CTRL-C to force quit the command
Code:
sed -i '' 's/<mpaa>AU-PG</mpaa>/<mpaa>PG-13</mpaa>/g' */*.nfo
sed: can't read s/<mpaa>AU-PG</mpaa>/<mpaa>PG-13</mpaa>/g: No such file or directory
Linux Attempt 2 (worked):
Then I took out the <mpaa>...</mpaa> and it was happy
Code:
sed -i 's/AU-PG/PG-13/g' */*.nfo
This gave no output but it worked.
This works because I have all my metadata stored in NFO (setting in Jellyfin).
I then re-scanned all metadata in Jellyfin, then went in to movies and filtered by Parental rating to check and adjusted any outliers manually, changing any that are actually AU-PG but I would prefer him not to watch or that would bore him to tears to AU-M.
Hope this helps someone...