Author Topic: Calling all graphic artists... Want to help finish the new playlist editor?  (Read 2736 times)

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
that is why I use Media Files Sync manually  and carefully (i'm sorry if I didn't convey that enough). It does bad things if the correct directory isn't selected.

So far, the playlist editor seems bug free. I'll wait a few days, and if I don't hear any different, I will close out the mantis tickets.
« Last Edit: July 08, 2008, 04:59:13 pm by jondecker76 »

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Ok, the final graphics are in for the vertical playlist editor layout (thankyou gbutters). It has been committed to SVN.
If you want to try it out, just svn update, and copy the charon-merge/web/pluto-admin/operations/mediaBrowser/images directory over as described here http://forum.linuxmce.org/index.php?topic=5666.0

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Calling all graphic artists... Want to help finish the new playlist editor?
« Reply #17 on: November 09, 2008, 03:19:04 am »
Jon - one piece of feedback, I believe that the query you use to retrieve potential media for the list to add from needs to filter out media entries that are marked as not-on-disk or that the device is offline.

I did a fair bit of editing to get rid of ' characters by renaming. Of course updatae media sees these as new files and the old was simply as missing from disk (until I get around to cleaning it all up) but the playlist editor shows them all, so there are many duplicates (many of which will cause the media plugin to stop playing the play list because they no longer exist)

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: Calling all graphic artists... Want to help finish the new playlist editor?
« Reply #18 on: November 09, 2008, 01:45:00 pm »
I get some time off of work in a couple of day, so this is one thing I will look into..  However, I don't think whether or not the media is available or on a mounted disk or not is stored as a flag in the database - and checking each db entry against actual files would take a lot of un-needed overhead. Simply put, making sure the files exist is handled by other parts of LMCE, and may be over-redundant to include such functionalitly in playlist building.

However, if there is some sort of "exists on disk" flag in the database, it may be feasible. Also, in my optinion, it would be best handled at the plugin level to fail safely if a file does not exist. This way, you can still add a file to your playlist that exists on a network share for example. When playing back, if that share is not available, then it should fail silently at the plugin level, and continue to the next playlist entry. This to me seems more flexable and a more proper way to do this.

Any thoughts on this?
« Last Edit: November 09, 2008, 01:47:30 pm by jondecker76 »

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Calling all graphic artists... Want to help finish the new playlist editor?
« Reply #19 on: November 09, 2008, 08:55:07 pm »
hmmmm I have a feeling there is that flag as I saw something recently that suggested it was being set. Also, in one of the SQL queries I was reading in a php (I think) somewhere it seemed to be explicitly excluding those files based on that attribute.... will take a look and see if I can find it again....

Edit:

This snip from mainMediaFilesSync.php might help, note the bold bit..

function dbonlyFilesList($path,$physicalFiles,$mediadbADO){
   // include language files
   include(APPROOT.'/languages/'.$GLOBALS['lang'].'/common.lang.php');   
   include(APPROOT.'/languages/'.$GLOBALS['lang'].'/mainMediaFilesSync.lang.php');
   $dpage=((int)@$_REQUEST['dpage']>0)?(int)$_REQUEST['dpage']:1;

   $queryDBFiles='
      SELECT DISTINCT File.*,count(FK_Picture) AS picsNo
      FROM File
      LEFT JOIN Picture_File ON FK_File=PK_File
      WHERE (Path="'.addslashes($path).'" OR Path="'.addslashes($path).'/'.'") AND Filename NOT IN ("'.join('","',array_map('addslashes',$physicalFiles)).'") AND Missing=1
      GROUP BY PK_File';
   $rs=$mediadbADO->_Execute($queryDBFiles);
   $dbFiles=array();
   $dbPKFiles=array();
   while($row=$rs->FetchRow()){
      $dbFiles[]=$row['Filename'];
      $dbPKFiles[]=$row['PK_File'];
      $dbPicsNoFiles[]=$row['picsNo'];
« Last Edit: November 09, 2008, 09:32:09 pm by colinjones »

golgoj4

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1046
  • hrumpf!
    • View Profile
    • La Smarthomes - SoCal smarthome site
Re: Calling all graphic artists... Want to help finish the new playlist editor?
« Reply #20 on: November 09, 2008, 09:13:33 pm »
In the 'file' table in pluto_media, there is a column called 'missing'. Maybe thats what you gents mean?
Those people who tell you not to take chances, they are all missing what life's all about.

Wiki Hardware Page http://wiki.linuxmce.org/index.php/User:Langstonius

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Calling all graphic artists... Want to help finish the new playlist editor?
« Reply #21 on: November 09, 2008, 09:35:19 pm »
In the 'file' table in pluto_media, there is a column called 'missing'. Maybe thats what you gents mean?

Thanks golgoj4 - that's where I was headed, just found a snip above using exactly that. The UpdateMedia log file indicates it is "marking" files as missing in some circumstances and I'm pretty sure it uses that. I think the Orbiter uses it to eliminate offline files. But as I say, I may be confused - not sure that missing files from online disks are the same as files unavailable because the entire disk is offline....