It is currently April 27th, 2024, 4:41 pm



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Improvement to auto-replace for same post links.
PostPosted: December 10th, 2023, 9:09 am 

Joined: December 30th, 2013, 3:54 pm
Posts: 319
Hey
I've noticed that with auto replace feature when we have two or more files/urls to replace from the SAME post, and we add them to auto-replace>links folder around the same time +- few minutes TM will search and find them at the same time and will replace them one by one.

The problem here is that on the first edit it's doing the right thing and taking the original posts with dead links but on the second edit since the post was taken at the same time as the first edit it's still the original post even though we have the first edit scheduled

At the end, we have only the second link edited because the second edit worked on the original post and not the edited.

If we add wait time between edits, it still doesn't work because the posts were taken at the same time.
Image
Hope I've explained it well.

Tbh I don't know how to improve that, but I think some kind of wait time would fix the issue.


Top
 Profile  
Reply with quote  
 Post subject: Re: Improvement to auto-replace for same post links.
PostPosted: December 11th, 2023, 9:32 am 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12646
Location: Earth
The issue is really that would put those links in two different files.

You can put them in single file (both new links) and it will replace both links in the post at the same time then (with one edit).

That's how it was supposed to be used originally. You can actually put all new links in one single file (from different posts), it would be overall faster to search once and replace them in all posts.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Improvement to auto-replace for same post links.
PostPosted: December 11th, 2023, 11:36 am 

Joined: December 30th, 2013, 3:54 pm
Posts: 319
Yes, and right now that's my workaround, and it does work fine.
But with that, it needs my input of merging files after they were uploaded by TC and moving to auto-replace. I thought I would just tell TC to save reuploaded files in auto-replace folder and TM would pick them up and replace.

Maybe if you would work on it in the future you can make some improvements, for now I think I'll merge and move it by hand or write some batch file and run it with scheduler to do it daily.

Thank You for this feature, I wasn't aware of it earlier.


Top
 Profile  
Reply with quote  
 Post subject: Re: Improvement to auto-replace for same post links.
PostPosted: December 11th, 2023, 12:51 pm 

Joined: December 30th, 2013, 3:54 pm
Posts: 319
Maybe someone will find it useful.

If the .txt files exist in a folder, it will merge them, move the merged file to a new folder and remove the individual .txt files.

Save the file as .bat, and you can set the application to execute every few hours in Windows Task Scheduler

Code:
:: Execute the command in folder:
pushd E:\Reupload\Auto reupload

:: Set a random name
setlocal EnableDelayedExpansion
set random_name=%RANDOM%%RANDOM%

if exist *.txt (

:: Merge posts with .txt extension
type *.txt > "%random_name%.txt"
:: Move merged file to new location
move %random_name%.txt*.* E:\themaManager\user\auto-replace\links

:: Deletes .txt files after they are merged.
del "E:\Reupload\Auto reupload\*.txt"

    echo Files merged
) else (
    echo No files in folder
)


Top
 Profile  
Reply with quote  
 Post subject: Re: Improvement to auto-replace for same post links.
PostPosted: February 17th, 2024, 10:19 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12646
Location: Earth
Fixed the original issue for next update (3.89).

It will be fine even when files are separated.

However it's still highly recommended to put links in single file in this case. It will be much faster in searching and need less resources and time when editing as well (since will replace all the links at the same time in a post).

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Theme designed by stylerbb.net © 2008
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All times are UTC