SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-29-2011, 09:49 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Read Metadata from Recording

I'm trying to scrape data from thetvdb for my video conversion program. The problem I'm having is that the show title from the filename has no spaces. Putting that in as a search sends back no results. I'd like to keep this as generic as possible but I can't think of another way to get the title with spaces.

I'm trying to figure out how to read the end of a recording to retrieve the title. I could get the other data I want but I've noticed the season and episode numbers that SageTV gets are not always the most accurate. At the very least it could give me another option if I fail to find anything from thetvdb.

I'm using vb.net right now.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #2  
Old 11-30-2011, 04:27 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by Taddeusz View Post
I'm trying to scrape data from thetvdb for my video conversion program. The problem I'm having is that the show title from the filename has no spaces. Putting that in as a search sends back no results. I'd like to keep this as generic as possible but I can't think of another way to get the title with spaces.

I'm trying to figure out how to read the end of a recording to retrieve the title. I could get the other data I want but I've noticed the season and episode numbers that SageTV gets are not always the most accurate. At the very least it could give me another option if I fail to find anything from thetvdb.

I'm using vb.net right now.
Welcome to my hell

There are 2 things you can do...
1. Scrape the AiringID from the filename and then use the airing id to lookup the mediafile. If you are running outside sagetv, then you can use the neilm's webserver or the sagex remote apis to convert an airing id to a mediafile's title.

2. Process the CamelCase file by adding a space after each captital letter (except for the first one).

Phoenix/BMT will primarily use the first case, but will also use the second case if the first case fails.

TVDB is very picky in their search criteria. Sometimes even being 1 character off will result in no hits.

Good luck
Reply With Quote
  #3  
Old 12-01-2011, 08:57 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Well, I figured out how to do it. My original issue was that I didn't know I could get the length of the file. So, I basically read the last 8Kb of the file and then split it to an array using ";" as the delimiter and then search through that array and split each one using "=" as the delimiter searching for "Title" as the first element in the array.

I then decided that I should grab EpisodeName if ExternalID starts with "EP".

Assuming the metadata is there, now that I can pull the full title and episode name I can query thetvdb for the title. Now I just have to figure out parsing XML with vb.net.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #4  
Old 12-02-2011, 04:57 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Great news! I figured out how to parse XML. I have all the data I need being captured from thetvdb including the poster. Now I just have to implement atomicparsley to write the metadata to the video file and I'll be golden!
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
STV Import: Read & Write Metadata files for Default STV 5/6 (v2.2.9 18/Feb./2010) JREkiwi SageTV Customizations 251 10-09-2019 11:11 AM
Plugin: Read, Write and Edit Metadata JREkiwi SageTV v7 Customizations 16 10-17-2011 12:15 PM
Read Only Recording Directory? zoundz SageTV Software 3 10-02-2008 11:03 AM
Easier to read recording schedule/guide... Hercules SageTV Software 0 05-13-2004 06:53 AM
forum posts not marked read when read? xlr8shun The SageTV Community 2 05-04-2004 01:49 AM


All times are GMT -6. The time now is 01:32 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.