pippin wrote: 
> Do you have documentation for your CLI commands?

Here is a description of the currently available commands. Please let me
know if you need any modifications. While writing this i noticed that
there are some "quirks" in the code (e. g. that i prefixed some return
values with an underscore or the awkward way the bookmark listing uses
to distinguish between bookmarks of albums and playlists). 
I'd be happy to implement any changes you want (Disclaimer: If my
limited knowledge of perl allows it...)

Most commands use two parameters: -idtype- and -id-

-idtype- must be either "albumid", "playlistid" or "current"


albumid-id- must contain an album-id
playlistid-id- must contain a playlist-id
current-id- is not used. The command referres to the
currently played track



BOOKMARKHISTORY CLI ?

Result:


_cliversionString with Version Number



BOOKMARKHISTORY HASBOOKMARK -IDTYPE- -ID- ?

Result:


_hasbookmark    1 if the given album/playlist/currently
playing track has a bookmark, 0 otherwise
_isprebookmark  1 if the bookmark is "prebookmarked", 0
otherwise
_isfrozen               1 if the bookmark is frozen, 0
otherwise


BOOKMARKHISTORY LISTBOOKMARKS -INDEX- -QUANTITY- TAGS:UELAC EXTAGS:PTT

Lists bookmarks similar like "songinfo" lists tracks

Parameters:

-index-: Start with entry
-quantity-: Number of entries that are returned 

Tagged Parameters:

tags: Defines the properties that are listed for each bookmark (like the
same parameter in songinfo)
Default is 'uelac'

The following tags may be used:

u = URL
e = Album-ID
l = Album title
a = Artist title
c = Cover-ID


extags: Defines additional properties of bookmarks that are listed
Default is 'pT'

The following tags may be used:

p: Prebookmarked
t: Timestamp of bookmark
T: Date of bookmark


Result:


countTotal number of bookmarks


Bookmarks are listed as a loop, sorted by the value defined in the
settings, starting with the entry number given in _index and listing
_quantity number of entries
Each result consists (depending on the values of tags and extags) of:


artistContains artist if the bookmark is a bookmarked
local album, empty otherwise
timestampdateDate of bookmark as returned by
Slim::Utils::DateTime::shortDateF
timestampTimestamp of bookmark
album_idReturns the album-id if the bookmark references
an album
If the bookmarks references a playlist the returned string is
"playlist:PLAYLISTID" is where PLAYLISTID is the id of the playlist

urlURL of the bookmarked track in an album or
playlist
prebookmarked1 if the boookmark is "prebookmarked", 0
if it is a "real" bookmark
coveridCover-ID as used in the bookmarks
menu
albumTitle of the album / playlist



Here is an example (as a JSON return value) for a bookmarked album:


Code:
--------------------
    {
        "artist": "Lester Powell",
        "timestampdate": "27/10/16",
        "url": 
"file:///mnt/audio/daten1/H%C3%B6rspiel/H%C3%B6rspiel%20-%20Krimi/Powell,%20Lester/Die%20Dame%20im%20Schnee/07%20-%207%20-%20Die%20Dame%20im%20Schnee.mp3",
        "prebookmarked": "0",
        "album_id": "81669",
        "coverid": "f8809d8a",
        "album": "Die Dame im Schnee"
  }
--------------------

                        
and this is a bookmark for a playlist with remote tracks:


Code:
--------------------
    {
        "album_id": "playlist:667651",
        "prebookmarked": "0",
        "coverid": "-278255736",
        "album": "Die neuen Fälle - Fall 02: Professor van Dusen reitet das 
trojanische Pferd",
        "artist": "Professor van Dusen",
        "timestampdate": "06/09/16",
        "url": "spotify:track:6gnvO84sHXDNfuOMn0IEIg"
  }
--------------------


                        
BOOKMARKHISTORY REMOVEBOOKMARK -IDTYPE- -ID-[/B] 

REMOVES A BOOKMARK IF IT EXISTS. NOTE THAT IF THE PLAYER IS PLAYING THE
BOOKMARKED ALBUM/PLAYLIST IT MAY BE IMMEDIATLY ADDED AGAIN BY THE
BOOKMARK TRACKER.

FOR THIS REASON THERE ARE ALSO THE FOLLOWING TWO COMMANDS:

[B]BOOKMARKHISTORY REMOVEBOOKMARK REMOVEFROMPLAYLIST -IDTYPE- -ID-

dto. but also removes the playlist/album from the current playlist for
the given player

BOOKMARKHISTORY REMOVEBOOKMARK REMOVEFROMALLPLAYLISTS -IDTYPE--ID-

dto. but removes the playlist/album from the current playlist for all
players

BOOKMARKHISTORY ADDPREBOOKMARK -IDTYPE- -ID-

Adds a "pre-bookmark" for the given album/playlist/currently playing
track

BOOKMARKHISTORY ADDCURRENTPLAYING

Adds a bookmark for the currently played playlist or album. A bookmark
for a playlist is added if the current playlist is a saved playlist (i.
e. if it has a playlist-id).
For remote tracks a saved playlist is created from the "currently
playling" playlist and the playback is switched to this playlist 
This may work or not - depending on wether the remote service allows
repositioning.


BOOKMARKHISTORY UPDATEFROZEN -IDTYPE- -ID-

Updates a bookmark even if it is a "frozen" bookmark. Does nothing if
there is no bookmark

BOOKMARKHISTORY FREEZE -IDTYPE- -ID-

Freezes a bookmark if a bookmark exists. Does nothing if there is no
bookmark

BOOKMARKHISTORY UNFREEZE -IDTYPE- -ID-

Unfreezes a bookmark if a bookmark exists. Does nothing if there is no
bookmark


------------------------------------------------------------------------
sternenjaeger's Profile: http://forums.slimdevices.com/member.php?userid=57562
View this thread: http://forums.slimdevices.com/showthread.php?t=102859

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to