foo-webview-sdk
    Preparing search index...

    Variable ratingConst

    rating: {
        get: (
            path: string,
            opts?: { cueIndex?: number },
        ) => Promise<RatingGetResponse>;
        set: (
            path: string,
            rating: number,
            opts?: { cueIndex?: number },
        ) => Promise<RatingSetResponse>;
    } = ...

    rating — track rating namespace (0-5 integer scale).

    Type Declaration

    • get: (path: string, opts?: { cueIndex?: number }) => Promise<RatingGetResponse>

      Resolve the 0-5 integer rating stored for the track at path.

      Uses %rating% when its atoi conversion yields 1 to 5; otherwise reads the file's RATING tag and clamps it to 0-5. 0 means unrated. storage is 'stats' for an accepted %rating% value and 'file' otherwise, including when neither source provides a rating.

    • set: (
          path: string,
          rating: number,
          opts?: { cueIndex?: number },
      ) => Promise<RatingSetResponse>

      Set the 0-5 integer rating for the track at path.