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 General
| |-+  Rockbox General Discussion
| | |-+  How can I identify (and delete) tracks already played?
« previous next »
  • Print
Pages: [1]

Author Topic: How can I identify (and delete) tracks already played?  (Read 3267 times)

Offline DrRemulak

  • Member
  • *
  • Posts: 10
How can I identify (and delete) tracks already played?
« on: June 30, 2008, 02:22:12 PM »
Hi,

I have a Rockbox'ed Sansa e280. 

As with my previous DAPs, I like to load up alot of music, put the player on shuffle and listen randomly.  Sometimes I like to remove the tracks I've already listened to.  Is there any way to do this easily?

On the Database page, I saw that there is a playcount tag, but unfortunately, it's not stored with the music file as an id tag; it's a runtime db tag.  So I can't see the value when I load up the music files in a tag editor such as mp3tag.

And I guess I can't easily delete multiple files directly via Rockbox (right?) so I can't delete all the ones that I've already listened to it that way.

Can anyone point me in the right direction?

Thanks!
« Last Edit: July 01, 2008, 12:06:19 PM by DrRemulak »
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: How can I identify (and delete) tracks already played?
« Reply #1 on: June 30, 2008, 03:38:02 PM »
Not sure if this is exactly the solution you're looking for but you could use the playcount to create a playlist and then delete all files in that playlist using a PC.
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline Strife89

  • Member
  • *
  • Posts: 354
  • Michael Carr
    • Strife89's blog
Re: How can I identify (and delete) tracks already played?
« Reply #2 on: June 30, 2008, 04:51:24 PM »
If you happen to be listening to the track, you can delete it while it's playing. From the WPS, go to the WPS context menu and select Delete. Presto! The song will keep playing, since it's cached, but skip ahead and it'll be gone for good.
Logged
Rockbox: Sansa Clip Zip, iPod Color, iRiver H320

Android: Moto X4, Galaxy Tab S2 T710

Offline ryran

  • Member
  • *
  • Posts: 379
    • b19 photography
Re: How can I identify (and delete) tracks already played?
« Reply #3 on: June 30, 2008, 06:15:15 PM »
FS#7049 might be helpful, though it looks like it hasn't had any interest from anyone besides the author... I tried to compile a build with it to have a look but make error'ed out.
« Last Edit: June 30, 2008, 06:22:58 PM by ryran »
Logged

Offline DrRemulak

  • Member
  • *
  • Posts: 10
Re: How can I identify (and delete) tracks already played?
« Reply #4 on: June 30, 2008, 07:17:37 PM »
Quote from: bluebrother on June 30, 2008, 03:38:02 PM
you could use the playcount to create a playlist and then delete all files in that playlist using a PC.

That sounds like a decent solution.  Can you point me in the right direction towards creating a playlist based on playcount?  I tried and didn't get very far.
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: How can I identify (and delete) tracks already played?
« Reply #5 on: July 01, 2008, 02:17:33 AM »
Quote from: DrRemulak on June 30, 2008, 07:17:37 PM
That sounds like a decent solution.  Can you point me in the right direction towards creating a playlist based on playcount?  I tried and didn't get very far.
You need to create a tagnavi_custom.config file to create a custom search in the database. Check the wiki, can't tell you off the top of my head how it works (and have a look at the default tagnavi.config)
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline DrRemulak

  • Member
  • *
  • Posts: 10
Re: How can I identify (and delete) tracks already played?
« Reply #6 on: July 01, 2008, 11:36:20 AM »
Hmmm.... well I thought I was able to successfully create the custom tagnavi but it didn't work.

I created the file similar to what's listed here for Example 3:
http://www.rockbox.org/twiki/bin/view/Main/DataBase#Examples

However, I don't think the runtime stats are ever getting updated on my player.  I did enable 'Gather Runtime Data' in the database settings but maybe I'm missing something else. 

The reasons why I don't think the runtime stats are being updated
1. The 'Recently Played Tracks' view (which is already in Rockbox, not something I created) doesn't show anything even after I play a few tracks.
2. I tried to backup the runtime stats by performing Export Modifications in the Database settings menu.  It created a small file with no stat data in it.

Any ideas why the runtime stats are not being updated?

Thanks.
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: How can I identify (and delete) tracks already played?
« Reply #7 on: July 01, 2008, 11:39:59 AM »
You may need to restart your player (or at least wait until a re-buffer has happened), in order to ensure that the data has been committed to the database.
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline DrRemulak

  • Member
  • *
  • Posts: 10
Re: How can I identify (and delete) tracks already played?
« Reply #8 on: July 01, 2008, 11:55:07 AM »
Quote from: bascule on July 01, 2008, 11:39:59 AM
You may need to restart your player (or at least wait until a re-buffer has happened), in order to ensure that the data has been committed to the database.

Tried those.  No change.  Not sure why I can't see runtime updates. 

EDIT1: OK, I tried again and now it's working.  The only thing did differently was to take it out of shuffle mode.  Maybe that was the issue.  Will try again later.

I created the playlist of tracks that had been played and saved it as an m3u file.  Then I edited it to be a batch file to delete the tracks.  It worked!  I will probably write an AutoIt script to automate the process of deleting the files once the playlist file has been created. 

Thanks!

EDIT2: Here's the AutoIt script to delete files from a playlist generated by Rockbox:
Code: [Select]
;Delete already played files by using playlist generated by Rockbox
;
$message="Choose playlist file containing tracks to be deleted"
$var = FileOpenDialog($message,@ScriptDir,"All (*.*)", 1)
If @error Then
    MsgBox(4096,"","No File(s) chosen")
    Exit
EndIf
$file = FileOpen($var, 0)
; Check if file opened for reading OK
If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf
Global $microdir = ""
While 1
    $line = FileReadLine($file)
    If @error = -1 Then ExitLoop
    $line = StringReplace($line, "/", "\")
$microchk = StringLeft($line,12)
if StringCompare($microchk,"\<microSD1>\")=0 then
  $line = StringTrimLeft($line,12)
  if StringLen($microdir)=0 then
    $microdir=FileSelectFolder("Choose drive folder containing microSD1 card.","")
  endif
  $line = $microdir & $line
endif
    If FileExists($line) then
       FileDelete($line)
    else
       MsgBox(4096,"",$line & " does not exist")
    endif
Wend
FileClose($file)
$answer = MsgBox(4,"Delete?","Delete playlist file?",20)
if $answer=6 then
   FileDelete($var)
endif

EDIT 3: Modified script to delete files from microSD card.  Obviously the card has to be out of the player and inserted as a drive on your PC (e.g. via USB adapter.)

Also note that you must use AutoIt 3.2.4.0 or greater because of UTF-8 support.  Rockbox saves the playlist in UTF-8 format and previous versions of AutoIt would only use ANSI, thus choking on the playlist text.
« Last Edit: July 25, 2008, 02:54:43 PM by DrRemulak »
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  How can I identify (and delete) tracks already played?
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.091 seconds with 15 queries.