Long file/folder-names & funny characters support
#31
also good is barenamex (i think its called) from the software section of xbox-scene.
Reply
#32
hi there,
currently i am using linux for my xbox but primary because the filenames on the fatx system suck. i know there are renaming tools but i want to keep the filenames!
what i am going to ask is if it would be possible to modify the ftp server in xbmc that filenames appear in the long format for the client but are in fact in xfat-convention on the fs. my idea would be to create a index file for each directory that contains the real name and the long name.
i have also seen a file-class in the xbmc source, does the ftp server make use of this class?

i dont think anyone else wants this feature, i would try to implement this by my own, i only want to know if its possible without too much work.
Reply
#33
thanks for moving the post to the right position.
i see this has been discussed over one year ago. is this now allready implemented? are you even working on it, or will i have to do it on my own?
Reply
#34
it's not being worked on.

currently we just truncate the files, no record is kept of the real filenames.

i suggest the following technique if you wish to implement it:

1. implement the renaming in the cfilehd class. just store it in a .realdirectorylist file, and use this file when a getdirectory() operation is performed to translate the names. this is the easy bit.

2. make xbfilezilla use xbmc's file classes. there's 2 ways i see of doing this.

a. it likely uses fread/fwrite etc. "just" implement a base function class which collects the real functions that do the file reading and writing and change the fread/fwrites etc. so that they use the base functions instead. then you just need to convert the fread/fwrites in one location to use the cfilehd methods.

b. redo xbfilezilla as a dll. i don't know how feasible this is, and is probably the harder method. once it's a dll, however, all file handling operations are automatically handled by xbmc's file classes.

good luck Smile

cheers,
jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#35
wayyy too many potential problems
xbmc doesnt have exclusive control of the xbox filesystem, what happens when other applications move or modify these 'long' files?

there is only one way this should ever be implimented imo, as a wrapper implimented in the bios.

hacks are not the way to fix filesystem limitations.
Reply
#36
@jmarshall

thanks for the tips. i already took a look inside the code to find some important places, which were similar to your suggestions. thank you really much, now i know i am on the right way Wink

i dont't really know what method i use for filezilla yet.
why do you think rebuilding the dll would be hard? (i never coded something for xbox yet)



@Loto_Bak

it doesn't matter to me if the files get modified outside. i implement this for my own and i will definitly only use xbmc for filetransfers.

also i don't see this as dramastic as you:
-if you loose the entry in the index-file, the file will still be shown in its truncated form.
-if you loose the file, the entry may still exist in the index-file, but i dont really care about this...

dont get me wrong: i would never release something like this, but for my own use it will be ok!
Reply
#37
i don't think modification outside of xbmc is a problem:

xbmc will use the file purely as a translation source - if it's asked for the long file, then it will look in the table to see if the conversion has been done to get the actual filename, then just continue (if the user has changed the filename then it'll just report that the file no longer exists).

on a directory listing from within xbmc, we first read the files in, then translate using the table to their long names.

any moved or changed files are viewed as they really are.

i don't see any potential issues with this, maybe i'm missing something?

cheers,
jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#38
sorry if i came off rude wasn't my intention

my point was more being, the implimentation is less than ideal. many of the fatx shortcommings can be made up for in other ways.

how so?
music files if they were tagged properly and scanned have no need for long filenames.
movie files are simular to music (less reliably so)

videos other than movies, pictures, and general filesystem maintanence are the areas that benfit.

the places that imo would benifit the most (emulation roms) would be left unaffected

just my 2 cents. take me with a grain of salt as i dont need the feature Smile
Reply
#39
crazy-flash:

the only reason i suggested that rebuilding filezilla server as a dll could pose problems is due to the fact that you'll need to export the commands it needs. probably starting with the official filezilla sources would be best in this case, and just add the exports necessary for correct xbmc operation. unsure of what is needed. if you've done this sort of thing before (lib/exe -> dll) then go for it.

otherwise, from a scan of the filezilla sources, it uses the win32 readfile()/createfile() etc. interfaces (around 8 functions in total by the looks) which you could replace with custom versions of each function that use the cfilehd class. the idea is that the functions are drop in replacements. for instance,

handle xboxcreatefile( ... )
{
cfilehd *file = new cfilehd()
file->open() / openforwrite() etc.
return (handle)file;
}

then just have a

#define xbox_invalid_handle_value null

in place of the usual invalid_handle_value.

in the other file commands you then just cast the handle back to a cfilehd pointer and do whatever needs doing.

let me know how you get on.

cheers,
jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#40
and do not forget you have to do the same in python. it is using open / fopen / fread and such all over the place.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#41
I have read here at the forums (and suffer myself Wink ) the name lost problem because FATX name limit of 48 character. Well, i've got and idea: at W9x times there was the "DOS name" feature, that it meaned files where stored with a "8.3" name because DOS, but later they where represented under Windows with full, 256 character name. My idea is to have in each directory it need a little txt (xml?) file full name and use it instead stored name. This feature only need to be added at the XBMC write/read functions, so althought apps that don't use that functions (ftp server? Sad ) couldn't be able to benefict of it but all the rest (search name, video player, browser and phyton scripts - i supose) yes, so you can see the full name on the screen, internet searches don't fail, etc, etc, etc...

Ey, i have say what was the correct place to implement it!!!:p
Reply
#42
how about using a old very old method descript.ion (create by JP-Soft 4DOS)
it is also support by total commander
just need to add a line in descript.ion file when uploading a file
Reply

Logout Mark Read Team Forum Stats Members Help
Long file/folder-names & funny characters support0