Search the Community
Showing results for tags 'Curl'.
-
My file system that isn't compatible with real time monitoring. I upload movies and series several times per day and I don't want to do a full scan for the whole library every time I add a new movie. The following curl command curl -d '{"Updates":[{"path":"/path/my-movies/movie (2020)/movie (2020).mkv","updateType":"Created"}]}' -H "Content-Type: application/json" -X POST http://localhost:8096/emby/Library/Media/Updated?api_key=my-apI-key When I ran this command I can see on Emby debug logs a message that says: New file refresher created for "/path/my-movies/movie (2020)/movie (2020).mkv" However the file doesn't seem to be scanned. Am I doing something wrong? Isn't it possible to force the scan of one individual file rather than the whole library? thanks
- 11 replies
-
- autoscan
- command line
-
(and 2 more)
Tagged with:
-
What this solves: Adding Channel Schedules in bulk to NextPVR User Friendly Channel Names Cleans up Channel Names Prune Channels by Language Download Channel Icons/Logos Requirements: AutoIt Curl (SSL support) FSUM NextPVR Schedules Direct (Account) References: ISO 639-1 Codes Notes: I wrote this against two HDHomeRun Primes (Comcast Cable), so not sure how it will fair with OTA & Satellite. One might also be able to alter this script to work with other services, but since I don't have access to others, I can't add support for them. How: This is made up of two scripts, one will download & prep 1 or more JSON Channel lineups that you created on your Schedules Direct Account. The other will import information from one of the Lineups, into the data scrapped from a fresh Channel listing XML made by NextPVR, and output a new XML along with downloading all the Icon's\Logo's that Schedules Direct has to offer. Instructions: Install AutoIt and set it to execute scripts when double clicked. Now Right Click on desktop and select "New\Folder" from the context menu, and Rename it "NextPVR Stuff" Now download & extract Curl and FSUM into "NextPVR Stuff" Now in "NextPVR Stuff" Right Click on the background and select "New\AutoIt v3 Script" from the context menu, and Rename it "Schedules Direct LineUp's.au3" Now Right Click "Schedules Direct LineUp's.au3" & select "Edit Script" from the context menu. Now paste the following code into: Be sure to edit the values of $sUserName and $sUserPassword to match what is used for your Schedules Direct account. Now save the script & execute it by double clicking it and if all went well...then you should now see one or more txt files that are prefixed with "[LineUp]", these are the lineups you setup on your account. Okay at this point one needs to fire up NextPVR. Now with NextPVR open, Right Click on the background and select "Settings" from the context menu. With the Settings Dialog open, Click Devices on the ListView on the left side of the dialog. Select one of your Devices from the ListView on the right, it should be marked as Present & Enabled, (if it doesn't list any Channels, please Click the "Device Setup" Button, then perform a scan by Clicking the "Scan" button, then Click the "OK" button) with the device selected Click the "Export Channels" Button, when the Export Dialog comes up save the file to the location you have "NextPVR Stuff" which according to the instructions I've been giving should be on your Desktop. Once you saved off the file and are back to the Settings dialog, Click the Channels item in the ListView on the left side. With the Channels ListView now shown on the right, select one of the channels and Click the "Details" Button. When the "Channel Details" Dialog pops up, in the EPG Source Group control, select "Schedules Direct" from the Source comboBox...this should if I recall prompt you for your Schedules Direct account information...when it's done for the first time. After that set things to whatever...as it doesn't really matter...the main purpose is to have your Account info added to NextPVR's config...which I currently don't know the type of encryption used...so I can't automatically add it for you...via a script. Hence...doing this manually now. So Click all the "OK" buttons till you are back to the main NextPVR form...now close NextPVR...as we are done with it for now. Now in "NextPVR Stuff" Right Click on the background and select "New\AutoIt v3 Script" from the context menu, and Rename it "Merge Schedules Direct.au3" Now Right Click "Merge Schedules Direct.au3" & select "Edit Script" from the context menu. Now paste the following code into: You will now need to edit some of the variables, at the top of the script, to match what you have or want: $sArtPath this is where your logo's are for NextPVR to make use of them$sBuffer1 this is your Schedules Direct Lineup that you intend to use$sBuffer2 this is the xml with the list of channels detected by NextPVR$sLangsOnly leave this empty if you do not wish to prune any langs...if you do however wish to remove other langs, add all the langs you wish to keep, but split them with a comma$bRemoveParentheses this will remove anything in paren's...review your Schedules Direct file to help decide if you wish to prune these or not$bSplitOnDash this will remove the dash and anything on the right side of it, note that a space must be both before and after the dash, for a split to occure Now save the script & execute it by double clicking it and if all went well...then you should see a bunch of images in the path you set for $sArtPath, and a new file called "New.xml" that is ready to be imported into NextPVR. Alright time to fire up NextPVR once again. Now with NextPVR open, Right Click on the background and select "Settings" from the context menu. With the Settings Dialog open, Click Devices on the ListView on the left side of the dialog. Select one of your Devices from the ListView on the right, (it should be marked as Present & Enabled) now Click "Device Setup" Button, and wait for the new dialog to open, once open Click on the first channel in the ListView, then scroll down to the last and SHIFT + Click on it, then Click on the "Delete" Button followed by the "OK" Button. Once the dialog closes repeat this for every Device you intend to apply a new Channel List to. Select one of your Devices from the ListView on the right, now Click the "Import Channels" Button and navigate to the "NextPVR Stuff" folder, and select "New.xml", then Click the "Open" Button. Repeat this for every device this channel list applies to. Once done with that, Click the Channels item in the ListView on the left side. With the Channels ListView now shown on the right, Click the "Update EPG" Button, then wait till the update is complete, and Click the "OK" Button to close out the Settings dialog. Now when you select the "TV Guide" on the main NextPVR form...you should be greated with all your show info, pretty names...and hopefully a bunch of icons.
- 20 replies
-
- 2
-
- NextPVR
- Schedules Direct
- (and 5 more)
-
Hi, I've been having issues since upgrading (fresh install and restore using backup plugin) to 3.4.1.0. Basically what happens is emby-server will be running for hours without issue (sometimes only minutes), and then it just stops. Usually while in the middle of playback. The service doesn't stop, it just stops responding to https or http requests. I've verified this by running a curl command to look at the headers returned when this is happening. curl --silent --insecure --connect-timeout 5 --max-time 8 --head http://emby.local:8096 | grep "HTTP/1.[01] 302 Found" curl --silent --insecure --connect-timeout 5 --max-time 8 --head https://emby.local:8920 | grep "HTTP/1.[01] 302 Found" My setup is the following: Hypervisor: ESXi 6.5.0 Update 1 (Build 7967591) CPU: AMD Ryzen 7 1700 OS: Ubuntu 18.04 LTS vCPUs: 8 RAM: 2GB What I've done to combat this is I've create a cron script that runs every minute to check on the status of emby's http/https responses and restart the service accordingly: sleep 10s date=`date '+%F %H:%M:%S'` if [[ $(netstat -ntlp | grep LISTEN | grep EmbyServer | grep 8096) ]]; then if [[ $(curl --silent --insecure --connect-timeout 5 --max-time 8 --head http://emby.local:8096 | grep "HTTP/1.[01] 302 Found") ]]; then if [[ $(netstat -ntlp | grep LISTEN | grep EmbyServer | grep 8920) ]]; then sleep 1s if [[ $(curl --silent --insecure --connect-timeout 5 --max-time 8 --head https://emby.local:8920 | grep "HTTP/1.[01] 302 Found") ]]; then sleep 1s else echo "$date : emby-server is not responding to https requests... restarting service" /usr/sbin/service emby-server restart fi else echo "$date : emby-server is not listening https requests... restarting service" /usr/sbin/service emby-server restart fi else echo "$date : emby-server is not responding to http requests... restarting service" /usr/sbin/service emby-server restart fi else echo "$date : emby-server is not listening http requests... restarting service" /usr/sbin/service emby-server restart fi I set this script up yesterday and I've already had a few occurrences: 2018-05-16 21:57:11 : emby-server is not responding to http requests... restarting service 2018-05-16 21:59:11 : emby-server is not responding to http requests... restarting service 2018-05-17 09:52:11 : emby-server is not responding to https requests... restarting service I've attached my server logs, but I really don't see what the issue is. I will note that *sometimes* when https doesn't work, http will continue to work. And when you log in to the admin console, it shows remote connections as http instead of https. This is making me feel like this is a config issue. Suggestions? Thanks! emby-server_logs.7z
-
I am trying to programatically get the server Library to rescan. This used to work using a simple curl command couple months ago, but I understand that additional token-based security has been added, according to http://mediabrowser.tv/community/index.php?/topic/72-user-authentication/ I am trying to follow the instructions to authenticate as per the first step in https://github.com/MediaBrowser/MediaBrowser/wiki/Authentication but to no avail. I have tried a variety of curl commands, similar to this (note: I do not have a password set): curl -d 'Authorization=MediaBrowser UserId="0d2c22c2debe62c66cc552b00adbfad4", Client="iOS", Device="iPhone", DeviceId="8912f03b961d76e736637d5d6014a586406de64c", Version="1.0.0.0"' -d "username=Foo" --dump-header headers http://192.168.0.30:8096/mediabrowser/Users/AuthenticateByName but the error I receive is: HTTP/1.1 500 NullReferenceException Transfer-Encoding: chunked Content-Type: text/html Vary: Accept Server: Microsoft-HTTPAPI/2.0 X-UA-Compatible: IE=Edge X-Application-Error-Code: Object reference not set to an instance of an object. X-Powered-By: ServiceStack/4.00 Win32NT/.NET Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS Access-Control-Allow-Headers: Content-Type, Authorization, Range, X-MediaBrowser-Token Please help! I know that the username (and empty pass) step I've entered is successfully, because if I deliberately enter it incorrectly I get a difference error ("Invalid username or password entered").
- 5 replies
-
- auth
- authenticate
-
(and 3 more)
Tagged with: