ribbons / RadioDownloader

An easy to use application for managing podcast subscriptions and downloads.
https://nerdoftheherd.com/tools/radiodld/
GNU General Public License v3.0
15 stars 11 forks source link

PR for issue#59 dates in episode titles #217

Closed nbl1268 closed 6 years ago

nbl1268 commented 7 years ago

Revised RegEx for matching and removing dates in episode titles

nbl1268 commented 6 years ago

Hi, sorry its been some time since i last looked at this. Havent been able to get my head around what is causing these tests to fail. Have been checking the code and re testing in Visual Studio, where all 4 tests pass (see attached). This is a pass for both the 'Run All' and 'debug tests'. I also stepped through the 4 tests that shows as failing and used the 'watch' feature to see the content of the variables and results of the functions (also attached)... unfortunately i haven't been able to see why this all works in my instance of VS but not when it is under test by AppVeyor and TravisCI. Are there any 'debuggin' or 'single step options for AppVeyor that woudl let me see what it is doing and what the conditions are when it is failing? 20171116 vs test explorer results 20171116 vs tests debugging 20171116 vs test debugging watch

nbl1268 commented 6 years ago

Thanks. Removing that Try...Catch certainly helped see the problem, which was all to do with converting the content of the string into a Date, and in my culture (AU) it worked, but your were right that it wasn't working in other cultures. So, have revised the code in this section to better handle the various potential formants that the string could be in before converting it to a date... now passed the AppVeyor and TravisCI tests :)

ribbons commented 6 years ago

Thanks. Removing that Try...Catch certainly helped see the problem, which was all to do with converting the content of the string into a Date, and in my culture (AU) it worked, but your were right that it wasn't working in other cultures. So, have revised the code in this section to better handle the various potential formants that the string could be in before converting it to a date... now passed the AppVeyor and TravisCI tests :)

Great - glad to have been of assistance. Are you ready for me to review your code again, or are there any other adjustments that you would like to make first?

nbl1268 commented 6 years ago

No other adjustments that relate to issue #59 ;). Yeap, happy for you review and let me know any improvements etc

nbl1268 commented 6 years ago

Thanks, have made style changes through out per suggestions, with exception of the notes in TextUtils.cs showing the 3 key date formats the RegEx is set up to match for. I'm thinking that this would be helpful for the future to reduce time for future coder (and forgetful me) to understand what this is doing.

nbl1268 commented 6 years ago

Hi, changes made and authors.md updated. Over to you :)