title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Scheduled Database Refreshing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Alepsis
    dBpoweramp Enthusiast

    • Aug 2014
    • 87

    Scheduled Database Refreshing

    I noticed in a different thread

    Speed Up Navigation

    that refreshing the database (Refresh All) speeds up navigation dramatically.

    But, on my server, rebuilding the database takes roughly about 40 min.

    So the question is, can Refresh All be scheduled, i.e., run it, for instance, daily at 3AM?

    Alternatively, can Refresh All be issued from the command line? (If so, then making a batch file and running it on a schedule would not be too difficult.)

    Thanks.
  • Spoon
    Administrator
    • Apr 2002
    • 44583

    #2
    Re: Scheduled Database Refreshing

    If you create a file

    RescanALL.bin

    in the folder %appdata%\dbpoweramp\

    It will trigger a rescan all
    Spoon
    www.dbpoweramp.com

    Comment

    • Alepsis
      dBpoweramp Enthusiast

      • Aug 2014
      • 87

      #3
      Re: Scheduled Database Refreshing

      Thanks. Is the rescan triggered as soon as the file is created?

      Comment

      • Spoon
        Administrator
        • Apr 2002
        • 44583

        #4
        Re: Scheduled Database Refreshing

        Yes
        Spoon
        www.dbpoweramp.com

        Comment

        • Alepsis
          dBpoweramp Enthusiast

          • Aug 2014
          • 87

          #5
          Re: Scheduled Database Refreshing

          On my system %appdata% resolves to

          C:\Users\<my_account>\AppData\Roaming

          I created a file named "RescanALL.bin" at

          C:\Users\<my_account>\AppData\Roaming\dBpoweramp

          Nothing happened.

          There are two directories there, "Asset Control" and "uMediaLibrary". I also created a file "RescanALL.bin" in

          C:\Users\<my_account>\AppData\Roaming\dBpoweramp\u MediaLibrary

          and still nothing happened.

          Permissions are the same as those for the *.bin files in uMediaLibrary. So perhaps there's an issue with the file's contents, or the location.

          What am I doing wrong?

          Comment

          • Alepsis
            dBpoweramp Enthusiast

            • Aug 2014
            • 87

            #6
            Re: Scheduled Database Refreshing

            Additional info:

            I decided "RescanALL.bin" should be in \dBpoweramp\uMediaLibrary. I created it there, waited for about 10 min, nothing happened.

            Then I went to Advanced Settings > Open Configuration Folder in Explorer. It opened \dBpoweramp\uMediaLibrary. When I closed Advanced Settings, Asset started to rescan the library; however, uMediaLibrary.exe crashed.

            I restarted Asset, did the above again, same result, except that uMediaLibrary.exe didn't crash (at least, not yet -- still scanning).

            So it looks like

            (1) RescanALL.bin should be created in uMediaLibrary
            (2) for some reason, Asset doesn't get the notification.

            Comment

            • Spoon
              Administrator
              • Apr 2002
              • 44583

              #7
              Re: Scheduled Database Refreshing

              Were there other files listed in the uMediaLibrary folder?

              You would have to save it in that folder, note if you changed asset to run as a service then its files will be elsewhere, you can find out where by clicking the button in the configuration program next to the debug log option.
              Spoon
              www.dbpoweramp.com

              Comment

              • Alepsis
                dBpoweramp Enthusiast

                • Aug 2014
                • 87

                #8
                Re: Scheduled Database Refreshing

                Originally posted by Spoon
                Were there other files listed in the uMediaLibrary folder?
                Yes. Below is the listing:

                ArtStorev5.bin
                AssetConfig.bin
                AssetPrevPlayedv3.bin
                AssetPrevPlayedv5.bin
                AssetStatus.bin
                AssetUPnPDefinedAudioTypesv4a.txt
                AssetUPnPDefinedAudioTypesv5.txt
                AssetUPnPDefinedBrowseTreev4.txt
                AssetUPnPDefinedBrowseTreev5.txt
                AssetUPnPForceDoP.txt
                AssetUPnPForceSingle.txt
                AssetUPnPForceToLPCM.txt
                AssetUPnPForceToMP3.txt
                AssetUPnPForceToWave.txt
                FilenameHash.bin
                KnownControlPoints.txt
                LastActiveControlPoint.txt
                MediaDatabaseFieldsv4.txt
                MediaDatabaseFieldsv5.txt
                MediaExcludeExts.txt
                MediaFoldersWatch.txt
                PlaylistFoldersWatch.txt
                uMediaLibraryMainDBv5.bin
                UpStreamArtFor.txt

                Originally posted by Spoon
                if you changed asset to run as a service
                I didn't.

                Originally posted by Spoon
                You would have to save it in that folder
                I tried, (a) creating it in the uMediaLibrary from the command line; (b) creating it elsewhere and copying it to uMediaLibrary in Win Explorer; (c) duplicating one of the .bin files in uMediaLibrary and re-naming it "RescanALL.bin".

                None worked. Asset didn't seem to notice the apparition of the file. OTOH, copied the file to uMediaLibrary and then restarted Asset. The file was deleted and, after a short delay, Asset started to scan the library. So, it seems to me, the problem is not with the file or its location, but with Asset not receiving notification or not acting upon it.

                Comment

                • Spoon
                  Administrator
                  • Apr 2002
                  • 44583

                  #9
                  Re: Scheduled Database Refreshing

                  it is umedialibrary.exe which picks up the file, if it is being deleted it suggests that part is working ok, check the program is running later on.
                  Spoon
                  www.dbpoweramp.com

                  Comment

                  • Alepsis
                    dBpoweramp Enthusiast

                    • Aug 2014
                    • 87

                    #10
                    Re: Scheduled Database Refreshing

                    Originally posted by Spoon
                    it is umedialibrary.exe which picks up the file, if it is being deleted it suggests that part is working ok, check the program is running later on.
                    Looks like this might have been it. Umedialibrary.exe was up and running, but there may have been something wrong with it. After restarting Asset, creating RescanALL.bin triggers database rebuilding right away. So it might be a good idea to include restarting Asset in maintenance. Is there any way to tell Asset to quit or restart (other than taskkill /t)? If I have to use taskkill, are there any other processes besides asset-upnp.exe that should be terminated?

                    Comment

                    • Spoon
                      Administrator
                      • Apr 2002
                      • 44583

                      #11
                      Re: Scheduled Database Refreshing

                      You should not have to kill asset.
                      Spoon
                      www.dbpoweramp.com

                      Comment

                      • Alepsis
                        dBpoweramp Enthusiast

                        • Aug 2014
                        • 87

                        #12
                        Re: Scheduled Database Refreshing

                        Originally posted by Spoon
                        You should not have to kill asset.
                        Yes,... but RescanALL.bin didn't work properly until Asset was restarted.

                        Anyway, I guess I'll start with scheduled rescan and take it from there.

                        Comment

                        • Alepsis
                          dBpoweramp Enthusiast

                          • Aug 2014
                          • 87

                          #13
                          Re: Scheduled Database Refreshing

                          So, I set up a batch file to rebuild the database daily at 3AM.

                          One week on, everything works fine, the database is rescanned every day and no problems so far. Haven't needed to restart Asset.

                          One suggestion, perhaps it might be useful (and not too difficult to implement) to see in Advanced Search > Details > Library Details a date/time stamp of when the library was last scanned or modified.

                          Comment

                          Working...

                          ]]>