themaCreator
http://creator.themasoftware.com/forum/

Randomize Filename To Keep Original Name in URL.
http://creator.themasoftware.com/forum/viewtopic.php?f=4&t=7500
Page 1 of 1

Author:  Crackpot [ December 4th, 2023, 12:31 am ]
Post subject:  Randomize Filename To Keep Original Name in URL.

i using randomize filename when upload. but when URL generate can we use any kind of replacement that TC will use original file name for URL?

lets say release name is "spiderman.s1e01"


like current TC out URL:

Rapidgator
https://rapidgator.net/file/98699y.rar

using replacement
https://rapidgator.net/file/spiderman.s1e01.rar

reason is: rapidgator has some banned word which is why using random file name.
and need replacement so that we can use themaleecher replacement url

Author:  Freddy [ December 4th, 2023, 7:22 pm ]
Post subject:  Re: Randomize Filename

Try this message replacement from next update (2.86).

It won't work in current version.

Search for:
Code:
(https?://rapidgator.net/file/.+?)/.+?(\.part[0-9]+\.rar|\.rar)


Replace with:
Code:
$$1/{#fileUploadName#}$2


Enable regex search.

Author:  Crackpot [ December 5th, 2023, 1:20 am ]
Post subject:  Re: Randomize Filename To Keep Original Name in URL.

currently it's wokring with <postSubject> tag themaposter and themamanager.


but file name can be

Code:
ABC.part1.rar
ABC.rar


so here is the regex, in case if someone need.
Code:
(https?://rapidgator.net/file/[a-z0-9]+/)[^/]+(\.part\d\.rar|\.rar)


replace with
Code:
$1<postSubject>$2

Author:  Freddy [ December 5th, 2023, 10:23 am ]
Post subject:  Re: Randomize Filename To Keep Original Name in URL.

Would not really recommend using <postSubject>.

It can have invalid characters for URL.

I have updated replacement above to include "part" as well.

Author:  Crackpot [ December 5th, 2023, 11:51 am ]
Post subject:  Re: Randomize Filename To Keep Original Name in URL.

ermm we are use releasename as archive, shouldn't be it's fine?

i was thinking to replace the file name which are already posted used themamanager.

Author:  Freddy [ December 5th, 2023, 4:27 pm ]
Post subject:  Re: Randomize Filename To Keep Original Name in URL.

In your case it should be fine, other people might have very different subject (even replacements added to subject which would add bad characters for URL).

If anyone else needs this the better way is like I wrote from next update.

Author:  Crackpot [ December 6th, 2023, 12:55 am ]
Post subject:  Re: Randomize Filename To Keep Original Name in URL.

can you please give me an example how that can be the problem? i actually have many posts which already posted on site that I am considering replacing the filename for the URL using TM.

Author:  Freddy [ December 6th, 2023, 5:43 am ]
Post subject:  Re: Randomize Filename To Keep Original Name in URL.

If the subject has backslashes "/" the URL would because invalid.

If it has normal spaces " " it would also break at the wrong point and won't be fully clickable.

The "+" might be bad as well.

Those are probably most common.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/