mkrufky / libdvbtee

dvbtee: a digital television streamer / parser / service information aggregator supporting various interfaces including telnet CLI & http control
GNU Lesser General Public License v2.1
79 stars 31 forks source link

fix JSON quote escaping #70

Open Patty-OFurniture opened 4 months ago

Patty-OFurniture commented 4 months ago

Example, I would assume from an episode of Two and a half men:

{"etm":"Charlie becomes obsessed with the newly "married" Rose and begins to stalk her; Alan is concerned when Jake and Eldridge videotape their dangerous stunts.","etmId":114714,"tableId":204,"tableName":"ETT","version":3}

I can work around #34 but quotes in the middle of etm text would be quite nearly impossible.

And as long as I'm here, I'm just removing the token and wrapping it correctly, with a known value, which does not have a pound or hash symbol because that also causes problems:

        json = "{\"TSID0001\"" + json + "}";

And separating the json into 2 objects apart from the leading and trailing text is a minor, but unnecessary matter as well.

mkrufky commented 4 months ago

Thank you for your efforts - Patches welcome. Please send a pull request.

Patty-OFurniture commented 2 months ago

Nah, mate, build environment is not something I can get done right now. I mostly just left this as a note in case others are having issues, piggy-backing on issue 34.

I was trying to extract descriptions. The filename has the program name, the create/modify dates can match up to the actual episode, and then I though GraceNote/Neilson could help. Rarely it would. I could not find exact matches otherwise, and partial matches were either negative or inconclusive.

For now, VLC with subtitles on gives me enough information to search a srt/sub archive to find the episode number/name, and if I record duplicates, Cinegy.TsAnalyzer (C#) gives me statistics to tell which .ts file is better quality.

So, trying to extract subtitles and do a "best match" on sub/srt/whatever else I can find.

Again, mostly just a note for others.