Jump to content

“keep up to” DVR feature in “series settings” not respected


vdrover
Go to solution Solved by vdrover,

Recommended Posts

vdrover

I have a few series set to record and save only the 3 latest episodes. 
 

This setting is not being respected and all recorded episodes of each series are being saved. 

Edited by vdrover
Link to comment
Share on other sites

On 1/4/2022 at 9:40 AM, vdrover said:

@LukeNeed any more details here?

Did you go into it to check that you even have seven episodes? Next time a Seinfeld episode records, please attach the emby server log as that is when the deletion occurs. Thanks.

Link to comment
Share on other sites

vdrover

Yes, I did confirm that all the episodes were saved and counted properly. I deleted the episodes above. I currently have 3 saved from new recordings. I expect the 4th to record and save tonight. That will be one more than the "save 3" setting, and I will post the log details. 

Link to comment
Share on other sites

5 hours ago, vdrover said:

Yes, I did confirm that all the episodes were saved and counted properly. I deleted the episodes above. I currently have 3 saved from new recordings. I expect the 4th to record and save tonight. That will be one more than the "save 3" setting, and I will post the log details. 

Great, thanks.

Link to comment
Share on other sites

vdrover

OK. I am PMing the server log for 1/7/22. The 4th episode of Seinfeld is called "The Implant". It's recording window was 11:05PM local for 30 minutes as you can see in the logs. 

This images show the series settings, and what I expected to happen based on those settings. 

Emby 2022-01-08 at 8.58.17 AM.png

Emby 2022-01-08 at 9.00.52 AM.png

Link to comment
Share on other sites

Hi, looks like you have some file or folder permissions problems to sort out:

2022-01-07 23:08:02.368 Error LiveTV: Error deleting recording
	*** Error Report ***
	Version: 4.6.7.0
	Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb
	Operating system: Linux version 5.4.0-91-generic (buildd@lcy01-amd64-017) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #102-Ubuntu SMP Fri Nov 5 16:31:28 UTC 2021
	Framework: .NET Core 3.1.21
	OS/Process: x64/x64
	Runtime: opt/emby-server/system/System.Private.CoreLib.dll
	Processor count: 12
	Data path: /var/lib/emby
	Application path: /opt/emby-server/system
	System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path '/mnt/Media/Emby/TV Shows/Seinfeld (1981)/Season 4/Seinfeld S04E17 The Outing.ts' is denied.
	 ---> System.IO.IOException: Permission denied
	   --- End of inner exception stack trace ---
	   at System.IO.FileSystem.DeleteFile(String fullPath)
	   at Emby.Server.Implementations.Library.LibraryManager.DeleteItem(BaseItem item, DeleteOptions options, BaseItem parent, Boolean notifyParentItem)
	   at Emby.LiveTV.EmbyTV.DeleteLibraryItemForTimer(TimerInfo timer)
	   at Emby.LiveTV.EmbyTV.DeleteLibraryItemsForTimers(List`1 timers)
	Source: System.IO.FileSystem
	TargetSite: Void DeleteFile(System.String)
	InnerException: System.IO.IOException: Permission denied
	Source: 
	TargetSite: 

 

  • Like 1
Link to comment
Share on other sites

vdrover

That’s helpful. I have been struggling with permissions as I migrate away from Plex.

Any thoughts on lightning into my Emby as the “Emby” user? 

Link to comment
Share on other sites

vdrover

 

Yes, I have been through that many times. However, based on the permissions issue you noted in the logs, I have found what is happening. I just don't WHT it is happening. Lwet me explain. 

So, I am transitioning from Plex and all my media is stored on an external drive (`mnt/Emby`) attached to my ubuntu box. I noticed some permissions problems earlier so I set up the following cron to run every 5 min: `/bin/chown -R emby:emby /mnt/Emby`

In other words, all the files and folders are owned by `emby` and are in the `emby` group. This keeps the permissions as needed and allows me to delete content from the normal Emby interface. 

What I have JUST noticed is that AS SOON AS a new recording begins in EMBY, the permission on the entire external drive shift from emby:emby to `victor:plex`.  Note that plex is not running any longer. Importantly, the episode cleanup issue I described above also takes place AS SOON AS the "4th" recording starts (since I am trying to save only 3 episodes), and the permissions are not correct. Once the cron kicks in to fix permissions, the episode cleanup process has already moved on and episodes remain. 

Also, I did a test using the `touch command`. I can replicate the changing of the file permissions independent of Emby by creating a new file on my external drive as follows: `sudo touch '/mnt/Emby/readme.txt'. 

So, I am hoping someone can suggest WHY, when I start recording to my external drive or copy a file to the external drive, the permissions on the entire external drive switch to victor:plex.

Note: I am logged into Ubuntu as `victor`.

 

Edited by vdrover
Link to comment
Share on other sites

  • Solution
vdrover

OK, I think I solved this. 

First, I suspect the external drive will always reset permissions to `victor:plex` when a file modification is made. I don't understand why, but I did see some posts about how the drive was installed originally and such. So I decided to take that as a given and work on permissions instead. In this approach, the problem to solve is allowing the `emby` user (i.e. the Emby app) to delete old episodes.

  1. First, I removed the crontab that was resetting permissions on `/mnt/Emby` to `emby:emby` . Now my permissions on the external drive would stay victor:plex.
  2. Second, I determined the userid of the emby user with this command: `less /etc/passwd`. Let's say the ID is `1001`.
  3. Finally, I set the following default ACL rule recursively on my external drive: `sudo setfacl -R --default --modify u:1001:rwx '/mnt/Emby'. This allowed the `emby` user to delete content on `mnt/Emby`.

With this rule in place, old episodes were successfully purged according to that specified in the series settings.

Edited by vdrover
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...