Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - deanzilla

#1
On the ICEBOX, I add a video source being the BeyonWiz T4 Ip address:

"smb://192.168.1.95:445/Movie" (change the IP address to your own one)

When importing as "Movies", make sure you "Choose information provider" to "Local information only", eg it will use the .nfo files you created.
#2
Example input meta file: 20250619 1925 - SBS World Movies - Movie_ The Year Of Living Dangerously.ts.meta

1:0:19:357:350:3202:EEEE0000:0:0:0::SBS World Movies
Movie: The Year Of Living Dangerously
A news reporter becomes hot property when he is stationed in Indonesia at the same time its president incites civil unrest. Moral dilemmas surface, as the correspondent must decide how far he wants to go to get the story of the moment.  Mel Gibson, Sigourney Weaver, Bill Kerr.
1750325100
Movie:_The_Year_Of_Living_Dangerously Tuner-C
709306621
2613641048
f:0,c:0000a2,c:010053,c:02002a,c:0300a2,c:050001
188
0


Example NFO file output: 20250619 1925 - SBS World Movies - Movie_ The Year Of Living Dangerously.nfo

<?xml version='1.0' encoding='utf-8'?>
<movie><title>Movie: The Year Of Living Dangerously</title><plot>A news reporter becomes hot property when he is stationed in Indonesia at the same time its president incites civil unrest. Moral dilemmas surface, as the correspondent must decide how far he wants to go to get the story of the moment.  Mel Gibson, Sigourney Weaver, Bill Kerr.</plot><studio>SBS World Movies</studio><premiered>2025-06-19</premiered><aired>2025-06-19</aired></movie>

#3
Ok, after a bit of work, here is my Python script (that will run on the BeyonWiz T4) to create the .NFO prior to importing them into the new ICEBOX.

Enable SSH on the BeyonWiz, give it a password.

"ssh root@IP_ADDRESS"

Create a local script called "meta2nfo.py"

"vi meta2nfo.py"

Copy this into the editor:

import os
import xml.etree.ElementTree as ET
from datetime import datetime

def parse_meta(meta_path):
    try:
        with open(meta_path, 'r') as f:
            lines = [line.strip() for line in f.readlines() if line.strip()]
        if len(lines) < 4:
            return None, None, None, None
        channel = lines[0].split(':')[-1].strip()
        title = lines[1].strip()
        plot = lines[2].strip()
        timestamp_unix = lines[3].strip()
        return title, plot, channel, timestamp_unix
    except Exception as e:
        print("[!] Error reading {}: {}".format(meta_path, e))
        return None, None, None, None

def normalize_title(title):
    return "Movie:" + title[6:] if title.startswith("MOVIE:") else title

def write_nfo(title, plot, studio, timestamp_unix, output_path):
    title = normalize_title(title)
    root = ET.Element('movie')
    ET.SubElement(root, 'title').text = title
    ET.SubElement(root, 'plot').text = plot
    if studio:
        ET.SubElement(root, 'studio').text = studio
    if timestamp_unix and timestamp_unix.isdigit():
        dt = datetime.utcfromtimestamp(int(timestamp_unix))
        date_str = dt.strftime('%Y-%m-%d')
        ET.SubElement(root, 'premiered').text = date_str
        ET.SubElement(root, 'aired').text = date_str
    tree = ET.ElementTree(root)
    tree.write(output_path, encoding='utf-8', xml_declaration=True)

def main(folder_path):
    if not os.path.isdir(folder_path):
        print("[!] Invalid directory.")
        return

    meta_files = sorted(f for f in os.listdir(folder_path) if f.endswith('.meta'))
    total = len(meta_files)
    print("[OK] Found {} .meta file(s).\n".format(total))

    for idx, filename in enumerate(meta_files, 1):
        full_path = os.path.join(folder_path, filename)
        title, plot, channel, timestamp = parse_meta(full_path)

        if not title:
            print("[{}/{}] Skipped {} (missing title)".format(idx, total, filename))
            continue

        name = filename.replace('.ts.', '.', 1)
        if name.endswith('.meta'):
            name = name[:-5]
        nfo_path = os.path.join(folder_path, name + '.nfo')

        write_nfo(title, plot, channel, timestamp, nfo_path)
        print("[{}/{}] Created: {} | Title: \"{}\" | Channel: {}".format(
            idx, total, os.path.basename(nfo_path), normalize_title(title), channel))

if __name__ == '__main__':
    folder = input("Enter full path to folder with .meta files: ").strip()
    main(folder)


The run "python3 meta2nfo.py"

When prompted, enter the directory "/hdd/movie"

This will then create all of the .NFO files

#4
I've had a look at the forum and can't find anything specific on how to generate the correct metadata for Icebox.  I see that the T4 has files such as .eit and .meta and they need to be converted to a correctly formatted .nfo.

Has anyone done this before and has scripts or programs they can share?