Announcement

Collapse
No announcement yet.

DL Rating System

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • DL Rating System

    After messing with RRMedia for a while trying to get the stars to reset when the song plays again. I decided to make my own rating system. I wonder if I am only having problems with it because I am using vista??? either way this works.

    My system:
    -will remember what you rated each song upon playing again (even if you have closed RR)
    -has two choices:
    1. Rate Song based on Artist and Song name only (I prefer this as I have many albums of the
    same artist sometimes and this way they all are rated the same)
    2. Rate Song based on Artist, Album, Track Number, and Song Name (may use more memory??)
    -will NOT create automatic playlists (You could add a "ADDTOLIST;$PLAYLISTPATH$XSTAR.M3U"
    command to the rate button, however this will allow multiple copies of the same file. Also I do not
    know of a way to remove a song from a saved playlist if you change the rating)
    -will NOT update the stars to the song file itself whether on ipod or whatever. it will only update
    the stars within RideRunner

    The first file below is to rate by artist and song name only. The second file is to rate by artist, album, track number, and song name.

    ////////////////ADD THE FOLLOWING TO THE EXECTBL.INI/////////////////

    /------------------DL Rating System Short Version-------------------------

    "ONSONGSTART","0STAR||WAIT;1||SETVARBYCODE;TAGARTI ST;TAGARTIST||SETVARBYCODE;TRACKNAME;TRACKNAME||BY VAR;$TAGARTIST$ - $TRACKNAME$;0STAR<<1STAR<<2STAR<<3STAR<<4STAR<<5ST AR"

    "0STAR","SETIND;!5STAR;OFF||SETIND;!4STAR;OFF||SET IND;!3STAR;OFF||SETIND;!2STAR;OFF||SETIND;!1STAR;O FF"

    "1STAR","SETIND;!1STAR;ON||SETIND;!2STAR;OFF||SETI ND;!3STAR;OFF||SETIND;!4STAR;OFF||SETIND;!5STAR;OF F"

    "2STAR","SETIND;!1STAR;ON||SETIND;!2STAR;ON||SETIN D;!3STAR;OFF||SETIND;!4STAR;OFF||SETIND;!5STAR;OFF "

    "3STAR","SETIND;!1STAR;ON||SETIND;!2STAR;ON||SETIN D;!3STAR;ON||SETIND;!4STAR;OFF||SETIND;!5STAR;OFF"

    "4STAR","SETIND;!1STAR;ON||SETIND;!2STAR;ON||SETIN D;!3STAR;ON||SETIND;!4STAR;ON||SETIND;!5STAR;OFF"

    "5STAR","SETIND;!1STAR;ON||SETIND;!2STAR;ON||SETIN D;!3STAR;ON||SETIND;!4STAR;ON||SETIND;!5STAR;ON"

    "RATE5","SETVARBYCODE;TAGARTIST;TAGARTIST||SETVARB YCODE;TRACKNAME;TRACKNAME||SETVAR;$TAGARTIST$ - $TRACKNAME$;5||5STAR||SAVETOINI;$TAGARTIST$ - $TRACKNAME$;5"

    "RATE4","SETVARBYCODE;TAGARTIST;TAGARTIST||SETVARB YCODE;TRACKNAME;TRACKNAME||SETVAR;$TAGARTIST$ - $TRACKNAME$;4||4STAR||SAVETOINI;$TAGARTIST$ - $TRACKNAME$;4"

    "RATE3","SETVARBYCODE;TAGARTIST;TAGARTIST||SETVARB YCODE;TRACKNAME;TRACKNAME||SETVAR;$TAGARTIST$ - $TRACKNAME$;3||3STAR||SAVETOINI;$TAGARTIST$ - $TRACKNAME$;3"

    "RATE2","SETVARBYCODE;TAGARTIST;TAGARTIST||SETVARB YCODE;TRACKNAME;TRACKNAME||SETVAR;$TAGARTIST$ - $TRACKNAME$;2||2STAR||SAVETOINI;$TAGARTIST$ - $TRACKNAME$;2"

    "RATE1","SETVARBYCODE;TAGARTIST;TAGARTIST||SETVARB YCODE;TRACKNAME;TRACKNAME||SETVAR;$TAGARTIST$ - $TRACKNAME$;1||1STAR||SAVETOINI;$TAGARTIST$ - $TRACKNAME$;1"

    "RATE0","SETVARBYCODE;TAGARTIST;TAGARTIST||SETVARB YCODE;TRACKNAME;TRACKNAME||SETVAR;$TAGARTIST$ - $TRACKNAME$;||0STAR||SAVETOINI;$TAGARTIST$ - $TRACKNAME$;"


    /////////////////BUTTON COMMANDS////////////////////

    "RATE5" -RATES THE CURRENTLY PLAYING SONG TO 5 AND SETS !STARX INDICATORS 1-5 ON

    "RATE4" -RATES THE CURRENTLY PLAYING SONG TO 4, SETS !STARX INDICATORS 1-4 ON AND INDICATOR 5 OFF

    "RATE3" -RATES THE CURRENTLY PLAYING SONG TO 3, SETS !STARX INDICATORS 1-3 ON AND INDICATORS 4-5 OFF

    "RATE2" -RATES THE CURRENTLY PLAYING SONG TO 2, SETS !STARX INDICATORS 1-2 ON AND INDICATORS 3-5 OFF

    "RATE1" -RATES THE CURRENTLY PLAYING SONG TO 1, SETS !STARX INDICATOR 1 ON AND INDICATORS 2-5 OFF

    "RATE0" -RATES THE CURRENTLY PLAYING SONG TO UNRATED AND SETS !STARX INDICATORS 1-5 OFF


    ////////////////INDICATOR CODES////////////////////

    "!5STAR" -INDICATES IF THE SONG IS RATED 5

    "!4STAR" -INDICATES IF THE SONG IS RATED 4 OR ABOVE

    "!3STAR" -INDICATES IF THE SONG IS RATED 3 OR ABOVE

    "!2STAR" -INDICATES IF THE SONG IS RATED 2 OR ABOVE

    "!1STAR" -INDICATES IF THE SONG IS RATED 1 OR ABOVE

    ////////////////ADD THE FOLLOWING TO THE EXECTBL.INI/////////////////

    /------------------DL Rating System Long Version-------------------------

    "ONSONGSTART","0STAR||WAIT;1||SETVARBYCODE;TAGARTI ST;TAGARTIST||SETVARBYCODE;TAGALBUM;TAGALBUM||SETV ARBYCODE;TAGTRACKNUMBER;TAGTRACKNUMBER||SETVARBYCO DE;TRACKNAME;TRACKNAME||BYVAR;$TAGARTIST$ - $TAGALBUM$ - $TAGTRACKNUMBER$ - $TRACKNAME$;0STAR<<1STAR<<2STAR<<3STAR<<4STAR<<5ST AR"

    "0STAR","SETIND;!5STAR;OFF||SETIND;!4STAR;OFF||SET IND;!3STAR;OFF||SETIND;!2STAR;OFF||SETIND;!1STAR;O FF"

    "1STAR","SETIND;!1STAR;ON||SETIND;!2STAR;OFF||SETI ND;!3STAR;OFF||SETIND;!4STAR;OFF||SETIND;!5STAR;OF F"

    "2STAR","SETIND;!1STAR;ON||SETIND;!2STAR;ON||SETIN D;!3STAR;OFF||SETIND;!4STAR;OFF||SETIND;!5STAR;OFF "

    "3STAR","SETIND;!1STAR;ON||SETIND;!2STAR;ON||SETIN D;!3STAR;ON||SETIND;!4STAR;OFF||SETIND;!5STAR;OFF"

    "4STAR","SETIND;!1STAR;ON||SETIND;!2STAR;ON||SETIN D;!3STAR;ON||SETIND;!4STAR;ON||SETIND;!5STAR;OFF"

    "5STAR","SETIND;!1STAR;ON||SETIND;!2STAR;ON||SETIN D;!3STAR;ON||SETIND;!4STAR;ON||SETIND;!5STAR;ON"

    "RATE5","SETVARBYCODE;TAGARTIST;TAGARTIST||SETVARB YCODE;TAGALBUM;TAGALBUM||SETVARBYCODE;TAGTRACKNUMB ER;TAGTRACKNUMBER||SETVARBYCODE;TRACKNAME;TRACKNAM E||SETVAR;$TAGARTIST$ - $TAGALBUM$ - $TAGTRACKNUMBER$ - $TRACKNAME$;5||5STAR||SAVETOINI;$TAGARTIST$ - $TAGALBUM$ - $TAGTRACKNUMBER$ - $TRACKNAME$;5"

    "RATE4","SETVARBYCODE;TAGARTIST;TAGARTIST||SETVARB YCODE;TAGALBUM;TAGALBUM||SETVARBYCODE;TAGTRACKNUMB ER;TAGTRACKNUMBER||SETVARBYCODE;TRACKNAME;TRACKNAM E||SETVAR;$TAGARTIST$ - $TAGALBUM$ - $TAGTRACKNUMBER$ - $TRACKNAME$;4||4STAR||5STAR||SAVETOINI;$TAGARTIST$ - $TAGALBUM$ - $TAGTRACKNUMBER$ - $TRACKNAME$;4"

    "RATE3","SETVARBYCODE;TAGARTIST;TAGARTIST||SETVARB YCODE;TAGALBUM;TAGALBUM||SETVARBYCODE;TAGTRACKNUMB ER;TAGTRACKNUMBER||SETVARBYCODE;TRACKNAME;TRACKNAM E||SETVAR;$TAGARTIST$ - $TAGALBUM$ - $TAGTRACKNUMBER$ - $TRACKNAME$;3||3STAR||5STAR||SAVETOINI;$TAGARTIST$ - $TAGALBUM$ - $TAGTRACKNUMBER$ - $TRACKNAME$;3"

    "RATE2","SETVARBYCODE;TAGARTIST;TAGARTIST||SETVARB YCODE;TAGALBUM;TAGALBUM||SETVARBYCODE;TAGTRACKNUMB ER;TAGTRACKNUMBER||SETVARBYCODE;TRACKNAME;TRACKNAM E||SETVAR;$TAGARTIST$ - $TAGALBUM$ - $TAGTRACKNUMBER$ - $TRACKNAME$;2||2STAR||5STAR||SAVETOINI;$TAGARTIST$ - $TAGALBUM$ - $TAGTRACKNUMBER$ - $TRACKNAME$;2"

    "RATE1","SETVARBYCODE;TAGARTIST;TAGARTIST||SETVARB YCODE;TAGALBUM;TAGALBUM||SETVARBYCODE;TAGTRACKNUMB ER;TAGTRACKNUMBER||SETVARBYCODE;TRACKNAME;TRACKNAM E||SETVAR;$TAGARTIST$ - $TAGALBUM$ - $TAGTRACKNUMBER$ - $TRACKNAME$;1||1STAR||5STAR||SAVETOINI;$TAGARTIST$ - $TAGALBUM$ - $TAGTRACKNUMBER$ - $TRACKNAME$;1"

    "RATE0","SETVARBYCODE;TAGARTIST;TAGARTIST||SETVARB YCODE;TAGALBUM;TAGALBUM||SETVARBYCODE;TAGTRACKNUMB ER;TAGTRACKNUMBER||SETVARBYCODE;TRACKNAME;TRACKNAM E||SETVAR;$TAGARTIST$ - $TAGALBUM$ - $TAGTRACKNUMBER$ - $TRACKNAME$;||0STAR||5STAR||SAVETOINI;$TAGARTIST$ - $TAGALBUM$ - $TAGTRACKNUMBER$ - $TRACKNAME$;"


    /////////////////BUTTON COMMANDS////////////////////

    "RATE5" -RATES THE CURRENTLY PLAYING SONG TO 5 AND SETS !STARX INDICATORS 1-5 ON

    "RATE4" -RATES THE CURRENTLY PLAYING SONG TO 4, SETS !STARX INDICATORS 1-4 ON AND INDICATOR 5 OFF

    "RATE3" -RATES THE CURRENTLY PLAYING SONG TO 3, SETS !STARX INDICATORS 1-3 ON AND INDICATORS 4-5 OFF

    "RATE2" -RATES THE CURRENTLY PLAYING SONG TO 2, SETS !STARX INDICATORS 1-2 ON AND INDICATORS 3-5 OFF

    "RATE1" -RATES THE CURRENTLY PLAYING SONG TO 1, SETS !STARX INDICATOR 1 ON AND INDICATORS 2-5 OFF

    "RATE0" -RATES THE CURRENTLY PLAYING SONG TO UNRATED AND SETS !STARX INDICATORS 1-5 OFF


    ////////////////INDICATOR CODES////////////////////

    "!5STAR" -INDICATES IF THE SONG IS RATED 5

    "!4STAR" -INDICATES IF THE SONG IS RATED 4 OR ABOVE

    "!3STAR" -INDICATES IF THE SONG IS RATED 3 OR ABOVE

    "!2STAR" -INDICATES IF THE SONG IS RATED 2 OR ABOVE

    "!1STAR" -INDICATES IF THE SONG IS RATED 1 OR ABOVE
    Feel free to use my codes and critique or make suggestions!

  • #2
    Does anyone know how to save to ini or skin under a specific section of the file?

    Comment


    • #3
      You can save either to the rr.ini or skin.ini with RideRunner code:

      (Save to Skin.ini)
      SaveToSkin;VariableName;YourInfo

      (Save to rr.ini)
      SaveToIni;VariableName;YourInfo

      There is no way, with RideRunner code, to save to a skin file itself, in a certain area. If you use variables, saving them in either the skin or rr ini's, you probably will not need to change the skin file. As the variables can be dynamic.

      You can also use include files. This is a small .txt file, that you can put labels and such in, and call in the skin like this:

      RoadRunner Skin
      ROADRUNNER menu Skin
      menu_OFF.png,menu_OFF.png,menu_On.png,menu_OFF.png

      INC,TopIndicators.txt

      In the "TopIndicators.txt" file, is standard RR skin code, labels, indicators ect.

      This is how the indicators are done in the DFX skin, so if something changes, or to add something, it is just a matter of editing that one single file, instead of every skin.
      Last edited by JohnWPB; 06-28-2011, 02:00 AM.
      Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

      My Fiero Build Thread

      Comment


      • #4
        Thanks John, though I think you misunderstood my question. Let me try again.

        With the commands SAVETOINI (saves to rr.ini) or SAVETOSKIN (saves to skin.ini) is there a way to save the variable under a specific section of the .ini file. For example in the RR.ini all the weather settings are under [Weather]. I am considering what is in the [brackets] to be a section of the file.

        Thanks in advance.

        Comment


        • #5
          Unfortunately with the SAVETOSKIN or SAVETOINI, they will just be placed at the bottom of the .ini if they do not already exist. Even thought it "Looks like an .ini" file, RR does not treat it as such. It just does string replacements and writes lines, essentially the same way a text file is done.

          When RR loads, it just turns all lines in the RR & Skin.ini's into variables, and ignores the [SECTIONS] entirely.

          Unfortunately, there is no "built in" read and write to .ini files in VB6. It needs to be read line by line looking for [ then ] and get what is in between (Mid$) to determine the sections.

          There are quite a few pre-programmed functions by other scriptwriters that can help. Google turned this one up as the first search result.

          If you do not want to go that route, , you can use that example above that uses RRExtended. It can read and write to certain sections using a similar function..

          Lastly, if you do not want to use RRExtended, OR API calls' you can do it 100% in script, using the code on this page.
          Last edited by JohnWPB; 06-28-2011, 10:07 PM.
          Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

          My Fiero Build Thread

          Comment


          • #6
            Great, thank you again John. Got it working with RRExtended... sort of.

            I was going to have it use a separate .ini file for the ratings however when I try and use inikeytovar command it always sets the variable to empty and does not load what is saved in the ini. Maybe it doesn't like it because my variable to load from the ini contains other variables in the name.

            Comment

            Working...
            X