Results 1 to 4 of 4

Thread: Wizmetadatagrabber can't find info in some cases

  1. #1
    Join Date
    Mar 2006
    Location
    Sweden
    Posts
    604

    Wizmetadatagrabber can't find info in some cases

    I have tried to solve this problem in a couple of ways, but I havn't found a reliable solution yet.

    Problem is that the search functionality on thetvdb could have been better.
    Example: I have downloaded the Castle show. But when wizmetadatagrabber do a search I get data from an old show about different castles around Britain(?). The problem originates in the fact that the files is named as: castle.2009.S01E01.yadayada.avi. Usually I use the Command-line tool, but if I search manually, I can rename the title to: Castle.(2009)... and voíla I get correct info.

    I have tried to create some script that renames the files automatically. but I have not found one that can handle the "()" (or something).

    Is there someone that knows how to create a script that can handle renaming like this? Python, perl or dos. And that I can use for other files as well.

    Or: maybe a xml-file that wizmetadatagrabber reads and use for the search (the renaming of files is just to get correct data, anyway)
    the xml-file could have either the correct name or the tvdb show Id (83462 for Castle). Roughly like the language translation xml...
    No real need for a UI to edit this.
    GBPVR PC: Win7 ult x64 / Intel P Duo / 2 gb RAM / Asus Extreme Radeon HD3450 HDTV
    Video: Sony 40'' LCD TV
    Plugins: MovieWiz, MLpanel, Videos library, Music Spot, WebRadio - and skin: Community WS
    _____________________________________________
    XML is like kids. They start small and cute. Then they grow.

  2. #2
    Join Date
    Dec 2006
    Location
    St. Johns, Florida USA
    Posts
    2,450
    How are you coming up with that name? Are you using a renaming tool?
    NPVR Server: Win10 / AMD Phenom II X4 965 / 8gRAM / ATI Radeon 7700 Series / Hauppauge 2250
    Misc: HDHR Prime, rPI LibreElec & Amazon FireStick Kodi clients

  3. #3
    Join Date
    Dec 2006
    Location
    St. Johns, Florida USA
    Posts
    2,450
    You might try vbscript. I'm not a vbscript programmer, but I cobbled together this script that may get you started.

    Paste into a text file and name appropriately (? maybe FileRenamer.vbs).
    Save it.

    Call it as follows:

    cscript FileRenamer.vbs //nologo castle.2009.S01E01.yadayada.avi

    Where the filename is the one you want renamed. It will take any .2009. (or current year), and replace with ' (2009).' (no quotes).

    So
    castle.2009.S01E01.yadayada.avi
    becomes
    castle (2009).S01E01.yadayada.avi

    Code:
    Option Explicit
        Dim objFS
     Dim strFileName
     Dim strYear
     Dim strTokenYear
     Dim strNewFileName
     Dim resp
     Wscript.Echo ""
     If Wscript.Arguments.Count <> 1 Then
      Wscript.Echo "  Invalid Syntax: Expecting 1 parameter (filename)"
     else
      Set objFS = CreateObject("Scripting.FileSystemObject")
      strFileName = Wscript.Arguments(0)
      If Not objFS.FileExists(strFileName) Then
       Wscript.Echo "  ERROR: " & strFileName & " does not exist."
       Wscript.Quit
      End If
      'MsgBox("Input File: " + strFileName)
     
      strYear=Year(Date)
      strTokenYear = "." & strYear & "."
      'MsgBox("tokenYear: " + strTokenYear)
     
      If InStr(strFileName, strTokenYear) > 0 Then
       strNewFileName = Replace(strFileName, strTokenYear, " (" & strYear & ").")
       '-- BEGIN SECTION 1 Uncomment this section to make interactive --
       'resp = MsgBox("Rename File" & Chr(13) & _
       '          "From: " & Chr(13) & strFileName & Chr(13) & _ 
       '          "To:" & Chr(13) &  strNewFileName, 1, "File Rename?")
       'If resp = 1 Then
       ' objFS.MoveFile strFileName, strNewFileName
       'End If
       '-- END SECTION 1 Uncomment this section to make interactive --
     
       '-- BEGIN SECTION 2 Console Section --
       Wscript.Echo "Renaming input file: " & strFileName
       Wscript.Echo "                 to: " & strNewFileName
       objSF.MoveFile strFileName, strNewFileName
       Wscript.Echo "Rename complete."
       '-- END SECTION 2 Console Section --
      End If
     End If
    NPVR Server: Win10 / AMD Phenom II X4 965 / 8gRAM / ATI Radeon 7700 Series / Hauppauge 2250
    Misc: HDHR Prime, rPI LibreElec & Amazon FireStick Kodi clients

  4. #4
    Join Date
    Mar 2006
    Location
    Sweden
    Posts
    604
    Thanks!
    That script did the work nicely. I created a .bat with one line:
    cscript FileRenamer.vbs //nologo castle.2009*
    So I'll run it right before the start of Wizmetadatagrabber...


    How are you coming up with that name? Are you using a renaming tool?
    I download my shows, so I don't use any renaming tools.

    I did take a look at your tool a long time ago, but it seemed to be designed to rename shows recorded in GBpvr.
    Last edited by 7ore; 2009-10-24 at 03:29 PM.
    GBPVR PC: Win7 ult x64 / Intel P Duo / 2 gb RAM / Asus Extreme Radeon HD3450 HDTV
    Video: Sony 40'' LCD TV
    Plugins: MovieWiz, MLpanel, Videos library, Music Spot, WebRadio - and skin: Community WS
    _____________________________________________
    XML is like kids. They start small and cute. Then they grow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •