Search the Community
Showing results for tags 'scheduled task'.
-
Make API Requests for Library Scan and More in PowerShell - Help
Oracle posted a topic in Developer API
Hi, all. So, I've been just slowing chipping away at this PowerShell script I run every night to sync my server with some other drives and want to make an API request to scan the Emby library and call two other requests as well (Timelord Plugins). Has anyone does this that has some code they'd be willing to share (privately or publicly) as examples? Here is my barebones script, without any of my server's info in there. Thanks! server_sync (1).ps1- 11 replies
-
- powershell
- api
-
(and 4 more)
Tagged with:
-
How Emby handles episodes marked as unwatched after a Trakt sync
toffee_123 posted a topic in General/Windows
I have tried to mark episodes as unwatched in Emby, so I can rewatch a show and get the next episode in 'continue watching'. However, as I'm using the Trakt plugin, when the plugin syncs, the unwatched status in Emby is overridden based on the Trakt play history. There are three possible solutions to this, two of which are not preferable: Remove plays from Trakt (not preferable, as this defeats one of the purposes of Trakt - keeping a record of my watches). Disable Update Trakt watched history during Scheduled Task option (not preferable, as I need to keep watches synced between Emby and Plex). Change the behaviour of Emby/the Trakt plugin, so when manually marking an item as unwatched in Emby, this is not overridden by a Trakt sync (or add an option in the Trakt plugin settings to specify how Emby will handle this situation). Option 3 is is how Plex handles this situation, and is why I currently have to do my rewatches on Plex rather than Emby (I'm a lifetime member of both). It would be really cool if you could change this behaviour in Emby, as I've noted multiple users have also had issues with this behaviour in the past. -
HOWTO: Periodically clean up and reindex Emby Library.db
Widestorm posted a topic in General/Windows
Important Update Vacuuming is built into newer server versions. Please see here: https://emby.media/community/index.php?/topic/75510-42032-vacuum-database-config-switch/ So I recently had the problem that Emby took forever to show any Channels when switching to Live TV and was generally slow. I'm using a HomeRun Expand with approximately 350 channels. Keep in mind I have already tried disabling any plugins I'm not using without any success. Reading through some forum posts I fould a fix that has seemed to improve the performance of the loading by quite a bit. Thank you kjp4756 https://emby.media/community/index.php?/topic/47386-extremely-slow-web-ui-performance/ His solution was intended for a Linux installation, but that's not a problem. On https://www.sqlite.org/download.html you can get the sqlite3 utility seperately. You can find it under "Precompiled Binaries for Windows" under sqlite-tools-win36-x86-xxxxxx.zip So what you can do is just run that command in a cmd. The easiest way to do this is to shift+right-click in the folder you extracted sqlite3.exe to and klick "Open command window here" and running the commands as following: Make sure to stop Emby before executing the query! sqlite3 %AppData%\Emby-Server\programdata\data\library.db "VACUUM" sqlite3 %AppData%\Emby-Server\programdata\data\library.db "ANALYZE" sqlite3 %AppData%\Emby-Server\programdata\data\library.db "REINDEX" After that you can restart the server and hopefully enjoy some faster browsing. I have also created a script that automatically stops, cleans up the database and starts Emby again. Useful if you want to create a scheduled task that does the work. Make sure to put both scripts as well as sqlite3.exe in the same folder or alternatively adjust the Parameters in the reindex-embydb.ps1 file. And keep in mind to run the script with the user Emby was installed with. I'm stopping and starting the server using these functions (it's also creating a logfile in the specified directory): # Shutdown Emby function Emby-Shutdown { param([Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true,Position=0)]$Hostname, [Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true,Position=0)]$Port) $Url= "http://" + $Hostname + ":" + "$Port" + "/emby/System/Shutdown" $Status = Invoke-WebRequest -Uri $Url -Method POST -Body ($params|ConvertTo-Json) -ContentType "application/json" if ($Status.StatusCode -eq 204){ LogWrite "Emby is shutting down..." } } Emby-Shutdown -Hostname localhost -Port 8096 # Start Emby function Emby-Start { $ProcessActive = Get-Process EmbyServer.exe -ErrorAction SilentlyContinue if($ProcessActive -eq $null) { LogWrite "Emby is starting..." & $env:APPDATA\Emby-Server\system\EmbyServer.exe } else { LogWrite "Emby was already running!" -ForegroundColor Red } } Start-Emby reindex-embydb.zip- 19 replies
-
- 3
-
Hi, I just did a clean install of emby (Version 3.2.26.0) on a brand new Ubuntu 17.04 (GNU/Linux 4.10.0-30-generic x86_64) host, restored my database and everything appears to be working flawlessly. But I did notice that the "Clean Database" scheduled task is missing. I can no longer run this. Was this removed in a recent update? If not, any ideas why this would no longer exist? Here's a screen snippit:
- 2 replies
-
- ubuntu
- clean database
-
(and 1 more)
Tagged with:
-
Hi Developers, Would it be possible to add more control over the scheduled library scan to add the following function: If using network storage send ping to server name, if reply start scan, if no reply do not start scan and retry ping in xx (user inputs value in seconds) time. The driver for this request is for those of us who have Network attached storage and while at work set the network attached storage to standy or off (using WOL commands when someone starts WMC to auto power on the NAS or I send a manual wol from my iPhone or WOL addin to WMC if on the lounge room main unit which WMC is always running) for power saving while not in use the scheduled scan may occur and then display all media as "Offline" and all media art is lost until next successful scan. The NAS may not be woken by WOL from starting a WMC session as there are times when WMC may not get used each day making scheduling difficult