Getting Album artist via CLI

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jkish
    Member
    • Nov 2008
    • 42

    Getting Album artist via CLI

    If I want to get the artist for an album and I have the album id, what is the best way to get the artist for that album (and other info like year, etc).

    I could use the albums command with the right tags, but that seems very wasteful in terms of the amount of data that would be sent from the server for large collections when I just want the info for one album.

    I could use songinfo and restrict to an album id and get the artist, year, etc there from one of the songs.

    What else?
  • pippin
    Senior Member
    • Oct 2007
    • 14809

    #2
    Originally posted by jkish
    If I want to get the artist for an album and I have the album id, what is the best way to get the artist for that album (and other info like year, etc).

    I could use the albums command with the right tags, but that seems very wasteful in terms of the amount of data that would be sent from the server for large collections when I just want the info for one album.

    I could use songinfo and restrict to an album id and get the artist, year, etc there from one of the songs.

    What else?
    albums album_id:xxx
    Doesn't that work?
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

    Comment

    • jkish
      Member
      • Nov 2008
      • 42

      #3
      Originally posted by pippin
      albums album_id:xxx
      Doesn't that work?
      It would be great if it did - I didn't try since the doc doesn't show it as a possibility. I'll try it and see. Thanks.

      Comment

      • jkish
        Member
        • Nov 2008
        • 42

        #4
        Originally posted by pippin
        albums album_id:xxx
        Doesn't that work?
        No dice on that - it seems to ignore the album_id setting.

        Any more ideas?

        How does iPeng handle that?

        Comment

        • pippin
          Senior Member
          • Oct 2007
          • 14809

          #5
          Originally posted by jkish
          No dice on that - it seems to ignore the album_id setting.

          Any more ideas?

          How does iPeng handle that?
          iPeng caches a table with album data for all albums so that's an internal lookup and I never just request that information for a single album.
          So I was indeed guessing, sounded too logical that it should be there.
          ---
          learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
          Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
          at penguinlovesmusic.com
          New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

          Comment

          • Michael Herger
            Babelfish's Best Boy
            • Apr 2005
            • 24653

            #6
            Getting Album artist via CLI

            >> albums album_id:xxx
            >
            > No dice on that - it seems to ignore the album_id setting.


            make this:

            albums 0 1 album_id:xyz

            albums et al. expect you to say how many items from which starting point
            you want. The above will give you starting from the first (index 0) 1
            album.

            Michael
            Michael

            "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
            (LMS: Settings/Information)

            Comment

            • jkish
              Member
              • Nov 2008
              • 42

              #7
              Originally posted by mherger
              >> albums album_id:xxx
              >
              > No dice on that - it seems to ignore the album_id setting.


              make this:

              albums 0 1 album_id:xyz

              albums et al. expect you to say how many items from which starting point
              you want. The above will give you starting from the first (index 0) 1
              album.

              Michael
              Yes, I tried it that way. Actually, the real command I sent was:

              albums 0 1 album_id:xyz tags:lajy

              It always returns the first album in the album list no matter what the value of xyz is set to.

              Comment

              • jkish
                Member
                • Nov 2008
                • 42

                #8
                Originally posted by pippin
                iPeng caches a table with album data for all albums so that's an internal lookup and I never just request that information for a single album.
                So I was indeed guessing, sounded too logical that it should be there.
                I tried that originally, but when I added 'a' to the tags on the albums command, the request started taking a huge amount of time. I was attempting to get all of the info for 250 albums at a time so maybe that is just too much data or something.

                Comment

                • pippin
                  Senior Member
                  • Oct 2007
                  • 14809

                  #9
                  Originally posted by jkish
                  I tried that originally, but when I added 'a' to the tags on the albums command, the request started taking a huge amount of time. I was attempting to get all of the info for 250 albums at a time so maybe that is just too much data or something.
                  No. SC is known to be slow on delivering albums with artist data. Hopefully New Schema in 7.4 will help with that.
                  I read chunks of 300 albums with quite a lot of data (ljywags) so from that POV it should be fine. Don't know about CLI performance, though.
                  I know 24.000 albums need 6 minutes on a fast system but through a remote connection. No idea whether iPhone slows things down due to own processing, though but I didn't have the impression that it does (simulator did take similar time).
                  ---
                  learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
                  Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
                  at penguinlovesmusic.com
                  New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

                  Comment

                  • jkish
                    Member
                    • Nov 2008
                    • 42

                    #10
                    Originally posted by pippin
                    No. SC is known to be slow on delivering albums with artist data. Hopefully New Schema in 7.4 will help with that.
                    I read chunks of 300 albums with quite a lot of data (ljywags) so from that POV it should be fine. Don't know about CLI performance, though.
                    I know 24.000 albums need 6 minutes on a fast system but through a remote connection. No idea whether iPhone slows things down due to own processing, though but I didn't have the impression that it does (simulator did take similar time).
                    Do you have a rough guess on how long the 300 album fetch takes?

                    I had a timeout set a 10 seconds and was hitting that when I was getting artist info with the albums command.

                    Comment

                    • pippin
                      Senior Member
                      • Oct 2007
                      • 14809

                      #11
                      Originally posted by jkish
                      Do you have a rough guess on how long the 300 album fetch takes?

                      I had a timeout set a 10 seconds and was hitting that when I was getting artist info with the albums command.
                      Depends entirely on the server. But can easily take longer than 10s, indeed. My impression is there's quite a bit of overhead involved, hence the large chunks.
                      ---
                      learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
                      Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
                      at penguinlovesmusic.com
                      New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

                      Comment

                      • jkish
                        Member
                        • Nov 2008
                        • 42

                        #12
                        Originally posted by pippin
                        Depends entirely on the server. But can easily take longer than 10s, indeed. My impression is there's quite a bit of overhead involved, hence the large chunks.
                        Sounds like I may have to load the whole list up in (small) pieces in the background in order to get the performance I need.

                        Comment

                        • Locuth
                          Senior Member
                          • Apr 2009
                          • 601

                          #13
                          Hi there

                          Have you considered querying 'the other way around'
                          artists 0 100 album_id:xyz

                          which of course is only usefull, if you need a single album's information rather than all album's.

                          Also, the artist for an album is not unique, is it?
                          The CLI manual states (depends on server configuration)
                          Use your PDA/Phone as SqueezeBox remote -- http://sc.sciatec.de

                          Comment

                          • jkish
                            Member
                            • Nov 2008
                            • 42

                            #14
                            Originally posted by Locuth
                            Hi there

                            Have you considered querying 'the other way around'
                            artists 0 100 album_id:xyz

                            which of course is only usefull, if you need a single album's information rather than all album's.

                            Also, the artist for an album is not unique, is it?
                            The CLI manual states (depends on server configuration)
                            Thought about that, but I need more info than just artist and I can't get some of the other info in the same way such as artwork track id etc. I ended up just using the albums command in small sizes in the background to build up the list I needed. That seems to work.

                            Comment

                            Working...