Project

General

Profile

Import of TV recordings from MediaPortal to TVH ?

Added by Friedhofs Blond over 4 years ago

Hi,
I have the following task: Import of TV recordings from MediaPortal (2)

TVH runs on a Synology NAS.

The TV recordings exist e.g. out:
ZDF Today folder
1x ZDF-Today_04062020.ts - recording
1x ZDF-Today_04062020.xml - EPG info for recording

I have about 3TB Recordings-Files on the hard drive.
Maybe I can use the old DB from Mediaportal.
Maybe the structure of the DB is similar.

many Greetings
Thanks for the answer ;)

here is a real example: Magnum P.I. - VOX HD - 2020-05-27 - 22_05.xml:

xml.txt (1.96 KB) xml.txt
tva.PNG (19.9 KB) tva.PNG

Replies (5)

RE: Import of TV recordings from MediaPortal to TVH ? - Added by M A Ben Amara over 4 years ago

i dont think u can just import a database from MP to tvh, your start point would be may here

https://tvheadend.org/boards/5/topics/29697

what i did was writing me a script which scraped my existing records and then added them auto via curl into tvh, sample cmd here

curl --data 'conf={"start":"1589400385","stop":"1589403256","channelname":"Sky 1 HD","title":{"ger":"Condor"},"files":[{"filename":"/Media/TVRIPS/Condor/Season 01/Condor - S01E02 - Die Lösung aller Probleme.mkv"}],"episode":{"enum":"2","snum":"1"},"subtitle":{"ger":"Die Lösung aller Probleme"} }' http://user@[email protected]:9981/api/dvr/entry/create

depending now what informations u have and want (title, episode, ...) and u need to scrape the infos from your recorded files

the raw command looks like this

curl --data 'conf={\"start\":\"$starttime\",\"stop\":\"$endtime\",\"channelname\":\"$channame\",\"title\":{\"ger\":\"$title\"},\"files\":[{\"filename\":\"$tvhfinalpath\"}],\"episode\":{\"enum\":\"$episode\",\"snum\":\"$season\"},\"subtitle\":{\"ger\":\"$subtitle\"} }' "http://$tvhuser:$tvhpass@$tvhip:$tvhport/api/dvr/entry/create""

as u see there are some values to fetch before which u have as sample in your existing xml's or in your filename's.

to update existing records in tvh when files are moved (i use this after i cutted coms and remux to mkv), sample

curl -s "http://"$tvhuser":"$tvhpass"@"$tvhip":"$tvhport"/api/dvr/entry/filemoved" --data-urlencode "src=$tvhsourcepath" --data-urlencode "dst=$tvhfinalpath"

here u see u only would need 2 variables, /old/path/file.ts /new/path/file.mkv, just in case ... cause tvh doesnt recognize when a file gets moved (or renamed).

RE: Import of TV recordings from MediaPortal to TVH ? - Added by Friedhofs Blond over 4 years ago

Puh,
that sounds complicated.
will then probably install the pyhton package (3) on the DS.

Ich glaube das werde ich dich nochmal auf deutsch nerven müssen wenn es soweit ist. ;)

Grüße

RE: Import of TV recordings from MediaPortal to TVH ? - Added by M A Ben Amara over 4 years ago

give it a try ;) its not so complicated when u have a working process, check the pythons some wrote here ...

und wenn es passt, gerne ;)

RE: Import of TV recordings from MediaPortal to TVH ? - Added by Friedhofs Blond over 4 years ago

Hallo,
sorry jetzt wird es speziell - darum mal in deutsch.
Habe einen Ordner im Aufnahmeordner erstellt und die ts-Dateien umbenannt.
irgendwie passt da was noch nicht? :(

Siehe auch hier:
https://www.kodinerds.net/index.php/Thread/70385-Import-von-ts-Files-aus-Mediaportal-zu-TVheadend/

RE: Import of TV recordings from MediaPortal to TVH ? - Added by Friedhofs Blond about 4 years ago

Moin,
ich komme einfach nicht weiter.
Irgendwie kann der User über die API nichts ins Logfile schreiben.
Habe schon neuen User angelegt usw..

Kann jemand helfen??

    (1-5/5)