Media ID and MD5

hello.
i need to know that based on what information does xibo generate the ‘‘media id’’ for a Video ? is it MD5 ? if it is, then how does it generate them and where does it store them?

When you upload a new media file it will receive next available id in your CMS library it’s not based on md5.

ie let’s say your last media id is 10 then next uploaded media id will most likely have id 11, unless media id 11 was already in the CMS at some point and then was deleted then new media will have id 12.

Thanks for the reply but i meant the media id which is written in DATABASE>LAYOUT>XML.
for example : media id=“6e1b94673a29449ddf4407c0be563735”

If the media item is file based, then as Peter says, it’s database ordered.

If it’s a non-file based media then they are essentially random, but are recorded in the database. The IDs are all handled for you when working via the API.

As a side note - if you upgraded to a 1.8 CMS, the mediaId’s would represent the “widgetId” - which is database generated.

Thank you sir.
actually we wonna create a web site for our customers so that they could give us their content via the web site. then a media id must be generated for that specific media . this is where the problem comes up. xibo doesn’t recognize an id which is randomly generated by us the admins. what should i do to solve this issue ?
(i mean i need a media id which is automatically generated by any code generator which is recognizable by XIBO)
Thanks in advance

You interface with Xibo via the API rather than directly editing the database.

Tnx for the reply but i really need to know that based on what info does xibo generate those specific codes? It apearantly isnt MD5. So what is it? Is it just a randomly generated code Based on no specific thing ?

It seems to me you’re looking at the Media ID in a finalized Layout (at the player’s end), that’s not the right location to change anything (it will be overwritten by the program). You have to look at the Media or Widget tables (or use the API).

Those Layout MediaID seem to be somewhat randomly generated (probably based on a timestamp) because the ‘content’ of the widget could change which doesn’t necessitates the need to change the widget ID.

If you are changing the media of a widget in a particular layout, you have to use the API (or database) where each widget and each media item has it’s own unique ID.

1 Like

Got it !
Thank you so much for the info.i appreciate everyone’s support <3

In 1.7 they are randomly generated when you first create the widget, in 1.8 they are the auto_increment ID in the widget table.