Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#138801 - 01/02/2003 13:12 Hijack Web interface
MP3944
journeyman

Registered: 25/05/2002
Posts: 55
Loc: Grove City, OH, USA
Hello,
I have been unable to view the playlists on my empeg through the Hijack web interface for quite some time now. I installed charcoalgray's interface and still no luck. When I click the link to view/browse playlists, it just shows an Unattached Items link and nothing else, if I click that link then it will display an empty playlist.
I know I have playlists, because I can go through them on the actual empeg.
Also I have Hijack v309.
Any help would be great,
Thanks,
Justin
_________________________
1987 Porsche 944 http://www.heeyyguys.com

Top
#138802 - 01/02/2003 21:19 Re: Hijack Web interface [Re: MP3944]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
What does this show for you:

http://your.empeg.ip.addr/?FID=101&EXT=.htm

-ml

Top
#138803 - 02/02/2003 01:32 Re: Hijack Web interface [Re: mlord]
MP3944
journeyman

Registered: 25/05/2002
Posts: 55
Loc: Grove City, OH, USA
I have attached the page it shows me.....


Attachments
137622-192_168_0_100 playlists All Music.htm (94 downloads)

_________________________
1987 Porsche 944 http://www.heeyyguys.com

Top
#138804 - 02/02/2003 21:20 Re: Hijack Web interface [Re: MP3944]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Hmmm.. if you know how to, could you please send me a .tar or .zip file containing ALL of the files ending in "1" from /drive0/fids/ (and /drive1/fids/ if your unit has two disk drives), plus all of the files from the same place(s) that end in "0" which are under 1000 bytes in size if possible. Basically everything from there EXCEPT for the multi-megabyte tune files themselves..

Could take you a bit to assemble it, but with that data I can fix whatever's wrong in Hijack.

Thanks

Top
#138805 - 02/02/2003 21:57 Re: Hijack Web interface [Re: mlord]
MP3944
journeyman

Registered: 25/05/2002
Posts: 55
Loc: Grove City, OH, USA
Here you go...


Attachments
137861-fids.zip (18 downloads)

_________________________
1987 Porsche 944 http://www.heeyyguys.com

Top
#138806 - 02/02/2003 22:03 Re: Hijack Web interface [Re: MP3944]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
If the file you tried to attach was larger than 200k (I'm guessing it was), then Mark didn't get it from that post. You're going to have to email it to him.
_________________________
Tony Fabris

Top
#138807 - 03/02/2003 08:31 Re: Hijack Web interface [Re: MP3944]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Mmmmm.. I received the fids.zip that you emailed me, thanks.

The problem appears to be that your player is using the new fids directory structure design, which will eventually become the default for post-v2.00 player software.

However, the current player software, while it supports this new design (for forward compatibility), does not normally use it by default. And Hijack does not currently support it.

How the heck did you end up with this on your player??

What version of player software, and more importantly, Emplode (or JEmplode or emptool) are you using with your player?

Thanks


Top
#138808 - 03/02/2003 08:39 Re: Hijack Web interface [Re: mlord]
MP3944
journeyman

Registered: 25/05/2002
Posts: 55
Loc: Grove City, OH, USA
I am using v2.00 beta 13 on the player, and the most up to date versions of Jemplode and Hijack, per the Jemplode auto-update function. As to how the new structure design came to be on my player, I am stumped.
_________________________
1987 Porsche 944 http://www.heeyyguys.com

Top
#138809 - 03/02/2003 08:46 Re: Hijack Web interface [Re: MP3944]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
By any chance have you ever used mp3tofid? Because that can generate the new style FID structure. Read this

- Trevor

Top
#138810 - 03/02/2003 08:49 Re: Hijack Web interface [Re: MP3944]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Have you EVER used "mp3tofid" ?

Apparently version 3.00 (and higher) of mp3tofid uses the new format.

It is important to determine how this happened, because whatever did it was buggy -- it created duplicates of the root playlist and several other files -- your music directory structure is basically corrupted at this point, with some things in the new format, and others duplicated in the old format. No guarantees as to which copies of the playlists will be used when sync'ing the player with Emplode ...

-ml

Top
#138811 - 03/02/2003 09:18 Re: Hijack Web interface [Re: mlord]
MP3944
journeyman

Registered: 25/05/2002
Posts: 55
Loc: Grove City, OH, USA
Yep, I had tried out mp3tofid in the past. Is there anyway to undo the corruption to the filesystem without losing music?
_________________________
1987 Porsche 944 http://www.heeyyguys.com

Top
#138812 - 03/02/2003 09:25 Re: Hijack Web interface [Re: MP3944]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Is there anyway to undo the corruption to the filesystem without losing music?

Once a new-scheme file exists, the player will use that from then on, until the FID is deleted and re-created -- even though all FIDs created by the player (e.g. when told to do so by Emplode/Jemplode/Emptool) will be old-scheme.

This means that, for FIDs that exist both as new-scheme and old-scheme, the new-scheme one is the one the player is using, and thus probably the one you want (but check a few first with "ls -l" to make sure you're keeping the newer one).

Peter

Top
#138813 - 03/02/2003 09:36 Re: Hijack Web interface [Re: peter]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Mmmm... any chance of having Emplode remove duplicates at some point in the future?

The biggest problem here is that this player has two copies of fid 100 -- the root playlist. The one in fids/_00000/100 is correct, and the one stored as fids/100 is basically empty except for "Unattached Items".

In Hijack, I need an easy way to detect up front whether the new format exists on a player, so I can avoid the time-costly lookups for new-style fids when none exist.. before falling back to the old-style regardless.

??

Top
#138814 - 03/02/2003 09:42 Re: Hijack Web interface [Re: peter]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
So if the files under /drive[01]/fids/ are thought of as long hex numbers, which when zero padded on the left would be in the form YYYYYXXX. To "fix" your player, you must delete all files from /drive[01]/fids/ which are duplicated as /drive[01]/fids/_YYYYY/XXX

For example, your player has both /drive0/fids/100 and /drive0/fids/_00000/100 -- a no-no! You can safely delete /drive0/fids/100 in this case. There are others like that as well.

And back to the original problem of the web interface, I may update Hijack soon to cope with the new structure, if only I can figure out a cheap way to tell when a new structure exists..

Cheers

Top
#138815 - 03/02/2003 09:57 Re: Hijack Web interface [Re: mlord]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
The biggest problem here is that this player has two copies of fid 100 -- the root playlist. The one in fids/_00000/100 is correct, and the one stored as fids/100 is basically empty except for "Unattached Items".

If mp3tofid writes a "complete set" of files including FID 100, then presumably it's not meant to be run on a non-empty player?

In Hijack, I need an easy way to detect up front whether the new format exists on a player, so I can avoid the time-costly lookups for new-style fids when none exist.. before falling back to the old-style regardless.

Does Hijack stat files that often? The player just looks for the new name first and, if it's not found, the old name. It already has to look in two places for each fid (i.e. each drive); looking in four places doesn't seem to have caused any user-visible slowdown.

Peter

Top
#138816 - 03/02/2003 10:06 Re: Hijack Web interface [Re: mlord]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Mmmm... any chance of having Emplode remove duplicates at some point in the future?

No chance whatsoever -- duplicates are simply not visible over the protocol, so Emplode couldn't fix them if it tried. Nor is it likely that the player itself would fix the situation: if you muck with the filesystem at the command-line, you should expect to need the command-line to fix it -- it's simply impossible to "fix" every single way a user could get stuff wrong!

On the other hand, deleting a fid in Emplode/whatever will delete all duplicates of that fid if they exist.

Peter

Top
#138817 - 03/02/2003 10:22 Re: Hijack Web interface [Re: peter]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
In Hijack, I need an easy way to detect up front whether the new format exists on a player, so I can avoid the time-costly lookups for new-style fids when none exist.. before falling back to the old-style regardless.

Does Hijack stat files that often? The player just looks for the new name first and, if it's not found, the old name. It already has to look in two places for each fid (i.e. each drive); looking in four places doesn't seem to have caused any user-visible slowdown.

Hijack already tries to be smart about which drive to try first, based on where it most recently found a related item. And I'd like it to be smart about this too, if possible.

This is just for the web interface, which when one clicks on a LARGE playlist can take a very long time to generate the page -- completely stat/IO bound while doing so.

I think for now I'll just use a config.ini flag to turn on/off support for the new format, so that plain vanilla systems won't be impacted at all.

This will be out shortly, untested, in Hijack v310.

Cheers

Top
#138818 - 03/02/2003 13:14 Re: Hijack Web interface [Re: MP3944]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Okay, try again now with Hijack v310.. it should find all of your playlists now.

Top
#138819 - 03/02/2003 13:22 Re: Hijack Web interface [Re: peter]
pim
addict

Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
If mp3tofid writes a "complete set" of files including FID 100, then presumably it's not meant to be run on a non-empty player?

mp3tofid writes a complete set of fids. But it relies on rsync to transfer the fids
to the player. The rsync command as suggested in the docs wipes away all
fids not created by mp3tofid.

Going back to emplode does not do this, of course. So before
going back to using emplode, you should probably resync all fids
to the old scheme, having recreated the fids with mp3tofid's -o switch.

Pim


Top
#138820 - 03/02/2003 13:37 Re: Hijack Web interface [Re: peter]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Mmmm.. I just tried this out on my player, and noticed that "emptool" doesn't seem to use the new structure when uploading playlists -- it just drops them into /drive0/fids/ instead of into /drive0/fids/_00000/

???

Top
#138821 - 03/02/2003 13:44 Re: Hijack Web interface [Re: mlord]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Yet another case of "the man" trying to keep us Linux users down.
_________________________
- Tony C
my empeg stuff

Top
#138822 - 03/02/2003 13:54 Re: Hijack Web interface [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Mmm.. or is that just the "way it works" even for Emplode?

Doesn't hurt anything, but just means that new playlists and tunes don't take full advantage of the new directory structure -- a third party tool could be used to shuffle them into the right pigeonholes, I suppose. Like a shell script.

-ml

Top
#138823 - 03/02/2003 14:10 Re: Hijack Web interface [Re: mlord]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Doesn't hurt anything, but just means that new playlists and tunes don't take full advantage of the new directory structure -- a third party tool could be used to shuffle them into the right pigeoholes, I suppose. Like a shell script.


Like this?
_________________________
- Tony C
my empeg stuff

Top
#138824 - 03/02/2003 14:10 Re: Hijack Web interface [Re: mlord]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Mmm.. or is that just the "way it works" even for Emplode?

That's just the way it works. Emplode/Jemplode/Emptool don't get a vote as to where the file goes: they all just say to the player "create FID 0x2340 for me" and never even get to find out which drive it's on. In order for "protocol" (Emplode and friends) to create new-scheme FIDs, you need to be running a post-2.0 build of the player -- which no-one outside Empeg Towers currently is.

Peter

Top
#138825 - 03/02/2003 14:15 Re: Hijack Web interface [Re: mlord]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Mmmm.. I just tried this out on my player, and noticed that "emptool" doesn't seem to use the new structure when uploading playlists -- it just drops them into /drive0/fids/ instead of into /drive0/fids/_00000/

Yes, the player will recognise and read new-scheme FIDs, but any new FIDs created by the player (i.e. by Emplode etc.) will be old-scheme.

Whether just editing a playlist will make it migrate from new-scheme to old-scheme depends on how Emplode was written -- I can't remember now whether it deletes and recreates the FID (which would count as a new FID and thus be old-scheme) or whether it overwrites in-place (which would preserve the new-scheme FID).

Peter

Top
#138826 - 03/02/2003 14:21 Re: Hijack Web interface [Re: tonyc]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Something similar to that, yes, but not that exact script.

Cheers

Top
#138827 - 03/02/2003 14:26 Re: Hijack Web interface [Re: mlord]
pim
addict

Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
Like a shell script

I have come up with this:


#!/bin/sh

# unless you remove this line, this script runs dry
echo=echo

for newfid in /drive?/fids/_*/*
do
# try not to use external commands for speed
oldfid=${newfid#drive?/fids/_}
oldfid=${oldfid#0}
oldfid=${oldfid#0}
oldfid=${oldfid#0}
oldfid=${oldfid#0}
oldfid=${oldfid#0}
oldfidhi=${oldfid%/*}
oldfidlo=${oldfid#${oldfidhi}/}
oldfid=${newfid%%/*}/fids/${oldfidhi}${oldfidlo}

if test $newfid -nt $oldfid
then
# move the new-scheme fid if it is newer
$echo mv -v $newfid $oldfid
else
# delete it otherwise
$echo rm -vf $newfid
fi
done



However, it does not take care of the effect that mp3tofid uses a different
algorithm to distribute fids across drives than (j)emplode/player. It should
work if you only have one drive, though.

Onother gotcha is that file date comparisons may not work if your player's
idea of the date is off. mp3tofid/rsync stores the file dates of the source
files, while the player uses the current date of the player.

Pim

Top
#138828 - 03/02/2003 14:35 Re: Hijack Web interface [Re: pim]
pim
addict

Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
I have come up with this:

Oops, I misunderstood. Mark was talking about a script that
actively uses the new scheme. My example script was
meant for tearing it down and taking duplicates along with it.

Pim

Top
#138829 - 03/02/2003 17:26 Re: Hijack Web interface [Re: mlord]
pim
addict

Registered: 14/11/2000
Posts: 474
Loc: The Hague, the Netherlands
Apparently version 3.00 (and higher) of mp3tofid uses the new format.

It is important to determine how this happened, because whatever did it was buggy


The only "buggy" thing I can think of is not using "--delete" with rsync, or using something
other than rsync (FTP?). Either way, old fids are not deleted and duplicate fids arise.
Duplicates can also arise when using the old directory scheme; you could end
up with duplicate fids on both drives.

Fixing this is easy in either situation. Just run rsync again, this time with the --delete switch.

Abandoning mp3tofid and its new directory scheme does not seem to pose problems
for (j)emplode, but it is probably safest to revert to the old scheme.

Pim

Top
#138830 - 03/02/2003 17:50 Re: Hijack Web interface [Re: pim]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Sounds safe enough, either way now. The leftover bits don't hurt anything, but getting rid of them is a Good Thing (tm).

Top