mackworth / cTiVo

TiVo Show Downloads for MacOS
220 stars 36 forks source link

Remove partial instance of show description from metadata txt file and add season #31

Closed verticalscience closed 10 years ago

verticalscience commented 10 years ago

Meta data file contains a partial description of the trailing show. Include only the description of the show that appears in the filename. Eliminate the second instance of meta data that doesn't apply to this show.

mackworth commented 10 years ago

Sorry; not understanding. Can you give an example?

verticalscience commented 10 years ago

showingBits : 921603 time : 2014-03-20T04:00:00Z vActor : Taylor|Eliza vActor : Turco|Paige vActor : McDonell|Thomas vActor : Goree|Eli vActor : Avgeropoulos|Marie vActor : Morley|Bob vActor : Hu|Kelly vActor : Larkin|Christopher vActor : Bostick|Devon vActor : Washington|Isaiah vActor : Cusick|Henry Ian showingBits : 0 colorCode : 04 description : Ninety-seven years after the planet Earth was destroyed, generations of survivors are faced with dwindling resources. vDirector : Nalluri|Bharat episodeTitle : Pilot vExecProducer : Miller|Matthew vExecProducer : Rothenberg|Jason vExecProducer : Nalluri|Bharat vExecProducer : Morgenstein|Leslie vExecProducer : Girolamo|Gina vProgramGenre : vProgramGenre : isEpisode : true originalAirDate : 2014-03-19T00:00:00Z vSeriesGenre : vSeriesGenre : vSeriesGenre : vSeriesGenre : seriesTitle : The 100 title : The 100 vWriter : Rothenberg|Jason tvRating : 04 showingBits : 4131 time : 2014-03-20T05:00:00Z showingBits : 0 colorCode : 04 description : Micah Ohlman, Cher Calvin, Vera Jimenez, Derrin Horton. vProgramGenre : isEpisode : false originalAirDate : 2005-03-24T00:00:00Z vSeriesGenre : vSeriesGenre : seriesTitle : KTLA 5 News at 10 title : KTLA 5 News at 10 startTime : 2014-03-20T03:59:58Z stopTime : 2014-03-20T05:00:02Z seriesID: SH01740398 displayMajorNumber: 405 callsign: KTLADT

verticalscience commented 10 years ago

the info from the second instance of showingBits to the end of the file appears to be for the tv show that followed the recording of "The 100- Pilot"

verticalscience commented 10 years ago

The file appears to contain two show records that begin with “showingBits”. Near the end you’ll see showingBits for the show that followed the recording of “The 100- Pilot”. The second instance seems to describe the news show that came on after “The 100”.

Maybe its easiest to just truncate the file beginning with the second instance of showingBits. Just a guess.

Thanks

On May 23, 2014, at 8:50 PM, Hugh Mackworth notifications@github.com wrote:

Sorry; not understanding. Can you give an example?

— Reply to this email directly or view it on GitHub.

showingBits : 921603 time : 2014-03-20T04:00:00Z vActor : Taylor|Eliza vActor : Turco|Paige vActor : McDonell|Thomas vActor : Goree|Eli vActor : Avgeropoulos|Marie vActor : Morley|Bob vActor : Hu|Kelly vActor : Larkin|Christopher vActor : Bostick|Devon vActor : Washington|Isaiah vActor : Cusick|Henry Ian showingBits : 0 colorCode : 04 description : Ninety-seven years after the planet Earth was destroyed, generations of survivors are faced with dwindling resources. vDirector : Nalluri|Bharat episodeTitle : Pilot vExecProducer : Miller|Matthew vExecProducer : Rothenberg|Jason vExecProducer : Nalluri|Bharat vExecProducer : Morgenstein|Leslie vExecProducer : Girolamo|Gina vProgramGenre : vProgramGenre : isEpisode : true originalAirDate : 2014-03-19T00:00:00Z vSeriesGenre : vSeriesGenre : vSeriesGenre : vSeriesGenre : seriesTitle : The 100 title : The 100 vWriter : Rothenberg|Jason tvRating : 04 showingBits : 4131 time : 2014-03-20T05:00:00Z showingBits : 0 colorCode : 04 description : Micah Ohlman, Cher Calvin, Vera Jimenez, Derrin Horton. vProgramGenre : isEpisode : false originalAirDate : 2005-03-24T00:00:00Z vSeriesGenre : vSeriesGenre : seriesTitle : KTLA 5 News at 10 title : KTLA 5 News at 10 startTime : 2014-03-20T03:59:58Z stopTime : 2014-03-20T05:00:02Z seriesID: SH01740398 displayMajorNumber: 405 callsign: KTLADT

mackworth commented 10 years ago

Interesting. I take it this is happening to more than just this show. I'd like to see the XML that TiVo sent you for that show. Can you go through the following steps...

1) Find the "TiVo ID" for the The 100 Pilot. Just look in the upper window on the appropriate line. (If you're not showing the Tivo ID column, just right-click on the table title bar, and add that column. )

2) Use the Finder command "Go>Go To Folder..." and go to /tmp/ctivo_details

3) Lets say the TivoID is 12345, and your Tivo is named TivoName. Then look for the file named YourTivoName_12345_Details.xml and post the contents of that file.

thx

mackworth commented 10 years ago

The reason I'm interested in seeing that file is that I'm thinking this is a TiVo issue rather than a cTivo one. It might be related to the shows' apparently overlapping on the same channel (note the startTime of the News is before the time of The 100 pilot).

verticalscience commented 10 years ago

I converted the file a while ago but I'll start another transfer now and grab the xml file again before it’s deleted.

Re: the advanced option to use [Title] - S[Season]E[EpisodeNumber] [Title] — this works perfectly for Plex and XBMC.

On May 23, 2014, at 10:17 PM, Hugh Mackworth notifications@github.com wrote:

The reason I'm interested in seeing that file is that I'm thinking this is a TiVo issue rather than a cTivo one. It might be related to the shows' apparently overlapping on the same channel (note the startTime of the News is before the time of The 100 pilot).

— Reply to this email directly or view it on GitHub.

verticalscience commented 10 years ago

<?xml version="1.0" encoding="utf-8"?>PT1H2SPT1HTaylor|ElizaTurco|PaigeMcDonell|ThomasGoree|EliAvgeropoulos|MarieMorley|BobHu|KellyLarkin|ChristopherBostick|DevonWashington|IsaiahCusick|Henry IanCOLORNinety-seven years after the planet Earth was destroyed, generations of survivors are faced with dwindling resources. Copyright Tribune Media Services, Inc.Nalluri|BharatPilotMiller|MatthewRothenberg|JasonNalluri|BharatMorgenstein|LeslieGirolamo|Ginatrue2014-03-19T00:00:00ZtrueThe 100SERIESThe 100Rothenberg|JasonPG16141224PT1HCOLORMicah Ohlman, Cher Calvin, Vera Jimenez, Derrin Horton. Copyright Tribune Media Services, Inc.false2005-03-24T00:00:00ZtrueKTLA 5 News at 10SERIESKTLA 5 News at 10PT1HTaylor|ElizaTurco|PaigeMcDonell|ThomasGoree|EliAvgeropoulos|MarieMorley|BobHu|KellyLarkin|ChristopherBostick|DevonWashington|IsaiahCusick|Henry IanCOLORNinety-seven years after the planet Earth was destroyed, generations of survivors are faced with dwindling resources. Copyright Tribune Media Services, Inc.Nalluri|BharatPilotMiller|MatthewRothenberg|JasonNalluri|BharatMorgenstein|LeslieGirolamo|Ginatrue2014-03-19T00:00:00ZtrueThe 100SERIESThe 100Rothenberg|JasonPG161412242014-03-20T03:59:58Z2014-03-20T05:00:02ZEjQAAwABAjoBywxXAAAADwAAAAQAAAACAAAAAwAAAA==2014-03-22T04:00:00Z/TvBusMarshalledStruct:TvBusEnvelope

verticalscience commented 10 years ago

FYI — im a Unix/Linux guy so no problem navigating files systems from a shell. Posted the old xml file on github. Will check back tomorrow. Let me know if you need anything else.

mackworth commented 10 years ago

Ok, GitHub tried to parse that as Markdown, so you should add ``` before and after to prevent that. On the other hand, I was able to get it out by "editing" it. That's American Idol, so I'd need to have the matching txt file that shows the symptom in the .txt file.

mackworth commented 10 years ago

Tell me you edited that comment, please? Because I'm sure I saw American Idol, and now it's The 100. And yes, that shows that the weird info is coming from TiVo (the XML file is directly loaded from the Tivo, and then cTivo generates the .TXT file from there).

Here's a formatted version. Note you have two elements in the "vActualShowing" section; one for The 100 and one for the news program... I've never seen this before, are you getting other programs with similar duplicate entries?

<?xml version="1.0" encoding="utf-8"?>
<<XMLS HEADER REMOVED FOR READABILITY>>
    <recordedDuration>PT1H2S</recordedDuration>
    <vActualShowing>
        <element>
            <showingBits value="921603"/>
            <time>2014-03-20T04:00:00Z</time>
            <duration>PT1H</duration>
            <program>
                <vActor>
                    <element>Taylor|Eliza</element>
                    <element>Turco|Paige</element>
                    <element>McDonell|Thomas</element>
                    <element>Goree|Eli</element>
                    <element>Avgeropoulos|Marie</element>
                    <element>Morley|Bob</element>
                    <element>Hu|Kelly</element>
                    <element>Larkin|Christopher</element>
                    <element>Bostick|Devon</element>
                    <element>Washington|Isaiah</element>
                    <element>Cusick|Henry Ian</element>
                </vActor>
                <vAdvisory/>
                <showingBits value="0"/>
                <vChoreographer/>
                <colorCode value="4">COLOR</colorCode>
                <description>Ninety-seven years after the planet Earth was destroyed, generations of survivors are faced with dwindling resources. Copyright Tribune Media Services, Inc.</description>
                <vDirector>
                    <element>Nalluri|Bharat</element>
                </vDirector>
                <episodeTitle>Pilot</episodeTitle>
                <vExecProducer>
                    <element>Miller|Matthew</element>
                    <element>Rothenberg|Jason</element>
                    <element>Nalluri|Bharat</element>
                    <element>Morgenstein|Leslie</element>
                    <element>Girolamo|Gina</element>
                </vExecProducer>
                <vProgramGenre>
                    <element/>
                    <element/>
                </vProgramGenre>
                <vGuestStar/>
                <vHost/>
                <isEpisode>true</isEpisode>
                <originalAirDate>2014-03-19T00:00:00Z</originalAirDate>
                <vProducer/>
                <series>
                    <isEpisodic>true</isEpisodic>
                    <vSeriesGenre>
                        <element/>
                        <element/>
                        <element/>
                        <element/>
                    </vSeriesGenre>
                    <seriesTitle>The 100</seriesTitle>
                </series>
                <showType value="5">SERIES</showType>
                <title>The 100</title>
                <vWriter>
                    <element>Rothenberg|Jason</element>
                </vWriter>
            </program>
            <tvRating value="4">PG</tvRating>
            <RatingList>
                <objectName/>
                <vRatings>
                    <element>
                        <objectName/>
                        <vAdvisory>
                            <element>16</element>
                            <element>14</element>
                            <element>12</element>
                        </vAdvisory>
                        <InternalRatingSystemId>2</InternalRatingSystemId>
                        <InternalRatingValueId>4</InternalRatingValueId>
                    </element>
                </vRatings>
            </RatingList>
        </element>
        <element>
            <showingBits value="4131"/>
            <time>2014-03-20T05:00:00Z</time>
            <duration>PT1H</duration>
            <program>
                <vActor/>
                <vAdvisory/>
                <showingBits value="0"/>
                <vChoreographer/>
                <colorCode value="4">COLOR</colorCode>
                <description>Micah Ohlman, Cher Calvin, Vera Jimenez, Derrin Horton. Copyright Tribune Media Services, Inc.</description>
                <vDirector/>
                <vExecProducer/>
                <vProgramGenre>
                    <element/>
                </vProgramGenre>
                <vGuestStar/>
                <vHost/>
                <isEpisode>false</isEpisode>
                <originalAirDate>2005-03-24T00:00:00Z</originalAirDate>
                <vProducer/>
                <series>
                    <isEpisodic>true</isEpisodic>
                    <vSeriesGenre>
                        <element/>
                        <element/>
                    </vSeriesGenre>
                    <seriesTitle>KTLA 5 News at 10</seriesTitle>
                </series>
                <showType value="5">SERIES</showType>
                <title>KTLA 5 News at 10</title>
                <vWriter/>
            </program>
        </element>
    </vActualShowing>
    <vBookmark/>
    <showing>
        <showingBits value="921603"/>
        <time>2014-03-20T04:00:00Z</time>
        <duration>PT1H</duration>
        <program>
            <vActor>
                <element>Taylor|Eliza</element>
                <element>Turco|Paige</element>
                <element>McDonell|Thomas</element>
                <element>Goree|Eli</element>
                <element>Avgeropoulos|Marie</element>
                <element>Morley|Bob</element>
                <element>Hu|Kelly</element>
                <element>Larkin|Christopher</element>
                <element>Bostick|Devon</element>
                <element>Washington|Isaiah</element>
                <element>Cusick|Henry Ian</element>
            </vActor>
            <vAdvisory/>
            <showingBits value="0"/>
            <vChoreographer/>
            <colorCode value="4">COLOR</colorCode>
            <description>Ninety-seven years after the planet Earth was destroyed, generations of survivors are faced with dwindling resources. Copyright Tribune Media Services, Inc.</description>
            <vDirector>
                <element>Nalluri|Bharat</element>
            </vDirector>
            <episodeTitle>Pilot</episodeTitle>
            <vExecProducer>
                <element>Miller|Matthew</element>
                <element>Rothenberg|Jason</element>
                <element>Nalluri|Bharat</element>
                <element>Morgenstein|Leslie</element>
                <element>Girolamo|Gina</element>
            </vExecProducer>
            <vProgramGenre>
                <element/>
                <element/>
            </vProgramGenre>
            <vGuestStar/>
            <vHost/>
            <isEpisode>true</isEpisode>
            <originalAirDate>2014-03-19T00:00:00Z</originalAirDate>
            <vProducer/>
            <series>
                <isEpisodic>true</isEpisodic>
                <vSeriesGenre>
                    <element/>
                    <element/>
                    <element/>
                    <element/>
                </vSeriesGenre>
                <seriesTitle>The 100</seriesTitle>
            </series>
            <showType value="5">SERIES</showType>
            <title>The 100</title>
            <vWriter>
                <element>Rothenberg|Jason</element>
            </vWriter>
        </program>
        <tvRating value="4">PG</tvRating>
        <RatingList>
            <objectName/>
            <vRatings>
                <element>
                    <objectName/>
                    <vAdvisory>
                        <element>16</element>
                        <element>14</element>
                        <element>12</element>
                    </vAdvisory>
                    <InternalRatingSystemId>2</InternalRatingSystemId>
                    <InternalRatingValueId>4</InternalRatingValueId>
                </element>
            </vRatings>
        </RatingList>
    </showing>
    <startTime>2014-03-20T03:59:58Z</startTime>
    <stopTime>2014-03-20T05:00:02Z</stopTime>
    <bitstreamFormat>
        <vFormat>
            <element>
                <vByte>
                    <base64>EjQAAwABAjoBywxXAAAADwAAAAQAAAACAAAAAwAAAA==</base64>
                </vByte>
            </element>
        </vFormat>
    </bitstreamFormat>
    <expirationTime>2014-03-22T04:00:00Z</expirationTime>
</TvBusMarshalledStruct:TvBusEnvelope>
verticalscience commented 10 years ago

Here’s the actual XML file. I didn’t edit anything.

Here’s a list of metadata files with two series titles:

I’m unavailable for the next 4 hours but happy to work with you on this.
I wrote a script called xmlgrep to find the opening tag. vActualShowing seems to appear once but i didn’t check all.

showingBits however appears multiple times sometimes. See my_metafiles.tgz. I can forward xml files when I return if you like.

Victor Johnson

<>

1:"About a Boy/About a Boy- About a Hammer.m4v.txt" 1:"About a Boy/About a Boy- About a Rib Chute.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated S14E11 - Special-Occasion Roasts.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- A Slow and Easy Thanksgiving.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Asian Takeout Favorites.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Big, Bold Chicken Braises-1.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Breakfast Standbys.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Chicken Classics, Improved.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Chili and Stew Go Vegetarian.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Classic Italian Fare.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Company's Coming.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Decadent Desserts.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Fall Classics.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- French Sweets, Refined and Rustic.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- From an Italian Bakery.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Great American Classics-1.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Great Italian Pasta Sauces.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Irish Comfort Classics.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Let's Start With Soup.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Meat and Potatoes a la Francaise.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Perfecting Summer Classics.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Rethinking Seafood Classics.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Salmon and Latkes.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Short Ribs and Chops Hit the Grill.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Simple & Satisfying Vegetable Mains.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Spicing Up the Grill.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Spicy Fall Sweets.m4v.txt" 1:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Three Ways With Eggs.m4v.txt" 1:"Chozen/Chozen- In a Pickle.m4v.txt" 1:"Crisis/Crisis- Pilot.m4v.txt" 1:"Dancing With The Stars/Dancing With the Stars.m4v.txt" 1:"Friends With Better Lives/Friends With Better Lives- Pilot.m4v.txt" 1:"Glee/Glee- Naked.m4v.txt" 1:"Glee/Glee- Old Dog New Tricks.m4v.txt" 1:"Glee/Glee- The Untitled Rachel Berry Project.m4v.txt" 1:"Independent Lens/Independent Lens- Brothers Hypnotic.m4v.txt" 1:"Independent Lens/Independent Lens- The Trials of Muhammad Ali.m4v.txt" 1:"Modern Family/Modern Family- The Wedding, Part 1.m4v.txt" 1:"Modern Family/Modern Family- The Wedding, Part 2.m4v.txt" 1:"Nashville/Nashville- All or Nothing With Me.m4v.txt" 1:"Nashville/Nashville- Nashville- On the Record.m4v.txt" 1:"Nashville/Nashville- On the Other Hand.m4v.txt" 1:"Resurrection/Resurrection- Torn Apart.m4v.txt" 1:"South Park/South Park- Ass Burgers.m4v.txt" 1:"South Park/South Park- Bass to Mouth.m4v.txt" 1:"South Park/South Park- You're Getting Old.m4v.txt" 1:"Surviving Jack/Surviving Jack- Pilot.m4v.txt" 1:"The Amazing Race/The Amazing Race S24E11 - Hei Ho Heidi Ho.m4v.txt" 1:"The Following/The Following- Betrayal.m4v.txt" 1:"The Voice/The Voice S06E26 - Recap- Live Final Performances.m4v.txt" 1:"The Voice/The Voice- Live Eliminations.m4v.txt" 1:"The Voice/The Voice- Live Finale - S06E626 The Voice- Live Finale.m4v.txt" 1:"The Voice/The Voice- Live Semi-Final Performances.m4v.txt" 1:"The Voice/The Voice- Live Semi-Final Results.m4v.txt" 1:"Wealth Without Risk/Wealth Without Risk.m4v.txt" 1:"XXII Winter Olympics/XXII Winter Olympics- Closing Ceremony.m4v.txt" 2:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- A Fancy Finale.m4v.txt" 2:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- A Modern Take on Pizza and Grilled Cheese.m4v.txt" 2:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- French-Style Dutch Oven Dinners.m4v.txt" 2:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Meat and Potatoes With Panache.m4v.txt" 2:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Revisiting Julia Child's Roast Turkey.m4v.txt" 2:"America's Test Kitchen From Cook's Illustrated/America's Test Kitchen From Cook's Illustrated- Sunday Brunch.m4v.txt" 2:"Black Box/Black Box- Exceptional or Dead.m4v.txt" 2:"Black Box/Black Box- Jerusalem.m4v.txt" 2:"Modern Family/Modern Family- Message Received.m4v.txt" 2:"The 100/The 100- Pilot.m4v.txt" 2:"The Blacklist/The Blacklist- Berlin- Conclusion.m4v.txt" 2:"The Blacklist/The Blacklist- Berlin.m4v.txt" 2:"The Voice/The Voice- Live Final Performances.m4v.txt" 1::"OSITIVO_1052760_Details.xml" 1::"OSITIVO_1067778_Details.xml" 1::"OSITIVO_1105794_Details.xml" 1::"OSITIVO_113900_Details.xml" 1::"OSITIVO_1223958_Details.xml" 1::"OSITIVO_1641073_Details.xml" 1::"OSITIVO_1654738_Details.xml" 1::"OSITIVO_1655043_Details.xml" 1::"OSITIVO_1657443_Details.xml" 1::"OSITIVO_1658345_Details.xml" 1::"OSITIVO_1658365_Details.xml" 1::"OSITIVO_1669810_Details.xml" 1::"OSITIVO_1672894_Details.xml" 1::"OSITIVO_1674567_Details.xml" 1::"OSITIVO_1686099_Details.xml" 1::"OSITIVO_1689417_Details.xml" 1::"OSITIVO_1690419_Details.xml" 1::"OSITIVO_1691544_Details.xml" 1::"OSITIVO_1691663_Details.xml" 1::"OSITIVO_1692022_Details.xml" 1::"OSITIVO_1692523_Details.xml" 1::"OSITIVO_1692620_Details.xml" 1::"OSITIVO_1692932_Details.xml" 1::"OSITIVO_1693170_Details.xml" 1::"OSITIVO_1693483_Details.xml" 1::"OSITIVO_1693567_Details.xml" 1::"OSITIVO_1694053_Details.xml" 1::"OSITIVO_1694070_Details.xml" 1::"OSITIVO_1694071_Details.xml" 1::"OSITIVO_1694562_Details.xml" 1::"OSITIVO_1694887_Details.xml" 1::"OSITIVO_1695140_Details.xml" 1::"OSITIVO_1695339_Details.xml" 1::"OSITIVO_1695518_Details.xml" 1::"OSITIVO_1695694_Details.xml" 1::"OSITIVO_1696262_Details.xml" 1::"OSITIVO_1696406_Details.xml" 1::"OSITIVO_1696836_Details.xml" 1::"OSITIVO_1696989_Details.xml" 1::"OSITIVO_1696997_Details.xml" 1::"OSITIVO_1697102_Details.xml" 1::"OSITIVO_1697235_Details.xml" 1::"OSITIVO_1697435_Details.xml" 1::"OSITIVO_1697599_Details.xml" 1::"OSITIVO_1697608_Details.xml" 1::"OSITIVO_1697833_Details.xml" 1::"OSITIVO_1698162_Details.xml" 1::"OSITIVO_1698411_Details.xml" 1::"OSITIVO_1698944_Details.xml" 1::"OSITIVO_1699177_Details.xml" 1::"OSITIVO_1699207_Details.xml" 1::"OSITIVO_1699494_Details.xml" 1::"OSITIVO_1699625_Details.xml" 1::"OSITIVO_1699631_Details.xml" 1::"OSITIVO_1699767_Details.xml" 1::"OSITIVO_1699938_Details.xml" 1::"OSITIVO_1700742_Details.xml" 1::"OSITIVO_1700751_Details.xml" 1::"OSITIVO_1700914_Details.xml" 1::"OSITIVO_1700935_Details.xml" 1::"OSITIVO_1700936_Details.xml" 1::"OSITIVO_1701190_Details.xml" 1::"OSITIVO_1701401_Details.xml" 1::"OSITIVO_1702583_Details.xml" 1::"OSITIVO_1702593_Details.xml" 1::"OSITIVO_1702736_Details.xml" 1::"OSITIVO_1703229_Details.xml" 1::"OSITIVO_1703255_Details.xml" 1::"OSITIVO_1703493_Details.xml" 1::"OSITIVO_1703746_Details.xml" 1::"OSITIVO_1703844_Details.xml" 1::"OSITIVO_1703856_Details.xml" 1::"OSITIVO_1704153_Details.xml" 1::"OSITIVO_1704162_Details.xml" 1::"OSITIVO_1704180_Details.xml" 1::"OSITIVO_1704564_Details.xml" 1::"OSITIVO_1704565_Details.xml" 1::"OSITIVO_1705027_Details.xml" 1::"OSITIVO_1705424_Details.xml" 1::"OSITIVO_1705655_Details.xml" 1::"OSITIVO_1705656_Details.xml" 1::"OSITIVO_1705828_Details.xml" 1::"OSITIVO_1705829_Details.xml" 1::"OSITIVO_1705830_Details.xml" 1::"OSITIVO_1705842_Details.xml" 1::"OSITIVO_1705852_Details.xml" 1::"OSITIVO_1705968_Details.xml" 1::"OSITIVO_1705969_Details.xml" 1::"OSITIVO_1706309_Details.xml" 1::"OSITIVO_1706313_Details.xml" 1::"OSITIVO_1706959_Details.xml" 1::"OSITIVO_1706963_Details.xml" 1::"OSITIVO_1707131_Details.xml" 1::"OSITIVO_1707294_Details.xml" 1::"OSITIVO_1707309_Details.xml" 1::"OSITIVO_1707317_Details.xml" 1::"OSITIVO_1707512_Details.xml" 1::"OSITIVO_1707681_Details.xml" 1::"OSITIVO_1707682_Details.xml" 1::"OSITIVO_1707742_Details.xml" 1::"OSITIVO_1707938_Details.xml" 1::"OSITIVO_1708107_Details.xml" 1::"OSITIVO_1708111_Details.xml" 1::"OSITIVO_1708121_Details.xml" 1::"OSITIVO_1708265_Details.xml" 1::"OSITIVO_1708266_Details.xml" 1::"OSITIVO_1708267_Details.xml" 1::"OSITIVO_1708409_Details.xml" 1::"OSITIVO_1708412_Details.xml" 1::"OSITIVO_1708422_Details.xml" 1::"OSITIVO_1708561_Details.xml" 1::"OSITIVO_1708562_Details.xml" 1::"OSITIVO_1708829_Details.xml" 1::"OSITIVO_1708830_Details.xml" 1::"OSITIVO_1708831_Details.xml" 1::"OSITIVO_1708837_Details.xml" 1::"OSITIVO_1709051_Details.xml" 1::"OSITIVO_1709056_Details.xml" 1::"OSITIVO_1709064_Details.xml" 1::"OSITIVO_1709273_Details.xml" 1::"OSITIVO_1709467_Details.xml" 1::"OSITIVO_1709468_Details.xml" 1::"OSITIVO_1709470_Details.xml" 1::"OSITIVO_1709479_Details.xml" 1::"OSITIVO_1709481_Details.xml" 1::"OSITIVO_1709665_Details.xml" 1::"OSITIVO_1709666_Details.xml" 1::"OSITIVO_1709668_Details.xml" 1::"OSITIVO_1709672_Details.xml" 1::"OSITIVO_1709799_Details.xml" 1::"OSITIVO_1709800_Details.xml" 1::"OSITIVO_1709802_Details.xml" 1::"OSITIVO_1709810_Details.xml" 1::"OSITIVO_1709815_Details.xml" 1::"OSITIVO_1709961_Details.xml" 1::"OSITIVO_1709962_Details.xml" 1::"OSITIVO_1709964_Details.xml" 1::"OSITIVO_1709977_Details.xml" 1::"OSITIVO_1710133_Details.xml" 1::"OSITIVO_1710135_Details.xml" 1::"OSITIVO_1710327_Details.xml" 1::"OSITIVO_1710335_Details.xml" 1::"OSITIVO_1710716_Details.xml" 1::"OSITIVO_1710722_Details.xml" 1::"OSITIVO_1710723_Details.xml" 1::"OSITIVO_1710724_Details.xml" 1::"OSITIVO_1710726_Details.xml" 1::"OSITIVO_1710731_Details.xml" 1::"OSITIVO_1710732_Details.xml" 1::"OSITIVO_1710733_Details.xml" 1::"OSITIVO_1710742_Details.xml" 1::"OSITIVO_1710743_Details.xml" 1::"OSITIVO_1710744_Details.xml" 1::"OSITIVO_1710904_Details.xml" 1::"OSITIVO_1710906_Details.xml" 1::"OSITIVO_1710911_Details.xml" 1::"OSITIVO_1710915_Details.xml" 1::"OSITIVO_1710916_Details.xml" 1::"OSITIVO_1711083_Details.xml" 1::"OSITIVO_1711087_Details.xml" 1::"OSITIVO_1711088_Details.xml" 1::"OSITIVO_1711093_Details.xml" 1::"OSITIVO_1711096_Details.xml" 1::"OSITIVO_1711180_Details.xml" 1::"OSITIVO_1711182_Details.xml" 1::"OSITIVO_1711195_Details.xml" 1::"OSITIVO_1711196_Details.xml" 1::"OSITIVO_1711201_Details.xml" 1::"OSITIVO_1711340_Details.xml" 1::"OSITIVO_1711342_Details.xml" 1::"OSITIVO_1711345_Details.xml" 1::"OSITIVO_1711352_Details.xml" 1::"OSITIVO_1711353_Details.xml" 1::"OSITIVO_1711354_Details.xml" 1::"OSITIVO_1711355_Details.xml" 1::"OSITIVO_1711516_Details.xml" 1::"OSITIVO_1711520_Details.xml" 1::"OSITIVO_1712075_Details.xml" 1::"OSITIVO_1712076_Details.xml" 1::"OSITIVO_1712493_Details.xml" 1::"OSITIVO_1712494_Details.xml" 1::"OSITIVO_1713107_Details.xml" 1::"OSITIVO_1713110_Details.xml" 1::"OSITIVO_1713211_Details.xml" 1::"OSITIVO_1713471_Details.xml" 1::"OSITIVO_250525_Details.xml" 1::"OSITIVO_258413_Details.xml" 1::"OSITIVO_258414_Details.xml" 1::"OSITIVO_258415_Details.xml" 1::"OSITIVO_268147_Details.xml" 1::"OSITIVO_279085_Details.xml" 1::"OSITIVO_289272_Details.xml" 1::"OSITIVO_299187_Details.xml" 1::"OSITIVO_308948_Details.xml" 1::"OSITIVO_319134_Details.xml" 1::"OSITIVO_322203_Details.xml" 1::"OSITIVO_404066_Details.xml" 1::"OSITIVO_651345_Details.xml" 1::"OSITIVO_698439_Details.xml" 1::"OSITIVO_778663_Details.xml" 1::"OSITIVO_856788_Details.xml" 1::"OSITIVO_860221_Details.xml" 1::"OSITIVO_860222_Details.xml" 1::"OSITIVO_864520_Details.xml" 1::"OSITIVO_864521_Details.xml" 1::"OSITIVO_864522_Details.xml" 1::"OSITIVO_868236_Details.xml" 1::"OSITIVO_907930_Details.xml" 1::"OSITIVO_964354_Details.xml"

verticalscience commented 10 years ago

The files above were sent by email but it looks like all attachments didn't make it to the github posting.

Had some trouble with the drop and drag and editing of a prior posting so you probably received the wrong file first.

Reformatted copies of all 275 of my ctivo_details xml files and found appears multiple times in several files. This is the output of grep on the worst case ctivo_details xml example file.

     <seriesTitle>2014 Billboard Music Awards</seriesTitle>
      <seriesTitle>Eyewitness News 11:00PM</seriesTitle>
      <seriesTitle>Castle</seriesTitle>
    <seriesTitle>2014 Billboard Music Awards</seriesTitle>
mackworth commented 10 years ago

In all cases, is the first one the correct one?

On May 24, 2014, at 2:07 PM, verticalscience notifications@github.com wrote:

The files above were sent by email but it looks like all attachments didn't make it to the github posting.

Had some trouble with the drop and drag and editing of a prior posting so you probably received the wrong file first.

Reformatted copies of all 275 of my ctivo_details xml files and found appears multiple times in several files. This is the output of grep on the worst case ctivo_details xml example file.

 <seriesTitle>2014 Billboard Music Awards</seriesTitle>
  <seriesTitle>Eyewitness News 11:00PM</seriesTitle>
  <seriesTitle>Castle</seriesTitle>
<seriesTitle>2014 Billboard Music Awards</seriesTitle>

\ Reply to this email directly or view it on GitHub.

verticalscience commented 10 years ago

YES

verticalscience commented 10 years ago

the first one always matches the converted filename

mackworth commented 10 years ago

So, very interesting. I wrote an XSLT script to find cases where vActualShowing has more than one element and a batch file to go through the cached TiVo details. It appears that the elements include any shows that happen to be in the file and the is the one that is intended. I even found one very odd case where the file contained three episodes of a series, while it was supposed to be an unrelated three-hour movie. vActualShowing had all three episodes information, while had the movie. So even though TiVo knew it was the series, it somehow originally thought it was the movie.

Thus in your "The 100" case, the recording shows as starting at 03:59:58Z and stops at 05:00:02Z. With the show itself showing as starting at 2014-03-20T04:00:00Z, TiVo apparently decided it needed to document the last three seconds, which are the first three seconds of the following news program. Why it didn't feel the need to document the last 2 seconds of the previous show (the first 2 seconds of the recording), I don't know. It may be related to the fact that it thinks the total recording duration is 1 hr, 2 seconds. In researching this some more, it seems that if one specifies record padding at the beginning or end, these fields are provided.

So, my conclusion for the metadata purposes, we should be ignoring the vActualShowing and just using the data from the section. Thanks for finding this! The tivo->pytivo translation is inherited from iTiVo and has been unchanged for the last several years, and has been doing the inverse (ignoring the showing section). My guess is that pyTivo must use only the first instance of any metadata or it would have been noticed long ago.

The other interesting question is whether we can do that cropping thing you mentioned, as it does seem to indicate when there are a few seconds of another show. More experiments required here, although there may be a problem with any live shows that go longer than anticipated.

In case of future interest, I've included the debugging scripts below: Batch file:

#!/bin/bash
cd /tmp/ctivo_details
for f in * ; do
  XSL=$(xsltproc ~/Desktop/pytivo_txt3.xslt  "$f")
  if [[ "$XSL" ]]; then
    echo $f
    echo -e "$XSL"
    echo 
  fi
done

XSLT file

<stylesheet version="1.0" 
xmlns="http://www.w3.org/1999/XSL/Transform">
<output method="text"/>

<template match="vActualShowing/element[position()>1]">
  <text></text>
  <apply-templates select = "/" mode = "foundOne" />
</template>

<template match="episodeTitle" mode = "foundOne">
  <value-of select="."/>
  <text> == </text>
</template>

<template match="seriesTitle" mode = "foundOne">
   <value-of select="."/>
  <text>
</text>
</template>

<template match="*">
<apply-templates />
</template>

<template match="text()">
</template>

<template match="text()" mode = "foundOne">
</template>

</stylesheet>
mackworth commented 10 years ago

And below is the revised cTiVo pytivo_txt.xslt file. It should fix the multiple episode problem, and also hide the blank genre fields. It hasn't gone through much QA yet, but if you want to try this out, just replace your file /Applications/cTiVo.app/Contents/Resources/pytivo_txt.xslt with this one. (Probably on a backup copy of cTiVo.) Note this will NOT add the season/episode info; that is indeed missing and I've found the issue in the Obj-C source.

<stylesheet version="1.0" 
xmlns="http://www.w3.org/1999/XSL/Transform">
<output method="text"/>

<template match="originalAirDate|episodeTitle|title|time|movieYear|seriesTitle|isEpisode|seriesId|episodeNumber|displayMajorNumber|callsign|displayMinorNumber|startTime|stopTime|partCount|partIndex">
  <value-of select="name()"/>
  <text> : </text>
  <value-of select="."/>
  <text>
</text>

</template>

<template match="description">
  <value-of select="name()"/>
  <text> : </text>
  <choose>
    <when test="contains(.,' Copyright Tribune Media Services, Inc.')">
      <value-of select="substring-before(.,' Copyright Tribune Media Services, Inc.')" />
    </when>
    <otherwise>
      <value-of select="." />
    </otherwise>
  </choose>
  <text>
</text>

</template>

<template match="showingBits">
  <value-of select="name()"/>
  <text> : </text>
  <value-of select="@value"/>
  <text>
</text>

</template>
<template match="tvRating|starRating|colorCode">
  <value-of select="name()"/>
  <text> : 0</text>
  <value-of select="@value"/>
  <text>
</text>

</template>

<template match="mpaaRating">
  <value-of select="name()"/>
  <text> : </text>
  <value-of select="substring(. , 1, 1)"/>
  <value-of select="@value"/>
  <text>
</text>

</template>

<template match="vActor|vGuestStar|vDirector|vExecProducer|vProducer|vWriter|vHost|vChoreographer|vProgramGenre|vSeriesGenre">
  <for-each select="element">
    <if test= "string(.)">
      <for-each select="parent::*">
        <if test="not(@id)">
          <value-of select="name()"/>
        </if>
        <value-of select="./@id"/>
      </for-each>
      <text> : </text>
      <value-of select="."/>
      <text>
</text>
    </if>
  </for-each>
</template>

<template match="vActualShowing">
</template>

<template match="*">
<apply-templates />
</template>

<template match="text()">
</template>

</stylesheet>
verticalscience commented 10 years ago

Testing revised copy here -> /Applications/cTiVo.app/Contents/Resources/pytivo_txt.xslt

mackworth commented 10 years ago

How'd it go?

mackworth commented 10 years ago

Closed due to lack of response. Believed fixed, to include in 2.4.0