Merge pull request #19 from JonOfUs/main

Stop creating unnecessary log file in Nextcloud root folder
This commit is contained in:
thrillfall 2021-08-16 20:53:23 +02:00 committed by GitHub
commit 3a5607a198
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,15 +5,12 @@ namespace OCA\GPodderSync\Core\EpisodeAction;
class EpisodeActionReader { class EpisodeActionReader {
public function fromString(string $episodeActionString): EpisodeAction { public function fromString(string $episodeActionString): EpisodeAction {
file_put_contents('actionreader.log', var_export($episodeActionString, true), FILE_APPEND);
preg_match( preg_match(
'/\[EpisodeAction{(podcast=\')(?<podcast>.*?)(\', episode=\')(?<episode>.*?)(\', action=)(?<action>.*?)(, timestamp=)(?<timestamp>.*?)(, started=)(?<started>.*?)(, position=)(?<position>.*?)(, total=)(?<total>.*?)}]*/', '/\[EpisodeAction{(podcast=\')(?<podcast>.*?)(\', episode=\')(?<episode>.*?)(\', action=)(?<action>.*?)(, timestamp=)(?<timestamp>.*?)(, started=)(?<started>.*?)(, position=)(?<position>.*?)(, total=)(?<total>.*?)}]*/',
$episodeActionString, $episodeActionString,
$matches $matches
); );
file_put_contents('actionreader.log', var_export($matches, true), FILE_APPEND);
return new EpisodeAction( return new EpisodeAction(
$matches["podcast"], $matches["podcast"],
$matches["episode"], $matches["episode"],