SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Linux > SageTV for unRAID/Docker
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV for unRAID/Docker Discussion related to SageTV for unRAID/Docker. Questions, issues, problems, suggestions, etc. relating to SageTV for unRAID/Docker should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-28-2019, 07:33 PM
btrcp2000 btrcp2000 is offline
Sage Fanatic
 
Join Date: Aug 2007
Posts: 888
Comskip and corrupt wiz.bin

Starting a new thread as I think I found the root of my issue, need guidance on next steps.

Comskip quit months ago, just found time to look into it. For giggles I renamed the wiz.bin and bak files and restarted the docker. CD/comskip fired right up perfectly.

I've never really understood what all is in it, but it seems to have found all my recordings. What do I lose if I just let it work off the new one? Watch history? Can I somehow fix the old one?
__________________
[size=1]Current Server:V9 UNRAID Docker, SuperMicro x9dri-LNF4+, 32 GB ECC, 2x Xeon e5-2660v2, storage array 6TB, 2 Dish r5000HD tuners, 1 HDHomerun Quatro, 1 HDHomerun Extend
4 Nvidia Shield TVs with Miniclient
Reply With Quote
  #2  
Old 02-28-2019, 09:38 PM
Tiki's Avatar
Tiki Tiki is offline
Sage Icon
 
Join Date: Feb 2005
Location: Southwest Florida, USA
Posts: 2,009
Wiz.bin stores the settings for all your Favorites and it maintains your Watched history. It also stores EPG data (but this gets updated all the time any way). It also stores metadata for your recordings (but as you found out, this info is now stored multiple ways, so most of it gets recreated automatically if you delete wiz.bin). Some plugins may store additional information in wiz.bin too.

A while back someone published a tool on this forum somewhere that could read a wiz.bin file and export most of the contents to some sort of sql database format. I don’t know if anyone ever published a tool to do the reverse. There are no repair tools for wiz.bin though.
__________________
Server: Ryzen 2400G with integrated graphics, ASRock X470 Taichi Motherboard, HDMI output to Vizio 1080p LCD, Win10-64Bit (Professional), 16GB RAM
Capture Devices (7 tuners): Colossus (x1), HDHR Prime (x2)
,USBUIRT (multi-zone)
Source:
Comcast/Xfinity X1 Cable
Primary Client: Server Other Clients: (1) HD200, (1) HD300
Retired Equipment: MediaMVP, PVR150 (x2), PVR150MCE,
HDHR, HVR-2250, HD-PVR
Reply With Quote
  #3  
Old 02-28-2019, 10:48 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by Tiki View Post
Wiz.bin stores the settings for all your Favorites and it maintains your Watched history. It also stores EPG data (but this gets updated all the time any way). It also stores metadata for your recordings (but as you found out, this info is now stored multiple ways, so most of it gets recreated automatically if you delete wiz.bin). Some plugins may store additional information in wiz.bin too.

A while back someone published a tool on this forum somewhere that could read a wiz.bin file and export most of the contents to some sort of sql database format. I don’t know if anyone ever published a tool to do the reverse. There are no repair tools for wiz.bin though.
That was me. https://forums.sagetv.com/forums/sho...d.php?p=577768

That tool may help determine where the corruption is or may choke on it too. I figured I’d modify the code as needed to manually repair my wiz.bin if I ever needed to.
Reply With Quote
  #4  
Old 02-28-2019, 11:11 PM
btrcp2000 btrcp2000 is offline
Sage Fanatic
 
Join Date: Aug 2007
Posts: 888
Thanks, but that is well beyond my abilities to decipher. All I really need is favorites, which I am hoping to export from the webUI if I can ever get that working.
__________________
[size=1]Current Server:V9 UNRAID Docker, SuperMicro x9dri-LNF4+, 32 GB ECC, 2x Xeon e5-2660v2, storage array 6TB, 2 Dish r5000HD tuners, 1 HDHomerun Quatro, 1 HDHomerun Extend
4 Nvidia Shield TVs with Miniclient
Reply With Quote
  #5  
Old 03-01-2019, 11:05 AM
btrcp2000 btrcp2000 is offline
Sage Fanatic
 
Join Date: Aug 2007
Posts: 888
Quote:
Originally Posted by wnjj View Post
That was me. https://forums.sagetv.com/forums/sho...d.php?p=577768

That tool may help determine where the corruption is or may choke on it too. I figured I’d modify the code as needed to manually repair my wiz.bin if I ever needed to.
Out of stubbornness I read your thread and although it is way over my head, I was able to figure out to run it by dragging the wiz.bin onto to the .exe in windows. Is it creating an output somewhere? where does the text file land?

thanks
__________________
[size=1]Current Server:V9 UNRAID Docker, SuperMicro x9dri-LNF4+, 32 GB ECC, 2x Xeon e5-2660v2, storage array 6TB, 2 Dish r5000HD tuners, 1 HDHomerun Quatro, 1 HDHomerun Extend
4 Nvidia Shield TVs with Miniclient
Reply With Quote
  #6  
Old 03-01-2019, 12:25 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by btrcp2000 View Post
Out of stubbornness I read your thread and although it is way over my head, I was able to figure out to run it by dragging the wiz.bin onto to the .exe in windows. Is it creating an output somewhere? where does the text file land?

thanks
Dragging onto the .exe just ran it without the proper syntax so probably didn't do anything. You need to open a command prompt by running 'cmd' from the start|run menu (or Windows key + R).

Then 'cd' into the location where the .exe (copy the wiz.bin there too) and run the following:
Code:
wiz2sql.exe wiz.bin -schema schema.sql -data data.sql
The data.sql file created will be a large text file with all of your 'stuff' in it, or at least as much as can be found before any corruption.
Reply With Quote
  #7  
Old 01-15-2020, 10:42 PM
mvkerr mvkerr is offline
New Member
 
Join Date: Mar 2004
Posts: 5
Favorites

I know this is old post, but my system crashed and I also am interested in recovering the Favorites list from the Wiz.bin. I used your post to extract the Wiz.bin file into the SQL files, created the Wiz.db, and then loaded that into SQLiteStudio to view the data.

Where do I decipher how the Favorites are stored? I don't see a table listed as Favorites.

Thanks.
Reply With Quote
  #8  
Old 01-17-2020, 02:22 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
I think favorites are "agents" of type "love" but I'll have to look when I get back to a PC.
Reply With Quote
  #9  
Old 01-17-2020, 03:28 PM
mvkerr mvkerr is offline
New Member
 
Join Date: Mar 2004
Posts: 5
Thanks. That showed me where to look closer. I checked the agents columns again and found "favProps" on the last column. I did not have my window wide enough to see it before. Most of the tables were very short width in SQLiteStudio.

I found a unique input as "UserCategory" for this column that appears to line up with the Favorites that I had. If I used a "Keyword" for a favorite name it appears in the "keyword" column like "TITLE:GOLF". But, all the ones that were entered by the Show Title can't be deciphered here.

I grep'd the data.sql file for "UserCategory" and am now creating a list to grep for the numbers in the "title" column of the agent table to find the rest of the names.

Thanks for you help. Could not have found the info with out your posts and supplied program. My data.sql file is 500MB, so it has been a while since I had a crash and lost everything without my backups being saved. My backup cron job died last summer and I did not notice, so no current backups.
Reply With Quote
  #10  
Old 01-17-2020, 03:41 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Yes, favorites are agents with agentmask bit 0 set.

Here's the code in Wizard.java that gets favorites. LOVE_MASK = 0x0001.

Code:
  public Agent[] getFavorites()
  {
    if (loading) return new Agent[0];

    Index indy = getIndex(AGENT_CODE, AGENTS_BY_CARNY_CODE);
    ArrayList<Agent> rv = new ArrayList<Agent>();
    try {
      indy.table.acquireReadLock();
      for (int i = 0; i < indy.table.num; i++)
        if ((((Agent) indy.data[i]).agentMask & Agent.LOVE_MASK) != 0)
          rv.add((Agent)indy.data[i]);
    } finally {
      indy.table.releaseReadLock();
    }
    return rv.toArray(new Agent[0]);
  }
Look inside Agent.java for all of the bits in the agentmask (i.e. firstruns, by actor, etc).
Reply With Quote
  #11  
Old 01-17-2020, 04:41 PM
mvkerr mvkerr is offline
New Member
 
Join Date: Mar 2004
Posts: 5
My posts are moderated so delayed to appear.

My grep method worked and I was able to get all my Favorites back. The BMT tools allowed me to get my 400+ unwatched recordings imported back into the correct locations. I am not a programmer at all, so your JAVA answer was over my head. My last programming was PERL scripts in the late 80's.

Thanks again. The crash got me moved to 64-bit SAGETV, so my speed is greatly improved with the increased JAVA heap size (and smaller Wiz.bin - 500M --> 40M). I was constantly crashing when it went into Slideshow sleep mode.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Corrupt IDs? jasonb1 SageTV Software 1 05-17-2016 04:35 PM
Corrupt EPG Doubletop SageTV Australia/New Zealand 0 03-07-2015 03:53 PM
Wiz.bin corrupt ohpleaseno SageTV Software 3 01-15-2010 01:46 PM
Corrupt Wiz.bin bjbeeson SageTV Linux 23 10-13-2008 04:58 AM
Corrupt Wiz.bin Wakecrash SageTV Beta Test Software 0 08-24-2005 06:03 PM


All times are GMT -6. The time now is 12:34 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.