demonrik / hdhr2plex

HDHomeRun DVR to Plex Scripts
The Unlicense
14 stars 6 forks source link

Error #2

Closed phathak closed 8 years ago

phathak commented 8 years ago

Hi!

This script looks amazing and does everything I need! I installed hdhr2plex and the tvdb api but I'm getting an error and I'm not sure how to resolve it.

I'll be happy to help debug if you need more info.

Thanks!

htmac:hdhr2plex htmac$ python fix_filenames.py --config my.conf 
 found  skip_shows
 found section  skip_shows
Setting up Skip Shows:  []
Post Processing Script:  /Users/htmac/hdhr2plex/post_proc.sh
Days Until Delete:  60
Rename Files Enabled:  True
Processing Plex files from:  /Volumes/My_Passport/Recordings/
Link Plex file to DVR (Assumes move to Plex):  False
Days Until Archive:  14
Extract and Save MetaData (Assumes move to Plex):  True
Processing DVR files from:  /Volumes/My_Passport/HDHomeRun/
Rename Directory to match TVDB show name:  True
Link DVR file to Plex:  False
Force Updates Enabled:  False
Live Delay:  5
Setting up Force Shows:  []
Log Level is set to:  debug
Logging to:  /Users/htmac/hdhr2plex/logs
Traceback (most recent call last):
  File "fix_filenames.py", line 57, in <module>
    md = pathTools.extract_metadata(metaData)
  File "/Users/htmac/hdhr2plex/hdhr_path.py", line 104, in extract_metadata
    return {'show':show, 'tvdbname':'', 'season':self.get_season_from_epnumber(epNumber), 'epnum':epNumber, 'eptitle':epTitle}
  File "/Users/htmac/hdhr2plex/hdhr_path.py", line 69, in get_season_from_epnumber
    if len(re.findall('S\d{2}E\d{2}',epNumber)) > 0:
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 181, in findall
    return _compile(pattern, flags).findall(string)
TypeError: expected string or buffer
demonrik commented 8 years ago

Can you attach the log? Something is up with the epnumber being passed

phathak commented 8 years ago

Sure.

Bruno-Pierre Jobin

On Jul 1, 2016, at 10:46 PM, Rik Dunphy notifications@github.com wrote:

Can you attach the log? Something is up with the epnumber being passed

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

phathak commented 8 years ago
INFO:root:------------------------------------------------------------
INFO:root:-                  HDHR2PLEX - archive2plex                -
INFO:root:-                   2016-07-01 17:10:28                    -
INFO:root:------------------------------------------------------------
DEBUG:root:Skip Shows ['"Masterpiece Classic"', '"The Tonight Show with Jimmy Fallon"', '"Masterpiece"', '"Masterchef"']
INFO:root:Checking Show Brigade Animo is not Movie or Sporting Event
INFO:root:Checking Show Diego is not Movie or Sporting Event
INFO:root:Checking Show Dora l'exploratrice is not Movie or Sporting Event
INFO:root:Checking Show Infoman is not Movie or Sporting Event
INFO:root:Checking Show La Pat'patrouille is not Movie or Sporting Event
INFO:root:Checking Show Movies is not Movie or Sporting Event
WARNING:root:*** Movie or Sporting Event found - Skipping ***
INFO:root:Checking Show T'choupi à l'école is not Movie or Sporting Event
INFO:root:Checking Show Toupie et Binou is not Movie or Sporting Event
INFO:root:Checking Show Wilfey, le petit ourson is not Movie or Sporting Event
INFO:root:-----------------------------------------------
INFO:root:Parsing: /Volumes/My_Passport/HDHomeRun/Brigade Animo/Brigade Animo 20130105 [20160521-1300].mpg
DEBUG:root:/Volumes/My_Passport/HDHomeRun/Brigade Animo/Brigade Animo 20130105 [20160521-1300].mpg was modified 2016-05-21 09:30:30 time is now: 2016-07-01 21:10:28.866478 difference is 3584398 seconds
DEBUG:root:Category|series
DEBUG:root:ChannelAffiliate|RADIOCAN
DEBUG:root:ChannelName|CBLFT
DEBUG:root:ChannelNumber|2.1
DEBUG:root:DisplayGroupID|31617785
DEBUG:root:DisplayGroupTitle|Brigade Animo
DEBUG:root:EndTime|1463837400
DEBUG:root:FirstAiring|1
DEBUG:root:ImageURL|http://my.hdhomerun.com/fyimediaservices/v_3_3_6_1/Program.svc/96/1617785/Primary
DEBUG:root:OriginalAirdate|1357344000
DEBUG:root:ProgramID|31617785
DEBUG:root:RecordEndTime|1463837430
DEBUG:root:RecordStartTime|1463835570
DEBUG:root:SeriesID|31617785
DEBUG:root:StartTime|1463835600
DEBUG:root:Synopsis|Dans la clinique du Dr Sébastien Kfoury, avec l’aide de ses deux jeunes assistants, Aurélia et Vincent, veillent sur la bonne santé des animaux, tout en répondant aux plusieurs questions pressantes venant des jeunes sur leurs animaux de compagnie.
DEBUG:root:Title|Brigade Animo
DEBUG:root:searching for [Brigade Animo] [1357344000]
INFO:root:Finding Episode/Season details by showname and airdate
DEBUG:root:Connecting to theTVdb.com
DEBUG:root:Finding the shows with the name Brigade Animo
DEBUG:tvdb_api:Searching for show Brigade%20Animo
DEBUG:tvdb_api:Retrieving URL http://thetvdb.com/api/GetSeries.php?seriesname=Brigade%20Animo&language=en
DEBUG:root:Found 0 Candidates shows to check...
DEBUG:root:No candidates found - setting it to blanks
DEBUG:root:Got nothing from thetvdb, so going to have to fall back to whatever was provided by SD
INFO:root:------------------------------------------------------------
INFO:root:-                  HDHR2PLEX - archive2plex                -
INFO:root:-                   2016-07-01 17:13:05                    -
INFO:root:------------------------------------------------------------
DEBUG:root:Skip Shows ['"Masterpiece Classic"', '"The Tonight Show with Jimmy Fallon"', '"Masterpiece"', '"Masterchef"']
INFO:root:Checking Show Brigade Animo is not Movie or Sporting Event
INFO:root:Checking Show Diego is not Movie or Sporting Event
INFO:root:Checking Show Dora l'exploratrice is not Movie or Sporting Event
INFO:root:Checking Show Infoman is not Movie or Sporting Event
INFO:root:Checking Show La Pat'patrouille is not Movie or Sporting Event
INFO:root:Checking Show Movies is not Movie or Sporting Event
WARNING:root:*** Movie or Sporting Event found - Skipping ***
INFO:root:Checking Show T'choupi à l'école is not Movie or Sporting Event
INFO:root:Checking Show Toupie et Binou is not Movie or Sporting Event
INFO:root:Checking Show Wilfey, le petit ourson is not Movie or Sporting Event
INFO:root:-----------------------------------------------
INFO:root:Parsing: /Volumes/My_Passport/HDHomeRun/Brigade Animo/Brigade Animo 20130105 [20160521-1300].mpg
DEBUG:root:/Volumes/My_Passport/HDHomeRun/Brigade Animo/Brigade Animo 20130105 [20160521-1300].mpg was modified 2016-05-21 09:30:30 time is now: 2016-07-01 21:13:05.979345 difference is 3584555 seconds
DEBUG:root:Category|series
DEBUG:root:ChannelAffiliate|RADIOCAN
DEBUG:root:ChannelName|CBLFT
DEBUG:root:ChannelNumber|2.1
DEBUG:root:DisplayGroupID|31617785
DEBUG:root:DisplayGroupTitle|Brigade Animo
DEBUG:root:EndTime|1463837400
DEBUG:root:FirstAiring|1
DEBUG:root:ImageURL|http://my.hdhomerun.com/fyimediaservices/v_3_3_6_1/Program.svc/96/1617785/Primary
DEBUG:root:OriginalAirdate|1357344000
DEBUG:root:ProgramID|31617785
DEBUG:root:RecordEndTime|1463837430
DEBUG:root:RecordStartTime|1463835570
DEBUG:root:SeriesID|31617785
DEBUG:root:StartTime|1463835600
DEBUG:root:Synopsis|Dans la clinique du Dr Sébastien Kfoury, avec l’aide de ses deux jeunes assistants, Aurélia et Vincent, veillent sur la bonne santé des animaux, tout en répondant aux plusieurs questions pressantes venant des jeunes sur leurs animaux de compagnie.
DEBUG:root:Title|Brigade Animo
DEBUG:root:searching for [Brigade Animo] [1357344000]
INFO:root:Finding Episode/Season details by showname and airdate
DEBUG:root:Connecting to theTVdb.com
DEBUG:root:Finding the shows with the name Brigade Animo
DEBUG:tvdb_api:Searching for show Brigade%20Animo
DEBUG:tvdb_api:Retrieving URL http://thetvdb.com/api/GetSeries.php?seriesname=Brigade%20Animo&language=en
DEBUG:tvdb_api:URL http://thetvdb.com/api/GetSeries.php?seriesname=Brigade%20Animo&language=en was cached in /var/folders/wp/n83n4hlj1332t7zdmhh6z3mh0000gn/T/tvdb_api-u501/a7f624b1b5e15fb99a7e8979772ee8cd.body
DEBUG:root:Found 0 Candidates shows to check...
DEBUG:root:No candidates found - setting it to blanks
DEBUG:root:Got nothing from thetvdb, so going to have to fall back to whatever was provided by SD
INFO:root:------------------------------------------------------------
INFO:root:-                  HDHR2PLEX - archive2plex                -
INFO:root:-                   2016-07-01 17:14:16                    -
INFO:root:------------------------------------------------------------
DEBUG:root:Skip Shows []
INFO:root:Checking Show Brigade Animo is not Movie or Sporting Event
INFO:root:Checking Show Diego is not Movie or Sporting Event
INFO:root:Checking Show Dora l'exploratrice is not Movie or Sporting Event
INFO:root:Checking Show Infoman is not Movie or Sporting Event
INFO:root:Checking Show La Pat'patrouille is not Movie or Sporting Event
INFO:root:Checking Show Movies is not Movie or Sporting Event
WARNING:root:*** Movie or Sporting Event found - Skipping ***
INFO:root:Checking Show T'choupi à l'école is not Movie or Sporting Event
INFO:root:Checking Show Toupie et Binou is not Movie or Sporting Event
INFO:root:Checking Show Wilfey, le petit ourson is not Movie or Sporting Event
INFO:root:-----------------------------------------------
INFO:root:Parsing: /Volumes/My_Passport/HDHomeRun/Brigade Animo/Brigade Animo 20130105 [20160521-1300].mpg
DEBUG:root:/Volumes/My_Passport/HDHomeRun/Brigade Animo/Brigade Animo 20130105 [20160521-1300].mpg was modified 2016-05-21 09:30:30 time is now: 2016-07-01 21:14:16.789024 difference is 3584626 seconds
DEBUG:root:Category|series
DEBUG:root:ChannelAffiliate|RADIOCAN
DEBUG:root:ChannelName|CBLFT
DEBUG:root:ChannelNumber|2.1
DEBUG:root:DisplayGroupID|31617785
DEBUG:root:DisplayGroupTitle|Brigade Animo
DEBUG:root:EndTime|1463837400
DEBUG:root:FirstAiring|1
DEBUG:root:ImageURL|http://my.hdhomerun.com/fyimediaservices/v_3_3_6_1/Program.svc/96/1617785/Primary
DEBUG:root:OriginalAirdate|1357344000
DEBUG:root:ProgramID|31617785
DEBUG:root:RecordEndTime|1463837430
DEBUG:root:RecordStartTime|1463835570
DEBUG:root:SeriesID|31617785
DEBUG:root:StartTime|1463835600
DEBUG:root:Synopsis|Dans la clinique du Dr Sébastien Kfoury, avec l’aide de ses deux jeunes assistants, Aurélia et Vincent, veillent sur la bonne santé des animaux, tout en répondant aux plusieurs questions pressantes venant des jeunes sur leurs animaux de compagnie.
DEBUG:root:Title|Brigade Animo
DEBUG:root:searching for [Brigade Animo] [1357344000]
INFO:root:Finding Episode/Season details by showname and airdate
DEBUG:root:Connecting to theTVdb.com
DEBUG:root:Finding the shows with the name Brigade Animo
DEBUG:tvdb_api:Searching for show Brigade%20Animo
DEBUG:tvdb_api:Retrieving URL http://thetvdb.com/api/GetSeries.php?seriesname=Brigade%20Animo&language=en
DEBUG:tvdb_api:URL http://thetvdb.com/api/GetSeries.php?seriesname=Brigade%20Animo&language=en was cached in /var/folders/wp/n83n4hlj1332t7zdmhh6z3mh0000gn/T/tvdb_api-u501/a7f624b1b5e15fb99a7e8979772ee8cd.body
DEBUG:root:Found 0 Candidates shows to check...
DEBUG:root:No candidates found - setting it to blanks
DEBUG:root:Got nothing from thetvdb, so going to have to fall back to whatever was provided by SD
INFO:root:------------------------------------------------------------
INFO:root:-                  HDHR TS MetaData Tool                   -
INFO:root:-                   2016-07-01 17:15:38                    -
INFO:root:------------------------------------------------------------
DEBUG:root:Skip Shows []
INFO:root:Checking Show Brigade Animo is not Movie or Sporting Event
INFO:root:Checking Show Diego is not Movie or Sporting Event
INFO:root:Checking Show Dora l'exploratrice is not Movie or Sporting Event
INFO:root:Checking Show Infoman is not Movie or Sporting Event
INFO:root:Checking Show La Pat'patrouille is not Movie or Sporting Event
INFO:root:Checking Show Movies is not Movie or Sporting Event
WARNING:root:*** Movie or Sporting Event found - Skipping ***
INFO:root:Checking Show T'choupi à l'école is not Movie or Sporting Event
INFO:root:Checking Show Toupie et Binou is not Movie or Sporting Event
INFO:root:Checking Show Wilfey, le petit ourson is not Movie or Sporting Event
INFO:root:-----------------------------------------------
INFO:root:Parsing: /Volumes/My_Passport/HDHomeRun/Brigade Animo/Brigade Animo 20130105 [20160521-1300].mpg
DEBUG:root:Category|series
DEBUG:root:ChannelAffiliate|RADIOCAN
DEBUG:root:ChannelName|CBLFT
DEBUG:root:ChannelNumber|2.1
DEBUG:root:DisplayGroupID|31617785
DEBUG:root:DisplayGroupTitle|Brigade Animo
DEBUG:root:EndTime|1463837400
DEBUG:root:FirstAiring|1
DEBUG:root:ImageURL|http://my.hdhomerun.com/fyimediaservices/v_3_3_6_1/Program.svc/96/1617785/Primary
DEBUG:root:OriginalAirdate|1357344000
DEBUG:root:ProgramID|31617785
DEBUG:root:RecordEndTime|1463837430
DEBUG:root:RecordStartTime|1463835570
DEBUG:root:SeriesID|31617785
DEBUG:root:StartTime|1463835600
DEBUG:root:Synopsis|Dans la clinique du Dr Sébastien Kfoury, avec l’aide de ses deux jeunes assistants, Aurélia et Vincent, veillent sur la bonne santé des animaux, tout en répondant aux plusieurs questions pressantes venant des jeunes sur leurs animaux de compagnie.
DEBUG:root:Title|Brigade Animo
DEBUG:root:searching for [Brigade Animo] [1357344000]
INFO:root:Finding Episode/Season details by showname and airdate
DEBUG:root:Connecting to theTVdb.com
DEBUG:root:Finding the shows with the name Brigade Animo
DEBUG:tvdb_api:Searching for show Brigade%20Animo
DEBUG:tvdb_api:Retrieving URL http://thetvdb.com/api/GetSeries.php?seriesname=Brigade%20Animo&language=en
DEBUG:tvdb_api:URL http://thetvdb.com/api/GetSeries.php?seriesname=Brigade%20Animo&language=en was cached in /var/folders/wp/n83n4hlj1332t7zdmhh6z3mh0000gn/T/tvdb_api-u501/a7f624b1b5e15fb99a7e8979772ee8cd.body
DEBUG:root:Found 0 Candidates shows to check...
DEBUG:root:No candidates found - setting it to blanks
DEBUG:root:Got nothing from thetvdb, so going to have to fall back to whatever was provided by SD
phathak commented 8 years ago

It's stuck on the first show "Brigade Animo". I think it can't find it because it's a french tv show and it's looking for an english match. Would be usefull to have a setting in conf that asks for shows language. Mine are all in french. Or maybe specify the show's TVDB ID manually in a file in the show's folder.

demonrik commented 8 years ago

Well.. It is a bug.. Still shouldnt bomb out.. Will fix that later today. Also, good point on language. Will look in to it and see what I can do.

phathak commented 8 years ago

Awesome. Thanks.

Bruno-Pierre Jobin

On Jul 2, 2016, at 10:03 AM, Rik Dunphy notifications@github.com wrote:

Well.. It is a bug.. Still shouldnt bomb out.. Will fix that later today. Also, good point on language. Will look in to it and see what I can do.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

demonrik commented 8 years ago

I need your help to test. I've fixed the bug you have found.. AND I've added thetvdb languages :) To enable - check out the new version of my.conf You create a section for the languages you want to search and then add to the main section under the languages key.

Please try it out and let me know. If it works for you I will announce on the hdhr forums

phathak commented 8 years ago

I've tested it a bit. But I'll test it further more tomorrow. So far I'm still getting errors.

I'm not sure if the code formatting will work. Doing it on my phone.

NFO:root:------------------------------------------------------------
INFO:root:-                  HDHR TS MetaData Tool                   -
INFO:root:-                   2016-07-02 17:26:36                    -
INFO:root:------------------------------------------------------------
DEBUG:root:Skip Shows []
DEBUG:root:Languages ['fr']
INFO:root:Checking Show Go Diego Go is not Movie or Sporting Event
INFO:root:Checking Show Plex is not Movie or Sporting Event
INFO:root:-----------------------------------------------
INFO:root:Parsing: /Volumes/My_Passport/Recordings/Go Diego Go/Go Diego Go 20050906 [20160604-1231].mpg
DEBUG:root:Category|series
DEBUG:root:ChannelAffiliate|TELEQUEBEC
DEBUG:root:ChannelImageURL|http://my.hdhomerun.com/fyimediaservices/v_3_3_6_1/Station.svc/2/28711/Logo/120x120
DEBUG:root:ChannelName|CIVM
DEBUG:root:ChannelNumber|17.1
DEBUG:root:DisplayGroupID|30296065
DEBUG:root:DisplayGroupTitle|Diego
DEBUG:root:EndTime|1465044960
DEBUG:root:ImageURL|http://my.hdhomerun.com/fyimediaservices/v_3_3_6_1/Program.svc/96/296065/Primary
DEBUG:root:OriginalAirdate|1125964800
DEBUG:root:ProgramID|30296065
DEBUG:root:RecordEndTime|1465044990
DEBUG:root:RecordStartTime|1465043430
DEBUG:root:SeriesID|30296065
DEBUG:root:StartTime|1465043460
DEBUG:root:Synopsis|Diego Marquez, un gamin de 8 ans, à des aventures pleines d'actions, prend la tâche pour élever des missions de sauvetage d’animaux, tout en encourageant le public à apprendre l'espagnol et l’anglais sur chaque étape du voyage magique.
DEBUG:root:Title|Diego
DEBUG:root:searching for [Diego] [1125964800]
INFO:root:Finding Episode/Season details by showname and airdate
DEBUG:root:Connecting to theTVdb.com with languages: fr
DEBUG:root:Finding the shows with the name Diego
DEBUG:tvdb_api:Searching for show Diego
DEBUG:tvdb_api:Retrieving URL http://thetvdb.com/api/GetSeries.php?seriesname=Diego&language=fr
DEBUG:tvdb_api:Found series Diego & Ziggy
DEBUG:tvdb_api:Found series Flipping San Diego
DEBUG:tvdb_api:Found series Go, Diego, Go!
DEBUG:tvdb_api:Found series NTSF:SD:SUV::
DEBUG:root:Found 0 Candidates shows to check...
DEBUG:root:No candidates found - setting it to blanks
DEBUG:root:Got nothing from thetvdb, so going to have to fall back to whatever was provided by SD

Bruno-Pierre Jobin

On Jul 2, 2016, at 5:13 PM, Rik Dunphy notifications@github.com wrote:

I need your help to test. I've fixed the bug you have found.. AND I've added thetvdb languages :) To enable - check out the new version of my.conf You create a section for the languages you want to search and then add to the main section under the languages key.

Please try it out and let me know. If it works for you I will announce on the hdhr forums

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

demonrik commented 8 years ago

That is odd. The meta data is saying only 'Diego' for show name, but file name is correct with 'Go Diego Go' Which suggests that the record engine is doing some other lookup to get the correct title.

Looks like I need to add something to query the engine to check if there is missing data.

phathak commented 8 years ago

Let me know if I can help.

demonrik commented 8 years ago

Hi, Could use your help..

I have implemented a fairly simple set of classes to interact with the HDHR devices and engine. This should allow me to get additional info from the DVR system as well as meta data from the files.

BUT before I do, I just want to check it's getting the info I need. For now, I just want to see if I can match a seriesID from the recorded file back to the recordings list, then dump out what ever the recordings list is showing for the recordings of that series. My hope is that I can use this to match the seriesID & programID of the file to that in the recording list and from there get more options for theTVDB matching.

So, if you could download latest. There is a script called test_api.py You need to point this at a valid recorded file. It will simply look up the meta data in the file, attempt to connect to your DVR engine, and then match the series there. Ideally - that Go Diego Go episode would be nice to see if the recording list gives me better data to play with :)

Please capture the output and either paste here or link. TIA

phathak commented 8 years ago

Alright I'll try to do that tonight. If not tomorrow.

Bruno-Pierre Jobin

On Jul 5, 2016, at 2:10 PM, Rik Dunphy notifications@github.com wrote:

Hi, Could use your help..

I have implemented a fairly simple set of classes to interact with the HDHR devices and engine. This should allow me to get additional info from the DVR system as well as meta data from the files.

BUT before I do, I just want to check it's getting the info I need. For now, I just want to see if I can match a seriesID from the recorded file back to the recordings list, then dump out what ever the recordings list is showing for the recordings of that series. My hope is that I can use this to match the seriesID & programID of the file to that in the recording list and from there get more options for theTVDB matching.

So, if you could download latest. There is a script called test_api.py You need to point this at a valid recorded file. It will simply look up the meta data in the file, attempt to connect to your DVR engine, and then match the series there. Ideally - that Go Diego Go episode would be nice to see if the recording list gives me better data to play with :)

Please capture the output and either paste here or link. TIA

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

phathak commented 8 years ago

There you go. I've pointed it to a Diego episode. One thing that is weird : the HDHomerun names that show "Diego" while on TVDB it's "Go Diego Go". But when parsing with an untouched file created by the HDHR, it find it anyway...

After searching for "Diego" on tvdb, It finds several Diego but the french one is called "Go Diego Go" (ID : 79896. Might be the same pattern for several shows.

htmac:hdhr2plex htmac$ python test_api.py /Volumes/My_Passport/HDHomeRun/Diego/Diego\ 20050906\ \[20160612-1230\].mpg 
- HDHR Device Discover Dump Tool 2016-07-05 18:09:35-
INFO:root:Parsing /Volumes/My_Passport/HDHomeRun/Diego/Diego 20050906 [20160612-1230].mpg
INFO:root:Category|series
INFO:root:ChannelAffiliate|TELEQUEBEC
INFO:root:ChannelImageURL|http://my.hdhomerun.com/fyimediaservices/v_3_3_6_1/Station.svc/2/28711/Logo/120x120
INFO:root:ChannelName|CIVM
INFO:root:ChannelNumber|17.1
INFO:root:DisplayGroupID|30296065
INFO:root:DisplayGroupTitle|Diego
INFO:root:EndTime|1465736160
INFO:root:ImageURL|http://my.hdhomerun.com/fyimediaservices/v_3_3_6_1/Program.svc/96/296065/Primary
INFO:root:OriginalAirdate|1125964800
INFO:root:ProgramID|30296065
INFO:root:RecordEndTime|1465736190
INFO:root:RecordStartTime|1465734570
INFO:root:SeriesID|30296065
INFO:root:StartTime|1465734600
INFO:root:Synopsis|Diego Marquez, un gamin de 8 ans, à des aventures pleines d'actions, prend la tâche pour élever des missions de sauvetage d’animaux, tout en encourageant le public à apprendre l'espagnol et l’anglais sur chaque étape du voyage magique.
INFO:root:Title|Diego
DEBUG:root:found 1 HDHomerun devices
INFO:root:HDHR Device 1040FB4E is HTTP Capable
INFO:root:Getting Recordings for series specified: 30296065
INFO:root:----
INFO:root:----
INFO:root:----
INFO:root:Dumping all Recordings
- Complete -
phathak commented 8 years ago

That is odd. The meta data is saying only 'Diego' for show name, but file name is correct with 'Go Diego Go'

I'm sorry, for that example I renamed the file with the correct name from TVDB to see if it could help. In the last one tough, I picked a file coming out of the hdhr, untouched.

demonrik commented 8 years ago

I've pointed it to a Diego episode. One thing that is weird : the HDHomerun names that show "Diego" while on TVDB it's "Go Diego Go". But when parsing with an untouched file created by the HDHR, it find it anyway

I see that.. I might have to figure out something new

I'm sorry, for that example I renamed the file with the correct name from TVDB to see if it could help. In the last one tough, I picked a file coming out of the hdhr, untouched.

Ahh - that explains it.

But the run with the test_api.py didn't work. It didn't pull anything from the record engine?!?! Can you check if your record engine is appearing in my.hdhomerun.com?

phathak commented 8 years ago

The record engine appears in my.hdhomerun.com

screen shot 2016-07-06 at 7 17 04 pm

I went on with a different show. A kid show, again. The files are named like so

htmac:Recordings htmac$ ls -l Toupie\ et\ Binou/
total 17744528
-rw-r--r--  1 htmac  staff   837875204  6 Jul 13:43 Toupie et Binou [20160607-1154].mpg
-rw-r--r--  1 htmac  staff   975823588  6 Jul 13:45 Toupie et Binou [20160607-1223].mpg
-rw-r--r--  1 htmac  staff   839887368  6 Jul 13:46 Toupie et Binou [20160608-1154].mpg
-rw-r--r--  1 htmac  staff   980263772  6 Jul 13:47 Toupie et Binou [20160608-1223].mpg
-rw-r--r--  1 htmac  staff   837411972  6 Jul 13:48 Toupie et Binou [20160609-1153].mpg
-rw-r--r--  1 htmac  staff   982795756  6 Jul 13:49 Toupie et Binou [20160609-1222].mpg
-rw-r--r--  1 htmac  staff   837426448  6 Jul 13:50 Toupie et Binou [20160610-1154].mpg
-rw-r--r--  1 htmac  staff   972317764  6 Jul 13:51 Toupie et Binou [20160610-1223].mpg
-rw-------  1 htmac  staff  1821376512  6 Jul 13:53 Toupie et Binou [20160611-1059].mpg

When I run fix_filename.py I get this:

htmac:hdhr2plex htmac$ python fix_filenames.py --config my.conf 
Setting up Skip Shows:  []
Post Processing Script:  /Users/htmac/hdhr2plex/post_proc.sh
Days Until Delete:  60
Rename Files Enabled:  True
Processing Plex files from:  /Volumes/My_Passport/Recordings/Plex/
Setting up theTVDB laguanges:  ['fr', 'en']
Link Plex file to DVR (Assumes move to Plex):  False
Days Until Archive:  14
Extract and Save MetaData (Assumes move to Plex):  True
Processing DVR files from:  /Volumes/My_Passport/Recordings/
Rename Directory to match TVDB show name:  True
Link DVR file to Plex:  False
Force Updates Enabled:  False
Live Delay:  5
Setting up Force Shows:  []
Log Level is set to:  debug
Logging to:  /Users/htmac/hdhr2plex/logs
Traceback (most recent call last):
  File "fix_filenames.py", line 59, in <module>
    md = pathTools.extract_metadata(metaData)
  File "/Users/htmac/hdhr2plex/hdhr_path.py", line 111, in extract_metadata
    tvdbEpData = db.getTVDBInfo(show,epAirDate,epTitle,epNumber)
  File "/Users/htmac/hdhr2plex/hdhr_thetvdb.py", line 121, in getTVDBInfo
    logging.debug('searching for [' + showname + '] [' + epAirdate + ']')
TypeError: cannot concatenate 'str' and 'NoneType' objects

And the log :

INFO:root:------------------------------------------------------------
INFO:root:-                  HDHR TS MetaData Tool                   -
INFO:root:-                   2016-07-06 19:13:44                    -
INFO:root:------------------------------------------------------------
DEBUG:root:Skip Shows []
DEBUG:root:Languages ['fr', 'en']
INFO:root:Checking Show Plex is not Movie or Sporting Event
INFO:root:Checking Show Toupie et Binou is not Movie or Sporting Event
INFO:root:-----------------------------------------------
INFO:root:Parsing: /Volumes/My_Passport/Recordings/Toupie et Binou/Toupie et Binou [20160607-1154].mpg
INFO:root:Category|series
INFO:root:ChannelAffiliate|TELEQUEBEC
INFO:root:ChannelImageURL|http://my.hdhomerun.com/fyimediaservices/v_3_3_6_1/Station.svc/2/28711/Logo/120x120
INFO:root:ChannelName|CIVM
INFO:root:ChannelNumber|17.1
INFO:root:DisplayGroupID|30564748
INFO:root:DisplayGroupTitle|Toupie et Binou
INFO:root:EndTime|1465300740
INFO:root:ImageURL|http://my.hdhomerun.com/fyimediaservices/v_3_3_6_1/Program.svc/96/564748/Primary
INFO:root:ProgramID|30564748
INFO:root:RecordEndTime|1465300770
INFO:root:RecordStartTime|1465300410
INFO:root:SeriesID|30564748
INFO:root:StartTime|1465300440
INFO:root:Synopsis|Toopy, une souris optimiste et son ami Binoo, un chat s'amusent ensembles en explorant le monde autour d'eux; l'émission enseigne l'importance de l'amitié.
INFO:root:Title|Toupie et Binou

The test_api.py returns :

htmac:hdhr2plex htmac$ python test_api.py /Volumes/My_Passport/Recordings/Toupie\ et\ Binou/Toupie\ et\ Binou\ \[20160607-1154\].mpg 
- HDHR Device Discover Dump Tool 2016-07-06 19:21:47-
INFO:root:Parsing /Volumes/My_Passport/Recordings/Toupie et Binou/Toupie et Binou [20160607-1154].mpg
INFO:root:Category|series
INFO:root:ChannelAffiliate|TELEQUEBEC
INFO:root:ChannelImageURL|http://my.hdhomerun.com/fyimediaservices/v_3_3_6_1/Station.svc/2/28711/Logo/120x120
INFO:root:ChannelName|CIVM
INFO:root:ChannelNumber|17.1
INFO:root:DisplayGroupID|30564748
INFO:root:DisplayGroupTitle|Toupie et Binou
INFO:root:EndTime|1465300740
INFO:root:ImageURL|http://my.hdhomerun.com/fyimediaservices/v_3_3_6_1/Program.svc/96/564748/Primary
INFO:root:ProgramID|30564748
INFO:root:RecordEndTime|1465300770
INFO:root:RecordStartTime|1465300410
INFO:root:SeriesID|30564748
INFO:root:StartTime|1465300440
INFO:root:Synopsis|Toopy, une souris optimiste et son ami Binoo, un chat s'amusent ensembles en explorant le monde autour d'eux; l'émission enseigne l'importance de l'amitié.
INFO:root:Title|Toupie et Binou
DEBUG:root:found 1 HDHomerun devices
INFO:root:HDHR Device 1040FB4E is HTTP Capable
INFO:root:Getting Recordings for series specified: 30564748
INFO:root:----
INFO:root:----
INFO:root:----
INFO:root:Dumping all Recordings
- Complete -
demonrik commented 8 years ago

ok - the record engine isn't appearing in your my.hdhomerun.com (from the image you provided) Only your Connect. are you running latest record engine?

The reason I asked was I see this at the bottom of test_api.py output INFO:root:HDHR Device 1040FB4E is HTTP Capable INFO:root:Getting Recordings for series specified: 30564748 INFO:root:---- INFO:root:---- INFO:root:---- It should have dumped what the record engine is finding. But since there is nothing there, it's indicating that the Record Engine isn't responding. I'm still curious to make sure on some of these recordings if there is additional metadata I can extract or not.. Your first Diego example made me think there was - but now that you've stated you changed it I'm beginning to think there isn't, but would like to confirm one way or the other

Your error in the 'Toupie et Binou' example is straight forward enough, although it doesn't look like the log is complete? Traceback (most recent call last): File "fix_filenames.py", line 59, in <module> md = pathTools.extract_metadata(metaData) File "/Users/htmac/hdhr2plex/hdhr_path.py", line 111, in extract_metadata tvdbEpData = db.getTVDBInfo(show,epAirDate,epTitle,epNumber) File "/Users/htmac/hdhr2plex/hdhr_thetvdb.py", line 121, in getTVDBInfo logging.debug('searching for [' + showname + '] [' + epAirdate + ']') TypeError: cannot concatenate 'str' and 'NoneType' objects It's that final bit - the cannot concatenate. It would seem either showname or epAirdate is not being set. However in the meta data I can see there is no 'OriginalAirdate' My search at this time looks based on OriginalAirdate since theTVDB doesn't maintain a list of everytime the show is played..

So - you have found another bug :) I think when no OriginalAirdate is set I need to search based on different set of metadata. I'll add something to do a sanity check on metadata and if I know for fact I can't get a match (I must have one of episode name, episode number, or Original Air Date) I will flag in the log and skip.

However, the problem with this show 'Toupie et Binou' is that there is no other data I can reliably search on! There is no episode number or episode name to play with and the only thing to differentiate is the Synopsis. If you look at this show on thetvDB there is little to no Original Air dates, or Synopsis.. so this is always going to fail to match.

Back to the original 'Diego' I changed something a long time back to not traverse every response from thetvDB that didn't match the original ask or original ask with a year, or a region, i.e. 'Diego' or 'Diego (2013)' or 'Diego (CA)' But in this case it's a problem because the DVR guide is actually dropping letters in the title, only calling it 'Diego' and not 'Go Diego Go'

To resolve (assuming the record engine doesn't have better data) I have 2 options.

  1. I can provide an option to override the search restrictions allowing you to search every show returned. The issue here could be it takes a very long time to find a match, or resolve that there isn't one.
  2. Provide a mechanism to allow you to provide name mapping, i.e. 'Diego' always = 'Go Diego Go'

At this point my preference would be to go for option 1.

phathak commented 8 years ago

Ok so I reinstalled HDHomeRun app on my mac and now I can see the record engine. In fact, I also installed it on my laptop and I see two of them. But whenever I click on either of them, I get "404 not found" error.

If you wish to do some testing on the Diego file I can dump it on my server and provide a link.

There is no episode number or episode name to play with and the only thing to differentiate is the Synopsis.

Would comparing synopses be a solution? The thing with this show is that it's a 5 minutes show between two 25 minutes shows. So I'm not surprise there's not a lot of info available. At this point, for these kind of show, I think I'll just make a script that rename them with a S##E## pattern starting from 01. It's not like my kid will care anyways.

To resolve (assuming the record engine doesn't have better data) I have 2 options.

  1. I can provide an option to override the search restrictions allowing you to search every show returned. The issue here could be it takes a very long time to find a match, or resolve that there isn't one.
  2. Provide a mechanism to allow you to provide name mapping, i.e. 'Diego' always = 'Go Diego Go'

At this point my preference would be to go for option 1.

Or 3. If a show is not found, ask the user provide a txt file with the correct name of the show and the TVDB ID in the show's folder. Then there could be a script that renames the files using a regex pattern in order to keep the recorded date and hour in the file name. That way your program knows where to search because the user provides the ID and the right name. I don't think it would be too much of a hassle considering that once a season is started, you're good for another 4-5 month before new shows starts to appear.