Author Topic: File Renaming  (Read 1549 times)

Offline slayer99

  • Junior Indexer
  • **
  • Posts: 9
  • Helpful: +0/-0
File Renaming
« on: 2018-01-02, 08:18:47 AM »
File renaming doesn't work as well as it should or I'm missing something.

I have my nZEDb implementation set up to download both Par2 and a RAR file in order to find the actual filenames.  If I click on an obfuscated nzb name, I find the filename contains the actual filenames under "Rar Contains."  However, neither the tmux automated tasks nor the manual php fixReleaseNames.php script (using php fixReleaseNames.php 6 true all no show) doesn't rename the Release into the filename listed in "Rar Contains."  I've tried all the different fixReleaseNames options without success.

This information is tied back to the ID in the DB, so the information is available...my question is why my implementation isn't changing the release name into something usable.  Seems like I'm wasting data downloading the last RAR and Par2 files if it doesn't rename the Release to the actual name of the files contained within.

Offline slayer99

  • Junior Indexer
  • **
  • Posts: 9
  • Helpful: +0/-0
Re: File Renaming
« Reply #1 on: 2018-01-15, 05:23:53 PM »
Anyone?

Offline Boinkers

  • Newbie
  • *
  • Posts: 4
  • Helpful: +0/-0
Re: File Renaming
« Reply #2 on: 2018-01-16, 11:47:11 PM »
Try running match_prefiles.php to see if it helps with some of the rename issues.

Offline martymonster

  • Junior Indexer
  • **
  • Posts: 18
  • Helpful: +0/-0
Re: File Renaming
« Reply #3 on: 2018-01-18, 09:02:31 PM »
Same here, lots of HASHED files in Other->Hashed
Open up the file and the info show the file name

eg: today
59186d5c54173024856c5865a1f0de84d7ee4425
is from alt.b.teevee and is on Other->Hashed
Double click on it and it shows - see attached screen shot.



Offline slayer99

  • Junior Indexer
  • **
  • Posts: 9
  • Helpful: +0/-0
Re: File Renaming
« Reply #4 on: 2018-01-28, 11:19:55 AM »
Try running match_prefiles.php to see if it helps with some of the rename issues.

That helped...improved naming on about 25%.

I guess what I'm wondering is that the titles are in the db when we do PAR2 and RAR checks...so there has to be a way to use the info in the database to rename the files based on that info.  The current renaming methods aren't covering those.

Offline hanshansen

  • Decent Indexer
  • ***
  • Posts: 57
  • Helpful: +1/-0
Re: File Renaming
« Reply #5 on: 2018-01-29, 04:30:42 AM »
Note to myself, always make a snapshot of my nzedb VM before doing stuff like that  :-[

I ran "match_prefiles.php full show" and it renamed tons of perfectly named music to "Various.Artists. - .Smash.Hits.80s.Mixtape.[2017].[Mixtape]" and "Best.Of.Buddha.Beats".

I checked the releases and they all have the predb_id of one of these two id in it. How on earth did the same predb_id end up in so many releases?

Is there a way to get the proper names back? First I would delete the predb_id from all of those releases and replace $searchname with $name. Can I then run a script on those releases looking for the names in nfo, rar, par etc?

Offline hanshansen

  • Decent Indexer
  • ***
  • Posts: 57
  • Helpful: +1/-0
Re: File Renaming
« Reply #6 on: 2018-01-30, 02:08:23 AM »
Ok, I restored my VM to a 2 days old backup and checked all releases for the predb_id's. I found only one. So the script messed it all up. It would be nice if it had a "dry run" option

Be careful when running it on all releases...

Offline drakejones

  • Junior Indexer
  • **
  • Posts: 29
  • Helpful: +3/-0
Re: File Renaming
« Reply #7 on: 2018-02-05, 12:26:47 AM »
I ran "match_prefiles.php full show" and it renamed tons of perfectly named music to "Various.Artists. - .Smash.Hits.80s.Mixtape.[2017].[Mixtape]" and "Best.Of.Buddha.Beats".

Wish I would have caught your post before I did the same thing.  But it was worth a try!  I learn something new almost everyday.   :D   Try this to get the old searchnames back:
 
Code: [Select]
php '/var/www/nZEDb/misc/testing/Release/resetSearchname.php' reset
« Last Edit: 2018-02-05, 04:06:32 AM by drakejones »

Offline r1ngx

  • Junior Indexer
  • **
  • Posts: 5
  • Helpful: +0/-0
Re: File Renaming
« Reply #8 on: 2018-03-13, 03:28:36 PM »
ugh..

I ran the php '/var/www/nZEDb/misc/testing/Release/resetSearchname.php' reset and it screwed up my release names and search names back to hashed mess.. How can I fix this? Thanks.

Offline drakejones

  • Junior Indexer
  • **
  • Posts: 29
  • Helpful: +3/-0
Re: File Renaming
« Reply #9 on: 2018-03-14, 01:03:10 AM »
Best if you irc the devs...  They are very good about about helping us.

Offline KLH

  • Junior Indexer
  • **
  • Posts: 5
  • Helpful: +1/-0
Re: File Renaming
« Reply #10 on: 2018-07-21, 09:38:36 AM »
Any news on this?

The only way I have been able to get a lot of my releases renamed is by using the match_prefiles.php script. Just noticed during last run a number renamed to "best.of.buddha.beats" with a preid of "best.of.buddha.beats.cd3"... WTH!?!?! heh

googled best of buddha beats and this thread popped up.

Anyway, I found I have about 250 of these bad renames (None of which are EVEN audio), out of the 1000's that processed good.

Easily fixable??

Offline drakejones

  • Junior Indexer
  • **
  • Posts: 29
  • Helpful: +3/-0
Re: File Renaming
« Reply #11 on: 2018-07-21, 11:35:39 PM »
I managed to get the names fixed by running "resetSearchname.php", if I remember correctly.  But you may have a larger issue if you have to manually run "match_prefiles.php" to get releases renamed. 

In the menu bar near the top of this page there is a "Chat" option...  If ask about your issue, the devs will help you out.  Be patient...

If the Chat button doesn't function - like mine with Firefox, install a chat client like HexChat.  The server is "synIRC" and the channel is "#nZEDb" (w/o quites).

Offline kaibosh

  • Overlord
  • ******
  • Posts: 161
  • Helpful: +18/-0
Re: File Renaming
« Reply #12 on: 2018-07-24, 10:53:01 AM »
match_prefiles.php might have renamed those releases incorrectly due to bad predb entries. Check the predb table for records with a title of "front" and "folder" and delete those ones. Other common errors are "CD1" and "VIDEO_TS"  IIRC. This will stop this happening again in the future.

To undo the bad renames that have already occurred, you can reset the post-processing flags of the releases that matched those now deleted predb_ids.

As drakejones mentions, issues like these are quicker resolved in IRC. It's best to use a proper IRC client and be prepared to wait a few hours for an answer.
« Last Edit: 2018-07-24, 11:04:52 AM by kaibosh »