From 7e9fc5cdf39bb3e9fc503545c2822a3d01121f19 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 16 May 2022 12:41:00 -0300 Subject: [PATCH] https://github.com/WWBN/AVideo-Storage/issues/30 --- install/fixSlashN.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install/fixSlashN.php b/install/fixSlashN.php index 58f37f0f4339..56d20b5d33cf 100644 --- a/install/fixSlashN.php +++ b/install/fixSlashN.php @@ -11,10 +11,15 @@ $count = 0; foreach ($videos as $value) { $count++; - $newDescription = str_replace('\n', PHP_EOL, $value['description']); + //$newDescription = str_replace('\n', PHP_EOL, $value['description']); + $newDescription = preg_replace('/(\\\\)+n/', PHP_EOL, $value['description']); + $newDescription = preg_replace('/(\\\\)+/', PHP_EOL, $newDescription); + $newTitle = preg_replace('/(\\\\)+/', '', $value['title']); + if($newDescription !== $value['description']){ echo "Change ($count) [{$value['id']}]{$value['title']} ******".PHP_EOL; $video = new Video('','',$value['id']); + $video->setTitle($newTitle); $video->setDescription($newDescription); $video->save(false, true); }else{