Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.

View Entry Info: Colon symbol in Directory Name

Category:
Possible Bug
What ViX Image build number are you using?
Please provide your ViX Team image build number. Menu > Information > About > Build number > ENTER THIS NUMBER e.g. 4.2.028
5.3.034
Have you tried a flash WITHOUT settings restore?
Have you tried this? PLEASE SELECT YES OR NO.
No
Have you tried a flash WITH settings restore?
Have you tried this? PLEASE SELECT YES OR NO.
No
Page 2 of 2 FirstFirst 12
Results 16 to 30 of 30

Thread: Colon symbol in Directory Name

  1. #16
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,780
    Thanks
    237
    Thanked 1,658 Times in 1,306 Posts
    Quote Originally Posted by fat-tony View Post
    My $PATH variable in linux mint:
    Sorry. I mis-read what you wrote.
    It would be a problem (in fact, impossible) to get a directory with a ":" in its name into PATH.

    However, you're not likely to want to put a directory created by Vix into PATH.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  2. #17
    ccs's Avatar
    Title
    ViX Beta Tester
    Join Date
    Sep 2014
    Posts
    5,836
    Thanks
    554
    Thanked 1,277 Times in 1,089 Posts
    The only problem with a ":" in the folder name in ViX, as far as I can tell, is that selecting it in movielist returns the folder as empty.
    All other operations appear to work ok.
    I had debug logs on yesterday when trying it out, and there were no obvious failures being reported.

  3. #18
    Joe_90's Avatar
    Title
    Moderator
    Join Date
    Mar 2014
    Location
    Wicklow, Ireland
    Posts
    4,109
    Thanks
    1,274
    Thanked 1,122 Times in 884 Posts
    One solution is to sanitise the input to exclude the ":" and replace it with a space/hyphen/underscore. I hate seeing punctuation characters in file or directory names as it gives rise to issues of portability between various OS's. But, that's just me
    GB Quad Plus, Mut@nt HD51, AX HD61, 80cm dish and Supreme Dark motor. Sony STR-DN 1060, Sony UHP-H1 Bluray, Odroid N2+ (CoreElec), Monitor Audio Bronze 5.1 speakers

  4. #19
    Valiant's Avatar
    Title
    Senior Member
    Join Date
    May 2016
    Posts
    145
    Thanks
    99
    Thanked 38 Times in 33 Posts
    The sub directory name is happily created by Create Directory in the movielist Menu option but when the movielist directory is scanned the file system returns the sub directory name truncated at the offending delimiter, in my case /media/hdd/movie/Drama/Strike is returned and not /media/hdd/movie/Drama/Strike: The Cuckoo's Calling. The former obviously does not exist and the file system returns an empty list for the contents thereof, but the full path name is displayed at the top of the page. No problem with the apostrophe though. I agree with @fat-tony's suggestion that it could be trimmed by the Create Directory option, ideally prior to loading the Virtual Keyboard edit field.
    VU+ Uno 4K SE Twin FBC Tuner 1TB HDD - Magic-FHD skin
    TV - LG OLED55CS6LA
    Remote - Logitech Harmony One

  5. #20
    ccs's Avatar
    Title
    ViX Beta Tester
    Join Date
    Sep 2014
    Posts
    5,836
    Thanks
    554
    Thanked 1,277 Times in 1,089 Posts
    How do you know /media/hdd/movie/Drama/Strike is returned? Surely debug logs would report an error?

    When I tried using telnet, I could access folders and sub folders with ":"s without any issues.

    I'd agree, something in movielist isn't quite right, but I'd been tempted to make that work rather than stripping out all potentially offending characters completely.

  6. #21

    Title
    ViX Beta Tester
    Join Date
    Nov 2017
    Posts
    888
    Thanks
    103
    Thanked 480 Times in 285 Posts
    It's because everything shown in the movie list is translated from the file system using a service reference, which of course uses a colon internally as a delimiter but doesn't work terribly hard to cope with names that have colons in. This'll be the another reason for colons being stripped out of the filenames of recordings.

    Fun activity: Go and look at what Windows Explorer calls your directory. I get TWUQRQ~L
    Last edited by simonc; 25-11-20 at 19:40.

  7. #22
    ccs's Avatar
    Title
    ViX Beta Tester
    Join Date
    Sep 2014
    Posts
    5,836
    Thanks
    554
    Thanked 1,277 Times in 1,089 Posts
    Quote Originally Posted by simonc View Post
    This'll be the another reason for colons being stripped out of the filenames of recordings.
    What happens if I select such a recording after the colon has been stripped, and do an epg search?

  8. #23

    Title
    ViX Beta Tester
    Join Date
    Nov 2017
    Posts
    888
    Thanks
    103
    Thanked 480 Times in 285 Posts
    Don't worry. It seems to get that correct.

    More interesting weirdness. This is a directory name's full service reference:
    Code:
    2:0:1:0:0:0:0:0:0:0:/media/hdd/TV/Documentaries/:16384%3ajpg 16384%3apng 16384%3agif 16384%3abmp
    And here's that directory with the colon in the name
    Code:
    2:0:1:0:0:0:0:0:0:0:/media/hdd/TV/Trailblazers:16384%3ajpg 16384%3apng 16384%3agif 16384%3abmp
    So the core Enigma2 code doesn't work at all well with a colon in the name of things.

  9. #24
    ccs's Avatar
    Title
    ViX Beta Tester
    Join Date
    Sep 2014
    Posts
    5,836
    Thanks
    554
    Thanked 1,277 Times in 1,089 Posts
    Quote Originally Posted by simonc View Post
    Fun activity: Go and look at what Windows Explorer calls your directory. I get TWUQRQ~L
    I see BIGKCW~L for a directory, but for a recording the colon (and dots) have been changed to underscore and the filename looks ok.

  10. #25

    Title
    ViX Beta Tester
    Join Date
    Nov 2017
    Posts
    888
    Thanks
    103
    Thanked 480 Times in 285 Posts
    Found the culprit. This is run when you enter a directory to view it in the movie list:
    Code:
            self.current_ref = eServiceReference("2:0:1:0:0:0:0:0:0:0:" + path)
    Unfortunately, it trims off everything in your directory name after the colon, expecting it to be a pretty name for what came before the colon. Magic strings are never a good thing and this kind of nonsense is in quite a few places

    If you want a quick fix, replace selCurrentRef in MovieSelection.py with this. It works for this specific scenario.
    Code:
        def setCurrentRef(self, path):
            self.current_ref = eServiceReference(2, 47, path)
            # Magic: this sets extra things to show
            self.current_ref.setName('16384:jpg 16384:png 16384:gif 16384:bmp')

  11. The Following User Says Thank You to simonc For This Useful Post:

    ccs (26-11-20)

  12. #26
    Joe_90's Avatar
    Title
    Moderator
    Join Date
    Mar 2014
    Location
    Wicklow, Ireland
    Posts
    4,109
    Thanks
    1,274
    Thanked 1,122 Times in 884 Posts
    Just remove the friggin' ":" and replace it with a safe value before it gets included in the directory name and the problem goes away. I presume the reference to path cause the issue because path uses ":" as a delimiter.
    GB Quad Plus, Mut@nt HD51, AX HD61, 80cm dish and Supreme Dark motor. Sony STR-DN 1060, Sony UHP-H1 Bluray, Odroid N2+ (CoreElec), Monitor Audio Bronze 5.1 speakers

  13. #27

    Title
    ViX Beta Tester
    Join Date
    Nov 2017
    Posts
    888
    Thanks
    103
    Thanked 480 Times in 285 Posts
    Just spotted this in FileList while trawling the code for other mistakes:
    Code:
    # we should not use the 'eServiceReference(string)' constructor, because it doesn't allow ':' in the directoryname
    Well done to the commenter in 2009, but they missed the same mistake added in 2008 further down the same file

  14. #28
    Joe_90's Avatar
    Title
    Moderator
    Join Date
    Mar 2014
    Location
    Wicklow, Ireland
    Posts
    4,109
    Thanks
    1,274
    Thanked 1,122 Times in 884 Posts
    But it probably wasn't allowing the ":" for good reason

    So, what's the solution? Disallow ":" in the construction of directory names or allow ":" and verify that they are handled in all use case?


    EDIT As an aside - no issue with ":" in directory name on my linux mint system. Searches work, command line works.
    Last edited by Joe_90; 26-11-20 at 14:03.
    GB Quad Plus, Mut@nt HD51, AX HD61, 80cm dish and Supreme Dark motor. Sony STR-DN 1060, Sony UHP-H1 Bluray, Odroid N2+ (CoreElec), Monitor Audio Bronze 5.1 speakers

  15. #29

    Title
    ViX Beta Tester
    Join Date
    Nov 2017
    Posts
    888
    Thanks
    103
    Thanked 480 Times in 285 Posts
    I'd argue that if you can see : in programme names in the list, you should be able to have them in directory names, especially as half the programmes in the evenings seem to start with New: on the main channels. I've got a bugfix for the erroneous code that avoids the complications of disabling : in the virtual keyboard, dealing with remotely renamed directories, directory name suggestions...

  16. The Following 3 Users Say Thank You to simonc For This Useful Post:

    ccs (26-11-20),Joe_90 (26-11-20),Valiant (26-11-20)

  17. #30
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,780
    Thanks
    237
    Thanked 1,658 Times in 1,306 Posts
    Quote Originally Posted by simonc View Post
    I'd argue that if you can see : in programme names in the list, you should be able to have them in directory names
    These are, however, unrelated. One is part of a description sent by a broadcaster while the other is how a user has decided to categorize them.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.