API - LibraryMediaList shows retired Media

Hi

Why does the api
LibraryMediaList

also shows retired Media?

The 1.7 API didn’t ever leave “beta” so I would imagine you’ve found a bug. We would recommend developing any API applications in 1.8 going forwards.

Hi Dan

We have 1.7 in production
1.8 is still beta or not ?

Is there anyway to rename a media item through API 1.7.5 ?

1.8 is still in alpha and we do not have a timescale for release yet. The LibraryMediaEdit call in 1.7 should work, and it takes an id, name and duration.

Hi Dan

LibraryMediaEdit works now

thx for the quick reply!!!

Funny things happen when you testing…

How to delete a media item which is connected to a region:

First rename the media item:

params = [('mediaId',idMedia),
          ('name',newName),
          ('fileName',filenameMedia),
          ('duration', '9000')]

response, status, code, message, content = api.callMethod('LibraryMediaEdit', params)

then delete the item:
params = [(‘mediaId’,idMedia)]
response, status, code, message, content = api.callMethod(‘LibraryMediaDelete’, params)

Result : Item is gone!!!

That sounds like the expected result to me.

If you delete a media item from the Library (LibraryMediaDelete call) then it will delete from all the regions it’s in.

If you just want to delete it from a region then I think you want LayoutRegionMediaDelete if you just want it deleted from that one region.

Normally if the item is defined in a region, you can not delete it
Even if you first use :
params = [(‘mediaId’,idMedia)]
response, status, code, message, content = api.callMethod(‘LibraryMediaRetire’, params)

and then:
params = [(‘mediaId’,idMedia)]
response, status, code, message, content = api.callMethod(‘LibraryMediaDelete’, params)