|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
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 |
#2
|
||||
|
||||
Quote:
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
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#3
|
|||
|
|||
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 |
#4
|
|||
|
|||
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 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
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 |