Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
[RELEASE] Media flags for external hdd storage
#1
Some basic media flags for external hdds, hopefully someone will find them useful Smile

Image

Download (HDD 01-99)

Image


I use them as replacement for video codec flag in Includes_MediaFlagsVideo.xml (you can replace whatever flag you don't need though).
Having them as flags is great because they are displayed in every view and you can quickly see hdd # where is selected media stored.

EXAMPLE:
You have your external HDD named EXT01

Code:
        <control type="image">
            <posx>136</posx>
            <posy>0</posy>
            <width>64</width>
            <height>48</height>
            <texture>flags/movies/storage/01.png</texture>
            <visible>substring(ListItem.Path,EXT01)</visible>
        </control>

... duplicate this code and change numbers for every external hdd you want to see in xbmc.

We're replacing code below with code above.
Code:
    <control type="image">
            <posx>136</posx>
            <posy>0</posy>
            <width>64</width>
            <height>48</height>
            <texture fallback="mediaflag-videocodec.png">flags/movies/videocodec/$INFO[ListItem.VideoCodec,,.png]</texture>
        </control>

Extract .zip to /media/flags/movies

LINUX
XBMC Linux builds mounts external hdds to /media/<hdd_name> so nothing else than changing the code in Includes_MediaFlagsVideo.xml is needed.

WINDOWS
It's little bit more complicated, because Windows mounts drives to letters.

There are two methods you can use:
1) Mount drives to folders. For example C:\_MOUNT\EXT01 then assign folder mounts in Disk Management

Control Panel - Administrative Tools - Computer Management - Storage - Disk Management - right Click to desired HDD partition - Change Drive Letter and Paths - Add... - Mount in the following empty NTFS folder - Browse - Select C:\_MOUNT\EXT01 - OK

From now on EXT01 HDD will always be mounted to C:\_MOUNT\EXT01 folder (also with default drive letter mount method) unless you change or remove it in Disk Management.
Then you select C:\_MOUNT\EXT01 folder as source in XBMC (instead of HDD drive letter)

2) If you don't want to mess with folder mounts you can have all media located in subfolder on your HDD.
For example instead of having external hdd media on drive E:\ move everything to EXT01 subfolder there (E:\EXT01) and select that as source in xbmc instead of E:\
With this method you can see media storage also in other skins, if they support showing Infolabel.Path when pressing INFO on selected media.
Reply
#2
I thanks for this trick...
anyway i've got a problem, i'm not sure where i'm wrong, if i add multiple code in the mediaflags.xml when i'm on a film in hd1 it shows me the right flag, but when i'm on a video that is for example in hd4 it shows me hd1 and also hd4 just on the right of the first...

this it's the part of the includes_mediaFlags.xml

<control type="image">
<description>Codec Image</description>
<width>70</width>
<height>60</height>
<aspectratio>keep</aspectratio>
<texture>flags/movies/storage/01.png</texture>
<visible>substring(ListItem.Path,Films)</visible>
<fadetime>MediaFlagsCrossfadeTime</fadetime>
<include condition="!Skin.HasSetting(WhiteMediaFlags)">ColoredMediaFlags</include>
</control>
<control type="image">
<description>Codec Image</description>
<width>70</width>
<height>60</height>
<aspectratio>keep</aspectratio>
<texture>flags/movies/storage/04.png</texture>
<visible>substring(ListItem.Path,HD_FILMS 4)</visible>
<fadetime>MediaFlagsCrossfadeTime</fadetime>
<include condition="!Skin.HasSetting(WhiteMediaFlags)">ColoredMediaFlags</include>
</control>

Hope that you can help me to find the solution. tnx and sorry for english

p.s. my skin is rapier qualar mod, i've seen that there's little differences from your config file...
regards


EDIT: resolved.... also have to add "/media/HD1" or "/media/HD2" in the <visible>substring(ListItem.Path,HD_FILMS 4)</visible> PATH

bye
Reply
#3
Laugh It looks great, thanks for icons
[Rpi3b+ (Archlinux+kodi) & Xbox One S + Kodi]
Reply
#4
I am really grateful for this, and I am going to get a lot of use from it, but I have a quick question..

ezechiel1917 Wrote:Extract .zip to /media/flags/movies

When you say this, which /media/ directory are you referring to? I've looked for one with /media/flags/movies and I can't find it.

Are you referring to the one in the individual skins? the one in my user path? Or the media folder where XBMC is actually installed?

I basically unzipped it to all of them, but then in trying to tweak my xml, I sort of made a mess out of XBMC, so I am not sure any of those are the right place (I was trying to make your suggestion work with the Aeon Nox skin lol)

Thanks,

F
Reply
#5
fional Wrote:I am really grateful for this, and I am going to get a lot of use from it, but I have a quick question..



When you say this, which /media/ directory are you referring to? I've looked for one with /media/flags/movies and I can't find it.

Are you referring to the one in the individual skins? the one in my user path? Or the media folder where XBMC is actually installed?

I basically unzipped it to all of them, but then in trying to tweak my xml, I sort of made a mess out of XBMC, so I am not sure any of those are the right place (I was trying to make your suggestion work with the Aeon Nox skin lol)

Thanks,

F

/media/flags/movies should be in skin.transparency folder. If you're using T! 3.11.5 the path doesn't exist, just create it and extract .zip file there.
Reply
#6
ezechiel1917 Wrote:/media/flags/movies should be in skin.transparency folder. If you're using T! 3.11.5 the path doesn't exist, just create it and extract .zip file there.

Thanks! This is a grand, again thanks for doing this! Smile
Reply
#7
Yeah! Thats what I was looking for! Thanks so much!

However could we improve the copy+paste mahem for each disk by a regex?
So that <visible> would contain a regex to fetch the number from the external drive "/media/HD(\d+)" and use the same regex in the texture too?

edit: it seems there is no such Boolean Compare function as regex. Maybe I should open a request on git for that?
Reply
#8
does anyone know how to do it with Aeon MQ4 ? I would like to replace the audio language icon by a custom icon if the movie is on an external HDD... i've messed around for a couple of hours trying to figure how to di it but i can't find how Sad
Reply
#9
In Aeon MQ4 just replace original language codes in MediaFurniture.xml. For example for external drives named EXT01 and EXT02 it should be:

Code:
    <!-- ######################################################################### Variable Audio Language ######################################################################### -->
    <variable name="Furniture_AudioLanguage">
<value condition="substring(ListItem.Path,EXT01)">HDD 01</value>
<value condition="substring(ListItem.Path,EXT02)">HDD 02</value>
    </variable>


then you will need to add custom font to Fonts.xml, otherwise HDD title flags will be truncated.

Code:
    <font>
    <name>Sml_Text_small2</name>
    <filename>aeon_menu.ttf</filename>
    <size>20</size>
    </font>

and change fonts before <label>$VAR[Furniture_AudioLanguage]</label> in MediaFurniture.xml. There are 2 occurences.

Code:
<font>Sml_Text_small</font>
to:
Code:
<font>Sml_Text_small2</font>

Don't forget to also change font in DialogVideoInfo.xml , Font_Time seems to be fit there.

Code:
<control type="label"><!-- Audio Language -->
        <height>45</height>
        <width>60</width>
        <align>center</align>
        <aligny>center</aligny>
        <colordiffuse>FFDDDDDD</colordiffuse>
    <font>Font_Time</font>
    <label>$VAR[Furniture_AudioLanguage]</label>
    <visible>!IsEmpty(ListItem.AudioLanguage)</visible>
  </control>

And that should be it Wink
Reply
#10
added some more flags (now 01-99) and updated download link in original post.
Reply
#11
hey thanks a lot !!!

2 more questions:

- Can i use a custom icon instead of text ?

- In Aeon MQ4 wall mode, each movie has its own media box. For example, dvd have grey media boxes and blurays have blue media boxes. Would it be possible to modify my skin so the medias on my external HDD appear with RED boxes so i could easily make the difference between local movies and external hdd movies
I'd use it for offline dvd scrumbs, it would be very wife-friendly to make the difference between normal movies and the ones burned into dvd. So if we want to watch a movie without having to search for the DVD, we would just need to avoid the red boxes.

I've been trying to find a solution to do that since so long Sad and this is very similar to what you are doing in this topic

Thanks a lot !
Reply
#12
(2013-05-08, 03:58)anarchoi Wrote: hey thanks a lot !!!

2 more questions:

- Can i use a custom icon instead of text ?

- In Aeon MQ4 wall mode, each movie has its own media box. For example, dvd have grey media boxes and blurays have blue media boxes. Would it be possible to modify my skin so the medias on my external HDD appear with RED boxes so i could easily make the difference between local movies and external hdd movies
I'd use it for offline dvd scrumbs, it would be very wife-friendly to make the difference between normal movies and the ones burned into dvd. So if we want to watch a movie without having to search for the DVD, we would just need to avoid the red boxes.

I've been trying to find a solution to do that since so long Sad and this is very similar to what you are doing in this topic

Thanks a lot !


Any idea ?? I'm willing to pay for this modification !! Just tell me how much you'd charge..
Reply
#13
Of course XBMC is highly configurable and anything is possible, given programming skills and willingness to almost write your own skin (that's why there is plenty of skins available) but the effort to pull this off; is hundreds if not thousands of hours (as is the case in T!) and I doubt you have the budget for that.. Keeping in mind that most of the effort in these forums is of a volunteer basis, and basically a labour of love. Most users don't mind giving a a bit of a helping hand to new users struggling, and answer a few questions to keep our sanity, but it's almost an insult to offer money for a specific modification when so many have given so much for free for years.

Now your issue: Given your goal you might want to re-think how the external library is handled and how you navigate your collection. Consider a separate profile, that only includes 'local' material and the entire collection. Another workaround is to use only Video (filemode) which has most of the capabilities of the movie mode, (the menu button of 'movies' can be hidden) and create icons for the different sources, so off-line or external files are indicated. A simple re-name of the files to indicate the status e.g. Starwars (2004 On the Second External) and then there's the usual ways of handling off-line files, using stubs. The 'filemode' method would seem ideal in your case, doesn't preclude you from using your library as a whole, and offers most of the capabilities if used in-combination with other techniques.

Modifying the media flags will work following the instructions but next update of the software will undoubtedly leave you doing this all over again unless you keep a differences file. I don't think a modification of the case colour would prove a fruitful direction to pursue, in the future there may be modifications of the program to help these issues, a posting in 'Feature Suggestions' might help.

A side note: donations to XBMC in general are always welcomed, a $50 or more gift will advance your cause much more and give a certain amount of seriousness to any and all your posts.
Reply
#14
Well it didn't look that hard to do... The Aeon skin has a feature to display a red media box for WEBTV files tagged with *.webtv in the filename....

I was thinking we could just edit this feature to display the red webtv media box for files tagged with external dvd stubs instead of *.webtv. Then i could just change the WEBTV icon in "Roaming\XBMC\addons\skin.aeonmq.4\media\flags\source" to something like "external dvd"

I just need to find out how and where the skin handles the tagging of webtv files... What file tells xbmc to use red media box for files tagged with .webtv ? I just need to edit this file to change the tag it is using for webtv boxes
Reply
#15
Tongue 
In the end... i've rename all my collection ...
I've try this method

(2013-05-07, 15:49)ezechiel1917 Wrote: In Aeon MQ4 just replace original language codes in MediaFurniture.xml. For example for external drives named EXT01 and EXT02 it should be:

Code:
    <!-- ######################################################################### Variable Audio Language ######################################################################### -->
    <variable name="Furniture_AudioLanguage">
<value condition="substring(ListItem.Path,EXT01)">HDD 01</value>
<value condition="substring(ListItem.Path,EXT02)">HDD 02</value>
    </variable>

For working the condition must be in reverse list:
Code:
<!-- ######################################################################### Variable Audio Language ######################################################################### -->
    <variable name="Furniture_AudioLanguage">
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 20)">HDD 20</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 19)">HDD 19</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 18)">HDD 18</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 17)">HDD 17</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 16)">HDD 16</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 15)">HDD 15</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 14)">HDD 14</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 13)">HDD 13</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 12)">HDD 12</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 11)">HDD 11</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 10)">HDD 10</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 9)">HDD 09</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 8)">HDD 08</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 7)">HDD 07</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 6)">HDD 06</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 5)">HDD 05</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 4)">HDD 04</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 3)">HDD 03</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 2)">HDD 02</value>
        <value condition="substring(ListItem.Path,BLURAY DISC Nº 1)">HDD 01</value>
    </variable>

This is the result:
Image
The result did not really like ...
I would prefer to use the first method you indicated (the one with the icon) maybe in addition (not instead of) the existing icons.
How in Aeon MQ4?
Reply

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Media flags for external hdd storage1
This forum uses Lukasz Tkacz MyBB addons.