Hello Hiro and sorry for the delayed response. I am in the process of updating my system with a new hard drive and a clean install of tvheadend. I ran into 2 snags today and one is with your script. I am the only superuser of my system and I am stilling get the unauthorized error as follows:
me@me:/home/hts/tv/casino$ ./tvimport.sh casino.mkv
casino.mkv Logfile: Descfile:
Sending create command for "."
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>401 Unauthorized</TITLE>
</HEAD><BODY>
<H1>401 Unauthorized</H1>
<P STYLE="text-align: center; margin: 2em"><A HREF="/" STYLE="border: 1px solid; border-radius: 4px; padding: .6em">Default login</A></P><P STYLE="text-align: center; margin: 2em"><A HREF="/login" STYLE="border: 1px solid; border-radius: 4px; padding: .6em">New login</A></P></BODY></HTML>
The import.json file is being sent to the tmp file. This is the text of the file:
conf={
"enabled": true,
"start": 1587228326,
"stop": 1587239026,
"channelname": "local file",
"duration" : 10700,
"title": {
"eng": "."
},
"subtitle": {
"eng": "filename: casino.mkv"
},
"description": {
"eng": ""
},
"comment": "added by tvimport.sh",
"files": [
{
"filename": "casino.mkv"
}
I assume that this is the creation for the log that is needed for the file to be played but it will not import into tvheadend. Something is blocking my access and I cannot figure out why. I changed the superuser password and user name to admin as you have within your posted sample. Changing the login information did not solve my problem and I still getting the 401 unauthorized error.
Just for fun, I tried just using the address: http://admin:admin@localhost:9981 without the script and I could log in fine.
Any Ideas?
Thanks Lisa