Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Feature Ideas
| | |-+  Delete Empty Root Folders Plugin
« previous next »
  • Print
Pages: [1]

Author Topic: Delete Empty Root Folders Plugin  (Read 8332 times)

Offline Lope

  • Member
  • *
  • Posts: 30
Delete Empty Root Folders Plugin
« on: October 04, 2010, 12:42:49 PM »
My Sansa Clip+ makes all these empty folders on internal&external storage everytime I boot OF, which is necessary very regularly on Clip+ at this stage of RB Clip+ development.

I would love an autorun option.
Disktidy is too slow and overcomplicated.

PROCEDURE:
Recursive {
Enumerate Folders
If folder contains no files, enumerate subfolders, if folder empty:delete.
}

I get these empty folders every time OF boots

Internal Memory:
##MUSIC#
##MUSIC#\Audiobooks
##MUSIC#\Music
##MUSIC#\Playlists
##MUSIC#\Podcasts
##MUSIC#\Service
##MUSIC#\Service\Rhapsody
##MUSIC#\Service\Rhapsody\Artist
##MUSIC#\Service\Rhapsody\Playlists
##MUSIC#\Service\Rhapsody\radiopc
##PORT#
AUDIBLE
AUDIOBOOKS
MUSIC
Playlists
PODCASTS
RECORD
RECORD\FM
RECORD\VOICE

External Memory:
MUSIC
MUSIC\AUDIOBOOKS
MUSIC\PODCASTS

Its a big problem on Clip+ because Clip+ RB has no USB support, requiring OF boot everytime you want to load music or work as a storage device.
Also, every time I plug power or USB, forgetting to boot RB first, it boots OF making all these folders.
Such a mission deleting it all every time. Esp while driving etc.
I use the MUSIC folders but none of the other folders or default subfolders.
« Last Edit: October 19, 2010, 12:02:11 PM by Lope »
Logged

Offline Artursk

  • Member
  • *
  • Posts: 19
Re: Delete Empty Root Folders Plugin
« Reply #1 on: October 14, 2010, 01:59:24 PM »
+

The same problem  :)
Logged

Offline BdN3504

  • Artist
  • Member
  • *
  • Posts: 323
Re: Delete Empty Root Folders Plugin
« Reply #2 on: October 14, 2010, 04:15:06 PM »
See if you can use this:
http://download.rockbox.org/daily/manual/rockbox-sansaclipplus/rockbox-buildch11.html#x14-27600011.4.7
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4383
Re: Delete Empty Root Folders Plugin
« Reply #3 on: October 14, 2010, 08:47:37 PM »
You should be able to configure the Disk Tidy plugin.  See if you can modify  /.rockbox/rocks/apps/disktidy.config.

(Ah, that's what was linked in the previous comment.)
« Last Edit: October 14, 2010, 08:49:29 PM by Chronon »
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline pabouk

  • Member
  • *
  • Posts: 387
Re: Delete Empty Root Folders Plugin
« Reply #4 on: October 15, 2010, 12:21:17 PM »
Plugin autorun at Rockbox start would be great.
Logged

Offline mc2739

  • Developer
  • Member
  • *
  • Posts: 262
Re: Delete Empty Root Folders Plugin
« Reply #5 on: October 15, 2010, 05:45:22 PM »
Quote from: pabouk on October 15, 2010, 12:21:17 PM
Plugin autorun at Rockbox start would be great.

There is  a method to autorun a plugin at startup, but you would need to set up a build environment, modify the source code and compile your modified build.
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Delete Empty Root Folders Plugin
« Reply #6 on: October 15, 2010, 06:54:37 PM »
Just as a note, it's a very, very trivial change if I recall correctly.
Logged

Offline Lope

  • Member
  • *
  • Posts: 30
Re: Delete Empty Root Folders Plugin
« Reply #7 on: October 19, 2010, 11:40:45 AM »
It would be nice to just have an option.
Because its just a few root folders. No need to scan the EVERY folder and file on internal and external storage doing ALL the checks that disktidy does, which will increase boot time a lot.
Just a little setting "delete empty root folders" would be awesome ;)

Edited first post, see complete folder list.
« Last Edit: October 19, 2010, 11:57:14 AM by Lope »
Logged

Offline torne

  • Developer
  • Member
  • *
  • Posts: 994
  • arf arf
Re: Delete Empty Root Folders Plugin
« Reply #8 on: October 19, 2010, 02:47:34 PM »
We don't generally add features to work around the behaviour of the original firmware if it doesn't otherwise impact Rockbox. This problem will be much less of an issue once Rockbox supports USB.

Instead of deleting the folders, mark them as hidden. This will make them no longer display in Rockbox (unless you set shown file types to All).
Logged
some kind of ARM guy. ipodvideo/gigabeat-s/h120/clipv2. to save time let's assume i know everything.

Offline Lope

  • Member
  • *
  • Posts: 30
Re: Delete Empty Root Folders Plugin
« Reply #9 on: October 20, 2010, 01:56:30 PM »
Thanks torne. I've most of the folders hidden, now they don't display in RB.
The ##PORT# and ##MUSIC# folders don't appear in the mounted FAT32 volume in windows.
I tried creating them and making them hidden, but the OF still somehow makes these folders, which then display in RB.
If I plug the player in again, I see my hidden ##PORT# and ##MUSIC# folders, still hidden, with no subdirs. Weird.
At least its better.
I can delete them in RB and they don't return till I boot OF.

Where is the OF stored now? Any idea where these ##MUSIC# and ##PORT# folders are?
Logged

Offline torne

  • Developer
  • Member
  • *
  • Posts: 994
  • arf arf
Re: Delete Empty Root Folders Plugin
« Reply #10 on: October 20, 2010, 03:56:07 PM »
Those folders are some kind of weird magic and they get hidden in a strange way when connected over USB, if I recall correctly, so no, I don't think you'll be able to hide them in the same way. The OF never exposes everything on the player: when it's in MTP mode it only exposes the MTP-specific parts, and when it's in MSC mode it exposes everything *except* the MTP-specific parts (to stop you messing around with stuff you synced via MTP). They're always empty because you aren't using MTP.

Again, the real fix in the long term is for Rockbox USB to be enabled so you don't have to boot the original firmware in the first place. This will happen when the bugs are worked out. :)
Logged
some kind of ARM guy. ipodvideo/gigabeat-s/h120/clipv2. to save time let's assume i know everything.

Offline grums

  • Member
  • *
  • Posts: 45
Re: Delete Empty Root Folders Plugin
« Reply #11 on: February 22, 2011, 03:30:59 AM »
Quote: 'Just as a note, it's a very, very trivial change if I recall correctly.' - can you hint me to where?

I want to autostart a tidy up of the above files in my Clip+ on reboot - until the proper USB support is there.

Thanks, Ole
Logged

Offline torne

  • Developer
  • Member
  • *
  • Posts: 994
  • arf arf
Re: Delete Empty Root Folders Plugin
« Reply #12 on: February 22, 2011, 05:34:14 AM »
Search for autorock in the source.
Logged
some kind of ARM guy. ipodvideo/gigabeat-s/h120/clipv2. to save time let's assume i know everything.

Offline grums

  • Member
  • *
  • Posts: 45
Re: Delete Empty Root Folders Plugin
« Reply #13 on: February 23, 2011, 08:27:50 AM »
Thanks, that gave me something to work with...
After enabling autostart in the code & rebuild, I get this message:

ubuntu@ubuntu-desktop:~/rockbox$ failed to load /.rockbox/rocks/apps/autostart.rock
lc_open(/.rockbox/rocks/apps/autostart.rock): simdisk/.rockbox/rocks/apps/autostart.rock: file too short


In the file I have one line: disktidy.rock - the file is edited on the ubuntu system using vi.

How can the file be too short?

Ole


Post Merge: February 23, 2011, 09:18:37 AM
- forgot yo say that I'm still running the simulator...
« Last Edit: February 23, 2011, 09:18:37 AM by grums »
Logged

Offline torne

  • Developer
  • Member
  • *
  • Posts: 994
  • arf arf
Re: Delete Empty Root Folders Plugin
« Reply #14 on: February 23, 2011, 10:06:44 AM »
autorock.rock needs to be *the actual plugin* you want to load, not just contain the name. You need to copy and rename the file.
Logged
some kind of ARM guy. ipodvideo/gigabeat-s/h120/clipv2. to save time let's assume i know everything.

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Feature Ideas
| | |-+  Delete Empty Root Folders Plugin
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.266 seconds with 21 queries.