SubtitleExtractor icon indicating copy to clipboard operation
SubtitleExtractor copied to clipboard

Repetitive functions in the modules

Open Houstonsoftware opened this issue 8 years ago • 1 comments

Those modules share identical or very similar functions that can be listed in common:

Fox and Hulu share the first half of getSubtitles

BBC and crackle have very similar getEpisodeID functions that can be converted into one by listing searchStringList as function parameter and making some minor tweaks

Fox and Comedy Central have same getSubtitleUrl function

Crackle, BBC and Youtube have nearly same downloadXMLTranscript function. Youtube one is a bit different and I am not sure how to merge them and do not deny possibility that it is impossible

Crunchyroll, youtube and bbc have exactly same convertXMLToSrt function. In Netflix module this function is different, but I think that same function as for this 3 can be reused.

Amazon, hulu and netflix getTitle functions differ only slightly; comedicentral & fox and bbc & crackle getTitle functions are identical

For Comedy Central's and Fox's getContentID1/2, getShowJson, getShowDetails and processShowName functions are identical

Amazon, netflix and comedycentral have similar downloadDfxpTranscript functions

comedycentral, crunchyroll, fox, netflix, youtube have nearly same standardCheck function

P.S. I evaluated newamazon module as it seams newer

Houstonsoftware avatar Dec 05 '16 19:12 Houstonsoftware

Please try to do the next task of coding it.

abhishek-vinjamoori avatar Dec 08 '16 11:12 abhishek-vinjamoori