Mede8er Forum

Mede8er Community => Mede8er Community Tools => Favourite Manager => Topic started by: mognons on May 09, 2012, 02:37:10 PM

Title: Mac OS X Favorite Manager
Post by: mognons on May 09, 2012, 02:37:10 PM
Hi folks, I'm not sure if this is the right place for this topic but I'm pretty sure that a moderator will move it if needed.

I'm practicing Mac OS X programming and I wrote a little utility to do one simple thing that cannot be done with the standard mede8er firmware: changing the order in which favo(u)rites are shown on the screen.

With Favourite Manager for OS X you can:
1) see every favs on your mede8er in the same order as shown on your TV. Handles network, USB and card. Should handle internal disk (HDD) for 450X2/500X2 users...
2) Move them around with drag 'n' drop
3) Easily change the genre icons for any given fav
4) Delete single favorite
5) Backup (and restore, of course) favorites stored in your m8r flash memory
6) Write configuration back to mede8er (flash memory, disks and card)

The application has been developed for personal use and tested on my own 400X2; this means that I've no internal HDD to test it upon, so any feedback about this will improve the app quality. Also this application has not been tested against mede8er model using old processors like the 500X series. It may work, who knows... :-)

Requirements:
*) Mac OS X 10.6 and later
*) a nnnX2 series mede8er
*) NAS enabled
*) Web remote enabled
*) LAN (cable or wifi) to connect your Mac AND the mede8er (same subnet, of course)

If anyone on OS X is interested in beta testing it (or use, for that matter), I'll be glad to forward him a copy of the application.
I cannot put on the forum as its size (668 kbytes) is beyond the attachment limit of 510 kb....

UPDATE: Download Link    http://www.mede8er.org/beta/Third_Party/Favourite Manager.zip (http://www.mede8er.org/beta/Third_Party/Favourite Manager.zip)

Enjoy!  ;D

Disclaimer:
The application is available "as is" and no guarantee is provided with it, nor can I found liable for any damage occurring to your properties while using this application.

While the application is free and available without licensing, I still retain any rights upon the application code, logic and technology. This application may not be distributed outside this forum without given permission by the author (me).

Any feedback is warmly welcomed!!!
Title: Re: Mac OS X Favorite Manager
Post by: Skylinc on May 09, 2012, 07:29:01 PM
Oh, wow! This sounds cool! I'm sure some of the Windows users are going to hate you for developing in Mac ;)
Title: Re: Mac OS X Favorite Manager
Post by: mognons on May 09, 2012, 07:31:40 PM
mmm, that's a good excuse for them to buy a shiny new Mac  ;D
Title: Re: Mac OS X Favorite Manager
Post by: Unreal on May 09, 2012, 07:47:38 PM
@mognons

Can you please explain briefly the technique you used to update the contents in flash memory?  In the past, I re-arranged the contents of one of my FavLink_USB files, but it had no actual effect on the Favourites screen because the changes to the FavLink_USB file were not reflected in flash memory.  I'm curious how you were able to update flash memory with the changes so I can do something similar (from my Windows system).  Since you state the web remote option is needed, I suspect you are using this to remove the links then create new links, both of which would update flash.  Is that how you did it, or did you use some other technique?
Title: Re: Mac OS X Favorite Manager
Post by: Mede8er1 on May 09, 2012, 07:54:48 PM
mognons

Happy to put this on our FTP and create a download link.

Just mail it to technical@mede8er.com

Mede8er1
Title: Re: Mac OS X Favorite Manager
Post by: mognons on May 09, 2012, 07:57:50 PM
I load all the FavLink files (from flash, usb and card), read the corresponding XML, reorder their timestamp (that's the "sort key" for the mede8er firmware) according to what the user have done with the application and then rewrite the modified FavLink files to the place they belong to.

The only "challenge" is to get to the FavLink_NET that's stored in flash memory.
As you suspect, that's where the "web remote" part comes into play, in particular I make use of the cubermctrl.cgi which is made available via the embedded HTTP server. Beware: this CGI is widely undocumented, so take care when playing with  8)

If you have any other question feel free to ask. If moderators have nothing to say against it, of course  :-X


@Meder8er1
the zip file containing the application is on his way to technical@mede8er.com...
no installer is provided because the application is self-contained and need nothing but itself.
Thank you for caring  ;)
Title: Re: Mac OS X Favorite Manager
Post by: mognons on May 09, 2012, 08:23:31 PM
Here's a "small" screenshot of Favourite Manager in action...

(http://img21.imageshack.us/img21/948/fmload.png)
By mognons (http://profile.imageshack.us/user/mognons) at 2012-05-09
Title: Re: Mac OS X Favorite Manager
Post by: Unreal on May 10, 2012, 12:56:17 AM
@mognons

Wow, the <Timestamp> field.  Seems so obvious for the order.  Thanks.
Title: Re: Mac OS X Favorite Manager
Post by: mognons on May 12, 2012, 08:23:10 PM
While I may suppose that nobody is interested in trying this little app, I have to say thanks to mede8er staff that acknowledged
 to make Favourite Manager available thru their own FTP site.

Anyway, should anybody have difficulties with FTP, here is a viable alternative via DropBox: http://dl.dropbox.com/u/12117639/Favourite%20Manager.zip (http://dl.dropbox.com/u/12117639/Favourite%20Manager.zip)

Enjoy!

m.

Post scriptum: how many users here are Mac addicted?
Title: Re: Mac OS X Favorite Manager
Post by: mede8dax on March 25, 2013, 10:38:44 AM
Great. Will this work for the 600x3d?
Title: Re: Mac OS X Favorite Manager
Post by: mognons on March 25, 2013, 10:43:23 AM
It should work, but it has been reported that it fails with NFS-based favorites: when it was written I had no NFS share to test it with ;)

Title: Re: Mac OS X Favorite Manager
Post by: Lock on August 06, 2013, 08:39:04 AM
I confirm it doesn't seems to work. I've a 600X3 and my favorites are via NFS.
The app gets stuck on retrieving data from the device. :(

Is there any other way to edit it? Even manually?
Thanks.
Title: Re: Mac OS X Favorite Manager
Post by: mognons on August 06, 2013, 08:48:02 AM
Yep, it does not with current firmware on X3 series. The project is quite old and based on reverse enginereed informations based on the old X2 firmware.

You cannot edit the favorite XMLs by hand as they are stored INSIDE your mede8er and cannot easily retrived and stored back after editing. That's why FavMan does not work anymore…
Only USB disk based favorites can be edited, either by hand or via this application.
Should Sanji or Mede8er make available a new way to interact with the "insides" of the device, I could update the app to work with new firmware.

Desolato...
Title: Re: Mac OS X Favorite Manager
Post by: Lock on August 06, 2013, 09:23:42 AM
I was "able" to extract a Mede8er.cfg from a USB key (I guess it's a copy of the configuration I've saved from the setup option).
Do you think it's not possible to manually edit that one somehow and then restore it to Med using the same setup option?
Also I've no idea about the format, opening it it doesn't seems plain text.

Thanks. :)

Edit: eh eh I drag&dropped the file in the address file of application but it only accepts an IP. :P
Title: Re: Mac OS X Favorite Manager
Post by: mognons on August 06, 2013, 09:28:06 AM
AFAIK the .cfg file does not contain any information about favorites, but I may be wrong 'cause I'm not looking at one of these files since last year and, you know, things may change  ;D

I know the format of a favorite entry and could take a look at your cfg file to see if contains any useful info. Should you want me to analyze it, just send it to me by email...
Title: Re: Mac OS X Favorite Manager
Post by: Lock on August 06, 2013, 10:02:41 AM
Thank you, Mognons, very kind of you.

You can access the file from my dropbox folder:
https://dl.dropboxusercontent.com/u/2449859/immagini/mede8er%20themes/Mede8er.cfg.zip (3 Mb)

Don't waste too much time, thu, I was excited by finding your application because I was fighting with the default favorite list organization of my X3 that was "out-of-standards" compared to Media Library one. But it's nothing really of vital importance. :)
I'd like the idea to also personalize the folder image but maybe it's just related to gender and not to actual folders.

Anyway many thanks, have a nice day. :)

P.s. I've just seen the screenshot of your favorite screen. Are you italian by any chance? :)
P.p.s. Yes, you are. Just had a look to your profile. :)
P.p.p.s. Non perderci troppo tempo se č una cosa complicata. :)
Title: Re: Mac OS X Favorite Manager
Post by: mognons on August 06, 2013, 10:23:36 AM
Got it!
Bad news first: the format is not that easy to handle. Dunno what happens if modified and restored to mede8er. I guess it contains some binary code, but also…
Good news: there is something resembling your favorite, in plain XML style, but I think that they really are your "Network Shortcut" shares and not your favorites…
You may try, at your own risk, to edit the section between <Storage> and </Storage>, changing the content of the tag <Timestamp> for each item: Timestamp is a numeric value representing the date and time the share (or favorite) was added to the system and it used to ORDER the items. Just change the last digits on the the right so the progression reflects the order that you want.
Backup your cfg first then cross your fingers and… use Text Edit to open the file, then search for "<Storage" (senza virgolette!).

Good luck!

PS SI.
PPS Si, infatti.
PPPS Non ti preoccupare, giornata fiacca al lavoro… :D

Title: Re: Mac OS X Favorite Manager
Post by: Lock on August 06, 2013, 10:56:39 AM
hmmm... you know what?
I unzipped the config file of the link and Finder automatically recognized the file as another zipped one (transl: in pratica lo ha scompattato automaticamente due volte) and now I see a folder structure with several files inside.
One of these, inside a folder called dvdplayer, is called FavLink_NFS and has the following text:

Code: [Select]
<?xml version="1.0" encoding="UTF-8" ?>
<Storage>
    <Device>7</Device>
    <Label></Label>
    <Link>
        <Item>
            <Hash>7c5a8749a01c1bc1c3289dfd2e21fcee</Hash>
            <Type>4</Type>
            <Timestamp>1375301665</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/1 - film/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
        <Item>
            <Hash>bea5960cb26cef0a4834bb2819232d3c</Hash>
            <Type>4</Type>
            <Timestamp>1375301669</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/2 - serie tv/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
        <Item>
            <Hash>eca2419652de4162c5b81d766d407c3d</Hash>
            <Type>4</Type>
            <Timestamp>1375301672</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/3 - cartoni animati/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
        <Item>
            <Hash>2b26585378a24b5435622ccc1137ca3c</Hash>
            <Type>4</Type>
            <Timestamp>1375301674</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/4 - eye tv/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
        <Item>
            <Hash>b402c4d923930c30f134c3b89c46f4a5</Hash>
            <Type>4</Type>
            <Timestamp>1375301677</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/5 - musica/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
        <Item>
            <Hash>cd960a0529ec943d9cdd9c3a3a13da67</Hash>
            <Type>4</Type>
            <Timestamp>1375301679</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/6 - Apple videos/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
        <Item>
            <Hash>ccc6822d1407816332c07af32cdf3f33</Hash>
            <Type>4</Type>
            <Timestamp>1375301681</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/7 - Mian/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
        <Item>
            <Hash>1787fcaacd3e30bc724445c14cf2d055</Hash>
            <Type>4</Type>
            <Timestamp>1375301683</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/8 - sport/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
        <Item>
            <Hash>ec8a089103d4457cc1fde2923bd61ba7</Hash>
            <Type>4</Type>
            <Timestamp>1375301687</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/9 - altro/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
    </Link>
</Storage>

that is exactly my favorite list. :)

So now the point is to discover what kind of compression the mede8er.cfg config file has and everything is done.

Now a further curiosity could be if it's possible to change the folder aspect, maybe playing with genre. But maybe it's something I could do manually on Med too?
Title: Re: Mac OS X Favorite Manager
Post by: mognons on August 06, 2013, 11:21:13 AM
hmmm... you know what?
I unzipped the config file of the link and Finder automatically recognized the file as another zipped one (transl: in pratica lo ha scompattato automaticamente due volte) and now I see a folder structure with several files inside.
One of these, inside a folder called dvdplayer, is called FavLink_NFS and has the following text:

Code: [Select]
<?xml version="1.0" encoding="UTF-8" ?>
<Storage>
    <Device>7</Device>
    <Label></Label>
    <Link>
        <Item>
            <Hash>7c5a8749a01c1bc1c3289dfd2e21fcee</Hash>
            <Type>4</Type>
            <Timestamp>1375301665</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/1 - film/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
        <Item>
            <Hash>bea5960cb26cef0a4834bb2819232d3c</Hash>
            <Type>4</Type>
            <Timestamp>1375301669</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/2 - serie tv/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
        <Item>
            <Hash>eca2419652de4162c5b81d766d407c3d</Hash>
            <Type>4</Type>
            <Timestamp>1375301672</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/3 - cartoni animati/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
        <Item>
            <Hash>2b26585378a24b5435622ccc1137ca3c</Hash>
            <Type>4</Type>
            <Timestamp>1375301674</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/4 - eye tv/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
        <Item>
            <Hash>b402c4d923930c30f134c3b89c46f4a5</Hash>
            <Type>4</Type>
            <Timestamp>1375301677</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/5 - musica/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
        <Item>
            <Hash>cd960a0529ec943d9cdd9c3a3a13da67</Hash>
            <Type>4</Type>
            <Timestamp>1375301679</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/6 - Apple videos/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
        <Item>
            <Hash>ccc6822d1407816332c07af32cdf3f33</Hash>
            <Type>4</Type>
            <Timestamp>1375301681</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/7 - Mian/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
        <Item>
            <Hash>1787fcaacd3e30bc724445c14cf2d055</Hash>
            <Type>4</Type>
            <Timestamp>1375301683</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/8 - sport/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
        <Item>
            <Hash>ec8a089103d4457cc1fde2923bd61ba7</Hash>
            <Type>4</Type>
            <Timestamp>1375301687</Timestamp>
            <URL>
                <![CDATA[/tmp/nfs/mnt/[movies]/9 - altro/]]>
</URL>
            <Genre>
                <![CDATA[default]]>
</Genre>
            <Personal>
                <d>192.168.0.5:/mnt/DroboFS/Shares/Nadine</d>
                <h />
                <a />
                <w />
            </Personal>
        </Item>
    </Link>
</Storage>

that is exactly my favorite list. :)

So now the point is to discover what kind of compression the mede8er.cfg config file has and everything is done.

Now a further curiosity could be if it's possible to change the folder aspect, maybe playing with genre. But maybe it's something I could do manually on Med too?
Good job, I didn't think about a double-zipped file! It looks uncompressed, may a tar file or similar…

Sure you can change the icon representing each favorite, use the menu and change the "genre" of the favorite.
Title: Re: Mac OS X Favorite Manager
Post by: Lock on August 06, 2013, 12:35:30 PM
Thanks for moral support. :)
Title: Re: Mac OS X Favorite Manager
Post by: mognons on August 06, 2013, 02:06:04 PM
mmm, maybe a little more than just moral…  8)


Take a look at the attached screenshot: does it feel somewhat familiar?

It IS a tar archive, by the way...
Title: Re: Mac OS X Favorite Manager
Post by: Lock on August 06, 2013, 07:23:13 PM
OOOOHHHH!  :D