empeg tools

roger's picture

In response to this thread on the empeg BBS, I hacked together a couple of small tools for the empeg car player.

They're not particularly well-integrated yet, but that'll come later.

They're command-line programs, so you'll need to open a console window before running them. They all require .NET 2.0, which is installed by default on Windows Vista, but you might need to download and install it on other OS versions and editions. They also work fine on Mono.

FindEmpeg

This program looks for empegs on the local network. Run it with no arguments, as follows:

C:\Temp>FindEmpeg.exe
crowley at 10.0.0.7
crowley at 10.0.0.7
^C

It'll scan the local network once every thirty seconds, displaying the empeg's name and its IP address. Press Ctrl+C to stop it.

Note that the Windows Vista firewall might prompt you to unblock the application. It seems to still work OK even if you don't.

EmpegGet

Given the IP address of the empeg found above, this downloads the database files from the empeg. They're placed into the current directory (this will be fixed later). Run it as follows:

C:\Temp>EmpegGet.exe 10.0.0.7
Getting empeg database from 10.0.0.7
Copying http://10.0.0.7/empeg/var/database3 to ./database3
Copying http://10.0.0.7/empeg/var/tags to ./tags
Copying http://10.0.0.7/empeg/var/playlists to ./playlists

It requires the following:

  • Your empeg must be running v3.0-alpha.
  • Your empeg must be running the Hijack kernel.
  • The HTTP server must be enabled in the Hijack kernel.

You can see if it succeeded, because the database files are placed in the current directory:

  • database3
  • playlists
  • tags

EmpegDump

This parses the database files downloaded above and dumps them, in depth-first order, to the screen. I'll add XML, HTML or XPS output in a later release:

C:\Temp>EmpegDump.exe
00000100: empeg-car
 00000120: Artists
  00000130: 1000 Clowns
   00000140: (Not the) Greatest Rapper
    00000150: (Not the) Greatest Rapper (LP Version)
    00000160: (Not the) Greatest Rapper (Instrumental)
    00000170: Rainy Days (LP Version)
  000183f0: 2 Many DJ's
   00018400: As Heard On Radio Soulwax Pt. 2
    00018410: Peter Gunn (Live) & Where's Your Head At (Head-A-Pella)
(etc.)

Each line shows the FID in hex, followed by the title, indented under the parent playlist.

AttachmentSize
empeg-tools.zip10.66 KB

Comments

empegget

it gives these error:
Ikke-afviklet undtagelse: System.IO.FileNotFoundException: Filen 'C:\Documents a
nd Settings\-bo-\Skrivebord\empeg-tools_1\tags' blev ikke fundet.
Filnavn: 'C:\Documents and Settings\-bo-\Skrivebord\empeg-tools_1\tags'
   ved System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   ved System.IO.FileStream.Init(String path, FileMode mode, FileAccess access,
Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions
options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   ved System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
 FileShare share, Int32 bufferSize, FileOptions options)
   ved System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean dete
ctEncodingFromByteOrderMarks, Int32 bufferSize)
   ved System.IO.StreamReader..ctor(String path, Encoding encoding)
   ved EmpegDump.EmpegDatabase..ctor()
   ved EmpegDump.Program.Main()

Re: EmpegGet

Did you run EmpegGet.exe first? Did it write out the 'tags', 'database' and 'playlists' files?

empegget

i might have made an mistake... it runs like it should... and it's very fast... only thing is that it gives me an error in the end along with a box asking if i want to report the error to m$ 00007290: U2 - The Best Of 1990-2000 & B-Sides 000072a0: Even Better Than The Real Thing 000072b0: Mysterious Ways 000072c0: Beautiful Day 000072d0: Electrical Storm (William Orbit Mix) 000072e0: One 000072f0: Miss Sarajevo 00007300: Stay (Faraway, So Close!) 00007310: Stuck In A Moment You Can't Get Out Of 00007320: Gone (New Mix) 00007330: Until The End Of The World 00007340: The Hands That Built America (Theme From 'Gangs Of New York') 00007350: Discothèque (New Mix) 00007360: Hold Me, Thrill Me, Kiss Me, Kill Me 00007370: Staring At The Sun (New Mix) 00007380: Numb (New Mix) 00007390: The First Time Ikke-afviklet undtagelse: System.Collections.Generic.KeyNotFoundException: Den g ivne nøgle var ikke til stede i ordbogen. ved System.ThrowHelper.ThrowKeyNotFoundException() ved System.Collections.Generic.Dictionary`2.get_Item(TKey key) ved EmpegDump.PlaylistChildEnumerator.get_Current() ved EmpegDump.Program.Visit(Int32 indent, Entry entry) ved EmpegDump.Program.Main() C:\Documents and Settings\-bo-\Skrivebord\5594>

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.